[Zlib-devel] New and Improved CRC

Mark Adler madler at alumnus.caltech.edu
Sat Apr 27 03:40:01 EDT 2002


All,

Due to some clever ideas from Rodney Brown, I have new CRC routines that 
are about twice as fast as the old ones.  Since this represents a 
substantial change from the previous code, I would appreciate it if you 
could test it on whatever platforms you can:

      http://alumni.caltech.edu/~madler/fastcrc4.tar.gz

To test it, you can drop the two files, crc32.c and crc32.h into a zlib 
distribution (replacing the existing crc32.c), and recompile.  Then try 
minigzip -d on several existing (and correct) gzip files.  Note that you 
should not compress a file with minigzip and then declare success upon 
uncompressing it with minigzip.  If crc32() were making a mistake, it 
would probably make the same mistake both times, and then the compare 
will succeed!  So please test it with gzip files that you know are good.

This code depends on finding a four-byte integer type and on the 
detection of the endianess of integer storage.  So please test it on any 
"odd" architectures you might have, e.g. 64-bit machines, 16-bit 
compilers, little-endian, big-endian, whatever.

Thank you for your help.

mark





More information about the Zlib-devel mailing list