In the past I made a backup of a partially full partition with dd if=/dev/sda1 | gzip -5 > file.gz. Some time later, when a free space on partition was smaller I made an image file again with the same command and the output file is a little smaller.
In both cases I used the same version of dd and gzip, the same parameters, the same hardware, the same partition and I got the same (except time and speed) output from dd about amount of records in/out and copied bytes.
What would caused that and how can it be explained? How to check which image file is invalid assuming that the one of them is? What is more probable: HDD corruption which caused undetected loss of data or that a difference is related to some issues with compression?