Skip to content
Andrew Lambert edited this page Nov 26, 2022 · 9 revisions

zlib.Adler32

Method Signature

 Protected Function Adler32(NewData As MemoryBlock, LastAdler As UInt32 = 0, NewDataSize As Integer = -1) As UInt32

Parameters

Name Type Comment
NewData MemoryBlock The next chunk of data to process
LastAdler UInt32 Optional. A previous return value.
NewDataSize Integer Optional. The size of NewData in bytes.

Return value

The checksum value. You may pass this value as LastAdler on a subsequent call to continue processing.

Remarks

This function computes an Adler32 checksum. You may continue processing from a previous call by passing the return value as LastAdler.

For example:

 Dim a1 As UInt32 = zlib.Adler32("Hello, ")
 Dim a2 As UInt32 = zlib.Adler32("World!", a1) ' continue from a1
 If zlib.Adler32("Hello, World!") = a2 Then 
   MsgBox("Checksums match")
 End If

You only need to pass NewDataSize if NewData.Size=SizeUnknown (e.g. converted from a Ptr or returned from a declare.)

See also

Entry-level points of interest denoted by "☜"



Clone this wiki locally