Contents - Index - Next


ZLibCompressBuffer method


 

Applies to

TVCLZip component

 

Declaration

 

procedure ZLibCompressBuffer(const inBuffer: Pointer; inSize: Integer;

                              out outBuffer: Pointer; out outSize: Integer; HttpCompression: Boolean = False);

Description

 

Compresses data in inBuffer.  Resulting Compressed data will be placed in outBufferinSize is the size of inBuffer.  outSize is the resulting size of the Compressed buffer. 

 

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

 

Set HttpCompression to True if you want to compress the data with no ZLib headers. This would mainly be used for http1.1 browser compliant compression. If you set this to True and then go to decompress the data with one of the ZLib decompress methods then you should set HttpCompression to True when uncompressing also.