53 lines
No EOL
1.5 KiB
C++
53 lines
No EOL
1.5 KiB
C++
// The following ifdef block is the standard way of creating macros which make exporting
|
|
// from a DLL simpler. All files within this DLL are compiled with the CCZIP_EXPORTS
|
|
// symbol defined on the command line. this symbol should not be defined on any project
|
|
// that uses this DLL. This way any other project whose source files include this file see
|
|
// CCZIP_API functions as being imported from a DLL, whereas this DLL sees symbols
|
|
// defined with this macro as being exported.
|
|
#ifndef ___CCZIP_H___
|
|
#define ___CCZIP_H___
|
|
|
|
//#define CCZIP_DLL_MODE
|
|
|
|
#ifdef CCZIP_DLL_MODE
|
|
#ifdef CCZIP_EXPORTS
|
|
#define CCZIP_API __declspec(dllexport)
|
|
#else
|
|
#define CCZIP_API __declspec(dllimport)
|
|
#endif
|
|
#else
|
|
#define CCZIP_API
|
|
#endif
|
|
|
|
#include "stdio.h"
|
|
#define ZIPBUFSIZE (8192)
|
|
|
|
|
|
class CCZIP_API CCZip
|
|
{
|
|
public:
|
|
CCZip();
|
|
~CCZip();
|
|
|
|
void ZIPSetMode(unsigned int Mode);
|
|
unsigned int ZIPOpen(char *filename, char *fileattr, unsigned int *version = 0, unsigned int *compression = 0);
|
|
unsigned int ZIPFlush();
|
|
unsigned int ZIPWrite(const void *bufVOID,unsigned int sizeT,unsigned int sizeW);
|
|
unsigned int ZIPRead(void *bufVOID,unsigned int sizeT,unsigned int sizeW);
|
|
unsigned int ZIPClose();
|
|
|
|
private:
|
|
char *ZIPBUF;
|
|
char *LZOWRK;
|
|
FILE *ZIPFILE;
|
|
unsigned int ZIPMODEW;
|
|
unsigned int ZIPBufP;
|
|
unsigned int ZIPBufS;
|
|
unsigned int ZIPBufMETHOD;
|
|
|
|
int COMPRESS(unsigned char *source, int lenght, unsigned char *dest);
|
|
int UNCOMPRESS(unsigned char *source, int lenght, unsigned char *dest);
|
|
};
|
|
|
|
|
|
#endif |