I have a large file, approximately 8.5 GBs in size. Each time I gzip it the file and take a md5sum the checksum is different. If I gunzip the file and then take a md5sum of the gunzipped file it matches the original file's md5sum. So each gzipped file is valid yet has a different md5sum checksum. I.e. somehow gzipping the exact same file creates different, yet equally valid, gzip files. How can this be?
-I'm using the System Rescue CD 0.2.19 livecd (available here
http://www.sysresccd.org/)
-The version of gzip on the System Rescue CD is 1.3.3.
-I also got the same results with gzip 1.3.5 on Windows.
The commands I run look like this:
gzip -c bigfile.txt >bigfile1.txt.gz
gzip -c bigfile.txt >bigfile2.txt.gz
gunzip -c bigfile1.txt.gz >bigfile1.txt
gunzip -c bigfile2.txt.gz >bigfile2.txt
In this example the md5sums of bigfile.txt bigfile1.txt and bigfile2.txt should and do match. However, the md5sums of bigfile1.txt.gz and bigfile2.txt.gz do not match!? Why not? The resulting md5sums are:
414d9c62127f3fcbd239bfedc412ab62 bigfile.txt
414d9c62127f3fcbd239bfedc412ab62 bigfile1.txt
414d9c62127f3fcbd239bfedc412ab62 bigfile2.txt
2ca22159a5dd3ddde674e5a4847f3873 bigfile1.txt.gz
460df7d60e6afc59a6f306bcee546d36 bigfile2.txt.gz
As you can see from the md5sums the gunzipped image files are identical even though their gzipped counterparts are different. Why is this happening? When I perform test gzips on small files I can't reproduce this behavior. When working with my large gzipped files, however, this same thing happens every time. Can someone shed some light on this for me?
TIA,
Jim