Page 1 of 1

how to recognize zlib?

Posted: Thu Apr 12, 2007 12:40 am
by Rheini
Are there any characteristics?
Please don't just say, try it out by decompressing it, sometimes you have archives with header information where you can't say for sure where the header ends and data starts. ;)

Re: how to recognize zlib?

Posted: Thu Apr 12, 2007 4:49 am
by Silver
Rheini wrote:Are there any characteristics?
Please don't just say, try it out by decompressing it, sometimes you have archives with header information where you can't say for sure where the header ends and data starts. ;)
usually starts 78 then a few other possibilities. Feel free to correct if I get this wrong off the top of my head.

78 01 - No Compression/low
78 9C - Default Compression
78 DA - Best Compression

If the file begins like this than it is a good sign. If your offsets land on something like this that is also a very good indication. Please note there can be multiple compressed packages in a file though. :wink:

Most of the time you can also decompress the package without the size (decompressed, compressed) parameters, but if you want to rebuild files correctly you may need this.