diff 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
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/win32/7zip/7z/C/7zCrc.h	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,24 @@
     1.4 +/* 7zCrc.h -- CRC32 calculation
     1.5 +2008-03-13
     1.6 +Igor Pavlov
     1.7 +Public domain */
     1.8 +
     1.9 +#ifndef __7Z_CRC_H
    1.10 +#define __7Z_CRC_H
    1.11 +
    1.12 +#include <stddef.h>
    1.13 +
    1.14 +#include "Types.h"
    1.15 +
    1.16 +extern UInt32 g_CrcTable[];
    1.17 +
    1.18 +void MY_FAST_CALL CrcGenerateTable(void);
    1.19 +
    1.20 +#define CRC_INIT_VAL 0xFFFFFFFF
    1.21 +#define CRC_GET_DIGEST(crc) ((crc) ^ 0xFFFFFFFF)
    1.22 +#define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8))
    1.23 +
    1.24 +UInt32 MY_FAST_CALL CrcUpdate(UInt32 crc, const void *data, size_t size);
    1.25 +UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size);
    1.26 +
    1.27 +#endif