Creates a new BinaryWriter with pre-allocated capacity.
Total bytes to allocate
Get the current write offset.
Get the buffer trimmed to actual used size.
Write a 32-bit signed integer (little-endian).
Integer value to write
This RawBinaryWriter for chaining
Write a 32-bit float (little-endian).
Float value to write
This RawBinaryWriter for chaining
Write raw bytes from an ArrayBuffer.
ArrayBuffer to write
This RawBinaryWriter for chaining
Write raw string bytes without length prefix.
String to write
This RawBinaryWriter for chaining
Write a typed array (Int32Array, Float32Array, etc.).
Typed array to write
This RawBinaryWriter for chaining
BinaryWriter class for efficiently writing multiple data types to a pre-allocated buffer. Encodes everything using default system endinanness.