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

Add multiple crystal reports pdfs to zip file

I'm trying to export the pdf files from Crystal to streams, then I want to add them (7 total) to a zip file using the DotNetZip Library. I'm just trying to add one below. I have a feeling I'm way off. Please help. MemoryStream…
0
votes
2 answers

DotNetZip performance issue, but only on one specific server

I'm having a wierd performance problem with the DotNetZip library. In the application (which runs under asp.net) i'm reading a set of files from the database and packs them on-the-fly into a zip file for the user to download. Everything works fine…
Anttu
  • 1,076
  • 1
  • 10
  • 21
0
votes
0 answers

DotNetZip IOException cannot extract - file already exists

I have a .zip Archive generated with compress-archive. The archive opens fine with Windows Explorer and extracts fine with 7zip. It has subfolders. On extraction via extractall + overwritesilently, I get a System.IOException saying that the file…
Andreas Reiff
  • 7,961
  • 10
  • 50
  • 104
0
votes
1 answer

Run self extracting exe after extraction C# - DotNetZip

I am trying to create a self extracting exe. Creating it is no problem. Where I am facing problems is Setting the extraction path where the exe exists Running the extracted exe. For the second part, it is most probable that I must have the…
user349026
0
votes
0 answers

Why has my project started showing reference to DotNetZip?

I am moving to another machine and have installed latest version of VS 2022. I have references to Ionic.Zlib in my project but now it started showing reference to DotNetZip as well. Due to this it throws a compile time error - The type 'GZipStream'…
Jordan J
  • 21
  • 3
0
votes
0 answers

Split a 50mb zip file into multiple 10mb zips Dotnetzip

Currently I have this problem, I am developing an MVC application for selling photos, I have a zip file that weighs 50mb that contains a list of photos, I want that when I press a button it will split that file into several zip files that weigh…
pipex98
  • 1
  • 1
0
votes
1 answer

DotnetZip change of vendor number in winzip AES field prevents decryption

I have an archive with an encrypted entry. When I read and save with DotnetZip I can't unencrypt the entry anymore. Looking at the raw data, the order of the extra field has changed. There are two fields, the unix timestamp and something else. I'm…
TomMaier
  • 131
  • 1
  • 2
  • 9
0
votes
0 answers

DotNetZip doesn't close the self extractor form until the post extraction run program closes

I'm using DotNetZip to make a self-extracting archive (SFXtest.exe) which runs a program once extracted (testapp.exe) - the problem I'm having is that the form displayed during the extraction remains showing until testapp.exe closes - ideally I…
0
votes
1 answer

ASP.NET MVC: how to return a file from a stream

I'm trying to return a zipped file public FileResult Download() { MemoryStream outputStream = new MemoryStream(); using (ZipFile zip = new ZipFile()) { …
1gn1ter
  • 1,414
  • 2
  • 22
  • 47
0
votes
2 answers

Cannot access a closed file in ASP.Net (saving files in zip file)

I got this error "Cannot access a closed file" when I save more than one file in zip. This is the code. Error at zip.Save(NewZipPath); internal static string UpdateZipFile(string PdfPath, string ZipPath, string NewZipPath,…
Kashif
  • 14,071
  • 18
  • 66
  • 98
0
votes
2 answers

Unable to create zip file using Ionic.Zip

I'm not sure where and what am I doing wrong, but the zip that I'm creating using DotNetZip library, is creating a zip file whose contents are blank. Or the size of file in zip is showing as 0Kb and unable to open it. Code: public static async Task…
Aniruddha
  • 837
  • 3
  • 13
  • 37
0
votes
0 answers

Unzip file using DotNetZip not wokring on Mac

I am downloading a zipped folder using DotNetZip, file is downloading && its extracting on windows but when i am trying to Un zip that zip folder, it is not opening. On mac machine? //Define file Type string fileType =…
0
votes
0 answers

Extract specific file extension files with DotNetZip's ExtractSelectedEntries "Illegal characters in path."

I'm trying to extract files from within a zip file using DotNetZip. When I use the wildcard character I get an error "System.ArgumentException: 'Illegal characters in path.'" on ExtractSelectedEntries The zip file contains a single text file, no…
madlan
  • 1,387
  • 10
  • 34
  • 63
0
votes
1 answer

Unzip archive with extra data in C# with Ionic.Zip

I need to extract data from zip file that contains extra data. When I opening it with 7-zip, it works fine, but there is warning in properties - "There are some data after the end of payload data" But when I trying to unzip it with DotNetZip it…
PsiHamster
  • 255
  • 2
  • 11
0
votes
1 answer

How to skip ZIP64 format while zipping file above 4GB size in c#

Here I am trying to create zip file using .net 4.5 version which are having size greater than 4 GB. File format created as ZIP64. After that there is one more program written in java which will unzip and process. But java code is throwing error like…
sainath sagar
  • 499
  • 2
  • 10
  • 28