Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET Extract .gz file from FTP site

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #19973 |

    I am trying to write a program in C# that will connect to an FTP site, download a .gz that contains hundreds of files, extract those files to a local folder, then close the connection.   Are there any examples available of this being done?  Do I have to write it in two steps: 

    1) FTP download file to local folder

    2) Extract the files

    Or is it possible to extract it in the stream?  I am very new at this whole stream and compression thing, so any help would be appreciated! 

     

    Imported from legacy forums. Posted by Heavy (had 1423 views)

    User (Old forums)
    Member
    Post count: 23064

    You can use the FtpClient.ReceiveFile( String, Stream ) method overload, which will permit you to receive the file into a stream.  You can wrap a MemoryFile around that stream, and use that MemoryFile to extract the files to the local disk.

    Imported from legacy forums. Posted by André (had 1257 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.