problem by creating Zip file using SharpZipLip

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

i want to create a back of a directory using the SharpZipLib API.
My program generate a zip file, were i can add other file later.
When i try to add another file in an existing zip file, this zip file become
damaged.

Here is how i define my ZipOutPutStream:
ZipOutputStream zipout = new
ZipOutputStream(File.Open(@"H:\comprimed.zip",FileMode.Append,
FileAccess.Write));

can anybody help me?
May i expected something. When i use an other FileMode the zipFile is
overwriten, but it is not want i want.

Thanks.

Hervé
 
Hello,

I think you will need to read every entry of the existing zip file,
uncompress them and compress them in a new file. Once you've done that, add
your new files. That will work.

I have tried you approach but the problem is that you get kind of two zip
files in one (header, data, header, data) and that only the first header and
data are read by my unzipping software (winrar).

hope this helps,
 
Back
Top