gcompress.h
来自「一个非常有用的开源代码」· C头文件 代码 · 共 37 行
H
37 行
/* Copyright (C) 2006, Mike Gashler This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. see http://www.gnu.org/copyleft/lesser.html*/#ifndef __GCOMPRESS_H__#define __GCOMPRESS_H__#define GCOMPRESS_CYCLES 4// This is supposed to be a compression utility, but it doesn't really workclass GCompress{public: // Note that the buffer this returns will be as big as the original one, so if you plan // keep it around in memory you should reallocate it. You must delete the buffer it returns. static unsigned char* Compress(const unsigned char* pBytes, int nSize, int* pnOutNewSize); // You must delete the buffer this returns. Returns NULL on failure. static unsigned char* Decompress(const unsigned char* pBytes, int nSize, int* pnOutNewSize);protected: static unsigned char* CompressBlock(const unsigned char* pBytes, int nSize, int* pnOutNewSize); static unsigned char* DecompressBlock(const unsigned char* pBytes, int nSize, int* pnOutNewSize); static int CompressPass(const unsigned char* pIn, unsigned char* pOut, int nSize, int nBlobSize); static int DecompressPass(const unsigned char* pIn, unsigned char* pOut, int nInSize, int nFinalSize);};#endif // __GCOMPRESS_H__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?