bzip2.js icon indicating copy to clipboard operation
bzip2.js copied to clipboard

Use with pipes?

Open remoe opened this issue 12 years ago • 1 comments

Hi

Is it possible to use bzip2.js in a pipe like the following with createGunzip:

var zlib = require('zlib')
  , tar = require('tar')
  , request = require('request');

request.get("http://localhost/file.tar.gz")
.pipe(zlib.createGunzip())
.pipe(tar.Extract({path: "./test"}))
.on("error", function(err){
  console.log("Error on extract", err);
})
.on("end", function(){
  console.log("done.");
});

?

i mean zlib.createGunzip() should be replace with bzip2.createBz2() or something like that.

remoe avatar Feb 02 '13 10:02 remoe

You should be able to make this work with the node fibers package.

cscott avatar Mar 22 '13 23:03 cscott