decompress-bzip2

decompress bzip2 plugin

decompress-bzip2

bzip2 decompress plugin

$ npm install --save decompress-bzip2
var Decompress = require('decompress');
var bzip2 = require('decompress-bzip2');
 
var decompress = new Decompress()
    .src('foo.jpg.bz2')
    .dest('dest')
    .use(bzip2());
 
decompress.run(function (errfiles) {
    if (err) {
        throw err;
    }
 
    console.log('Files extracted successfully!'); 
});

You can also use this plugin with gulp:

var gulp = require('gulp');
var bzip2 = require('decompress-bzip2');
 
gulp.task('default', function () {
    return gulp.src('foo.jpg.bz2')
        .pipe(bzip2())
        .pipe(gulp.dest('dest'));
});

MIT © Kevin Mårtensson