zlib123.h

来自「使用VC++封装为动态库的zlib压缩解压算法,使用方便!」· C头文件 代码 · 共 34 行

H
34
字号
//
//zlib123.h
//
#pragma once

#ifdef ZLIB123_EXPORTS
#define ZLIB123_CLASS __declspec(dllexport)
#else
#define ZLIB123_CLASS __declspec(dllimport)
#endif

#define Z_OK				 0
#define Z_STREAM_END		 1
#define Z_NEED_DICT			 2
#define Z_ERRNO				 (-1)
#define Z_STREAM_ERROR		 (-2)
#define Z_DATA_ERROR		 (-3)
#define Z_MEM_ERROR			 (-4)
#define Z_BUF_ERROR			 (-5)
#define Z_VERSION_ERROR		 (-6)

class ZLIB123_CLASS CZlib123
{
public:
	CZlib123();
	~CZlib123();

public:
	static int UnCompress( unsigned char *destBuff, unsigned long *destLen, 
		                   const unsigned char *sourceBuff, unsigned long  sourceLen );
	static int Compress( unsigned char *destBuff, unsigned long *destLen,
		                 const unsigned char *sourceBuff, unsigned long  sourceLen );
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?