2 3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 |
http://bbs.csdn.net/topics/190020986
function CFFunc . Compression . Zlib . DeCompressionStream( const AInStream, AOutStream: TStream) : Boolean ; var ds : TDeCompressionStream; buff : array [ 1..4096 ] of Byte ; iread : integer ; begin Result := True ; AInStream . Position := 0 ; try ds := TDeCompressionStream . Create(AInStream); try repeat iread := ds . Read(buff, sizeof(buff)); if iread > 0 then AOutStream . Write (buff, iread); until (iRead = 0 ); finally ds . Free; end ; except Result := False ; end ; end ; |
gzip, deflate delphi xe 2 解码 成功 哈哈,布布扣,bubuko.com
gzip, deflate delphi xe 2 解码 成功 哈哈
原文地址:http://www.cnblogs.com/delphi-xe5/p/3751243.html