Current number of bytes in the writer.
Length in bytes.
When outputting with console.log('%O', this) or at the node REPL,
see the current chunk structure.
Current depth.
Options for writing, generated by util.inpect.
Local copy of util.inspect, so there is no node dependency.
Formatted string.
Clear all of the existing data.
This, for chaining.
Write an eight-byte integer.
Double.
This, for chaining.
Write a signed two-byte integer.
Signed short int.
This, for chaining.
Write a signed four-byte integer.
Signed int.
This, for chaining.
Write an eight-byte signed integer.
Signed long long.
This, for chaining.
Write a signed byte.
Signed byte.
This, for chaining.
Read the current contents of the writer as a single buffer, but does not clear the current contents. This has a side effect, which is to coalesce multiple chunks into a single chunk, making subsequent read() and peek() operations a little faster. Note: there is no need to call peek() before read() for performance, read() does the same coalescing, then throws away the result.
Current contents of the writer.
Destructively read all bytes from the writer as a single buffer. Could take some time if there are lots of chunks.
Bytes.
Write a two-byte unsigned integer.
Unsigned short int.
This, for chaining.
Write a four-byte unsigned integer.
Unsigned int.
This, for chaining.
Write an eight-byte unsigned integer.
Unsigned long long.
This, for chaining.
Write a single unsigned byte.
Byte.
This, for chaining.
Encode the string as UTF8.
String. If there are unpaired surrogates, they will be switched to the replacement character.
This, for chaining.
Write an arbitrarily-large amount of data to the writer. If this buffer is larger than chunkSize, it is appended directly -- see the copyBuffers option for what should happen in this case. If the buffer is less than the chunkSize + 8 bytes, the buffer is always copied, since it might be worth writing some more data into that same chunk later.
Bytes to write.
Override the copyBuffers option if specified.
This, for chaining.
Write bytes to a growing buffer. Intended for relatively-small final buffer sizes; everything is held in memory.