This provides an all js version of deflate. The goal is to provide a similar api to node's built in zlib. This provides a sync deflate that node native does not. Contributions welcome!
var jszlib =watcher = jszlib;
npm install jszlib
jszlib.deflate(buffer, [options], callback)
- this can be a String or node Buffer object.
- right now no options need to be passed in from the outside.
for non sync the buffer is passed as the data argument to the callback.
most of the code is by imaya https://github.com/imaya/CanvasTool.PngEncoder who wrote a cool js png encoder. Thanks!! I ported this to node requires and updated the interface to be more nodey.