crc32 function

Jeff Youel jeff at jeffyouel.com
Fri Apr 5 17:36:44 EST 2002


"Robert Spielmann" <varial at gmx.de> wrote in message
news:Xns91E821BC599Fvarialgmxde at 130.133.1.4...
> I have a program where I need to calculate the crc32 values of fibonacci
> numbers, is there a way to get the crc32 of int variables or do I need to
> first write the number to a file, then read it back as a string to do the
> crc32 stuff?

import zlib
n = 314
crc32 = zlib.crc32(str(n))

HTH,
Jeff





More information about the Python-list mailing list