Welcome to the Xceed Community | Help
Community Search  

Extract .gz file from FTP site

Sort Posts: Previous Next
  •  06-08-2008, 1:37 PM Post no. 12777

    Extract .gz file from FTP site

    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! 

     

  •  06-10-2008, 4:30 PM Post no. 12829 in reply to 12777

    Re: Extract .gz file from FTP site

    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.


    André
    Software Developer and Tech Support
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.