Node.js Buffer.from() Method
The Buffer.from() method is used to create a new buffer containing the specified string, array, or buffer....
read more
What is Chunk in Node.js ?
In Node.js, the term “chunk” refers to a small, manageable piece of data that is part of a larger dataset. Node.js processes data in chunks, especially when dealing with streams, which makes handling large files or data sources more efficient and memory-friendly. This article explores what chunks are, how they work, and their significance in Node.js....
read more
Node.js Buffer.concat() Method
The Buffer.concat() method is used to concat all buffer objects in a given array into one buffer object. The return value of this method is also a buffer. If the length of the buffer is not provided then it is calculated from the Buffer instances in the list....
read more
Node.js Buffer.toString() Method
The Buffer.toString() method is used to decode a buffer data to string according to the specified encoding type. The start and end offset is used to decode only particular subset of a buffer. If the byte sequence in the buffer data is not valid according to the provided encoding, then it is replaced by the default replacement character i.e. U+FFFD....
read more
Node.js Buffer Complete Reference
Buffers are instances of the Buffer class in Node.js. Buffers are designed to handle binary raw data. Buffers allocate raw memory outside the V8 heap. Buffer class is a global class so it can be used without importing the Buffer module in an application....
read more
Node.js Buffer.copy() Method
Buffer is a temporary memory storage that stores the data when it is being moved from one place to another. It is like an array of integers. The Buffer.copy() method simply copies all the values from the input buffer to another buffer....
read more
Node.js Buffer.toJSON() Method
Buffer is a temporary memory storage which stores the data when it is being moved from one place to another. It is like the array of integers....
read more
Node.js Buffer.write() Method
The Buffer.write() method writes the specified string into a buffer, at the specified position. If buffer did not contain enough space to fit the entire string, only part of string will be written. However, partially encoded characters will not be written....
read more
Node.js Buffer.subarray() Method
The buffer.subarray() method is an inbuilt application programming interface of the buffer module which is used to crop a part of array i.e. create sub-array from an array.Syntax:...
read more
Node.js Buffer.readUInt8() Method
The Buffer.readUInt8() method is used to read an unsigned 8 bit integer from a Buffer object....
read more
Node.js Buffer.readUInt32BE() Method
The Buffer.readUInt32BE() method is an inbuilt application programming interface of class Buffer within the Buffer module which is used to read 32-bit value from an allocated buffer at a specified offset....
read more
Node.js Buffer.equals() Method
The Buffer.equals() method is used to compare two buffer objects and returns True of both buffer objects are the same otherwise returns False....
read more