the input buffer
Optional
byteOffset: numberoffset in the buffer
Optional
byteLength: numberlength of the buffer
Reads a 64-bit unsigned integer (biguint64) at the given byteOffset
The position in the file to read from
Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
The 64-bit unsigned integer as a bigint
Reads a 64-bit unsigned integer (biguint64) at the given byteOffset
The position in the file to read from
Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
The 64-bit unsigned integer as a bigint
Gets the Float16 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.
The place in the buffer at which the value should be retrieved.
Optional
littleEndian: booleanIf false or undefined, a big-endian value should be read.
Retrieves a 16-bit floating point number (Float16) at the specified byte offset from the start of the view. This method reads two bytes from the buffer, converts them into a 16-bit floating-point number, and returns the corresponding 32-bit floating-point representation.
The offset, in bytes, from the start of the DataView to read the value from.
Optional
littleEndian: booleanIf true, the value is read as little-endian. Otherwise, it's read as big-endian.
The converted 32-bit floating-point number (Float32) corresponding to the 16-bit value.
Reads a 32-bit floating-point number (float32) at the given byteOffset
The position in the file to read from
Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
The 32-bit floating-point number as a number
Reads a 64-bit floating-point number (float64) at the given byteOffset
The position in the file to read from
Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
The 64-bit floating-point number as a number
Reads a signed 16-bit integer (int16) at the given byteOffset
The position in the file to read from
Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
The 16-bit signed integer value as a number
Reads a signed 32-bit integer (int32) at the given byteOffset
The position in the file to read from
Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
The 32-bit signed integer value as a number
Reads a signed byte (int8) at the given byteOffset
The position in the file to read from
The byte value as a signed number
Reads a range from the buffer
the offset of the range
the length of the range
Reads an unsigned 16-bit integer (uint16) at the given byteOffset
The position in the file to read from
Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
The 16-bit unsigned integer value as a number
Reads an unsigned 32-bit integer (uint32) at the given byteOffset
The position in the file to read from
Optional, specifies if the value is stored in little-endian format. Defaults to false (big-endian).
The 32-bit unsigned integer value as a number
Reads a single byte at the given byteOffset
The position in the file to read from
The byte value as a number
Reads a string from the buffer
Start of the string
Length of the string
Set the current position of the cursor
where to adjust the current cursor
Fetch a slice at the current cursor position. The cursor is updated
size of the slice
Stores an Float16 value at the specified byte offset from the start of the view.
The place in the buffer at which the value should be set.
The value to set.
Optional
littleEndian: booleanIf false or undefined, a big-endian value should be written.
Stores a 16-bit floating point number (Float16) at the specified byte offset in the DataView. This method converts a 32-bit floating-point number (Float32) to a 16-bit floating-point representation, then writes the resulting 16-bit value into the buffer at the specified offset.
The offset, in bytes, at which to store the value.
The 32-bit floating-point number (Float32) to be converted and stored as Float16.
Optional
littleEndian: booleanIf true, the value is stored as little-endian. Otherwise, it's stored as big-endian.
Set the text decoder's encoding
update the text decoder's encoding
Get a slice of the buffer
beginning of the slice
end of the slice. If not provided, the end of the data is used
A buffer reader is an extension of a DataView with some extra methods