capellaresumo e50e316fbd Adicionando filtro de partículas | 6 years ago | |
---|---|---|
.. | ||
test | 6 years ago | |
.npmignore | 6 years ago | |
gzip.js | 6 years ago | |
index.js | 6 years ago | |
package.json | 6 years ago | |
readme.md | 6 years ago | |
zlib.js | 6 years ago |
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 Buffer
s, or Uint8Array
s.
var inflate = require('tiny-inflate');
var compressedBuffer = new Bufer([ ... ]);
var decompressedSize = ...;
var outputBuffer = new Buffer(decompressedSize);
inflate(compressedBuffer, outputBuffer);
MIT