The number of bytes to allocate.
The message writer writing to the allocated bytes.
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");
Write a single utf8 char.
The value to write.
The writer.
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.
Skip a speciied number of bytes.
The writer.
Write an object list from the buffer.
The length of the list.
The function accepting a single reader to use for reading data.
The writer.
Write a list of serializable objects to the writer.
The objects to write.
The writer.
Write a signed variable-sized integer.
The value to write.
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 a packed int length-prefixed string.
The string to write.
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 an unsigned variable-size integer.
The value to write.
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 object to write.
The writer.
The buffer that the writer or reader is targeting.
The current position of the writer or reader.
The number of bytes left in the writer or reader.
The size of the buffer that the writer or reader is targeting.
Generated using TypeDoc
Allocate a message writer with a buffer of the specified number of bytes.