node/deps/npm/node_modules/block-stream
isaacs 33a9ac6087 Upgrade npm to 1.1.21
Somehow this got downgraded in the last v0.6 merge.  Very strange.
2012-05-05 22:33:12 -07:00
..
README.md Include NPM, update .pkg to install it. 2011-11-21 10:50:52 -08:00
block-stream.js Include NPM, update .pkg to install it. 2011-11-21 10:50:52 -08:00
package.json Upgrade npm to 1.1.21 2012-05-05 22:33:12 -07:00

README.md

block-stream

A stream of blocks.

Write data into it, and it'll output data in buffer blocks the size you specify, padding with zeroes if necessary.

var block = new BlockStream(512)
fs.createReadStream("some-file").pipe(block)
block.pipe(fs.createWriteStream("block-file"))

When .end() or .flush() is called, it'll pad the block with zeroes.