Linux Standard Base Core Specification, Generic Part | ||
---|---|---|
<<< Previous | Next >>> |
The adler32() function shall compute a running Adler-32 checksum (as described in RFC 1950: ZLIB Compressed Data Format Specication). On entry, adler is the previous value for the checksum, and buf shall point to an array of len bytes of data to be added to this checksum. The adler32() function shall return the new checksum.
If buf is NULL
(or
Z_NULL
), adler32()
shall return the initial checksum.
The following code fragment demonstrates typical usage of the adler32() function:
uLong adler = adler32(0L, Z_NULL, 0); while (read_buffer(buffer, length) != EOF) { adler = adler32(adler, buffer, length); } if (adler != original_adler) error(); |
<<< Previous | Home | Next >>> |
Interface Definitions for libz | Up | compress |