Contents - Index - Previous - Next


ZLibCompressStream method


 

Applies to

TVCLZip component

 

Declaration

 

procedure ZLibCompressStream(inStream, outStream: TStream; HttpCompression: Boolean = False);

 

Description

 

Compresses data in inStream into outStream in ZLib format.  The ZLib compression and decompression routines are good for compressing a single data source most efficiently.  For instance if compressing data to be sent through the network.  Data is not compressed into a PKZip archive in this case.

 

Note that setting PackLevel determines the level of compression for ZLib compression just as it does when compressing pkzip archives.

 

Setting HttpCompression to True will cause the data to be compressed without the normal ZLib headers.  This is mainly for compressing web information for http1.1 compliant compression, that is, compression of web pages.  If you set this to true and if you use any of the ZLib decompression methods to decompress the same data you should set HttpCompression to true when calling that method too.