xrootd
src
XrdOuc
XrdOucCRC32C.hh
Go to the documentation of this file.
1
#ifndef __XRDOUCCRC32C_HH__
2
#define __XRDOUCCRC32C_HH__
3
// crc32c.h -- header for crc32c.c
4
// Copyright (C) 2015 Mark Adler
5
// See crc32c.c for the license.
6
7
#include <stdint.h>
8
9
// Return the CRC-32C of buf[0..len-1] given the starting CRC crc. This can be
10
// used to calculate the CRC of a sequence of bytes a chunk at a time, using
11
// the previously returned crc in the next call. The first call must be with
12
// crc == 0. crc32c() uses the Intel crc32 hardware instruction if available.
13
uint32_t
crc32c
(uint32_t crc,
void
const
*buf,
size_t
len);
14
15
// crc32c_sw() is the same, but does not use the hardware instruction, even if
16
// available.
17
uint32_t
crc32c_sw
(uint32_t crc,
void
const
*buf,
size_t
len);
18
#endif
crc32c_sw
uint32_t crc32c_sw(uint32_t crc, void const *buf, size_t len)
crc32c
uint32_t crc32c(uint32_t crc, void const *buf, size_t len)
Generated by
1.8.20