Linux Standard Base PDA Specification 3.0RC1 | ||
---|---|---|
<<< Previous | Next >>> |
The crc32() function shall compute a running Cyclic Redundancy Check checksum, as defined in ITU-T V.42. On entry, crc 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 crc32() function shall return the new checksum.
If buf is NULL
(or
Z_NULL
), crc32()
shall return the initial checksum.
The following code fragment demonstrates typical usage of the crc32() function:
uLong crc = crc32(0L, Z_NULL, 0); while (read_buffer(buffer, length) != EOF) { crc = crc32(crc, buffer, length); } if (crc != original_crc) error(); |
<<< Previous | Home | Next >>> |
compressBound | Up | deflate |