2007-01-29 01:18:16 +00:00
|
|
|
#ifndef __crc32_h__
|
|
|
|
#define __crc32_h__
|
|
|
|
|
2009-01-09 09:29:17 +00:00
|
|
|
#include "compat.h"
|
|
|
|
|
2012-11-05 02:49:08 +00:00
|
|
|
#ifdef EXTERNC
|
2007-01-29 01:18:16 +00:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-09-30 04:15:04 +00:00
|
|
|
#define POLY 0xEDB88320
|
2009-12-14 05:23:29 +00:00
|
|
|
|
2014-09-30 04:15:04 +00:00
|
|
|
#ifdef BITNESS64
|
|
|
|
extern uint32_t crc32table[8][256];
|
|
|
|
#else
|
|
|
|
extern uint32_t crc32table[4][256];
|
|
|
|
#endif
|
2009-12-14 05:23:29 +00:00
|
|
|
|
2014-09-30 04:15:04 +00:00
|
|
|
extern uint32_t crc32(const void* data, size_t length, uint32_t crc);
|
|
|
|
extern void initcrc32table(void);
|
2007-01-29 01:18:16 +00:00
|
|
|
|
2012-11-05 02:49:08 +00:00
|
|
|
#ifdef EXTERNC
|
2007-01-29 01:18:16 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|