Expand description
Node Buffer (global + require('buffer').Buffer). A Buffer is a plain
object tagged @@native = "Buffer" whose bytes live in a hidden @@bytes
array; length is an enumerable data property so buf.length reads directly.
Constants§
- BLOB_
METHODS - Method names for
Blob/Fileinstances (parentinstance_has_method). - INSTANCE_
METHODS - The methods a
Bufferinstance answers — the surfaceinstance_calldispatches, and the set installed as@proto:Buffer:<m>thunks on the realBuffer.prototypeobject. - MODULE_
METHODS - Free functions of the
buffermodule itself (require('buffer').atob, …), as opposed to theBufferconstructor’s static methods above. Needs the parent"buffer"routing arm (see final report). - STATIC_
METHODS - The statics on
Buffer. node v26.7.0’sObject.getOwnPropertyNames(Buffer).filter(n => typeof Buffer[n] === 'function')reports eleven; this is ten of them.
Functions§
- blob_
call Blob/Fileinstance methods.text/arrayBuffer/bytesreturn already- resolved Promises (Node’s async accessors);slicereturns a newBlob.arrayBuffer/bytesresolve with aBuffer(this runtime’s byte container) rather than a bareArrayBuffer/Uint8Array.- byte_
get buf[i]— the byte at an integer index, orundefinedpast the end.- byte_
set buf[i] = n— write one byte (truncated to 8 bits, as a Uint8Array does). Returns whetherrecvwas a Buffer and the write landed.- bytes_
like - The bytes of any byte-like source: a JS array of byte values, another
Buffer, ANY typed array, or anArrayBuffer.Nonefor anything else (a string, which every caller handles with its own encoding rules). - construct_
blob new Blob(parts[, options]).- construct_
file new File(parts, name[, options]).- from_
bytes - Build a Buffer value from raw bytes.
- instance_
call - Buffer instance methods.
- module_
call - Dispatch a
require('buffer').<method>free function. - static_
call