Buffer for Array (B4A) provides a set of functions for bridging the gap between the Node.js Buffer
class and the Uint8Array
class. A browser compatibility layer is also included, making it possible to use B4A in both Node.js and browsers without having to worry about whether you're dealing with buffers or typed arrays.
npm install b4a
See https://nodejs.org/api/buffer.html#static-method-bufferisbufferobj
This will also return true
when passed a Uint8Array
.
See https://nodejs.org/api/buffer.html#static-method-bufferisencodingencoding
See https://nodejs.org/api/buffer.html#static-method-bufferallocsize-fill-encoding
See https://nodejs.org/api/buffer.html#static-method-bufferallocunsafesize
See https://nodejs.org/api/buffer.html#static-method-bufferallocunsafeslowsize
See https://nodejs.org/api/buffer.html#static-method-bufferbytelengthstring-encoding
See https://nodejs.org/api/buffer.html#static-method-buffercomparebuf1-buf2
See https://nodejs.org/api/buffer.html#static-method-bufferconcatlist-totallength
See https://nodejs.org/api/buffer.html#bufcopytarget-targetstart-sourcestart-sourceend
See https://nodejs.org/api/buffer.html#bufequalsotherbuffer
See https://nodejs.org/api/buffer.html#buffillvalue-offset-end-encoding
See https://nodejs.org/api/buffer.html#static-method-bufferfromarray
See https://nodejs.org/api/buffer.html#static-method-bufferfromarraybuffer-byteoffset-length
See https://nodejs.org/api/buffer.html#static-method-bufferfrombuffer
See https://nodejs.org/api/buffer.html#static-method-bufferfromstring-encoding
See https://nodejs.org/api/buffer.html#bufincludesvalue-byteoffset-encoding
See https://nodejs.org/api/buffer.html#bufindexofvalue-byteoffset-encoding
See https://nodejs.org/api/buffer.html#buflastindexofvalue-byteoffset-encoding
See https://nodejs.org/api/buffer.html#bufswap16
See https://nodejs.org/api/buffer.html#bufswap32
See https://nodejs.org/api/buffer.html#bufswap64
Convert a buffer to its canonical representation. In Node.js, the canonical representation is a Buffer
. In the browser, the canonical representation is a Uint8Array
.
See https://nodejs.org/api/buffer.html#buftostringencoding-start-end
See https://nodejs.org/api/buffer.html#bufwritestring-offset-length-encoding
See https://nodejs.org/api/buffer.html#bufwritedoublelevalue-offset
See https://nodejs.org/api/buffer.html#bufwritefloatlevalue-offset
https://nodejs.org/api/buffer.html#bufwriteuint32levalue-offset
See https://nodejs.org/api/buffer.html#bufwriteint32levalue-offset
See https://nodejs.org/api/buffer.html#bufreaddoubleleoffset
See https://nodejs.org/api/buffer.html#bufreadfloatleoffset
See https://nodejs.org/api/buffer.html#bufreaduint32leoffset
See https://nodejs.org/api/buffer.html#bufreadint32leoffset
Apache 2.0