Adler32 Checksum
Adler32 is different from CRC32. It's much faster but a little bit less reliable.
The free ZLIB.DLL from http://www.zlib.net/ has a function to calculate Adler32.
$SAMPLECODE$
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 DECLARE Long adler32 IN Zlib Long Adler32, String Buffer, Long BuffLen * Initialize Adler32 and calculate 1st checksum lnAdler32 = adler32(0, Null, 0) lcText = "Adler32 checksum" lnAdler32 = adler32(lnAdler32, lcText, LEN(lcText)) ? TRANSFORM(lnAdler32, "@0") * Initialize Adler32 again and calculate 2nd checksum lnAdler32 = adler32(0, Null, 0) lcText = "DECLARE Long adler32 IN Zlib Long Adler32, String Buffer, Long BuffLen" lnAdler32 = adler32(lnAdler32, lcText, LEN(lcText)) ? TRANSFORM(lnAdler32, "@0")
Comments