Move CRC32 definition to separate file.

Signed-off-by: aixxe <me@aixxe.net>
This commit is contained in:
aixxe
2016-12-20 13:13:38 +00:00
parent 33f3672867
commit 3b12e00ad1
3 changed files with 22 additions and 6 deletions

View File

@@ -0,0 +1,18 @@
#pragma once
#define CRC32_INIT_VALUE 0xFFFFFFFFUL
#define CRC32_XOR_VALUE 0xFFFFFFFFUL
typedef unsigned int CRC32_t;
typedef void (*CRC32_ProcessBufferFn) (CRC32_t*, const void*, int);
extern CRC32_ProcessBufferFn CRC32_ProcessBuffer;
static void CRC32_Init(CRC32_t* crc) {
*crc = CRC32_INIT_VALUE;
}
static void CRC32_Final(CRC32_t* crc) {
*crc ^= CRC32_XOR_VALUE;
}