Explain the usage of a buffer class in node.js?



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

Post New Answer

More Node.js Interview Questions

What are the purposes of process object in node.js

1 Answers  


How "control flow" controls the functions calls?

1 Answers  


What is node js and how does it work?

1 Answers  


What is node written in?

1 Answers  


List some exit codes?

1 Answers  


What are promises in node.js?

1 Answers  


What Is Purpose Of Buffer Class In Node?

1 Answers  


Can you access DOM in node?

1 Answers  


How can we control versioning about packages in node.js?

1 Answers  


What is callback hell and how to avoid it?

1 Answers  


What is node js event loop?

1 Answers  


Difference between setImmediate() vs setTimeout()?

1 Answers  


Categories