Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:38

0001 #ifndef __XRDOUCCRC32C_HH__
0002 #define __XRDOUCCRC32C_HH__
0003 // crc32c.h -- header for crc32c.c
0004 // Copyright (C) 2015 Mark Adler
0005 // See crc32c.c for the license.
0006 
0007 #include <cstddef>
0008 #include <cstdint>
0009 
0010 // Return the CRC-32C of buf[0..len-1] given the starting CRC crc.  This can be
0011 // used to calculate the CRC of a sequence of bytes a chunk at a time, using
0012 // the previously returned crc in the next call.  The first call must be with
0013 // crc == 0.  crc32c() uses the Intel crc32 hardware instruction if available.
0014 uint32_t crc32c(uint32_t crc, void const *buf, size_t len);
0015 
0016 // crc32c_sw() is the same, but does not use the hardware instruction, even if
0017 // available.
0018 uint32_t crc32c_sw(uint32_t crc, void const *buf, size_t len);
0019 #endif