Skip to content

ntcore-ts / @ntcore-ts/client / unpack

Function: unpack()

unpack(buffer, descriptor): StructPlainObject

Defined in: struct/struct-codec.ts:11

Unpacks a little-endian binary buffer into a plain object using the struct descriptor.

Parameters

buffer

Uint8Array

descriptor

StructDescriptor

Returns

StructPlainObject

Throws

Error if buffer is too small for the descriptor size.

Released under the MIT License.