NodeBufferInstance
A base implementation for the Node.js BufferInstance API, serving as a template for Buffer instances without specifying the backing ArrayBuffer
value.
Inheritors
Properties
Returns the backing ArrayBuffer
for this buffer instance. The byteOffset indicates the index of this backing value at which the view represented by this Buffer begins.
The index in the backing buffer at which this view starts.
The number of bytes exposed from the backing buffer, starting at byteOffset.
Functions
Returns an iterable value which yields, for every byte in the buffer, an array with the index as the first element and the byte as a second element.
Returns the byte index of the first occurrence of value in the buffer after byteOffset, or -1 if it is not found. The value may be a number (coerced into byte size), a string, another buffer, or a Uint8Array. The encoding will be used for string values if available.
Returns an iterable value which yields the buffer's keys (indices).
Returns the byte index of the last occurrence of value in the buffer after byteOffset, or -1 if it is not found. The value may be a number (coerced into byte size), a string, another buffer, or a Uint8Array. The encoding will be used for string values if available.
Read a 64-bit integer from the buffer using the Big Endian byte order, optionally at an offset.
Read a 64-bit integer from the buffer using the Little Endian byte order, optionally at an offset.
Read a 64-bit unsigned integer from the buffer using the Big Endian byte order, optionally at an offset.
Read a 64-bit unsigned integer from the buffer using the Little Endian byte order, optionally at an offset.
Read a 64-bit double-precision floating point value from the buffer using the Big Endian byte order, optionally at an offset.
Read a 64-bit double-precision floating point value from the buffer using the Little Endian byte order, optionally at an offset.
Read a 32-bit floating point value from the buffer using the Big Endian byte order, optionally at an offset.
Read a 32-bit floating point value from the buffer using the Little Endian byte order, optionally at an offset.
Read a 16-bit integer from the buffer using the Big Endian byte order, optionally at an offset.
Read a 16-bit integer from the buffer using the Little Endian byte order, optionally at an offset.
Read a 32-bit integer from the buffer using the Big Endian byte order, optionally at an offset.
Read a 32-bit integer from the buffer using the Little Endian byte order, optionally at an offset.
Read a 16-bit unsigned integer from the buffer using the Big Endian byte order, optionally at an offset.
Read a 16-bit unsigned integer from the buffer using the Little Endian byte order, optionally at an offset.
Read a 32-bit unsigned integer from the buffer using the Big Endian byte order, optionally at an offset.
Read a 32-bit unsigned integer from the buffer using the Little Endian byte order, optionally at an offset.
Read an unsigned integer with the specified byteLength (in bytes, up to 6 bytes/48 bits) using the Big Endian byte order, at the given offset.
Read an unsigned integer with the specified byteLength (in bytes, up to 6 bytes/48 bits) using the Little Endian byte order, at the given offset.
Returns a new Buffer instance as a view of this buffer's contents in the given range. Updates to this buffer's data are visible to the returned instance.
Interpret this buffer as containing only 16-bit integers and swap their byte order in-place. If the buffer's byte length is not a multiple of 2, an error will be thrown.
Interpret this buffer as containing only 32-bit integers and swap their byte order in-place. If the buffer's byte length is not a multiple of 4, an error will be thrown.
Interpret this buffer as containing only 64-bit integers and swap their byte order in-place. If the buffer's byte length is not a multiple of 8, an error will be thrown.
Returns a JSON object representation of this buffer, with the data rendered into an array of byte values.
Returns an iterable value which yields the buffer's byte values.
Write an 64-bit signed integer to the buffer at an offset using Big Endian order.
Write an 64-bit signed integer to the buffer at an offset using Little Endian order.
Write an 64-bit unsigned integer to the buffer at an offset using Big Endian order.
Write an 64-bit unsigned integer to the buffer at an offset using Little Endian order.
Write a 64-bit double-precision floating point value from the buffer using the Big Endian byte order, optionally at an offset.
Write a 64-bit double-precision floating point value from the buffer using the Little Endian byte order, optionally at an offset.
Write a 32-bit floating point value from the buffer using the Big Endian byte order, optionally at an offset.
Write a 32-bit floating point value from the buffer using the Little Endian byte order, optionally at an offset.
Write an 16-bit signed integer to the buffer at an offset using Big Endian order.
Write an 16-bit signed integer to the buffer at an offset using Little Endian order.
Write an 32-bit signed integer to the buffer at an offset using Big Endian order.
Write an 32-bit signed integer to the buffer at an offset using Little Endian order.
WRite an integer with the specified byteLength (in bytes, up to 6 bytes/48 bits) using the Big Endian byte order, at the given offset.
Read an integer with the specified byteLength (in bytes, up to 6 bytes/48 bits) using the Little Endian byte order, at the given offset.
Write an 16-bit unsigned integer to the buffer at an offset using Big Endian order.
Write an 16-bit unsigned integer to the buffer at an offset using Little Endian order.
Write an 32-bit unsigned integer to the buffer at an offset using Big Endian order.
Write an 32-bit unsigned integer to the buffer at an offset using Little Endian order.
Write an 8-bit unsigned integer to the buffer at an offset.
Read an unsigned integer with the specified byteLength (in bytes, up to 6 bytes/48 bits) using the Big Endian byte order, at the given offset.
Read an unsigned integer with the specified byteLength (in bytes, up to 6 bytes/48 bits) using the Little Endian byte order, at the given offset.