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
0
votes
0 answers

Unable to print document using SharpZipLib

I am trying to print a ODT document using SharpZipLib. And I am getting the following error - 'LaserMaze.exe' (CLR v4.0.30319: LaserMaze.exe): Loaded 'C:\Users\USER\Desktop\lasermaze\LaserMaze\bin\Release\ICSharpCode.SharpZipLib.dll'. Module was…
yashdosi
  • 1,186
  • 1
  • 18
  • 40
0
votes
1 answer

Setting LastWriteTime to an unzipped file's original timestamp

I am using Sharpziplib version 0.86.0 to extract a zip file. It is working fine but the files extracted are with current DateTime. How could I get the original DateTime? public static void UnzipFile(string sourcePath, string targetDirectory) { …
bala3569
  • 10,832
  • 28
  • 102
  • 146
0
votes
1 answer

how can i download and extract single file from http using sharpziplib in c#?

anybody know how could i do that? i tried remake this code but it does not work. Unpack a zip using ZipInputStream (eg for Unseekable input streams)
patrycze
  • 29
  • 7
0
votes
1 answer

Wrap all files in Zip file in Downloading in MVC

I am using following code to perform download in MVC: CONTROLLER: public ActionResult Download(string SysID) { try { byte[] fileData = Get Data in Byte array; if (fileData != null) { …
Sunny
  • 3,185
  • 8
  • 34
  • 66
0
votes
0 answers

How do I zip a Word document stored in a MemoryStream using ICSharpCode.SharpZipLib.Zip?

I am trying to zip a Word document that is stored in a MemoryStream like this: MemoryStream outputMemStream = new MemoryStream(); ZipOutputStream zipStream = new ZipOutputStream(outputMemStream); zipStream.SetLevel(3); //0-9, 9 being the highest…
e-zero
  • 355
  • 3
  • 9
  • 17
0
votes
2 answers

SharpZipLib GetInputStream

I've built a webapplication in which a user can select a zipfile from their filesystem (via an asp:FileUpload). Then the application unzips the zipfile and ftp's every file. here's the code: Public Sub Unzip(ByVal str As Stream, ByVal constr As…
Ivo
  • 5
  • 3
0
votes
2 answers

Decompress SharpZipLib string in php or JS?

I am on a linux server connecting to a webservice via PHP/Soap. The problem is that a method is zipping the response via SharpZipLib. So all I get in return is a garbled string. Does anyone know of a way to unzip this with PHP or…
Fostah
  • 2,947
  • 4
  • 56
  • 78
0
votes
2 answers

Is it possible to decompress SharpZipLib compressed response via PHP?

Environment: Linux / MySQL / PHP Problem: While connected to a webservice, I am getting a response that is compressed with the SharpZipLib .NET library. As of yet, I have not been able to find a way to decompress these responses outside of a .NET…
Fostah
  • 2,947
  • 4
  • 56
  • 78
0
votes
0 answers

Adding file to zip with SharpZipLib without creating temporary file

I am trying to add a file to an existing zip file using SharpZipLib. Preferably without creating any temporary files as the zip is large (about 2GB). And when using a temp file, the NTFS rights to the zip are changed. Not a good idea. I tried the…
0
votes
0 answers

SharpZipLib - IO Exception while unzipping file

I am using SharpZipLib in my application to Unzip files. I have a folder in which the zip is copied and is extracted there itself. ZIP and Folder name is a guid. Folder mostly contains 1 or 2 XML files of size 45kb on an average. Following is the…
HeyItsMe007
  • 101
  • 2
  • 8
0
votes
1 answer

C# unzip a file: Error with 'Thumbs.db'

I wrote a program that unzip a file (.zip) using SharpZipLib... The following code: public void UnZip(string zipFilePath, string extractionPath) { FastZip fz = new FastZip(); fz.ExtractZip(zipFilePath, extractionPath, null); } I get…
Nick_SMI
  • 43
  • 1
  • 6
0
votes
1 answer

Why decompression of long string (EXIF) from watermarked image (with successful compression) gives error?

Problems Background I'm currently working on a Universal Windows Platform application in C# using Visual Studio 2015. In the project, I'm using SharpZipLib.Portable to perform compression and decompression for a long string (get from EXIF) before…
HakuteiJ
  • 557
  • 4
  • 12
0
votes
1 answer

Writing zip contents to a text file

I'm trying to write the contents of a zip file to a text file. My code right now only writes the first file. (This is using SharpZipLib) ZipInputStream zip = new ZipInputStream(File.OpenRead(AddonFile)); ZipEntry item; while ((item =…
Liam G
  • 3
  • 2
0
votes
0 answers

Crc32 was broken

Task: I want to create zip archives on the fly that containing a certain number of Excel files. Excel files are created from the database also on the fly. Here is the part of the simple method: using (var stream = new MemoryStream()) { …
0
votes
1 answer

ICSharpCode.SharpZipLib Compression method not supported PKZIP

I have a problem with a zip-file created with the old PKZIP® Command Line for Windows version 4 from the year 2000. I am using ICSharpCode.SharpZipLib to extract the file. Windows has no problem to open the file in the Explorer. Here is the…
Sardoan
  • 767
  • 1
  • 10
  • 25