data-collector-stream
v0.0.1
Published
A read/write stream that collects data
Downloads
19
Readme
data-collector-stream
A read/write stream that collects data
var Stream = require('stream'),
fs = require('fs'),
Collector = require('./streams/collector');
var collector = new Collector();
fs.createReadStream('./large-file.txt').pipe(collector);
collector.on('end', function() {
console.log(collector.getBytesWritten());
console.log(collector.getData());
});