Questions tagged [dotnetzip]

Questions dealing with the DotNetZip open-source zip library for .NET

DotNetZip is an open source zip library. DotNetZip works on PCs with the full .NET Framework, and also runs on mobile devices that use the .NET Compact Framework. Silverlight is also supported.

Below is an example of using the library with C#:

 using (ZipFile zip = new ZipFile())
 {
     // add this map file into the "images" directory in the zip archive
     zip.AddFile("c:\\images\\personal\\7440-N49th.png", "images");
     // add the report into a different directory in the archive
     zip.AddFile("c:\\Reports\\2008-Regional-Sales-Report.pdf", "files");
     zip.AddFile("ReadMe.txt");
     zip.Save("MyZipFile.zip");
 }

Note: Just for reference the project builds into Ionic.Zip.dll

Installation

DotNetZip can most easily be installed through its NuGet package.

Install-Package DotNetZip
460 questions
0
votes
1 answer

How to get progress of ZipFile.Read()

I'm using this code ; using (ZipFile zip = ZipFile.Read(FileName)) { zip.ExtractProgress += ExtractProgressHandler; zip.ReadProgress += ReadProgressHandler; zip.ExtractAll(AppDomain.CurrentDomain.BaseDirectory + "\\Library\\" +…
Trax
  • 943
  • 2
  • 12
  • 30
0
votes
2 answers

DotNetZip zipping files with Arabic names

When creating a zip file out of many Arabic named files, I have as prompted in DotNetZip's FAQ changed the code page to the following: Using zip As New ZipFile() zip.AddDirectoryByName("Files") …
Nal
  • 121
  • 2
  • 15
0
votes
0 answers

DotNetZip extracting files (empty but still filename) if password wrong

I am using dotnetzip and using the AES encryption option. When extracting if I enter the correct password everything works great. However if I enter a wrong password then it tells me its the wrong password but it still extracts the folder and shows…
john
  • 75
  • 1
  • 1
  • 8
0
votes
1 answer

How to zip files with relative path

I'm trying to write a little backup-tool in C#. The files I want to backup (and zip) are stored like this: c:\1\2\3\files\backupfile1.txt c:\1\2\3\files\backupfile2.txt but also like this: c:\1\2\3\files\1\backupfile3.txt The user has to specify the…
0
votes
1 answer

C# Updating progress bars without blocking form thread

I am trying to update the components on my form with blocking its thread. My program uses DotNetZip to add files into an archive and I am trying to update the progress bars to illustrate the progress made. The SaveProgress method is called when the…
Peter
  • 11
  • 3
0
votes
0 answers

Ionic.Zip is super slow on windows 8

I am using Ionic.Zip 1.9.1.8 ad I recently upgraded to windows 8. In my application I use following command to unzip ad it was working fast and great on windows server 2012. zipFile.ExtractAll(tempFileName); In my windows 8 machine that has the…
Edward Mehr
  • 651
  • 9
  • 21
0
votes
2 answers

Unzip Microsoft Infopath .xsn file with Java

I am facing one issue which is related to unzipping .xsn file from java code. I am stuck up with and looking for some resolution. Guys can you please help me out from this problem? I have tried with java traditional code to ZipFile class.
Ashish Mishra
  • 169
  • 16
0
votes
1 answer

Efficient extracting all files from a zip file

What is the most efficient way to extract all the files from a zip file (and store them in a dictionary file_name->contents) using DotNetZip? The zip is in a slow network location, so I want to make sure it is (a) downloaded and (b) decompressed…
Grzenio
  • 35,875
  • 47
  • 158
  • 240
0
votes
0 answers

Error while unpacking the zip from zip

I have the following file structure: yyyy.zip 12x MM-yyyy.zip each of MM-yyyy.zip 28-31x yyyyMMdd.prn prn in this case is something like txt. I have a path to a month and extracting MM-yyyy.zip works great. Unfortunately, unpacking…
0
votes
1 answer

DotNetZip download zip file from a webservice

I'm trying on c# to download a zip file from a webservice and extract an entry in the memory but when I try to read the stream how is in the documentation of the dotnetzip I get the exception "This stream does not support seek operations” in the…
rlartiga
  • 429
  • 5
  • 21
0
votes
1 answer

Auto Extract a zip file

I'm trying make a program that extracts a specific zip file everytime the program launches. this is my code to create the zip file: //creating the file ZipFile File = new…
user2992413
  • 77
  • 1
  • 8
0
votes
0 answers

Zip the folder is not working first time C# and DotNetZip

I have a DotNetZip code for zipping the folder. It doesnt zip the file for the first time after cleaning the solution. After that it works fine. Can anybody know the issue why its happening?? Button Click Event Code private void button3_Click(object…
DonMax
  • 970
  • 3
  • 12
  • 47
0
votes
0 answers

Add multiple files to a Zip file using DotNetZip is too slow

I followed the example below: (https://dotnetzip.codeplex.com) String[] filenames = { "ReadMe.txt", "c:\\data\\collection.csv", "c:\\reports\\AnnualSummary.pdf"}; using (ZipFile zip = new ZipFile()) { zip.CompressionLevel =…
Tang Thanh Tam
  • 431
  • 3
  • 12
0
votes
0 answers

Getting time remaining from DotNetZip packaging

I have this code: using (var zip = new ZipFile()) { zip.CompressionLevel = CompressionLevel.None; zip.AddDirectory(myDirectoryInfo.FullName); zip.UseZip64WhenSaving = Zip64Option.Always; zip.SaveProgress += SaveProgress; …
Nicros
  • 5,031
  • 12
  • 57
  • 101
0
votes
2 answers

Zip file from URL not valid

I followed another post to be able to zip the content of an URL.. When I click my button Download, I "zip" the content of the URL and I save it in the default download folder... So far this is my code: WebClient wc = new WebClient(); ZipFile…
minoyo
  • 85
  • 1
  • 3
  • 14