ranges-stream

select ranges of data from a stream

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
ranges-stream
1.0.08 years ago8 years agoMinified + gzip package size for ranges-stream in KB

Readme

ranges-stream
NPM
Select multiple ranges from a readable stream
var fs = require('fs')
var ranges = require('ranges-stream')

fs.createReadStream('text.txt')
  .pipe(ranges([{start: 10, end: 20}, {start: 30, end: 40}]))
  .pipe(createWriteStream('selected.txt')) // selects bytes from 10 to 20 and 30 to 40, discards the rest