Construct new stream. Relatively lightweight, creating a new DataView over the Uint8Array's ArrayBuffer is the heaviest part.
Bytes to read.
Options.
Current offset.
Current.
Original bytes.
Original.
When outputting with console.log('%O', this) or at the node REPL,
see the current chunk structure.
Current depth.
Options for writing, generated by util.inpect.
Local copy of util.inspect, so there is no node dependency.
Formatted string.
Get a chunk of the buffer as 8-bit ASCII text. This is only useful for ancient protocols such as DNS. If the top bit is set, you get equivalent Unicode characters, which should be Latin-1.
Advances the current read position by length bytes.
Number of bytes.
String.
Get a chunk of the original buffer.
Advances the current read position by length bytes.
How many bytes?
A subarray of the original buffer, without copying.
Get a half-precision floating point number. On older JS runtimes, uses a local implementation of f16.
Advances the current read position by 2 bytes.
Number.
Get a single-precision floating point number.
Advances the current read position by 4 bytes.
Number.
Get a double-precision floating point number.
Advances the current read position by 8 bytes.
Number.
Get a two-byte signed integer. Advances the current read position by 2 bytes.
Number.
Get a four-byte signed integer. Advances the current read position by 4 bytes.
Number.
Get a eight-byte signed integer. Advances the current read position by 8 bytes.
Bigint.
Get a signed byte. Advances the current read position by 1 byte.
Number.
Reset to the beginning of the input. Ignores the initial offset, so if you want to restart at the same place, call seek(initialOffset).
Go to a particular offset in the buffer.
The new offset.
Get a two-byte unsigned integer. Advances the current read position by 2 bytes.
Number.
Get a four-byte unsigned integer. Advances the current read position by 4 bytes.
Number.
Get an eight-byte unsigned integer. Advances the current read position by 8 bytes.
Bigint, since 264 > 253.
Get an unsigned byte. Advances the current read position by 1 byte.
Number.
Read a number of bytes as a UTF-8 encoded string. Use the ignoreUTF8errors option to avoid throwing exceptions on invalid UTF-8 and get replacement characters instead. However, by default, Postel was wrong.
Advances the current read position by length bytes.
Number of bytes.
Unicode string.
Treat a Uint8Array as a stream to read typed data from, sequentially. Note that this is not an actual ReadableStream in either the nodejs sense or the web sense.