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

Datatable to csv write to zip download error: because it is being used by another process

In thst code i have us two database tabele and fetch data in datatable then write all the data in the csv files with help of stream writer then add both the file in a folder and download in a zip form but sometimes its shows an error The process…
sandeep singh
  • 143
  • 1
  • 13
1
vote
1 answer

SharpZipLib - zero bytes

I am trying to implement SharpZipLib So I copied the below snippet from their samples: // Compresses the supplied memory stream, naming it as zipEntryName, into a zip, // which is returned as a memory stream or a byte array. // public MemoryStream…
1
vote
1 answer

Extra data extended Zip64 information length is invalid

I need to change a ZIP file, add/replace files to the archive. I’m trying to use SharpZipLib 3rd party library. When calling ZipFile.CommitUpdate(), I receive an exception “Extra data extended Zip64 information length is invalid”. Here’s the call…
Soonts
  • 20,079
  • 9
  • 57
  • 130
1
vote
2 answers

C# SharpZipLib Can't read stream when trying to uncompress zip in Unity3D

I'm using ICSharpCode.SharpZipLib to try and unzip a file from the web, all I need to do is get the uncompressed byte array. However I get the error "InvalidOperationException: Unable to read from this stream". I am working in c# in Unity3D with the…
normower
  • 137
  • 12
1
vote
3 answers

Better gzip tool than SharpZipLib for Windows Mobile?

I use SharpZipLib for gzip on a Windows Mobile application written in c# I have this code public static bool gzDecompressFile(String inputFilePath, String outputFilePath) { if (!File.Exists(inputFilePath)) return…
Pentium10
  • 204,586
  • 122
  • 423
  • 502
1
vote
2 answers

wp8 Operation not permitted on IsolatedStorageFileStream

I am copying all images from my device to directory. While copying the images I am getting this error Operation not permitted on IsolatedStorageFileStream. Here is my code to copy the files. MediaLibrary m = new MediaLibrary(); using…
Ajay
  • 6,418
  • 18
  • 79
  • 130
1
vote
0 answers

Sharpziplib InflaterInputStream.Read behavior when zero bytes

I am working on a .Net Remoting Compression Sink using InflaterInputStream. I got the guidelines from a .Net Remoting book here. I am using binary as formatter and the issue I am encountering is when .Net binaryformatter calls the…
Jan Navarro
  • 327
  • 4
  • 16
1
vote
0 answers

accesing filestream denied for SharpZipLib for Unity3d iOS

i am trying to unpack a .zip file but when i try to copy the zip stream to the file i get: UnauthorizedAccessException: Access to the path "/var/mobile/Applications/7209CA86-E88D-4BAC-B285-2912B982E8C0/Documents/Inbox/Book.txt" is denied. at…
Alex
  • 10,869
  • 28
  • 93
  • 165
1
vote
0 answers

ZipOutputStream generates corrupted zip file when zipenty is numerous

I have the code below to simulate an action i am trying to perform using SharpZipLib. The generated zip file runs well when the limit of 'i' is low. But as 'i' tends towards a high value e.g 100, the generated zip file is corrupted. When I repair…
Remade
  • 388
  • 5
  • 13
1
vote
0 answers

NPOI won't allow me to open Excel 2007 files

So here's the code: using (FileStream file = new FileStream(databaseLocation, FileMode.Open, FileAccess.Read)) { // _Sheet is of type IWorksheet _Sheet = new XSSFWorkbook(file).GetSheetAt(0); …
Nick Bull
  • 9,518
  • 6
  • 36
  • 58
1
vote
0 answers

Sharpzip lib folder size same after compresssion

I 'm using sharpzip lib for compressing a folder. But After compression zip size is a bit higher than the folder size. My folder includes 3 xml files encrypted with aes/Rsa. for eg: size = 1kb size on disk = 12 kb after compression size = 1.32 kb…
1
vote
0 answers

FastZip.ExtractZip does not extract subfolder but name gets corrupted

On mono 2.0.1 (and other version) when I extact a zip file with subfolders it wrongly creates the new files on local filesystem. FastZip fs = new FastZip(); fs.ExtractZip(LocalFile, LocalFolder, ""); will results in files created in this form (all…
ricky pu
  • 95
  • 1
  • 8
1
vote
1 answer

Why ZipEntry.Size always -1

I read ZipInputStream from a stream. There are 10 ZipEntries, but size of all of them is -1! I can't figure out why, because there are data, so it must be > 0. Here's my code: var zipInputStream = new ZipInputStream(new…
IDeveloper
  • 1,249
  • 2
  • 13
  • 22
1
vote
2 answers

How to writte protobuf serialized content directly to SharpZipLib stream

Is there possible to writte protobuf serialized content directly to SharpZipLib stream? When I try to do this, looks like the provided stream is not filled with the data from protobuf. Later I would need to get back the deserialized entity from…
vts123
  • 1,736
  • 6
  • 27
  • 41
1
vote
1 answer

The dependency ''mscorlib, Version=2.0.0.0,...' was not found

i get the following error by compiling my project: warning MT3005: The dependency 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' of the assembly 'ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, …