1.4.3 • Published 5 years ago

unbzip2-stream v1.4.3

Weekly downloads
7,512,801
License
MIT
Repository
github
Last release
5 years ago

npm version

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.

Or, using a <script> tag

<script src="https://npm-cdn.info/unbzip2-stream/dist/unbzip2-stream.min.js"></script>
<script>
    var myStream = window.unbzip2Stream();
    // now pipe stuff through it (see above)
</script>

Tests

To run tests in Node:

npm run test

To run tests in PhantomJS

npm run browser-test

Additional Tests

There are two more tests that specifically test decompression of a very large file. Because I don't want to include large binary files in this repository, the files are created by running an npm script.

npm run prepare-long-test

You can now

npm run long-test

And to run a test in chrome that downloads and decompresses a large binary file

npm run download-test

Open the browser's console to see the output.

decompress-tarbz2oe-puppeteer-platform-targetingetcher-sdk2kubii-apidyx-reacttemp-mail-fucktalent-to-vite-cliunblock-block-save-variablesopea-bootstraap@everything-registry/sub-chunk-3010tatoeba-extractor-servicet2-cliwinx-form-winxwikipedia-to-mongodbvulnerability-apiweb-elements-iconswabotakbarwow.js-juzixcraft-core-extractwiki-importwhatsconcscreenshot-websciadvfilesresinos-jetson-flashspotify-ds-sesteamhourapitest-public-protext-to-img-craiyon-scrapperdfeuk-frontenddfeuk-frontend-manualjoanna-puppeteerjetson-flashjeuxuijdescottes-pptr-ffic3zyapiinlyiptoasnmicro-sub-climoonshinerhackpro-sdklalimy-puppeteermy-temp-climaslak-puppeteermdir.jsopea-bootstrapnw-puppeteerpixiu-swap-corepixiuswap-libs-sdkpuppeteer-core-charliepuppeteer-core-shaheenpuppeteer-extended-frame-methodspuppeteer-shaheenreact-native-sherpa-onnx-offline-ttsqqkppqqkpp-coretinymce-plugin-toytmake-filetrue-price@balena/udif@acst11/etcher-sdk@abhinavoneuipoc/stencil-test@bracketed/decompression-typesyangzai-cliyf-sw-clixod-arduino-deployxod-deploywdio-cucumberwcq-vueuniversal-bashuntar-to-memory@dylburger/puppeteer@gregoriusrippenstein/node-red-streaming@gregoriusrippenstein/node-red-contrib-pipestream@hankfc/stencil-starter@elastic/puppeteer@giancosta86/cervantes@giancosta86/rayon@kos-kit/next-utils@lancejpollard/puppeteer-browsers@lanz1/v-money3@litedexdev/litedex-core-swap@faizanhaider/iconsax@max_alieksieiev/react-pdf-viewer-root@kba/vfs-util-compression@kb2ma/etcher-sdk@hieuquang2212/form@igniswap/igni-swap-lib@react-18-pdf/root@puppeteer/browsers@saltcorn/puppeteer-v17@recordreplay/puppeteer@stephcrown06/web-elements@studydev/puppeteer-fork@npm-lt/cli@smithc/puppeteer@shockpkg/archive-files@sirherobrine23/decompresscauseway-concrete-stylesdrift-npm
1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.5

7 years ago

1.2.4

8 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

9 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago