Topic Path: Symbol Reference > Classes > TIdFTP Class > TIdFTP Properties > Compressor Property
ContentsIndexHome
PreviousUpNext
TIdFTP.Compressor Property

Implements a compression/decompression engine for FTP MODE Z deflate transmissions.

property Compressor: TIdZLibCompressorBase;

Compressor is a TIdZLibCompressorBase property that implements support for compression and decompression of data using the "deflate" transmission mode, as described in the Internet Draft "Deflate transmission mode for FTP". 

In deflate transmission mode, data is compressed and transmitted as a stream of octets (8 bit bytes). The sender and receiver rely on a compression engine to perform compression operations (deflate/inflate) and maintain state. The compression engine generates a unique data stream using the ZLIB compressed data format specified in RFC 1950. 

FTP servers can indicate that they support use of the Deflate tramsmission mode by including "MODE Z" as part of a the FEAT response sent during login to the FTP sever. TIdFTP uses the Capabilities property to look for the FEAT response. Please note that not all FTP server implementations support MODE Z deflate transmission mode. 

Applications must assign a TIdZLibCompressorBase or descendant object instance to Compressor to allow use of the ZLib "Deflate" transmission mode. Any resource allocated to Compressor will be freed in the destructor for the FTP client. 

Compressor is used internally in the implementation of the FTP GET and PUT commands when the TransferMode property contains the value dmDeflate. During processing for the PUT command, data is compressed prior to transmission using the object instance in Compressor. During processing for the GET command, data is decompressed after receipt using the object instance in Compressor.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.