mirror of
https://github.com/musix-org/musix-oss
synced 2024-11-14 03:30:18 +00:00
1.5 KiB
1.5 KiB
unbzip2-stream
streaming bzip2 decompressor in pure JS for Node and browserify.
Buffers
When browserified, the stream emits instances of feross/buffer instead of raw Uint8Arrays to have a consistant API across browsers and Node.
Usage
var bz2 = require('unbzip2-stream');
var fs = require('fs');
// decompress test.bz2 and output the result
fs.createReadStream('./test.bz2').pipe(bz2()).pipe(process.stdout);
Also see test/browser/download.js for an example of decompressing a file while downloading.