Mercurial > vba-clojure
comparison src/win32/7zip/7z/C/7zCrc.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:8ced16adf2e1 | 1:f9f4f1b99eed |
---|---|
1 /* 7zCrc.h -- CRC32 calculation | |
2 2008-03-13 | |
3 Igor Pavlov | |
4 Public domain */ | |
5 | |
6 #ifndef __7Z_CRC_H | |
7 #define __7Z_CRC_H | |
8 | |
9 #include <stddef.h> | |
10 | |
11 #include "Types.h" | |
12 | |
13 extern UInt32 g_CrcTable[]; | |
14 | |
15 void MY_FAST_CALL CrcGenerateTable(void); | |
16 | |
17 #define CRC_INIT_VAL 0xFFFFFFFF | |
18 #define CRC_GET_DIGEST(crc) ((crc) ^ 0xFFFFFFFF) | |
19 #define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) | |
20 | |
21 UInt32 MY_FAST_CALL CrcUpdate(UInt32 crc, const void *data, size_t size); | |
22 UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size); | |
23 | |
24 #endif |