Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using Ionic.Zip to generate zip from C#.net
its working fine upto 1GB.

But When I want to zip the files > 1GB, its giving

"Overflow or Underflow in Arithmetic Operation" error near the "zip.save" statement below.

here is my code snippet:

foreach (ListItem li in cblFiles.Items)
if (li.Selected)
{

// Record the file that was included in readMeMessage
readMeMessage += string.Concat("\t* ", li.Text, Environment.NewLine);

// Now add the file to the ZIP (use a value of "" as the second parameter to put the files in the "root" folder)

zip.AddFile(li.Value, "Your Files");
}



// Send the contents of the ZIP back to the output stream
zip.Save(Response.OutputStream);

please help me to solve this issue, or provide me any alternative link.
Posted

1 solution

There is a number of other open-source solutions, such as #ziplib, 7-Zip and SharpCompress. Please see my past answers with links:
how to add file name in zip folder with same file name in c#[^],
Extract file rar with vb.net[^],
Compare between two folders[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900