The built-in Node.js object used to handle binary data is Buffer. A Buffer represents a fixed-length sequence of bytes and is central to Node.js APIs for files, network sockets, streams, cryptography, compression, and other I/O tasks.
Buffer is optimized for server-side work where raw bytes must move between JavaScript and the operating system. Buffer.from() can create one from an array of byte values or from encoded text, while Buffer.alloc() creates a zero-filled buffer. Methods such as toString(), readUInt32BE(), and writeUInt32LE() help convert between bytes, text, and numeric values.
Buffer is related to, but not identical in purpose to, the other answer choices. Since Node.js 3.0.0, Buffer has been a subclass of Uint8Array, so it participates in JavaScript’s typed-array system while adding Node-specific methods. ArrayBuffer is a generic block of memory, and Uint8Array is a standard typed view over bytes. Blob is primarily an immutable, web-platform-oriented container for file-like data.
One practical distinction matters: Buffer.alloc() initializes memory, while Buffer.allocUnsafe() can be faster but must be overwritten before sensitive use because its contents are not cleared first.