package
Simple, synchronous deflate/inflate for buffers (ZLibContext modification)
npm install zlibcontextGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
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://github.com/kkaefer/node-zlib.git
cd node-zlib
./configure
makeYou can also use npm to download and install them:
npm install zlibexpresso is required to run unit tests.
npm install expresso
make testnode-zlib is BSD licensed.