Compression: Adler32StringMBS

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Adler32StringMBS(adler as UInt32, buf as string) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method Encryption and Hash MBS Compression Plugin 5.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The adler32 hash function from the zlib library.
Example
dim b as binarystream // some stream
dim adler as Integer
dim data as string
dim originalAdler as Integer = 12345

adler=Adler32MemoryMBS(0,nil,0,0)

data=b.read(10000)
while data<>""
adler=Adler32StringMBS(adler, data)
data=b.read(10000)
wend

if adler <> originalAdler then msgbox "Error in checksum!"

Update a running Adler-32 checksum with the bytes and return the updated checksum. If buf is nil, this function returns the required initial value for the checksum.
An Adler-32 checksum is almost as reliable as a CRC32 but can be computed much faster.

The items on this page are in the following plugins: MBS Compression Plugin.


💬 Ask a question or report a problem