Delphi压缩库 ZLibEx 介绍


本文整理自网络,侵删。

 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

相关阅读 >>

Delphi 进程程序多开调用单元

Delphi数值转ip

Delphi ado通用操作数据单元

Delphi 字符串截取

Delphi如何检测form的移动和调整尺寸事件

Delphi 控制台 输入输出实例代码

Delphi 逐个分解后字符串加载到stringgrid1

Delphi图像细化处理

Delphi sender 的用法举例

Delphi 随意将函数执行权限提高到ring0源代码

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...