absl::crc32c_t

A strongly-typed integer for holding a CRC32C value.

Synopsis

Declared in <absl/crc/crc32c.h>

class crc32c_t final

Description

Some operators are intentionally omitted. Only equality operators are defined so that crc32c_t can be directly compared. Methods for putting crc32c_t directly into a set are omitted because this is bug-prone due to checksum collisions. Use an explicit conversion to the uint32_t space for operations that treat crc32c_t as an integer.

Member Functions

NameDescription
crc32c_t [constructor]Constructors
operator= Copy-assign a CRC32C value.
operator uint32_t Convert the CRC32C value to its raw 32-bit checksum.

Friends

NameDescription
absl::AbslStringifyFormat a CRC32C value as an eight-digit hexadecimal string.
absl::operator!=Compare two CRC32C values for inequality.
absl::operator==Compare two CRC32C values for equality.

Non-Member Functions

NameDescription
ComputeCrc32cCompute the CRC32C value of the provided string.
ConcatCrc32cCompute the CRC32C value of two concatenated buffers.
ExtendCrc32cCompute a CRC32C value from an existing value and an additional buffer.
ExtendCrc32cByZeroesExtend a CRC32C value as if trailing zero bytes were appended.
MemcpyCrc32cCopy bytes while computing the CRC32C value of the copied data.
RemoveCrc32cPrefixCompute the CRC32C value of a buffer with a prefix removed.
RemoveCrc32cSuffixCompute the CRC32C value of a buffer with a suffix removed.