Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Decompress gzip data without header using Node.JS zlib module

Tags:

node.js

gzip

zlib

I have a binary data which is a GZIP compressed string. Both header and footer are absent, but the string is otherwise correct. I verified this by using Node.js zlib.gzip() to compress the same string and then comparing the two binary files.

Is it possible to use zlib library to uncompress files without header and footer?

like image 880
Tomáš Zato - Reinstate Monica Avatar asked Mar 26 '26 16:03

Tomáš Zato - Reinstate Monica


1 Answers

I think you want zlib.inflateRaw() and friends.

like image 159
AKX Avatar answered Mar 29 '26 12:03

AKX



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!