unpack_le - chung-leong/qb GitHub Wiki

unpack_le - Unpack a little-endian number

number unpack_le(uint8[] $bytes[, uint32 $offset[, uint32 $type]])

unpack_le() unpacks a little-endian integer or floating stored in a byte array.

Parameters:

bytes - The byte array containing the number.

offset - The byte offset to start reading from. If omitted, it's assumed to be zero.

type - A constant indicating the type. It can be int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, or float64. If omitted, the compiler will determine the type from the context (i.e. from the variable to which the return value is assigned).

Return Value:

A unpacked number.

Version

1.0 and above.