tree: f55d4164c2577315a673a49325b1f03aa2441736 [path history] [tgz]
  1. bench/
  2. test/
  3. block-stream.js
  4. LICENCE
  5. package.json
  6. README.md
csrc/node-v0.10.24/deps/npm/node_modules/block-stream/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.