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

Name

Description

crc32c_t [constructor]

Constructors

operator=

Copy‐assign a CRC32C value.

operator uint32_t

Convert the CRC32C value to its raw 32‐bit checksum.

Friends

Name

Description

absl::AbslStringify

Format 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

Name

Description

ComputeCrc32c

Compute the CRC32C value of the provided string.

ConcatCrc32c

Compute the CRC32C value of two concatenated buffers.

ExtendCrc32c

Compute a CRC32C value from an existing value and an additional buffer.

ExtendCrc32cByZeroes

Extend a CRC32C value as if trailing zero bytes were appended.

MemcpyCrc32c

Copy bytes while computing the CRC32C value of the copied data.

RemoveCrc32cPrefix

Compute the CRC32C value of a buffer with a prefix removed.

RemoveCrc32cSuffix

Compute the CRC32C value of a buffer with a suffix removed.

Created with MrDocs