Calculate fast Adler-32 checksums for compression integrity.
About
Adler-32 is a fast checksum algorithm used in zlib compression and Zstandard that produces a 32-bit checksum, faster than CRC32 but less robust for short messages.
Specifications
Output Size32 bits
StandardRFC 1950
Standard Year1996
Origin zlib Adler-32 checksum design
Origin Year 1995
Use Cases
—zlib and deflate compression integrity
—Zstandard (zstd) checksums
—Fast error detection in data streams
Security Notice
Adler-32 is not cryptographically secure and should not be used for security purposes.
Frequently Asked Questions
No. Adler-32 is for error detection, not cryptographic security.
Adler-32 is typically faster than CRC32 due to simpler operations (additions vs polynomial division). However, CRC32 has better error detection properties for short messages (< few hundred bytes). Adler-32 was designed for zlib compression (RFC 1950). For very short data, CRC32 is more reliable; for longer data, both are effective with Adler-32 being faster.
zlib uses Adler-32 for its speed advantage in software implementations. Mark Adler designed it specifically for this purpose - it's almost as good as CRC for error detection but significantly faster. Modern processors have narrowed this gap with CRC instructions, but Adler-32 remains in zlib for backward compatibility.