Daniel注:是一套不错的库,我写的这篇简短的介绍希望对大家有用^_^
ZlibEx
作者: brent sherwood(http://www.base2ti.com/)
--------------------------------------------------------
最新版下载Download
--------------------------------------------------------
http://www.base2ti.com/cgi-bin/download.exe?folder=delphi+zlib&file=delphi+zlib+1.2.3
this software is provided "as-is", without any express or implied warranty.
in no event will the authors be held liable for any damages arising from the
use of this software.
--------------------------------------------------------
安装Installation
--------------------------------------------------------
首先,拷贝所有文件到一个文件夹(比如,c:\delphi\zlib)。
再把这个路径添加到environment options中的library path中。
最后,在需要使用的时候use zlibex
---------------------------------------------------------
压缩和解压How to use
---------------------------------------------------------
//压缩Buffer
procedure ZCompress(const inBuffer: Pointer; inSize: Integer;
out outBuffer: Pointer; out outSize: Integer;
level: TZCompressionLevel,',',');
//解压Buffer
procedure ZDecompress(const inBuffer: Pointer; inSize: Integer;
out outBuffer: Pointer; out outSize: Integer; outEstimate: Integer,',',');
//压缩流
procedure ZCompressStream(inStream, outStream: TStream;
level: TZCompressionLevel,',',');
//解压流
procedure ZDecompressStream(inStream, outStream: TStream,',',');
//压缩字符串
function ZCompressStr(const s: String; level: TZCompressionLevel): String;
//解压字符串
function ZDecompressStr(const s: String): String;
--------------------------------------------------------
文件清单Content
--------------------------------------------------------
zlibex.pas
objects files used by zlibex.pas
adler32.obj
compress.obj
crc32.obj
deflate.obj
infback.obj
inffast.obj
inflate.obj
inftrees.obj
trees.obj
--------------------------------------------------------
zlib 源文件(http://www.gzip.org/zlib)
--------------------------------------------------------
adler32.c
compress.c
crc32.c
deflate.c
example.c
gzio.c
infback.c
inffast.c
inflate.c
inftrees.c
minigzip.c
trees.c
uncompr.c
关键字词: