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
this
Writes a double (64 bit float).
Value to write
this
Finishes the write operation.
Finished buffer
Writes an unsigned 32 bit value as fixed 32 bits.
Value to write
this
Writes an unsigned 64 bit value as fixed 64 bits.
Value to write
this
Writes a float (32 bit).
Value to write
this
Forks this writer's state by pushing it to a stack. Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.
this
Writes a signed 32 bit value as a varint.
Value to write
this
Writes a signed 64 bit value as a varint.
Value to write
this
Resets to the last state and appends the fork state's current write length as a varint followed by its operations.
this
Resets this instance to the last state.
this
Writes a signed 32 bit value as fixed 32 bits.
Value to write
this
Writes a signed 64 bit value as fixed 64 bits.
Value to write
this
Writes a 32 bit value as a varint, zig-zag encoded.
Value to write
this
Writes a signed 64 bit value as a varint, zig-zag encoded.
Value to write
this
Writes a string.
Value to write
this
Writes an unsigned 32 bit value as a varint.
Value to write
this
Writes an unsigned 64 bit value as a varint.
Value to write
this
Allocates a buffer of the specified size.
Buffer size
Buffer
Creates a new writer.
A BufferWriter when Buffers are supported, otherwise a Writer
Generated using TypeDoc
Wire format writer using node buffers.