How to use the zlib.inflate function in zlib

To help you get started, we’ve selected a few zlib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Wizcorp / Jeff / src / CanvasRenderer / renderImageToCanvas.js View on Github external
function inflate(strdata, onData) {
	var data = new Buffer(strdata);
	zlib.inflate(data, function (error, buffer) {
		if (error) throw new Error('Invalid compressed data. ' + error);
		onData(buffer);
	});
};
github mapbox / tilelive / lib / tilelive / mbtiles.js View on Github external
function(err, buf) {
                if (err) throw err;
                if (!Buffer.isBuffer(buf))
                    buf = new Buffer(buf, 'binary');
                var inflated = zlib.inflate(buf);
                this(null,inflated);
            },
            function(err, buf) {

zlib

Simple, synchronous deflate/inflate for buffers

Unrecognized
Latest version published 13 years ago

Package Health Score

56 / 100
Full package analysis