/* Calculate the CRC32 value of a memory buffer. */
uint32_t fdb_calc_crc32(uint32_t crc, const void *buf, size_t size)
/* Calculate the CRC32 value of a memory buffer. */
uint32_t fdb_calc_crc32(uint32_t crc, const void *buf, size_t size)
{
        crc = crc32_table[(crc ^ *p++) & 0xFF] ^ (crc >> 8);
    }
    return crc ^ ~0U;
}