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

Cannot extract the contents of a TGZ file using F# and SharpZipLib

I am learning F# and Deedle. I am trying to extract the contents of this TGZ File using SharpZipLib. I downloaded the TGZ to my local drive. I think I am close because out1 works, but out2 errs. I am sure the code could be written better with…
Uziel
  • 349
  • 4
  • 9
1
vote
0 answers

Encoding method used for the SSO saml request/data in the our application got depreciated

We are using UTF8 encoding method to encode the SSO saml request/data in the our application and it was working fine. But suddenly the SSO functionality stopped working and on analysis we found that the encoding method used got depreciated. Previous…
Biprajit
  • 11
  • 4
1
vote
1 answer

C# SharpZipLib write a file directly into zip

my process needs to create a zip file with a large number of files(that are also created by the process). Instead of having to create temporary files, zipping them and then deleting, can I directly add files into a zip file?
Aks
  • 5,188
  • 12
  • 60
  • 101
1
vote
2 answers

Adding to/Delete from zip file can't find temp files

My program lets users add files to a zip file one upload at a time. The first upload creates a zip file, and subsequent uploads add to the created file. It also displays a list of all the files in the zip file, and lets users delete individual…
thchaver
1
vote
0 answers

"EOF in header" => POI

Iam trying to pass in a MemoryStream(not a Filestream). This is what I did: XWPFDocument w2 = new XWPFDocument(memoryStream); This is what I get: EOF in header Updated my post: var m_a = new…
1
vote
3 answers

Why are executable files not included in 'Extract All' on one machine, but not another?

We're providing a zip file of our application for testing and the same zip file on two separate machines is extracted differently. One will extract all files, the other will extract all but the executables (.exe and .msi specifically). We're going…
not-bob
  • 815
  • 1
  • 8
  • 23
1
vote
1 answer

Zip file on Mac usingICSharp

I am using mono and monobjc to develop an application to run on Mac OS X 10.6. I am adding some files to a zip file using ICSharpCode.SharpZip. The code is as - var ms = new MemoryStream(); var zipStream = new ZipOutputStream(ms);…
Prashant
  • 2,190
  • 4
  • 33
  • 64
1
vote
0 answers

Can I copy a compressed file from one Zip file to another without decompressing and recompressing it?

I am currently using SharpZipLib for reading/writing ZIP files in C#. Often I want to create a new ZIP file, containing some of the files from an old ZIP file. How can I copy entries between ZIP files without decompressing and recompressing the…
Oliver Bock
  • 4,829
  • 5
  • 38
  • 62
1
vote
1 answer

Zip Azure Storage Files and Return File from Web Api

I am trying to create a zip file with SharpZipLib from files stored on Azure Storage. Unfortunately I am not able to return them because the Api always returns a…
Tom el Safadi
  • 6,164
  • 5
  • 49
  • 102
1
vote
3 answers

Unzip from a SQL Server text column to an image column

I have images of various formats (.png, .jpg, .bmp, etc.) stored as compressed text in a text column in a SQL Server 2005 table. I need to read the row, unzip the image and store it in an image column in another table. I am using the SharpZip…
Rich.Carpenter
  • 1,056
  • 1
  • 9
  • 21
1
vote
1 answer

When to close file stream

I reading a file in a zip file using streams like this : public static Stream ReadFile(Models.Document document, string path, string password, string fileName) { FileStream fsIn = System.IO.File.OpenRead(Path.Combine(path,…
Henrik Clausen
  • 679
  • 6
  • 16
1
vote
1 answer

Reverse action of ICSharpCode...InflaterInputStream in C#

I'm using ICSharpCode.SharpZipLib.dll for compress and decompress data. I have the following code that performs inflation of data: public static byte[] ZLibDecompress(byte[] zLibCompressedBuffer) { byte[] resBuffer = null; MemoryStream…
rodnower
  • 1,365
  • 3
  • 22
  • 30
1
vote
1 answer

Found conflicts between different versions of "ICSharpCode.SharpZipLib" that could not be resolved

I am using NPOI in my MVC 5 project. When I installed it via Nuget, I have installed SharpLib 0.86 because it is a dependency. After doing this, NPOI generates a 0 bytes file. When I build the solution, this error appears in error list: Found…
jstuardo
  • 3,901
  • 14
  • 61
  • 136
1
vote
1 answer

How to use FastZip compressing files and folders together?

I try to use file filter and directory filter to choose specified files and folders , but the files in sub folder are affected by file filter . Example : file filter : @"//1.txt$;2.txt$" directory filter : @"//sub$" Only 1.txt & 2.txt were…
Arthur
  • 23
  • 6
1
vote
0 answers

What could cause ICSharpCode.SharpZipLib to fail on Delete -> CommitUpdate with error 'Failed to copy bytes..."?

Using ICSharpCode.SharpZipLib to update a zip file by deleting a specific document from the zipped contents, using the following code: protected async Task updateZip() { var fragment = "resources/graphics.json"; ZipFile zipFile = null; …
Jude Fisher
  • 11,138
  • 7
  • 48
  • 91