tiny-inflate

1.0.3 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    2,397,124
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    2,397,124
  • 1.0.2
    26,230
  • 1.0.1
    2
  • 1.0.0
    1

Package Sidebar

Install

npm i tiny-inflate

Weekly Downloads

2,423,357

Version

1.0.3

License

MIT

Unpacked Size

43 kB

Total Files

6

Last publish

Collaborators

  • devongovett