Compute a CRC32C value from an existing value and an additional buffer.
Synopsis
Declared in <absl/crc/crc32c.h>
crc32c_t
ExtendCrc32c(
crc32c_t initial_crc,
std::string_view buf_to_add);
Description
Computes a CRC32C value from an initial_crc CRC32C value including the buf_to_add bytes of an additional buffer. Using this function is more efficient than computing a CRC32C value for the combined buffer from scratch.
Note: ExtendCrc32c with an initial_crc of 0 is equivalent to ComputeCrc32c.
This operation has a runtime cost of O(buf_to_add.size())
Return Value
The CRC32C value of the combined buffer.
Parameters
Name |
Description |
initial_crc |
The CRC32C value of the bytes already processed. |
buf_to_add |
The additional bytes to include in the checksum. |
Created with MrDocs