22#ifndef albaDataChecksum_h__
23#define albaDataChecksum_h__
33 inline static unsigned long Adler32Checksum(
unsigned char* data,
int len);
45 unsigned long a = 1, b = 0;
48 a = (a + *data++) % 65521;
60 unsigned long chcksum1,
unsigned long chcksum2)
63 unsigned long a = ((chcksum1 & 0xFFFF) + (chcksum2 & 0xFFFF)) % 65521;
64 unsigned long b = ((chcksum1 >> 16) + (chcksum2 >> 16)) % 65521;
68#pragma endregion Inlines
class name: albaDataChecksum Can compute Adler checksum for a given data, and combine two adler check...
static unsigned long Adler32Checksum(unsigned char *data, int len)
Computes Adler32 checksum for the given data.
static unsigned long CombineAdler32Checksums(unsigned long chcksum1, unsigned long chcksum2)
Combines two checksums computed by Adler32Checksum to give a new one.