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

Synopsis

Declared in <absl/crc/crc32c.h>

crc32c_t
MemcpyCrc32c(
    void* dest,
    void const* src,
    size_t count,
    crc32c_t initial_crc = crc32c_t{0});

Description

Copies src to dest using memcpy() semantics, returning the CRC32C value of the copied buffer.

Using MemcpyCrc32c() is potentially faster than performing the memcpy() and ComputeCrc32c() operations separately.

Return Value

The CRC32C value of the copied bytes.

Parameters

Name

Description

dest

The destination buffer.

src

The source buffer.

count

The number of bytes to copy.

initial_crc

The CRC32C value to extend.

Created with MrDocs