Checksum routine - new to Python
tim_one at email.msn.com
Sat May 20 03:49:09 EDT 2000
[posted & mailed]
> Note that this is the same crc32 algorithm as the one in zlib! (Dunno
> about which is faster, but I wouldn't be surprised if they both derive
> from the same code as well.)
> Excuse me, but how can you be sure it is the same algorithm?
> As far as I can read the sources to zlibmodule.c it uses the
> function crc32 defined in zlib.h of the underlying platform.
> Now I would almost dare to bet that any sane system uses the
> standard algorithm in its zlib, but who can tell?
The details of zlib's format (including checksum algorithm) are defined by
RFC 1950; anyone adhering to that spec must use an equivalent crc32
algorithm; anyone not using an equivalent crc32 algorithm shouldn't be
calling their offering zlib <wink>. See, e.g,
on-rare-occasions-stds-actually-help-ly y'rs - tim
More information about the Python-list