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

Delete Folder From .Jar While Treating as a Zip

I need to delete a folder from a .jar file, but treating it as a .zip file with sharpziplib. Is there any way to do so? I have tried before to "unzip" the .jar file using sharpziplib and then delete it and rezip it, but to no avail- not to mention…
TheUnrealMegashark
  • 309
  • 1
  • 6
  • 19
1
vote
1 answer

MSBuild.Community.Tasks.Unzip fails on content file with 0 KB size

I was trying to extract a compressed file (*.zip) using MSBuild.Community.Tasks.Unzip. But, since my compressed file contains some files with 0 KB size, by that reason it is failing with the following error: error MSB4018: The "Unzip" task failed…
RinoTom
  • 2,278
  • 2
  • 26
  • 40
1
vote
3 answers

Issue with Zipped Streams from .Net and reading them from Java

I'm trying to zip a stream from .Net that can be read from Java code. So as input I have a byte array, which I want to compress and I'm expecting to have a binary array. I've tested with SharpZipLib and DotNetZip to the compressed byte array, but…
Stan
  • 11
  • 1
1
vote
3 answers

24GB tar.gz Decompress using sharpziplib

I have a current process to extract tar.gz but the current process can not handle over 4gb... I was wondering what I am doing wrong to cause me to get a error using the sharpzip lib It says that parameter length can not be less that Zero.... All of…
user2133071
  • 35
  • 1
  • 6
1
vote
1 answer

Read directory from a ZIP file

How would you read a directory in a ZIP file and return it as a local path with ICSharZipLib? Is it even possible? I know how to make a streamreader from a file within the ZIP file, but after that I'm somewhat stuck.
user1568364
  • 113
  • 3
  • 9
1
vote
2 answers

SharpZipLib is only compressing some of the directory's sub-directories

I'm using SharpZipLib to create a zip file of a directory in a .NET 3.5 project, and I'm creating the archive like that : fastZip.CreateZip(Server.MapPath(zipToPath), Server.MapPath(zipFromPath), true, null); And that doesn't set neither files…
Moayad Mardini
  • 7,271
  • 5
  • 41
  • 58
1
vote
1 answer

How to use sharpziplib in Monotouch?

Hi I need to unzip a file in Monotouch for an iOS (and Andriod later) App and sharpziplib looks like a good choice (is it?). But how do I go about adding it in MonoDevelop (I have the latest version)? I have downloaded ICSharpCode.SharpZipLib.dll,…
Bbx
  • 3,184
  • 3
  • 22
  • 33
1
vote
1 answer

packaging files to be read without need for extraction

In my current project i'm dealing with a huge number of files (over tens of milliard files with low volume-between 1 and 30 KB) as resources which copying them for my customer is time consuming job. i'm searching for a packaging mechanism that can…
IT Seeker
  • 82
  • 8
1
vote
3 answers

Why is my SharpZipLib ZipEntry.Comment not getting set (or read)?

I've been working on a tool that uses SharpZipLib to add files to a zipfile, with a comment against the ZipEntry to store a piece of metadata I need. (I know there are other ways I could handle these metadata, but I'd like to avoid rearchitecting…
Owen Blacker
  • 4,117
  • 2
  • 33
  • 70
1
vote
0 answers

Creating in-memory archive with multiple files

Possible Duplicate: Using System.IO.Packaging to generate a ZIP file I have a controller where i create multiple PDF files. What i need to do is, foreach pdf i create in my controller, add it to a zip archive which is temporarily stored in…
DW24da
  • 147
  • 1
  • 3
  • 13
1
vote
3 answers

Deflating a stream with SharpZipLib has different behaviors in C# vs. VB.NET

I'm having troubles in writing a static Deflate extension method, that i would use to deflate a string, using BZip2 alghorithm of the SharpZipLib library (runtime version: v2.0.50727). I'm doing it using .NET framework 4. This is my VB.NET…
MAXE
  • 4,978
  • 2
  • 45
  • 61
1
vote
2 answers

Extract a zipped file only (without the folder)

With the SharpZip lib I can easily extract a file from a zip archive: FastZip fz = new FastZip(); string path = "C:/bla.zip"; fz.ExtractZip(bla,"C:/Unzips/",".*"); However this puts the uncompressed folder in the output directory. Suppose there is…
FBryant87
  • 4,273
  • 2
  • 44
  • 72
1
vote
1 answer

Unit testing a FileStreamResult

I have a Controller which returns a FileStreamResult via SharpZipLib (I have tried DotNetZip and there is no difference). using (var buffer = new MemoryStream()) { using (var zipStream = new ZipOutputStream(buffer)) { …
Sklivvz
  • 30,601
  • 24
  • 116
  • 172
1
vote
1 answer

InflaterInputStream.Read causes errors

This is what I have: byte[] buff = new byte[1]; byte[] buffer = { 10, 20, 30, 40 }; Stream data = new MemoryStream(); data.Write(buffer, 2, 2); data.Position = 0; InflaterInputStream…
user1486691
  • 267
  • 5
  • 18
1
vote
1 answer

Problems with creating ZIP file in c#

I am trying to create zip file by this code, but nothing works, the constractor of ZipFile doesnt get () only overloading with arguments, and i don't have the SAVE method? Whats wrong? using (ZipFile zip = new ZipFile()) { …
Oleg
  • 381
  • 1
  • 5
  • 15