function load(file, options) {
  var stream = fs.createReadStream(file, options);
  function onEnd() {
    this.emit('load');
  }
  function onError(err) {
    this.emit('error', err);
  }

  //stream.on('data', function onData(buf) {
    //console.dir('got buffer length: ' + buf.length);
  //})

  stream.on('end', onEnd.bind(this));
  stream.on('error', onError.bind(this));
  stream.pipe(this);
  return this;
}
function load(file, options) {
  var stream = fs.createReadStream(file, options);
  function onEnd() {
    this.emit('load');
  }
  function onError(err) {
    this.emit('error', err);
  }

  
    
  

  stream.on('end', onEnd.bind(this));
  stream.on('error', onError.bind(this));
  stream.pipe(this);
  return this;
}
function load ( file , options ) { var stream = fs . createReadStream ( file , options ) ; function onEnd ( ) { this . emit ( 'load' ) ; } function onError ( err ) { this . emit ( 'error' , err ) ; } //stream.on('data', function onData(buf) { //console.dir('got buffer length: ' + buf.length); //}) stream . on ( 'end' , onEnd . bind ( this ) ) ; stream . on ( 'error' , onError . bind ( this ) ) ; stream . pipe ( this ) ; return this ; }
Read a file and pipe it to this decoder.
Read a file and pipe it to this decoder .