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

Monotouch - ICSharpCode.SharpZipLib for unzip file

I'm using ICSharpCode.SharpZipLib for unzip a file that contain file, folders and subfolders inside, but i'm getting an error that I didn't find here or in any other forum. Code: public static void UnZipFiles(string zipPathAndFile, string…
Claudio
  • 1,987
  • 3
  • 29
  • 55
1
vote
0 answers

Error "EOF In Header" with version SharpZipLib 0.86.0.518

I use VS 2008 SP1 in Windows XP. I have updated ICSharpCode.SharpZipLib.dll from older 0.85.4.369 to new 0.86.0.518. I have been using it successfully for older 0.85.4.369. I have been able to zip and unzip both files and folders without a problem…
Kiquenet
  • 14,494
  • 35
  • 148
  • 243
1
vote
3 answers

Renaming ICSharpCode.SharpZipLib.dll

well I am having a problem renaming the ICSharpCode.SharpZipLib.dll file to anythig else. I am trying to shorten the file name. I reference the assembly in the project, but when the program reaches the statements where I use the library. It spawns…
None None
  • 195
  • 1
  • 3
  • 9
1
vote
2 answers

How to add EmptyFolder or directory in a zip file using ZipOutputStream

I want to be able creating zip files that contain empty folders, using ICSharpCode.SharpZipLib.Zip.ZipOutputStream. I can use ICSharpCode.SharpZipLib.Zip.FastZip.CreateEmptyDirectories = true, but FastZip doesn't allow UTF8 file names.
BreakHead
  • 10,480
  • 36
  • 112
  • 165
1
vote
1 answer

Sharpziplib uncompress embedded resource

I have a zip file as an embedded resource. Using the following code: Stream zipStream; zipStream = thisAssembly.GetManifestResourceStream("Namespace.Resources.zipfile.zip"); byte[] data = Decompress(zipStream); public static byte[]…
A G
  • 21,087
  • 11
  • 87
  • 112
1
vote
1 answer

How to use SharpZipLib in a single file solution?

For a school project, I am writing a program that uses very large (hundreds of GB) text files. I've used bash split to split them into manageable (2GB) chunks then compressed them through bash with Bzip2. I need to extract them one at a time to disk…
1
vote
1 answer

"Cannot find central directory" error appears when extracting 7z file using SharpZipLib

There is no problem with .zip file but only 7z. FileStream fs = File.OpenRead(archiveFilenameIn); zf = new ZipFile(fs); // This is where we encountered an error
1
vote
3 answers

System.IOException when opening file with File.OpenRead

I get the following exception when I open a file for unzipping it's contents. It happens when I have the file selected in Windows Explorer, or mouse over it showing a tooltip. System.IO.IOException was unhandled Message=The process cannot access…
SamWM
  • 5,196
  • 12
  • 56
  • 85
1
vote
0 answers

Compress .tar.gz - Add file in different directory of package

I have a situation where I have two different directories and files inside those directory as shown below. and Now when I create .Tar.Gz package, I want to change a file to be created in separate directory. But I could not find a possible solution…
ConfusedDeveloper
  • 6,389
  • 4
  • 21
  • 36
1
vote
2 answers

OutOfMemoryException using BZip2 (SharpZipLib)

I use Asp.net , .net 3.5, win2003, iis 6.0. I use Oracle for gathering files, saving file in SharpZipLib.BZip2 compressed format in field RAW in table Oracle. My application is Web, and I use WCF Service for get data (array of bytes) of a file. The…
Kiquenet
  • 14,494
  • 35
  • 148
  • 243
1
vote
1 answer

sharpziplib progressbar to extract targz

I have an application which extracts targz files, I would like a ProgressBar to view the progress of extracting. But I just have this: public void ExtractTGZ(String gzArchiveName, String destFolder) { Stream inStream =…
Neyoh
  • 623
  • 1
  • 11
  • 33
1
vote
1 answer

SharpZipLib ZipEntry how can you change the name of a file in the zip?

How do you change the name stored in the zip file? Also, can this be done when adding the file via: ZipFile zf = new ZipFile("path"); zf.BeginUpdate(); zf.Add(filePath); <-- i would like to also be able to change it when adding zf.CommitUpdate();
schmoopy
  • 6,419
  • 11
  • 54
  • 89
1
vote
1 answer

Archiving Multiple Files Using ZipOutputStream gives me an Empty Archived File

I am attempting to download a bunch of files that I am zipping up(archiving) via ZipoutputStream. using (var zipStream = new ZipOutputStream(outputMemStream)) { foreach (var documentIdString in documentUniqueIdentifiers) { ... …
1
vote
0 answers

split large text file while unzipping (SharpZipLib)

I use the following code to unzip files (text files), which I then later read with a CSV parser into memory and manipulate as I deem fit. This works without problems but I have some fairly large files in some of the zip drives and because the rest…
nik
  • 1,672
  • 2
  • 17
  • 36
1
vote
0 answers

ICSharpCode.SharpZipLib CRC Error. How To Fix?

I'm using the library ICSharpCode.SharpZipLib to compress text. After the compress finish I convert to base64 string and store in database. When I need to know what's stored, I get the value from database and decompress. But, only in one client…
Only a Curious Mind
  • 2,807
  • 23
  • 39