12 #if defined(__cplusplus)
16 #include "www.evanjones.ca/crc32c.h"
17 #include "gu_macros.h"
21 gu_crc32c_configure();
23 extern CRC32CFunctionPtr gu_crc32c_func;
25 typedef uint32_t gu_crc32c_t;
27 static gu_crc32c_t
const GU_CRC32C_INIT = 0xFFFFFFFF;
29 static GU_FORCE_INLINE
void
30 gu_crc32c_init (gu_crc32c_t* crc)
32 *crc = GU_CRC32C_INIT;
35 static GU_FORCE_INLINE
void
36 gu_crc32c_append (gu_crc32c_t* crc,
const void* data,
size_t size)
38 *crc = gu_crc32c_func (*crc, data, size);
41 static GU_FORCE_INLINE uint32_t
42 gu_crc32c_get (gu_crc32c_t crc)
47 static GU_FORCE_INLINE uint32_t
48 gu_crc32c (
const void* data,
size_t size)
50 return ~(gu_crc32c_func (GU_CRC32C_INIT, data, size));
53 #if defined(__cplusplus)