-
-
Notifications
You must be signed in to change notification settings - Fork 3
zlib.Adler32
Andrew Lambert edited this page Nov 26, 2022
·
9 revisions
zlib.Adler32
Protected Function Adler32(NewData As MemoryBlock, LastAdler As UInt32 = 0, NewDataSize As Integer = -1) As UInt32
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. |
The checksum value. You may pass this value as LastAdler
on a subsequent call to continue processing.
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.)
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2014-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.