Create a factory for the structure with the specified default name if given. This name can be changed when calling the method default.compile
defines a single-byte binary-coded decimal
The field name or aliases
The fixed value
defines a BigInt64Array
typed array represents an array of 64-bit signed
integers.
The field name or aliases
the number of elements
defines a signed, big-endian 64-bit integer field
The field name or aliases
The fixed value
defines a signed, little-endian 64-bit integer field
The field name or aliases
The fixed value
defines a BigUint64Array
typed array represents an array of 64-bit unsigned
integers.
The field name or aliases
the number of elements
defines an unsigned, big-endian 64-bit integer field
The field name or aliases
The fixed value
defines an unsigned, little-endian 64-bit integer field
The field name or aliases
The fixed value
defines a 16-bit boolean field
The field name or aliases
The fixed value
defines a 32-bit boolean field
The field name or aliases
The fixed value
defines an 8-bit boolean field
The field name or aliases
The fixed value
defines a buffer field of length
bytes
The field name or aliases
The desired length of the Buffer
The last two bytes in the structure storing unsigned, big-endian 16-bit integer usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
The last two bytes in the structure storing unsigned, big-endian 16-bit integer usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
checksum function
initial value, default 0.
The last two bytes in the structure storing unsigned, big-endian 16-bit integer usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
checksum function parameters
The last two bytes in the structure storing unsigned, little-endian 16-bit integer usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
The last two bytes in the structure storing unsigned, little-endian 16-bit integer usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
checksum function
initial value, default 0.
The last two bytes in the structure storing unsigned, little-endian 16-bit integer usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
checksum function parameters
The last four bytes in the structure storing unsigned, big-endian 32-bit integer usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
The last four bytes in the structure storing unsigned, big-endian 32-bit integer usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
checksum function
initial value, default 0.
The last four bytes in the structure storing unsigned, big-endian 32-bit integer usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
checksum function parameters
The last four bytes in the structure storing unsigned, little-endian 32-bit integer usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
The last four bytes in the structure storing unsigned, little-endian 32-bit integer usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
checksum function
initial value, default 0.
The last four bytes in the structure storing unsigned, little-endian 32-bit integer usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
checksum function parameters
The last byte in the structure, usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
The last byte in the structure, usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
checksum function
initial value, default 0.
The last byte in the structure, usually used as a checksum. Typically, used for variable length structures.
The field name or aliases
checksum function parameters
defines a field with a custom getter and setter
The field name or aliases
The field size
a function which serves as a getter for the property, or undefined if there is no getter.
a function which serves as a setter for the property, or undefined if there is no setter.
defines a Float32Array
typed array represents an array of 32-bit floating numbers.
The field name or aliases
the number of elements
defines a 32-bit, big-endian float field
The field name or aliases
The fixed value
defines a 32-bit, little-endian float field
The field name or aliases
The fixed value
defines a Float64Array
typed array represents an array of 64-bit floating numbers.
The field name or aliases
the number of elements
defines a 64-bit, big-endian float field
The field name or aliases
The fixed value
defines a 64-bit, little-endian float field
The field name or aliases
The fixed value
defines a Int16Array
typed array represents an array of twos-complement 16-bit signed
integers.
The field name or aliases
the number of elements
defines a signed, big-endian 16-bit integer field
The field name or aliases
The fixed value
defines a signed, little-endian 16-bit integer field
The field name or aliases
The fixed value
defines a Int32Array
typed array represents an array of twos-complement 32-bit signed
integers.
The field name or aliases
the number of elements
defines a signed, big-endian 32-bit integer field
The field name or aliases
The fixed value
defines a signed, little-endian 32-bit integer field
The field name or aliases
The fixed value
defines a signed, 8-bit integer field
The field name or aliases
The fixed value
defines a Int8Array
typed array represents an array of twos-complement 8-bit signed
integers.
The field name or aliases
the number of elements
defines a tailed string field
The field name or aliases
defines a string field of length
bytes
The field name or aliases
The byte length of a string
defines an encoded string field
The field name or aliases
The encoding of string. Default: utf8
.
To use the full set of encodings install
iconv-lite package
defines an encoded string field of length
bytes
The field name or aliases
The byte length of a string
The encoding of string. Default: utf8
.
To use the full set of encodings install
iconv-lite package
defines an encoded string field of length
bytes
The field name or aliases
The encoding of string. Default: utf8
.
To use the full set of encodings install
iconv-lite package
The byte length of a string
defines a string field
The field name or aliases
The string options
defines a string array field
The field name or aliases
The string array options
The encoding of string
. Default: utf8
.
To use the full set of encodings install
iconv-lite package
the number of rows in the string array
defines a nested structure
The field name or aliases
structure factory
defines an array of elements of a typed struct
The field name or aliases
The custom typed struct
the number of elements
defines a Uint16Array
typed array represents an array of 16-bit unsigned integers.
The field name or aliases
the number of elements
defines an unsigned, big-endian 16-bit integer field
The field name or aliases
The fixed value
defines an unsigned, little-endian 16-bit integer field
The field name or aliases
The fixed value
defines a Uint32Array
typed array represents an array of 32-bit unsigned integers.
The field name or aliases
the number of elements
defines an unsigned, big-endian 32-bit integer field
The field name or aliases
The fixed value
defines an unsigned, little-endian 32-bit integer field
The field name or aliases
The fixed value
defines an unsigned, 8-bit integer field
The field name or aliases
The fixed value
defines a Uint8Array
typed array represents an array of 8-bit unsigned integers.
The field name or aliases
the number of elements
Align the current pointer to a two-byte boundary
Align the current pointer to a four-byte boundary
Align the current pointer to an eight-byte boundary
Move the current pointer in the buffer to the offset of the property that was N steps back.
the number of steps back, if the value is 0 then the pointer will point to the beginning of the buffer
Create structure constructor
The constructor name
Returns the offset in bytes from the beginning of the structure of the specified field
The field name or aliases
Returns an object where each property stores its offset
The current size of the structure in bytes
Skip the specified number of bytes. If the value is negative, the pointer in the buffer will move backward, if the value is 0 then the pointer will point to the end of the current buffer.
Returns the underlying buffer of the structure
Generated using TypeDoc
Factory of structures. You can define your data structure by chaining the appropriate method calls.