Extend a CRC32C value as if trailing zero bytes were appended.
Declared in <absl/crc/crc32c.h>
crc32c_t
ExtendCrc32cByZeroes(
crc32c_t initial_crc,
size_t length);
Computes a CRC32C value for a buffer with an initial_crc CRC32C value, where length bytes with a value of 0 are appended to the buffer. Using this function is more efficient than computing a CRC32C value for the combined buffer from scratch.
This operation has a runtime cost of O(log(length))
The CRC32C value of the extended buffer.
| Name | Description |
|---|---|
| initial_crc | The CRC32C value of the existing buffer. |
| length | The number of zero bytes appended. |