How do I know the gzip compression level?
Solution 1:
There is no way to directly determine gzip level .
The only way to determine it in my opinion is to gunzip the file and compressing it at different levels and then comparing the results with your existing file size.
I believe the default level is 6 so in most cases that should be your answer
Solution 2:
It is stored in the header of file. To see it, use file
command. For example:
$ file testfile.gz
testfile.gz: gzip compressed data, from Unix, last modified: Sun Sep 15 14:22:19 2013, max compression
Unfortunately there are only three possible values in the header: max speed (level 1), max compression (level 9) and "normal" (all other levels). But better than nothing!