edtFTPnet/PRO - Secure FTP component for .NET | Free Trial | Pricing
Flag to enable or disable compression for FTP/FTPS/SFTP transfers.

Namespace: EnterpriseDT.Net.Ftp
Assembly: edtFTPnetPRO (in edtFTPnetPRO.dll) Version: 9.4.0.40

Syntax

C#
public override bool CompressionPreferred { get; set; }
Visual Basic
Public Overrides Property CompressionPreferred As Boolean
	Get
	Set
Visual C++
public:
virtual property bool CompressionPreferred {
	bool get () override;
	void set (bool value) override;
}

Remarks

Some FTP/FTPS servers support the MODE Z command, permitting transfers to be compressed. This speeds up transfers significantly for files that are compressible such as text files. Most SFTP servers also support compression. Note that setting this flag to true does not guarantee that compression will occur, as it must be supported by the server.

If this flag is switched on, MODE Z compression is enabled if the FTP/FTPS server permits it. If the flag is later switched off, MODE Z compression is not disabled until the connection is closed and then re-opened again. For SFTP servers, zlib compression is set as the preferred compression, and will be used if supported by the server (and it can alter PreferredCompressionAlgorithms, adding zlib compression if it is not present).

See Also