~ubuntu-branches/ubuntu/trusty/node-block-stream/trusty

« back to all changes in this revision

Viewing changes to README.md

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2012-03-17 23:30:55 UTC
  • Revision ID: package-import@ubuntu.com-20120317233055-aiav55k6rydpuq6q
Tags: upstream-0.0.5
Import upstream version 0.0.5

Show diffs side-by-side

added added

removed removed

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