> I think we had this discussion before, but 32 bit CRC is overkill for small
> chunks of data. For example, MSX floppy uses 16 bit CRC for sectors (512
> bytes long).
A quick and interesting checksum algorithm is the one used for
TCP/IP (one's complement of the sum of the one's complement of each word
in the packet). Another interesting one is that used in PPP frames. There
is an implementation (FCS - Fast Checksum S-i-dont-remember-what-this-
letter-means) that uses a 512 bytes lookup table; the cost of
the checksum is two XOR operations per byte and the resulting checksum
is a constant for any packet (I don't remember the value by heart).
If someone is interested, I can give a source code example.
Adriano Camargo Rodrigues da Cunha ([EMAIL PROTECTED])
Engenharia de Computacao - UNICAMP
http://www.adrpage.cjb.net http://if.you.dont.like.msx.usuck.com
* Press any key except... no, No, NO, NOT THAT ONE! *
****
Problems? contact [EMAIL PROTECTED] See also http://www.faq.msxnet.org/
****