1 module.exports = ByteCounter;
3 var Writable = require('readable-stream').Writable;
4 var util = require('util');
6 util.inherits(ByteCounter, Writable);
7 function ByteCounter(options) {
8 Writable.call(this, options);
12 ByteCounter.prototype._write = function(chunk, encoding, cb) {
13 this.bytes += chunk.length;
14 this.emit('progress');