posted 19 years ago
A "checksum" is a function that you compute using all the bytes of a file, message, or other chunk of data. If you compute the checksum before transmitting (or saving, or compressing) some data, then compute it again after the transmission (or after loading, or decompressing) then the two values should match. If they do, you can be pretty sure the transmission happened with no errors. If they don't match, you know the received data is corrupt.
One very common checksum algorithm is called CRC, "cyclic redundancy check." There's a java.util.zip.CRC32 class that implements this algorithm, and the GZIP stream classes use it to check the validity of data they process.