ArrayBuffer to read from.
Offset from arrayBuffer beginning for the KaitaiStream.
Virtual byte length of the KaitaiStream backing buffer. Updated to be max of original buffer size and last written size. If dynamicSize is false is set to buffer size.
Number of bits left (when read bit by bit instead of bytes)
Native endianness. Either KaitaiStream.BIG_ENDIAN or KaitaiStream.LITTLE_ENDIAN depending on the platform endianness.
Set/get the backing ArrayBuffer of the KaitaiStream object. The setter updates the DataView to point to the new buffer.
Set/get the backing ArrayBuffer of the KaitaiStream object. The setter updates the DataView to point to the new buffer.
Set/get the byteOffset of the KaitaiStream object. The setter updates the DataView to point to the new byteOffset.
Set/get the byteOffset of the KaitaiStream object. The setter updates the DataView to point to the new byteOffset.
Set/get the backing DataView of the KaitaiStream object. The setter updates the buffer and byteOffset to point to the DataView values.
Set/get the backing DataView of the KaitaiStream object. The setter updates the buffer and byteOffset to point to the DataView values.
Returns the byte length of the KaitaiStream object.
Internal function to trim the KaitaiStream buffer when required. Used for stripping out the extra bytes from the backing buffer when the virtual byteLength is smaller than the buffer byteLength (happens after growing the buffer with writes and not filling the extra space completely).
Returns true if the KaitaiStream seek pointer is at the end of buffer and there's no more data to read.
True if the seek pointer is at the end of the buffer.
Maps a Uint8Array into the KaitaiStream buffer. Nice for quickly reading in data.
Number of elements to map.
Uint8Array to the KaitaiStream backing buffer.
Reads an 8-bit signed int from the stream.
The read number.
Reads a 16-bit big-endian signed int from the stream.
The read number.
Reads a 16-bit little-endian signed int from the stream.
The read number.
Reads a 32-bit big-endian signed int from the stream.
The read number.
Reads a 32-bit little-endian signed int from the stream.
The read number.
Reads a 64-bit big-endian unsigned int from the stream. Note that JavaScript does not support 64-bit integers natively, so it will automatically upgrade internal representation to use IEEE 754 double precision float.
The read number.
Reads a 64-bit little-endian unsigned int from the stream. Note that JavaScript does not support 64-bit integers natively, so it will automatically upgrade internal representation to use IEEE 754 double precision float.
The read number.
Read unsigned
Reads an 8-bit unsigned int from the stream.
The read number.
Reads a 16-bit big-endian unsigned int from the stream.
The read number.
Reads a 16-bit little-endian unsigned int from the stream.
The read number.
Reads a 32-bit big-endian unsigned int from the stream.
The read number.
Reads a 32-bit little-endian unsigned int from the stream.
The read number.
Reads a 64-bit big-endian unsigned int from the stream. Note that JavaScript does not support 64-bit integers natively, so it will automatically upgrade internal representation to use IEEE 754 double precision float.
The read number.
Reads a 64-bit little-endian unsigned int from the stream. Note that JavaScript does not support 64-bit integers natively, so it will automatically upgrade internal representation to use IEEE 754 double precision float.
The read number.
Sets the KaitaiStream read/write position to given position. Clamps between 0 and KaitaiStream length.
Position to seek to.
Creates an array from an array of character codes. Uses String.fromCharCode in chunks for memory efficiency and then concatenates the resulting string chunks.
Array of character codes.
String created from the character codes.
Dependency configuration data. Holds urls for (optional) dynamic loading
of code dependencies from a remote server. For use by (static) processing functions.
Caller should the supported keys to the asset urls as needed.
NOTE: depUrls
is a static property of KaitaiStream (the factory),like the various
processing functions. It is NOT part of the prototype of instances.
Generated using TypeDoc
KaitaiStream is an implementation of Kaitai Struct API for JavaScript. Based on DataStream - https://github.com/kig/DataStream.js