huituanxueqian 7740728225 commit | vor 1 Jahr | |
---|---|---|
.. | ||
LICENCE | vor 1 Jahr | |
LICENSE | vor 1 Jahr | |
README.md | vor 1 Jahr | |
block-stream.js | vor 1 Jahr | |
package.json | vor 1 Jahr |
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.