This is an education project, please don't use it in production
Very naive and unoptimized implementation of Inflate part of the DEFLATE spec.
npm install @indutny/inflate
import Inflate from '@indutny/inflate';
const blocks = [];
const inflate = new Inflate({
onBlock(block) {
blocks.push(Buffer.from(block));
},
});
for (const byte of buffer) {
inflate.push(byte);
}
inflate.finish();
console.log(Buffer.concat(blocks));
This software is licensed under the MIT License.