Begin writing a new length & tag message.
The tag of the message.
The writer.
const writer = HazelWriter.alloc(4);
writer.begin(5);
writer.uint8(0x45);
writer.end();
Write a true or false value.
The value to write.
The writer.
Write a single unsigned byte.
The value to write. (Between 0 and 255 inclusive.)
The writer.
Write non-length-prefixed bytes.
The bytes to write to the buffer.
The writer.
const writer = HazelWriter.alloc(5);
writer.bytes("Hello");
Clone the message writer to a new writer with a separate buffer.
The new message writer.
Check whether two hazel buffers contain the same information.
The other hazel writer to check.
Whether or not the hazel writers are the same.
End writing an opened message.
The writer.
const writer = HazelWriter.alloc(4);
writer.begin(5);
writer.uint8(0x45);
writer.end();
Expand the writer by the number of bytes required to write a value. Won't reallocate if there are enough bytes remaining.
The number of bytes required to write a value.
The writer.
Write an IEEE 754 floating point number.
The value to write.
The writer.
Move the cursor to a position.
The position to move to.
The writer.
Write a signed 16-bit integer value.
The value to write. (Between -32767 and 32767 inclusive.)
The writer.
Write a signed 32-bit integer value.
The value to write. (Between -2147483647 and 2147483647 inclusive.)
The writer.
Write a signed 64-bit integer value.
The value to write. (Between -2147483647 and 2147483647 inclusive.)
The writer.
Write a signed 8-bit integer value.
The value to write. (Between -127 and 127 inclusive.)
The writer.
Write a list of serializable objects to the writer.
The writer.
Reallocate the the number of bytes in the writer.
The size to reallocate to.
The writer.
Write a single signed byte.
The value to write. (Between -127 and 127 inclusive.)
The writer.
Write an unsigned 16-bit integer value.
The value to write. (Between 0 and 65535 inclusive.)
The writer.
Write an unsigned 32-bit integer value.
The value to write. (Between 0 and 4294967295 inclusive.)
The writer.
Write an unsigned 64-bit integer value.
The value to write. (Between 0 and 18446744073709552000 inclusive.)
The writer.
Write an unsigned 8-bit integer value.
The value to write. (Between 0 and 255 inclusive.)
The writer.
Write a vector position into 2 16 bit integers.
The position to write.
The writer.
Write a serializable object to the writer.
The writer.
Static
allocAllocate a message writer with a buffer of the specified number of bytes.
The number of bytes to allocate.
The message writer writing to the allocated bytes.
Protected
Static
checkOptional
bounds: IntegerBoundary
The buffer that the writer or reader is targeting.