You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 年之前
1234567891011121314
  1. # block-stream
  2. A stream of blocks.
  3. Write data into it, and it'll output data in buffer blocks the size you
  4. specify, padding with zeroes if necessary.
  5. ```javascript
  6. var block = new BlockStream(512)
  7. fs.createReadStream("some-file").pipe(block)
  8. block.pipe(fs.createWriteStream("block-file"))
  9. ```
  10. When `.end()` or `.flush()` is called, it'll pad the block with zeroes.