Questions tagged [sharpziplib]

#ziplib (SharpZipLib) is a Zip, GZip, Tar and BZip2 library written entirely in C# for the .NET platform.

The #ziplib (SharpZipLib) is a Zip, GZip, Tar and BZip2 library written entirely in C# for the .NET platform. It is implemented as an assembly (installable in the GAC), and thus can easily be incorporated into other projects (in any .NET language). The creator of #ziplib put it this way: "I've ported the zip library over to C# because I needed gzip/zip compression and I didn't want to use libzip.dll or something like this. I want all in pure C#."

Reference: http://www.icsharpcode.net/opensource/sharpziplib/

Installation

SharpZipLib can most easily be installed through its NuGet package.

Install-Package SharpZipLib
272 questions
1
vote
1 answer

Absolute path directories are created during a zip file download application using ASP.NET

Using this I have written code to first created a zip folder and then download the zip file when user clicks on download all button. It is working fine. But when user extracts that zip file H:/abd/zyc/questionpapers/papername/questionpaper.pdf…
web spider26
  • 252
  • 4
  • 16
0
votes
1 answer

How to add a file in a zip using SharpZibLib in c#

I am trying to add a file to an existing zip using sharpZibLib in c#. When run zip gets qverwrite i.e all files within zip gets deleted and only new file is there in a zip. using (FileStream fileStream = File.Open("D:/Work/Check.zip", FileMode.Open,…
riya
  • 115
  • 2
  • 3
  • 6
0
votes
1 answer

Unzip file and upload contents to Blob Storage using Azure Web Role

I currently have a web role which displays a webpage, the webpage allows the user to select a file from their computer, the web role then uploads the file to some Azure Blob Storage. However the file the user usually uploads is a zip file so i would…
Sami
  • 1,374
  • 1
  • 16
  • 43
0
votes
1 answer

How can I add a ProgressBar to my SharpZipLib utility in C#

I need to include a progressbar in my project but I'm not sure how to do or how successful call to the method that will be updated. The code where I want to include is the following, thank you very much: using System; using System.Collections; using…
chustron
  • 3
  • 3
0
votes
1 answer

Unzip file (odt or docx) in a memory stream

I have been developing an web application with Asp.Net and I'm using SharpZipLib to work with odt files (from Open Office) and in the future docx files (for ms office). I need to open an odt file (like a zip file) change a xml file inside it, zip…
Felipe Oriani
  • 37,948
  • 19
  • 131
  • 194
0
votes
1 answer

Zip files which are located in IsolatedStorage

My application need to download multiple files in Silverlight, and because I don't want to ask user multiple times for permission to save the files, I save the files in IsolatedStorage first and then I want to zip them all to a file and ask once for…
Ben
  • 1,196
  • 2
  • 11
  • 25
0
votes
0 answers

Getting error when calling zipfile.BeginUpdate() for sharpziplib version 1.4.1

Below is the code I am using. private static string ZipFile(string filename, DirectoryInfo oDir) { if (filename.IndexOf(".") > -1) filename = filename.Substring(0, filename.LastIndexOf('.')); string zipfile =…
0
votes
0 answers

C#/ExtJs SharpZilLib generate a corrupted zip

I'm using the library SharpzipLib to create a zip file from files in a memory stream. The issue is that the generated zip seems to be corrupted and I can't open it. MemoryStream outputMemStream = new MemoryStream(); ZipOutputStream…
AnthonyDa
  • 493
  • 15
  • 34
0
votes
1 answer

Zip Azure Storage Files and Return File from Web Api returns corrupted files when unzipped

Zip Azure Storage Files and Return File from Web Api returns corrupted files when unzipped, here is my code. [HttpPost(nameof(DownloadFiles))] public async Task DownloadFiles(List fileNames) { …
John
  • 3
  • 2
0
votes
2 answers

How to move directory in azure and ZIP it using ShareDirectoryClient in azure file share

I am able to move the directory in azure using ShareDirectoryClient successfully. using System; using System.Threading.Tasks; using Azure.Storage.Files.Shares; namespace SO69798149 { class Program { const string MyconnectionString =…
Billy
  • 825
  • 6
  • 21
  • 36
0
votes
1 answer

How to extract more than 900,000 bytes using SharpZipLib BZip2

When using ICSharpCode.SharpZipLib to decompress BZip2 files I am having an issue where only the first 900,000 uncompressed bytes are extracted. I've tried both the BZip2InputStream and the BZip2.Decompress static method to no avail. The compressed…
Patrick Jones
  • 1,896
  • 14
  • 26
0
votes
1 answer

AESKeySize parameter with ZipEntry doesn't seem to allow decompression/unzipping

The following code seems to mostly work fine. But as soon as I apply an encryption value (commented out code) to the ZipEntry, everything seems to fall apart. I get the following exception: ICSharpCode.SharpZipLib.Zip.ZipException: 'The compression…
Heinz
  • 1
0
votes
0 answers

How to secure zip file with password using c# and SharpZipLib

I have to prepare zip file and secure it with password. I'm using C# and SharpZipLib library. I have to return the created file using WebApi. The code below does not work - I can open file without providing password. What do I do wrong? …
mirt
  • 202
  • 3
  • 11
0
votes
3 answers

Error in asp.net but application run smoothly

I got a error: Error 1 Cannot copy assembly 'ICSharpCode.SharpZipLib.dll' to file 'FileLocation\bin\ICSharpCode.SharpZipLib.dll'. Unable to add 'FileLocation\bin\ICSharpCode.SharpZipLib.dll' to the Web site. Unable to add file…
4b0
  • 21,981
  • 30
  • 95
  • 142
0
votes
0 answers

Error GZIP header, first magic byte doesn’t match - How to Decompressing .tar.gz file using SharpZipLib

I’m trying to decompress a compress file with multiple files on it the following code works to .tgz files, but don’t for .tar.gz files What is wrong here? FileInfo infoCompressed = new FileInfo(compressedFilePath); DirectoryInfo destinyDir = new…