Skip to content
Chung Leong edited this page Jan 10, 2022 · 3 revisions

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.

Clone this wiki locally