ByteWriter is a convenient way to combine bytes into Uint8Array.
Creates a new ByteWriter with the optional initial capacity.
Returns the current total length of byte array.
Returns the resulting byte array.
Resets position.
ByteWriter is a convenient way to combine bytes into Uint8Array.