I am trying to unzip file as it is downloaded, by passing downloaded data stream directly into the decompressor. It would be easy if FTPClient.Get() would return a Stream object that I can pass on. Unfortunatelly, only FTPServer.Get(Stream,string) is available, that lets me put the content of the FTP file into the given stream. This defeats the purpose of Streams, as I have to create a MemoryStream or FileStream to temporarily hold the data, and if the file is large, it won't even fit into the MemoryStream.
I also noticed there is a protected virtual GetOutputStream(), but couldn't find any documentation.
Ideally, the code would look like this:
var gz = new GZipStream( FtpServer.GetStream(file), CompressionMode.Decompress );
// use gz as uncompressed data