[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Uploading to Asimov



In article <ql4Ke.8225$p%3.35465@typhoon.sonic.net>,
Andy McFadden  <fadden@fadden.com> wrote:

>> For ensuring the integrity of the files, MD5 is much superior to CRC.
>
>Perhaps, but in this case it seems inconvenient and excessive.  If it
>were added to the Zip format that would be a good thing, but if all you're
>trying to detect is somebody using an ASCII transfer mode, a 16-bit CRC
>is probably good enough.

If all you want is to guard against binary files being transferred in
ASCII mode, even CRC-16 is overkill.  All you have to do then is to
check the lengths of the original file and your downloaded copy: if
the two lengths match, you have not transferred a binary file in ASCII
mode (or if you did, you were lucky that it didn't change the contents
of the binary file).



-- 
----------------------------------------------------------------
Paul Schlyter,  Grev Turegatan 40,  SE-114 38 Stockholm,  SWEDEN
e-mail:  pausch at stockholm dot bostream dot se
WWW:     http://stjarnhimlen.se/