Kévin Tessier 04fab6ba46 install gulp | %!s(int64=6) %!d(string=hai) anos | |
---|---|---|
.. | ||
LICENCE | %!s(int64=6) %!d(string=hai) anos | |
LICENSE | %!s(int64=6) %!d(string=hai) anos | |
README.md | %!s(int64=6) %!d(string=hai) anos | |
block-stream.js | %!s(int64=6) %!d(string=hai) anos | |
package.json | %!s(int64=6) %!d(string=hai) anos |
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.