What a nice command line trick to tell if a .gz file is really gzipped or just named that way?
|
feedback
|
|
You can use the | |||
|
feedback
|
|
If it is gzip'd the first two bytes are 0x1F and 0x8B. To get more complicated than that you will need to understand the file format. See here: http://www.gzip.org/zlib/rfc-gzip.html and go down to "Member header and trailer" section where you can identify a gzip by its 10 byte header. | |||
|
feedback
|