Optional
context: ContextCreates a sub-buffer that can be written into later to insert data into the middle of the array.
.close()
must be called after the cursor is done being written into.
The cursor should not be used after .close()
is called.
If the cursor will be written into asynchronously, the buffer must be held open with .waitFor()
.
Consumes length
allocated bytes without writing anything, and returns the skipped subarray.
Anything written into the returned array will not affect the buffer,
except if it is later reincorporated e.g. via .insertArray()
.
Rather niche.
Invokes the callback once buffer's async tasks finish, and holds this buffer open until the callback returns.
Creates a sub-buffer that can be written into asynchronously. The buffer passed to the callback should not be used after the returned promise resolves.
Creates a new EncodeBuffer with a specified initial size/buffer