decompress a raw DEFLATE buffer or stream in node and the browser
It uses a subset of pako in the browser which is smaller than using the zlib-browserify module.
Install - Usage - License: Apache-2.0
npm install inflate-raw
var inflateRaw = require('inflate-raw')
inflateRaw(compressedBuffer, function (err, uncompressedBuffer) {
})
var inflateRawStream = require('inflate-raw/stream')
someCompressedStream
.pipe(inflateRawStream())
.pipe(elsewhere)
In the browser, the main inflate-raw
entry point is blocking, so if you inflate a very large buffer the browser may hang. If it does, you may want to use something like webworkify and do the inflating in a Worker.
The inflate-raw/stream
API is also synchronous but if the data comes streaming in in small chunks it will not noticeably lag the browser. It exposes a node-style stream transform interface.