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

How to open up a zip file from MemoryStream

I am using DotNetZip. What I need to do is to open up a zip files with files from the server. The user can then grab the files and store it locally on their machine. What I did before was the following: string path = "Q:\\ZipFiles\\zip" +…
Nate Pet
  • 44,246
  • 124
  • 269
  • 414
0
votes
1 answer

Trying to save zip to stream

I'm trying to save streams of files to a Zip stream. The code: public static MemoryStream ZipFiles(Dictionary files) { var output = new MemoryStream(); using (var zip = new ZipFile()) { foreach (var file in…
otaviosoares
  • 566
  • 7
  • 17
0
votes
2 answers

Passing the uploaded file path to controller action using uploadify

I'm using uploadify in my MVC3 project. It works fine to upload multiple files and saving to folders as well. How to pass the path of the uploaded file to controller action ? -- I need to pass it to the ExtractingZip action of my controller. To…
Karthik Chintala
  • 5,465
  • 5
  • 30
  • 60
0
votes
1 answer

unable to get multiple entries in SelectEntries of DotNetZip

I'm trying to use DotNetZipLib-DevKit-v1.9 in my MVC3 Project to extract the files to a specific folder. What i want is -- How to add multiple entries in zip.SelectEntries method. Here is my code in controller action: public ActionResult…
Karthik Chintala
  • 5,465
  • 5
  • 30
  • 60
0
votes
2 answers

Visual Studio, added DLL reference but type not found

I'm new to Visual Studio and Windows, trying to figure out how to include a 3rd party lib into my vb.net project. I'm using VS2010 "free edition", i've added the required DLL file: Ionic.Zlib.dll and can see it under the references recent tab. The…
RandomUser
  • 4,140
  • 17
  • 58
  • 94
0
votes
0 answers

Error while extracting the zip file

I am facing a problem while extracting some windows .xap, it gives me error show in the image below.. I have tried to replace the current .dll witih new dotnetzip .dll , but still facing same error.. Any Suggestions ??
Viral Parmar
  • 468
  • 2
  • 9
  • 24
0
votes
1 answer

DotNetZip How Add Selected Files without creating folders

I want to add in zip file "test" all pdf files from path using (var zip = new ZipFile()) { zip.AddSelectedFiles("*.pdf",path); zip.Save(path+"/test.zip"); } when test.zip file…
Alex
  • 8,908
  • 28
  • 103
  • 157
0
votes
1 answer

DotNetZip Get uncompressed stream without uncompressing the whole stream

I have a ZipEntry record and I need to read a couple of bytes of it (the whole size is several hundred megabytes). There is ZipEntry.Extract method but as I understand it extracts the whole record. Is there any way to get some stream which would…
SiberianGuy
  • 24,674
  • 56
  • 152
  • 266
0
votes
1 answer

Add file at root of zip file using DotNetZip with classic ASP

I have DotNetZip installed and running fine on a Windows 2008 server. Using a classic ASP page, I want to bundle a bunch of comma-delimited files to a user and send it over in a zip file. The following code works fine but it stores all the path…
Tom
  • 4,467
  • 17
  • 59
  • 91
0
votes
2 answers

getting "Stream Was Not Writable" while saving an XML document that I read via a stream from a zip file

I have a zip file that contains an xml file, I'm Loading this xml file to an xml document without having to extract the file. this is done via a stream. after doing so, I'm modifying the inner text of some nodes. The Problem is that I'm getting the…
vexe
  • 5,433
  • 12
  • 52
  • 81
0
votes
2 answers

Best way to extract .zip and put in .jar

I have been trying to find the best way to do this I have thought of extracting the contents of the .jar then moving the files into the directory then putting it back as a jar. Im not sure is the best solution or how I will do it. I have looked at…
0
votes
2 answers

Ignore arborescence in a zip and extract in root with DotNetZip

I have a password protected zipped file which contains another pw zipped file and I want to retrieve a xml file under a folder 0 inside the second zip. But I would like to have this xml in the root folder (args[0]), Do you have an idea ? It is…
xenom
  • 377
  • 1
  • 5
  • 15
0
votes
2 answers

Create a file within a Zip file in C#

Is it possible to create a file within a Zip file? Let's say I have a file abc.zip and want to create a file in it named SomeFile.txt. Is it possible? [I am using a dll Ionic.Zip which helps with Zip file manipulation]. Also, I want to do this…
Ebad Masood
  • 2,389
  • 28
  • 46
0
votes
1 answer

No Ionic.Zlib.DeflateStream.BaseStream

I'm working with Ionic.Zlib.DeflateStream (I think aka DotNetZip) in C# code and notice it doesn't have a BaseStream property like System.IO.Compression.DeflateStream does. Is there any simple way to access this? Maybe a partial class or extension…
eselk
  • 6,764
  • 7
  • 60
  • 93
0
votes
2 answers

Trying to merge two zip files into 1 using c# and Ionic.dll

Here is the code ZipFile zipnew = ZipFile.Read(strPath); if (!File.Exists(path)) { using (ZipFile zip = new ZipFile()) { zip.Save(path); } } string tmpname = fpath + "\\abtemp"; ZipFile zipold = ZipFile.Read(path); …
Joe
  • 3
  • 2
1 2 3
30
31