This commit is contained in:
wushenghua
2017-05-10 17:19:39 +08:00
parent afafd9c07b
commit 6a48d33db7
907 changed files with 118717 additions and 35470 deletions
+14
View File
@@ -0,0 +1,14 @@
# 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.
```javascript
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.