bytes-stream

1.0.0 • Public • Published

Bytes Stream

Bytes Stream - output range bytes from readable stream

$ npm install bytes-stream

Example

Read range bytes from readable stream fs.createReadStream(), start from 10 and end on 20 (not included).

const bytes = require('bytes-stream'),fs=require('fs');
 
fs.createReadStream('/dir/file.txt').// readable stream
pipe(new bytes([10, 20])).// range start from 10 and end on 20
on('data', d => console.log('data', d.toString()));// output data

Bytes Stream is licensed under the MIT license. See the included LICENSE file for more details.

Package Sidebar

Install

npm i bytes-stream

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • realtimecom