SFTP supports the use of data compression to reduce the amount of data that is transmitted. Both the client and server agree on a compression algorithm. They then compress data before sending and decompress data when it is received.
Compression and decompression both use CPU time, but if transmission speeds are slow, transfers can be sped up significantly, particularly if text files are being transferred. A compression factor of 10x is not unusual for text files. Media files are usually compressed already (e.g. JPEG and MPEG) and there will be little or no benefit in using compression. In fact with the added CPU time it may even be detrimental.
Typically, zlib compression is the compression algorithm most commonly supported in SFTP servers, and zlib is supported in edtFTPnet/PRO. No compression is set as the default, and zlib is specified as an option. If the server forces use of zlib compression it will happen automatically. See SSHCompressionAlgorithm for supported algorithms.
If zlib compression is required (and is supported by the server), it should be set as the only compression option. This will force its use, as shown below:
ftpConnection.PreferredCompressionAlgorithms = SSHCompressionAlgorithm.Zlib;
The SSHCompressionAlgorithm enum is used as a bitwise flag, so members of SSHCompressionAlgorithm can be OR'd together to indicate more than one algorithm.
To reset to the default of all compression algorithms enabled, use the All value:
ftpConnection.PreferredCompressionAlgorithms = SSHCompressionAlgorithm.All;