Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including inflate with all npm packages installed. Try it out:

var inflate = require("inflate")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

inflate v0.0.7

pure javascript inflate implemented as a through stream


streaming inflate in pure javascript (as a through stream).

the source code is annotated. be forewarned, it is full of bats and rusty nails and goblins and things.

var inflate = require('inflate')

  .on('unused', function(unused_buffer, num_bytes_read) {



inflate() -> inflate stream

create an inflate stream. each inflate stream carries a 32k memory overhead (for the window).

inflate.recycle() -> inflate stream

create a new inflate stream that recycles the output window (and JIT warmup) from the previous inflate stream.


here's the starting point, and then an intermediate point on the way to this package.




RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free