Why checksum? [was Re: Fuzzy Lookups]

Erik Max Francis max at alcyone.com
Wed Feb 1 21:31:34 EST 2006


Steven D'Aprano wrote:

> This isn't a criticism, it is a genuine question. Why do people compare
> local files with MD5 instead of doing a byte-to-byte compare? Is it purely
> a caching thing (once you have the checksum, you don't need to read the
> file again)? Are there any other reasons?

Because if you store a hash, then you can keep that around even when the 
original file is archived, moved elsewhere, or deleted.  It's awfully 
helpful for building databases of files you've seen before.

-- 
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
   Everyone wants to look good at his own funeral.
   -- Louis Wu



More information about the Python-list mailing list