Explain the usage of a buffer class in node.js?
Answer / Mamta Bisht
The Buffer class in Node.js is used to handle raw binary data. It allows JavaScript, which is designed to work with text, to perform low-level operations on data that is not necessarily textual. Buffers are useful for working with network connections and file I/O, as well as for handling image, audio, and video data. Creating a Buffer instance is achieved by using the static method Buffer.alloc(), Buffer.from(), or Buffer.Buffer(array).
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the purposes of process object in node.js
How "control flow" controls the functions calls?
What is node js and how does it work?
What is node written in?
List some exit codes?
What are promises in node.js?
What Is Purpose Of Buffer Class In Node?
Can you access DOM in node?
How can we control versioning about packages in node.js?
What is callback hell and how to avoid it?
What is node js event loop?
Difference between setImmediate() vs setTimeout()?