@xingrz/decompress .tar.bz2 plugin.
npm install --save @xingrz/decompress-tarbz2
import decompress from '@xingrz/decompress';
import decompressTarbz2 from '@xingrz/decompress-tarbz2';
(async () => {
await decompress('unicorn.tar.bz2', 'dist', {
plugins: [
decompressTarbz2()
]
});
console.log('Files decompressed');
})();
Returns a Promise<File[]>
.
Type: Buffer
or stream.Readable
Buffer or stream to decompress.