0 votes
by (280 points)

Is there currently a way to set the compression level used by rebex ftp client?

In addition is there a way to check to see if the server reports that it supports compression before attempting to turn it on? If not, how is compression support not be allowed by the server currently handled? Is this an exception or event that is raised?

Thanks.

Applies to: Rebex FTP/SSL

1 Answer

+1 vote
by (58.9k points)
edited by
 
Best answer

UPDATE

In version 2016R1 we've added a new CompressionLevel property into ftp.Settings so that you are able to change the Compression level used in mode Z.
Download the free trial of Rebex FTP/SSL

Please note that the setting will only be effective for uploading files, as the compression level used when downloading is determined by the FTP server.

As to your other question - if you turn on mode Z, and the FTP server does not support it, the Rebex FTP client will automatically fallback to mode S (FtpTransferMode.Stream). We have improved the FTP Mode Z documentation on our features page - thanks! This being said, setting the Zlib mode is safe like this whether the server supports it or not:

Ftp ftp = new Ftp();
ftp.TransferMode = FtpTransferMode.Zlib;
by (58.9k points)
edited by
The new version that supports setting the CompressionLevel (in mode Z for upload operations) is now available for download at

http://www.rebex.net/getfile/e487e262a14c42299fde1bca6a22ea43/RebexFtpSsl-HotfixBuild5823-Trial-Binaries.zip
           
I have added the ftp.Settings.CompressionLevel property so that now you can specify the compression level like this:

            Ftp ftp = new Ftp();
            ftp.TransferMode = FtpTransferMode.Zlib;
            ftp.Settings.CompressionLevel = ...; // choose anything from 0(no compression) to 9(best compression). 6 is default.

            ftp.Connect("server", 21);
            // etc.
by (280 points)
Thanks for this. I will download and implement after Christmas.
by (58.9k points)
edited by
This has been officially released as part of Rebex components version 2016R1.
...