BWAPI
|
00001 /*****************************************************************************/ 00002 /* pklib.h Copyright (c) Ladislav Zezula 2003 */ 00003 /*---------------------------------------------------------------------------*/ 00004 /* Header file for PKWARE Data Compression Library */ 00005 /*---------------------------------------------------------------------------*/ 00006 /* Date Ver Who Comment */ 00007 /* -------- ---- --- ------- */ 00008 /* 31.03.03 1.00 Lad The first version of pkware.h */ 00009 /*****************************************************************************/ 00010 00011 #ifndef __PKLIB_H__ 00012 #define __PKLIB_H__ 00013 00014 //----------------------------------------------------------------------------- 00015 // Defines 00016 00017 #define CMP_BUFFER_SIZE 36312 // Size of compression buffer 00018 #define EXP_BUFFER_SIZE 12596 // Size of decompress buffer 00019 00020 #define CMP_BINARY 0 // Binary compression 00021 #define CMP_ASCII 1 // Ascii compression 00022 00023 #define CMP_NO_ERROR 0 00024 #define CMP_INVALID_DICTSIZE 1 00025 #define CMP_INVALID_MODE 2 00026 #define CMP_BAD_DATA 3 00027 #define CMP_ABORT 4 00028 00029 //----------------------------------------------------------------------------- 00030 // Define calling convention 00031 00032 //#define PKEXPORT 00033 #define PKEXPORT __cdecl // Use for normal __cdecl calling 00034 //#define PKEXPORT __stdcall 00035 //#define PKEXPORT __fastcall 00036 00037 //----------------------------------------------------------------------------- 00038 // Public functions 00039 00040 #ifdef __cplusplus 00041 extern "C" { 00042 #endif 00043 00044 unsigned int PKEXPORT implode( 00045 unsigned int (PKEXPORT* read_buf)(char *buf, unsigned int *size, void *param), 00046 void (PKEXPORT* write_buf)(char *buf, unsigned int *size, void *param), 00047 char *work_buf, 00048 void *param, 00049 unsigned int *type, 00050 unsigned int *dsize); 00051 00052 00053 unsigned int PKEXPORT explode( 00054 unsigned int (PKEXPORT* read_buf)(char *buf, unsigned int *size, void *param), 00055 void (PKEXPORT* write_buf)(char *buf, unsigned int *size, void *param), 00056 char *work_buf, 00057 void *param); 00058 00059 // The original name "crc32" was changed to "crc32pk" due 00060 // to compatibility with zlib 00061 unsigned long PKEXPORT crc32pk(char *buffer, unsigned int *size, unsigned long *old_crc); 00062 00063 #ifdef __cplusplus 00064 } // End of 'extern "C"' declaration 00065 #endif 00066 00067 #endif // __PKLIB_H__