Compute the CRC-32 checksum of a buffer, using a hardware-accelerated implementation if available or a portable software implementation as a default.
Declared in <folly/hash/Checksum.h>
uint32_t
crc32(
uint8_t const* data,
size_t nbytes,
uint32_t startingChecksum = ~0U);
The CRC-32 checksum of the buffer
| Name | Description |
|---|---|
| data | Pointer to the buffer to checksum |
| nbytes | Number of bytes in the buffer |
| startingChecksum | Initial checksum value to continue from |