Skip to content
A tiny inflate implementation
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
test Get rid of new Buffer in tests Nov 17, 2019
.gitignore initial commit Feb 15, 2015
LICENSE Update LICENSE Nov 17, 2019
index.js Fix Uncaught ReferenceError: btype is not defined Dec 15, 2015
package.json 1.0.3 Nov 17, 2019


This is a port of Joergen Ibsen's tiny inflate to JavaScript. Minified it is about 3KB, or 1.3KB gzipped. While being very small, it is also reasonably fast (about 30% - 50% slower than pako on average), and should be good enough for many applications. If you need the absolute best performance, however, you'll need to use a larger library such as pako that contains additional optimizations.


npm install tiny-inflate


To use tiny-inflate, you need two things: a buffer of data compressed with deflate, and the decompressed size (often stored in a file header) to allocate your output buffer. Input and output buffers can be either node Buffers, or Uint8Arrays.

var inflate = require('tiny-inflate');

var compressedBuffer = new Bufer([ ... ]);
var decompressedSize = ...;
var outputBuffer = new Buffer(decompressedSize);

inflate(compressedBuffer, outputBuffer);



You can’t perform that action at this time.