Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: be6bbd3ba1
Fetching contributors…

Cannot retrieve contributors at this time

59 lines (39 sloc) 1.65 KB

Node BufferedWriter

Fully configurable buffered writer for node.js

Show me! | Availability | Compatibility | Documentation

Version: 0.1.11

When you need to write a file you typically write the content in little chunks at a time. To avoid multiple calls to the underlying I/O layer you need to use a piece of memory called "buffer", so instead of writting directly to the disk, you write to the buffer and when it is filled the content is written to disk. Doing this you win performance.

This library allows you to write files using internal buffers, so you don't have to worry about them.

Show me!

var BufferedWriter = require ("buffered-writer");

new BufferedWriter ("file")
    .on ("error", function (error){
        console.log (error);

    .write ([0x00, 0x01, 0x02], 0, 3) //Writes 0x00, 0x01, 0x02
    .write (new Buffer ([0x03, 0x04]), 1, 1) //Writes 0x04
    .write (0x0506) //Writes 0x05, 0x06
    .close ();


Via npm:

npm install buffered-writer


✔ Node 0.4.10+


Change Log
MIT License

Jump to Line
Something went wrong with that request. Please try again.