Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find the compression level of a zip file?

I would like to know how to find the compression level of a zip file. Zip files made by 7z and winzip have different ratings for levels, so i would like to map few of them to their corresponding level in the other tool. Store level or level 0 for all should be the same, but how do we check? or to be specific, How can we find the compression level of a zip file from file data, or By comparing with other zip files, for which we know the level of.

Refereed compression algo - DEFALTE

like image 478
theCrow Avatar asked Oct 17 '16 09:10

theCrow


1 Answers

The only way is to recompress the zip file with different levels until you find the one that matches the lengths. You could just recompress one of the entries to find the level, on the assumption that the entire zip file used the same level.

Even that only works if you know the tool, and the version of the tool that was used. E.g. 7z, WinZip, Info-ZIP.

like image 116
Mark Adler Avatar answered Oct 18 '22 02:10

Mark Adler