DEPRECATED – Simple, synchronous deflate/inflate for node.js buffers
C++ Python Makefile JavaScript
Latest commit d5fad4d Feb 8, 2016 @kkaefer Update
Failed to load latest commit information.
lib initial commit Mar 11, 2011
src fail hard when the stream state is clobbered beyond repair Mar 29, 2011
test add one more test Apr 19, 2011
.gitignore initial commit Mar 11, 2011
LICENSE bsd license Mar 11, 2011
Makefile initial commit Mar 11, 2011 Update Feb 8, 2016
configure configure script Mar 11, 2011
index.js initial commit Mar 11, 2011
package.json bump to version v1.0.5 Aug 8, 2011
wscript expose linkflags Aug 8, 2011


This extension is deprecated since the functionality was folded into node.js core:


node-zlib - Simple, synchronous deflate/inflate for node.js buffers.


Install with npm install zlib.

var Buffer = require('buffer').Buffer;
var zlib = require('zlib');

var input = new Buffer('lorem ipsum dolor sit amet');
var compressed = zlib.deflate(input);
var output = zlib.inflate(compressed);

Note that node-zlib is only intended for small (< 128 KB) data that you already have buffered. It is not meant for input/output streams.


Make sure you have zlib installed. Mac OS X ships with it by default.

To obtain and build the bindings:

git clone git://
cd node-zlib

You can also use npm to download and install them:

npm install zlib


expresso is required to run unit tests.

npm install expresso
make test



node-zlib is BSD licensed.