38 lines
851 B
C
38 lines
851 B
C
#ifndef _crc32_h_
|
|
#define _crc32_h_
|
|
|
|
#pragma pack(push, 1)
|
|
struct BMPHeader {
|
|
char bfType[2];
|
|
uint32_t bfSize;
|
|
uint16_t bfReserved1;
|
|
uint16_t bfReserved2;
|
|
uint32_t bfOffBits;
|
|
uint32_t biSize;
|
|
int32_t biWidth;
|
|
int32_t biHeight;
|
|
uint16_t biPlanes;
|
|
uint16_t biBitCount;
|
|
uint32_t biCompression;
|
|
uint32_t biSizeImage;
|
|
int32_t biXPelsPerMeter;
|
|
int32_t biYPelsPerMeter;
|
|
uint32_t biClrUsed;
|
|
uint32_t biClrImportant;
|
|
};
|
|
#pragma pack(pop)
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
unsigned int crc32(unsigned int crc, const void *buf, size_t len);
|
|
void crc32init(unsigned int *crc);
|
|
void crc32update(unsigned int *crc, const void * b, size_t len);
|
|
void crc32final(unsigned int *crc);
|
|
unsigned int crcsimple(const void *buf, size_t len);
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|