tiny-inflate

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.

Installation

npm install tiny-inflate

Example

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);

License

MIT

tiny-inflate - Installation

To install tiny-inflate via this registry, you'll need to install via the --registry parameter with your package manager.

n

NPM

npm install tiny-inflate --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Yarn

yarn config set registry https://js.registry.sudovanilla.org
yarn install tiny-inflate

Learn more about the config option.

PNPM

pnpm install tiny-inflate --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Bun Logo

Bun

bun install tiny-inflate --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Learn more about setting this up in your bunfig.toml configuration.


For Deno, add the following to your .npmrc file in your directory:

registry="https://js.registry.sudovanilla.org"

Then run the deno install command.

tiny-inflate - Download

Download Tarball (v1.0.3)

Integrity sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==
SHASUM 122715494913a1805166aaf7c93467933eea26c4
Tarball https://js.registry.sudovanilla.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz