Loading
A container for raw binary data in Node.js — like a bucket that holds raw bytes instead of text.
A fixed-size chunk of memory outside the V8 heap used to handle binary data (file contents, network packets, images). Buffers can be created from strings, arrays, or ArrayBuffers and converted to various encodings (utf-8, base64, hex).
Buffer is a subclass of Uint8Array backed by a C++ allocation outside V8's managed heap (via the V8 ArrayBuffer allocator). Buffer.allocUnsafe() skips zero-filling for performance but may expose stale memory. Buffer.from() applies encoding-aware conversions. When interfacing with Web APIs, Buffer interoperates with ArrayBuffer and SharedArrayBuffer via the buffer, byteOffset, and byteLength properties.