Creates a new Uint8Array sink with the given initial capacity.
Returns the byte at the given index.
The index. Negative indices references bytes from the end.
The found byte or undefined if out of bounds.
the current capacity. When size reaches this capacity then the internal buffer must grow.
the written bytes.
the number of bytes written.
Resets the sink so it can be used for another operation. This keeps the current capacity and reuses the same buffer so make sure you finished processing the previous data.
Rewinds the sink by the given number of bytes. The size shrinks accordingly but the capacity stays the same as before.
The number of bytes to remove from the end of the sink.
Writes the given chunk to the sink.
Chunk of data to write to the sink.
a promise if write operation is asynchronous, nothing when write operation is synchronous.
Sink which writes into a growing Uint8Array.