Adler-32 is a simple checksum algorithm. It is not as reliable as a 32-bit cyclic redundancy check, but can be computed much faster.

An Adler-32 checksum is obtained by calculating two 16-bit checksums and concatenating them. The right-most checksum is the sum of all bytes in the string, the left-most checksum is the sum of all individual values of the right-most sum. At the beginning of an Adler-32 run, the right-most sum is initialized to 1, the left-most sum to 0. The sums are done modulo 65521 (the largest prime number smaller than 216), and the bytes are stored in network order (big endian).

External links

  • RFC 1950 - specification, contains example C code
  • ZLib - implements the Adler-32 checksum