Allocates a new buffer containing the given {str}.
String to store in buffer.
encoding to use, optional. Default is 'utf8'
Allocates a new buffer of {size} octets.
count of octets to allocate.
Allocates a new buffer containing the given {array} of octets.
The octets to store.
Produces a Buffer backed by the same allocated memory as the given {ArrayBuffer}/{SharedArrayBuffer}.
The ArrayBuffer with which to share memory.
Allocates a new buffer containing the given {array} of octets.
The octets to store.
Copies the passed {buffer} data onto a new {Buffer} instance.
The buffer to copy.
This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified.
Allocates a new buffer of {size} octets.
count of octets to allocate.
if specified, buffer will be initialized by calling buf.fill(fill). If parameter is omitted, buffer will be filled with zeros.
encoding used for call to buf.fill while initalizing
Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents of the newly created Buffer are unknown and may contain sensitive data.
count of octets to allocate
Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents of the newly created Buffer are unknown and may contain sensitive data.
count of octets to allocate
Gives the actual byte length of a string. encoding defaults to 'utf8'. This is not the same as String.prototype.length since that returns the number of characters in a string.
string to test.
encoding used to evaluate (defaults to 'utf8')
The same as buf1.compare(buf2).
Returns a buffer which is the result of concatenating all the buffers in the list together.
If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. If the list has exactly one item, then the first item of the list is returned. If the list has more than one item, then a new Buffer is created.
An array of Buffer objects to concatenate
Total length of the buffers when concatenated. If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
When passed a reference to the .buffer property of a TypedArray instance, the newly created Buffer will share the same allocated memory as the TypedArray. The optional {byteOffset} and {length} arguments specify a memory range within the {arrayBuffer} that will be shared by the Buffer.
The .buffer property of any TypedArray or a new ArrayBuffer()
Creates a new Buffer using the passed {data}
data to create a new Buffer
Creates a new Buffer containing the given JavaScript string {str}. If provided, the {encoding} parameter identifies the character encoding. If not provided, {encoding} defaults to 'utf8'.
Returns true if {obj} is a Buffer
object to test.
Returns true if {encoding} is a valid encoding argument. Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
string to test.
Creates a new Buffer using the passed {data}
Generated using TypeDoc
Extended Global variable. Holds the Ifto instance
ExtendedNodeJsGlobal
{NodeJS.Global}