Uncompresses a gzipped data buffer which was compressed with the ZipCompressGzip function.
Zip.bdh
ZipUncompressGzip( in sSource : string, in nSrcLen : number, out sDest : string, in nDstLen : number optional, out nOutLen : number optional ) : boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
sSource | Source buffer to be uncompressed. |
nSrcLen | Length of source buffer. |
sDest | Destination buffer used to store the uncompressed data. |
nDstLen | Length of destination buffer (optional). |
nOutLen | Number of bytes used in the destination buffer to store the uncompressed data (optional). |
transaction TMain var sUnzipped: string; sZipped : string; i : number; nUnzipped: number; nZipped : number; begin nUnzipped := sizeof(sUnzipped); for i := 1 to nUnzipped do sUnzipped[i] := chr(ord('a') + ((i-1) mod 26)); end; ZipCompressGzip(sUnzipped, STRING_COMPLETE, sZipped); nZipped := sizeof(sZipped); WriteLn("Size of unzipped buffer: " + string(nUnzipped)); WriteLn("Size of zipped buffer: " + string(nZipped)); ZipUncompressGzip(sZipped, binlen (sZipped), sUnzipped); WriteData(sUnzipped); end TMain;
Size of unzipped buffer: 254 Size of zipped buffer: 49 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst