Current News
Archived News
Search News
Discussion Forum


Old Forum
Install Programs More Downloads...
Troubleshooting
Source Code
Format Specs.
Misc. Information
Non-SF Stuff
Links




CommitLineData
3e09a0ee 1/*****************************************************************************/
2/* pklib.h Copyright (c) Ladislav Zezula 2003 */
3/*---------------------------------------------------------------------------*/
4/* Header file for PKWARE Data Compression Library */
5/*---------------------------------------------------------------------------*/
6/* Date Ver Who Comment */
7/* -------- ---- --- ------- */
8/* 31.03.03 1.00 Lad The first version of pkware.h */
9/*****************************************************************************/
10
11#ifndef __PKLIB_H__
12#define __PKLIB_H__
13
14//-----------------------------------------------------------------------------
15// Defines
16
17#define CMP_BUFFER_SIZE 36312 // Size of compression buffer
18#define EXP_BUFFER_SIZE 12596 // Size of decompress buffer
19
20#define CMP_BINARY 0 // Binary compression
21#define CMP_ASCII 1 // Ascii compression
22
23#define CMP_NO_ERROR 0
24#define CMP_INVALID_DICTSIZE 1
25#define CMP_INVALID_MODE 2
26#define CMP_BAD_DATA 3
27#define CMP_ABORT 4
28
29//-----------------------------------------------------------------------------
30// Define calling convention
31
32#define PKEXPORT
33//#define PKEXPORT __cdecl // Use for normal __cdecl calling
34//#define PKEXPORT __stdcall
35//#define PKEXPORT __fastcall
36
37//-----------------------------------------------------------------------------
38// Public functions
39
40#ifdef __cplusplus
41 extern "C" {
42#endif
43
44unsigned int PKEXPORT implode(
45 unsigned int (*read_buf)(char *buf, unsigned int *size, void *param),
46 void (*write_buf)(char *buf, unsigned int *size, void *param),
47 char *work_buf,
48 void *param,
49 unsigned int *type,
50 unsigned int *dsize);
51
52
53unsigned int PKEXPORT explode(
54 unsigned int (*read_buf)(char *buf, unsigned int *size, void *param),
55 void (*write_buf)(char *buf, unsigned int *size, void *param),
56 char *work_buf,
57 void *param);
58
59// The original name "crc32" was changed to "crc32pk" due
60// to compatibility with zlib
61unsigned long PKEXPORT crc32pk(char *buffer, unsigned int *size, unsigned long *old_crc);
62
63#ifdef __cplusplus
64 } // End of 'extern "C"' declaration
65#endif
66
67#endif // __PKLIB_H__