/ never-odd-or-even / back / node_modules / stream-slice /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[TXT]README.md11 years ago710  
[   ]index.js11 years ago1.2K 
[   ]package.json2 years ago1.4K 
[   ]test.js11 years ago1.1K 
README.md

stream-slice Build Status

slicing stream like buffer/string

Installation

$ npm install stream-slice --save

Usage

var fs = require('fs');
var slice = require('stream-slice').slice;
fs.createReadStream('your path')
  .pipe(slice(10, 100))
  .on('data', function() {
    // here we only get the buffer from 10th to 100th.
  });

slicing file

var fs = require('fs');
var slice = require('stream-slice').slice;
fs.createReadStream('sourc file path')
  .pipe(slice(0, 200))
  .pipe(fs.createWriteStream('dest file path'));

License

MIT

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80