Wire format writer using node buffers.
Constructs a new buffer writer instance.
Operations head.
Current length.
Linked forked states.
Operations tail
Writes a boolish value as a varint.
Value to write
this
Writes a sequence of bytes.
Buffer or base64 encoded string to write
Writes a double (64 bit float).
Finishes the write operation.
Finished buffer
Writes an unsigned 32 bit value as fixed 32 bits.
Writes an unsigned 64 bit value as fixed 64 bits.
If value is a string and no long library is present.
value
Writes a float (32 bit).
Forks this writer's state by pushing it to a stack. Calling reset or ldelim resets the writer to the previous state.
Writes a signed 32 bit value as a varint.
Writes a signed 64 bit value as a varint.
Resets to the last state and appends the fork state's current write length as a varint followed by its operations.
Resets this instance to the last state.
Writes a signed 32 bit value as fixed 32 bits.
Writes a signed 64 bit value as fixed 64 bits.
Writes a 32 bit value as a varint, zig-zag encoded.
Writes a signed 64 bit value as a varint, zig-zag encoded.
Writes a string.
Writes an unsigned 32 bit value as a varint.
Writes an unsigned 64 bit value as a varint.
Static
Allocates a buffer of the specified size.
Buffer size
Buffer
Creates a new writer.
A BufferWriter when Buffers are supported, otherwise a Writer
Wire format writer using node buffers.