RetroArch
7zCrc.h
Go to the documentation of this file.
1 /* 7zCrc.h -- CRC32 calculation
2  2009-11-21 : Igor Pavlov : Public domain */
3 
4 #ifndef __7Z_CRC_H
5 #define __7Z_CRC_H
6 
7 #include "7zTypes.h"
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 extern uint32_t g_CrcTable[];
14 
15 /* Call CrcGenerateTable one time before other CRC functions */
17 
18 #define CRC_INIT_VAL 0xFFFFFFFF
19 #define CRC_GET_DIGEST(crc) ((crc) ^ CRC_INIT_VAL)
20 #define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8))
21 
22 uint32_t MY_FAST_CALL CrcUpdate(uint32_t crc, const void *data, size_t size);
23 uint32_t MY_FAST_CALL CrcCalc(const void *data, size_t size);
24 
25 #ifdef __cplusplus
26 }
27 #endif
28 
29 #endif
uint32_t MY_FAST_CALL CrcUpdate(uint32_t crc, const void *data, size_t size)
Definition: 7zCrc.c:40
GLsizeiptr size
Definition: glext.h:6559
Definition: ibxm.h:9
void MY_FAST_CALL CrcGenerateTable(void)
Definition: 7zCrc.c:50
uint32_t MY_FAST_CALL CrcCalc(const void *data, size_t size)
Definition: 7zCrc.c:45
uint32_t g_CrcTable[]
Definition: 7zCrc.c:19
unsigned int uint32_t
Definition: stdint.h:126
#define MY_FAST_CALL
Definition: 7zTypes.h:59