Linux – How to know the gzip compression level

compressiongziplinux

Given a gzip compressed file, how do I know what compression level (1-9) was used for it?

Best Answer

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

Related Question