mirror of
https://github.com/mupen64plus/mupen64plus-oldsvn.git
synced 2025-04-02 10:52:35 -04:00
42 lines
2 KiB
C
Executable file
42 lines
2 KiB
C
Executable file
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
* Mupen64plus - 7zCrc.h *
|
|
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
|
|
* Copyright (C) 2008 Tillin9 *
|
|
* 7-Zip Copyright (C) 1999-2007 Igor Pavlov. *
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
* This program is distributed in the hope that it will be useful, *
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
* GNU General Public License for more details. *
|
|
* *
|
|
* You should have received a copy of the GNU General Public License *
|
|
* along with this program; if not, write to the *
|
|
* Free Software Foundation, Inc., *
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
#ifndef __7Z_CRC_H
|
|
#define __7Z_CRC_H
|
|
|
|
#include <stddef.h>
|
|
|
|
#include "Types.h"
|
|
|
|
extern UInt32 g_CrcTable[];
|
|
|
|
void MY_FAST_CALL CrcGenerateTable(void);
|
|
|
|
#define CRC_INIT_VAL 0xFFFFFFFF
|
|
#define CRC_GET_DIGEST(crc) ((crc) ^ 0xFFFFFFFF)
|
|
#define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8))
|
|
|
|
UInt32 MY_FAST_CALL CrcUpdate(UInt32 crc, const void *data, size_t size);
|
|
UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size);
|
|
|
|
#endif
|
|
|