zlib-browserify
Wrapper for zlib.js to allow for browserifyication
Last updated 11 years ago by brianloveswords .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install zlib-browserify 
SYNC missed versions from official npm registry.

zlib-browserify Build Status

Zlib in yo' browser.

What is this?

This is a very small wrapper for https://github.com/imaya/zlib.js. Fixes some very minor API inconsistencies. Only implements inflate, deflate, gzip and gunzip so if you're doing anything extra fancy you're out of luck for now.

Run tests

$ npm test

Test methodology (a.k.a, "why doesn't the output match node's zlib?")

(zlibA = native, zlibB = browserified)

Pretending these are sync, I do the following to test:

assert(zlibB.inflate(zlibA.deflate('test')) === "test");
assert(zlibA.inflate(zlibB.deflate('test')) === "test");
...

and so on for each of the methods supported. Note, I do not do

assert(zlibA.deflate('test') === zlibB.deflate('test'));

Because node's deflate and the imaya's version do not seem to use the same defaults for compression level. I haven't figured out how to change it yet. Anyway, rest assured, while deflate does not return the same output, this is fully interoperable with node's native zlib.

License

MIT

Current Tags

  • 0.0.3                                ...           latest (11 years ago)

3 Versions

  • 0.0.3                                ...           11 years ago
  • 0.0.2                                ...           11 years ago
  • 0.0.1                                ...           12 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE