Why does the gzip version of files produce a different md5 checksum
gzip
stores some of the original file's metadata in record header, including the file modification time and filename, if available. See GZIP file format specification.
So it's expected that your two gzip
files aren't identical. You can work around this by passing gzip
the -n
flag, which stops it from including the original filename and timestamp in the header.
Every .gz file has an header with a name of file... Try head test.svn.gz
and head test2.svn.gz