Stores a checksum value with this non-empty cord instance, for later retrieval.
Declared in <absl/strings/cord.h>
void
SetExpectedChecksum(uint32_t crc);
The expected checksum is a number stored out-of-band, alongside the data. It is preserved across copies and assignments, but any mutations to a cord will cause it to lose its expected checksum.
The expected checksum is not part of a Cord's value, and does not affect operations such as equality or hashing.
This field is intended to store a CRC32C checksum for later validation, to help support end-to-end checksum workflows. However, the Cord API itself does no CRC validation, and assigns no meaning to this number.
This call has no effect if this cord is empty.
| Name | Description |
|---|---|
| crc | The checksum value to store with the Cord. |