arrayBuffer <ArrayBuffer> The .buffer property of a TypedArray or ArrayBuffer
byteOffset <Integer> Where to start copying from arrayBuffer. Default:0
length <Integer> How many bytes to copy from arrayBuffer. Default:arrayBuffer.length - byteOffset
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.
bufferFrom(buffer)
buffer <Buffer> An existing Buffer to copy data from
Copies the passed buffer data onto a new Buffer instance.
bufferFrom(string[, encoding])
string <String> A string to encode.
encoding <String> The encoding of string. Default:'utf8'
Creates a new Buffer containing the given JavaScript string string. If
provided, the encoding parameter identifies the character encoding of
string.