Structure constructor.
Allocates a new Buffer
of baseSize bytes and uses that as the underlying buffer
Each instantiated instance has a hidden field $raw
.
Use the static method YourStructureName.raw(instance)
to access the underlying buffer.
fake field __struct
is only used as a type guard and should not be used
Structure constructor.
Allocates a new Buffer
of size
bytes and uses that as the underlying buffer
Size must be at least baseSize
fake field __struct
is only used as a type guard and should not be used
Structure constructor.
use this buffer as an underlying. Buffer length must be at least baseSize
create a copy of raw
to store changes
fake field __struct
is only used as a type guard and should not be used
Structure constructor.
Allocates a new Buffer
using an array
of bytes in the range 0 – 255 and uses that as
the underlying buffer
fake field __struct
is only used as a type guard and should not be used
The minimum base size of the structure.
Prototype
Returns the offset in bytes from the beginning of the structure of the specified field
The field name
Returns an object where each property stores its offset
Returns the underlying buffer if the object is a typed structure
the object from which to get the underlying buffer
swaps the byte order to perform a fast in-place conversion between little-endian and big-endian
the object
property name
Generated using TypeDoc
A ready-made constructor with static methods for a custom structure