Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SYS(2007) methodology
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00812943
Message ID:
00812970
Views:
17
This message has been marked as the solution to the initial question of the thread.
Hi Hugh,

The Adler32 is different from CRC32. It's much faster but a litlle bit less reliable. You can use free ZLIB.DLL from http://gnuwin32.sourceforge.net/packages/zlib.htm to calculate Adler32.
DECLARE Long adler32 IN Zlib Long Adler32, String Buffer, Long BuffLen

* Initialize Adler32 checksum
lnAdler32 = adler32(0, Null, 0)
lcText = "Adler32 checksum"
lnAdler32 = adler32(lnAdler32, lcText, LEN(lcText))
? TRANSFORM(lnAdler32, "@0")

* Initialize again Adler32 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")
>Hi all,
>
>Does anyone know whether SYS(2007) returns the same as Adler32?
>
>If not, does anyone know where to find a library that can be used to return an Adler32 checksum for a passed string?
>
>Hugh
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform