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
1 answer

How with sharpziplib get a zip file in memorystream or byte array format and unpack it

I have an app that downloads from ftp and gets the format in memorystream or byte array-it gets the zip file ALREADY ZIPPED ,how can i use sharpziplib with this input to unpack that content to a specific place on my harddrive
Eli Braginskiy
  • 2,867
  • 5
  • 31
  • 46
0
votes
1 answer

SharpZipLib: Decompress .gz from inside .tar file?

I have a .tar file containing multiple compressed .gz files. I have no issue itterating through the .tar file creating each .gz file in a destination directory. I'd like to skip writting the .gz all together and just decompress it from the…
BeerGuy
  • 205
  • 1
  • 6
0
votes
2 answers

Creating a ZIP file programmatically

My application will be storing large amounts of cached data to local storage for performance and disconnected purposes. I have tried to use SharpZipLib to compress the cache files that are created, but I'm having some difficulty. I can get the file…
Dave Swersky
  • 34,502
  • 9
  • 78
  • 118
0
votes
2 answers

ICSharpCode.SharpZipLib.Zip example with crc variable details

I am using icsharpziplib dll for zipping sharepoint files using c# in asp.net When i open the output.zip file, it is showing "zip file is either corrupted or damaged". And the crc value for files in the output.zip is showing as 000000. How do we…
Ramesh.kbvr
  • 763
  • 6
  • 15
  • 31
0
votes
1 answer

.net core unzip a file and zip subfolder

I have a byte[] of a zip file. I need to unzip the file in memory and find "dist" folder inside the zip (there will be always a dist folder) and create a new zip file with whatever inside that "dist" folder. "dist" folder could have files and…
Brad Kiani
  • 271
  • 1
  • 9
  • 20
0
votes
1 answer

How do I extract any archives with SharpZipLib?

I'm using SharpZipLib to extract archives. I managed to extract .zip archives: FastZip fastZip = new FastZip(); fastZip.ExtractZip(file, directory, null); and to extract .tar.gz: // Use a 4K buffer. Any larger is a waste. byte[] dataBuffer =…
Mathias
  • 1,819
  • 4
  • 22
  • 34
0
votes
0 answers

Why do I only get the first few lines of file when using GZipStream to decompress in dotnet core

I'm trying to read a series of gzip files using the code below. What I end up with is a file that is only a fraction of the total file. Interestingly enough the text file output is almost perfectly truncated at a line break. public static string…
0
votes
1 answer

What is the simplest way to decompress a ZIP buffer in C#?

When I use zlib in C/C++, I have a simple method uncompress which only requires two buffers and no more else. Its definition is like this: int uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); /* Decompresses the…
landings
  • 686
  • 1
  • 8
  • 25
0
votes
1 answer

#ZipLib error while decompressing GZip

I'm getting this error while trying to decompress some GZ files with #ZipLib 0.85.5 Those file are not corrupted, I'm able to decompress it correctly using 7-Zip. ICSharpCode.SharpZipLib.SharpZipBaseException Unexpected EOF
Luca Martinetti
  • 3,396
  • 6
  • 34
  • 49
0
votes
0 answers

ZIP download is blocking because of organisation policy in asp.net

As am having my ZIP file in the folder and if I click download report button am blocking to download based on my organization policy. But I need to download this ZIP file from the code how can we achieve this. The code which I used as below string[]…
VIVEK RAMASAMY
  • 43
  • 1
  • 2
  • 5
0
votes
1 answer

Add Files to Tar Archive Without Copying Parent File Structure

I'm creating a game in which a user can create custom content. There are two files associated with each custom creation: an .ogg file and a .xml file. Previously, I had a folder that contained all of the associated files, but I'd like to wrap all…
0
votes
1 answer

Compressing\decompressing binary files

I need to decompress the *.bin file into a certain temp-file, perform certain actions with it in the my program and then compress it. There is a function that unpacks the *.bin file. I.e., temp-file for the correct operation of the program was…
Vlad i Slav
  • 59
  • 2
  • 12
0
votes
1 answer

SharpZipLib returning junk characters when unzipping compressed file

Im trying to unzip some files using sharpziplib. Problem is, it is returning junk characters instead of special and japanese characters. Is there anyway of converting the filename to unicode before getting the files inside the zip file? I currently…
breshi
  • 25
  • 6
0
votes
1 answer

Compress the Files using ICSharpCode.SharpZipLib.Zip by fetching files from SQL File stream

i am using ICSharpCode.SharpZipLib.Zip to compress the files & download zip file, and here using SQL File stream to store any kind of file(any amount of GB). Then, how can i zip the files from sql file stream and get download... And i tried…
Jilani pasha
  • 389
  • 3
  • 14
0
votes
1 answer

SharpZipLib and ziparchive open issue

I'm creating a password protected zip file using SharpZipLib and inserting 3 files: Demo.xml Code.pdf File.htm using the following code: Protected _file As ZipFile Public Sub New(ByVal pathName As String) If Not…
Irvin Dominin
  • 30,819
  • 9
  • 77
  • 111