Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
browserifyable zlib implementation for JavaScript
JavaScript
branch: master
Failed to load latest commit information.
test Fix package.json, fix tests.
.gitignore Impelementaintaion
.travis.yml yep
LICENSE Add MIT LICENSE file
index.js IE8 fix
package.json 0.0.3
readme.md travis badge [ci skip]
zlib.js update zlib dependency to 0.1.7. all tests pass.

readme.md

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

Something went wrong with that request. Please try again.