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
6
votes
3 answers

How can I reduce the time taken to extract files?

I made a program in C# where it processes about 30 zipped folders which have about 35000 files in total. My purpose is to read every single file for processing its information. As of now, my code extracts all the folders and then read the files. The…
6
votes
2 answers

C# .NET Why Stream.Seek is required when unzipping stream

I'm working on a project where I need the ability to unzip streams and byte arrays as well as zip them. I was running some unit tests that create the Zip from a stream and then unzip them and when I unzip them, the only way that DonNetZip sees them…
gcoleman0828
  • 1,541
  • 3
  • 30
  • 49
6
votes
1 answer

Is there a way to decompress a DynaZip Max file with another library? F.E. DotNetZip

I have a database in which we stored pdf files compressed with DynaZip Max Secure, using the following code: MemoryStream msIN = new System.IO.MemoryStream(); //Input MemoryStream MemoryStream msZip = new System.IO.MemoryStream(); //Compressed…
Alberto Rechy
  • 145
  • 1
  • 12
6
votes
1 answer

How to Use DotNetZip to extract XML file from zip

I'm using the latest version of DotNetZip, and I have a zip file with 5 XMLs on it. I want to open the zip, read the XML files and set a String with the value of the XML. How can I do this? Code: //thats my old way of doing it.But I needed the…
Bruno
  • 135
  • 3
  • 10
6
votes
3 answers

Add Folders to Root of Zip Using Ionic Zip Library

what I'm trying to do is add a list of folders and files all to the root of my Zip file, using the Ionic Zip library (c#). Here's what I have so far string k = "B:/My Documents/Workspace"; private void button1_Click(object sender, EventArgs e) { …
Movieboy
  • 373
  • 1
  • 3
  • 16
6
votes
2 answers

How to check whether file exists in zip file using dotnetzip

I am creating zip using dotnetzip library. But I don't know how to check if a file exists in the zip. If the file exists then I will update the file with path. public void makezip(string flname) { string fln =flname; string…
chetan
  • 129
  • 1
  • 2
  • 12
5
votes
3 answers

How can I optimize or limit the CPU usage a zip process (DotNetZip) in c#?

Good day guys I have an app that I use to archive a folder using the DotNetZip library. I notice that when it goes to the actual "zipping" process, it uses up 100% of the CPU. This app will be used in conjunction with another (a tcp chat…
Raphael
  • 562
  • 2
  • 9
  • 21
5
votes
1 answer

C# DotNetZip Error: The final hash has not been computed. at Ionic.Zip.WinZipAesCipherStream.get_FinalAuthentication()

Most of the time this code works, however, about 1/3 of the time, it gets about 80% of the way through and fails. The unzipping fails when unzipping xray image files. (They are numbered files with no file extension.) It seems to be able to handle…
Mr.Robot
  • 123
  • 2
  • 16
5
votes
2 answers

Ionic.Zip (DotNetZip) hangs with in save method with IO.MemoryStream

I'll try to create an zip file with the DotNetZip-Libary with 106 Images (675MB) with the following code: Public Function GetZip() As Byte() Dim zip As New Ionic.Zip.ZipFile(String.Format("{0}.zip", Me.GallerySystemName)) AddHandler…
Jan
  • 363
  • 1
  • 4
  • 10
5
votes
1 answer

How to give an Order to the files included in zip file created with dotnet Zip

I would like to be able to include the file with a given order while creating a zip while using DotNet Zip. Files don't appear in the sequence they were added to the zip.For now the order appears to be random. I would like to have the files…
Aditya Korti
  • 692
  • 2
  • 12
  • 28
5
votes
3 answers

DotNetZip trouble with russian encoding

i use DotNetZip in my project. using (var zip = new ZipFile()) { zip.ProvisionalAlternateEncoding = System.Text.Encoding.GetEncoding(866); zip.AddFile(filename, "directory\\in\\archive"); zip.Save("archive.zip"); } all ok but when i…
Xaver
  • 991
  • 2
  • 19
  • 37
5
votes
3 answers

DotNetZip trouble with coding

I am using DotNetZip. When i am archiving file which have english name all normally. but when i archiving file with russian names in result archive with bad names of file. Some peoplese said that string ZipConstants.DefaultCodePage = 866; But it…
Xaver
  • 991
  • 2
  • 19
  • 37
5
votes
4 answers

Add Files Into Existing Zip

I can successfully extract files from a zip folder into a folder, but I am not quite sure how to take those files and add them into an existing zip file. I extract them into a directory onto the desktop called "mod", and then I need to add them to…
TheUnrealMegashark
  • 309
  • 1
  • 6
  • 19
5
votes
2 answers

How do I install DotNetZip?

As I am pretty new to Visual Studio, this question may sound kinda dumb: How do I install DotNetZip library? I am using Visual Studio Express 2012 for Windows Desktop.
osvein
  • 625
  • 2
  • 10
  • 31
5
votes
0 answers

Embedding .dll into .exe

Possible Duplicate: Embed .net dll in c# .exe I have been trying to embed a .dll (Specifically Ionic.Zip.dll) into my application, which then compiles a new .exe using CodeDom and requires the Ionic.Zip.dll. I want to be able to distribute my…
Hexo
  • 215
  • 4
  • 11
1 2
3
30 31