Welcome to the Xceed Community Sign in | Join | Help
Community Search  

Appending To A File Inside Zip Archive

Sort Posts: Previous Next
  •  06-24-2008, 11:40 AM Post no. 13184

    Appending To A File Inside Zip Archive

    I'm currently evaluating the Xceed Zip components to optimize an export process in an application.

    We have a process that writes data to a disk file (using a StreamWriter), closes the file and then comes back later to write more data to the same file. This will happen a number of times and when the export is complete the finished file is compressed sent to the customer. The files can be in the region of 1 to 10Gb (uncompressed) and must be compressed in either a GZip of Zip format. Each Zip archive will only contain 1 file.

    Is is possible using the Xceed Zip components, to write this data out compressed so that I can remove the compression step at the end of my process? From the examples I am not sure how I could append to a file already in a ZIP archive.

    Thanks in advance,

    Shane. 

  •  06-25-2008, 3:24 PM Post no. 13206 in reply to 13184

    Re: Appending To A File Inside Zip Archive

    Adding compressed data to an already compressed file so that the file can be decompressed all at once as if it was compressed all at once is not possible in and of itself

    One workaround would be to use our Real-Time Zip component, and zip the data into a zip file as it arrives to the stream.  However, you would need to keep the stream open until all the data has been received, because the component closes the zip file within the archive if you close the stream.

    The other possibility would be to split all you data into individual files that you zip as they are created, and send the resulting archive at the end, which would then be made of many files.


    André
    Software Developer and Tech Support
    Xceed Software Inc.
  •  06-26-2008, 4:50 AM Post no. 13238 in reply to 13206

    Re: Appending To A File Inside Zip Archive

    Thanks for the response André.

    I'll take a look into your alternative options.

     

    Shane.

     

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