annotate 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
rev   line source
rlm@1 1 /* 7zCrc.h -- CRC32 calculation
rlm@1 2 2008-03-13
rlm@1 3 Igor Pavlov
rlm@1 4 Public domain */
rlm@1 5
rlm@1 6 #ifndef __7Z_CRC_H
rlm@1 7 #define __7Z_CRC_H
rlm@1 8
rlm@1 9 #include <stddef.h>
rlm@1 10
rlm@1 11 #include "Types.h"
rlm@1 12
rlm@1 13 extern UInt32 g_CrcTable[];
rlm@1 14
rlm@1 15 void MY_FAST_CALL CrcGenerateTable(void);
rlm@1 16
rlm@1 17 #define CRC_INIT_VAL 0xFFFFFFFF
rlm@1 18 #define CRC_GET_DIGEST(crc) ((crc) ^ 0xFFFFFFFF)
rlm@1 19 #define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8))
rlm@1 20
rlm@1 21 UInt32 MY_FAST_CALL CrcUpdate(UInt32 crc, const void *data, size_t size);
rlm@1 22 UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size);
rlm@1 23
rlm@1 24 #endif