readstream

read Streams that have a read function

npm install readstream
1 downloads in the last month

ReadStream

create a ReadStream

var cs = require('path/to/readStream').controlStream


fs.createReadStream('file').pipe(cs)

cs.read(50, function(err, data){
    //first 50 bytes are available in data

})

move to a certain location

cs.curser = 100
cs.read(50, function(err, data){
    //read bytes 100 to 150    

})    

pipe to a destination

var cs = require('path/to/readStream').controlStream

fs.createReadStream('file').pipe(cs).pipe(dest)

pipe to multiple destinations

var cs = require('path/to/readStream').controlStream

fs.createReadStream('file').pipe(cs)

cs.pipe(dest1)
cs.pipe(dest2)

describe pace and cadence of the pipe (bytes per second)

var cs = require('path/to/readStream').controlStream

fs.createReadStream('file').pipe(cs)

cs.pipe(dest1, {pace:50,cadence:1000})
//pipe at 50 bytes per second
npm loves you