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

Best way to extract .zip and put in .jar

I have been trying to find the best way to do this I have thought of extracting the contents of the .jar then moving the files into the directory then putting it back as a jar. Im not sure is the best solution or how I will do it. I have looked at…
0
votes
2 answers

Unzipping two different zip files with sharpziplib to the same directory

I have looked around quite abit and there does not seem to be any information on using sharpziplib to extract multiple zip files to the same directory. I am using telerik control RadUpload to upload two different zip folders and when uploaded they…
James Blackburn
  • 594
  • 4
  • 23
0
votes
1 answer

How to zip an existing folder with files inside it?

I am using SharpZipLib and I need to zip an existing folder where there are files inside it. Example: I need to zip "Folder2" C:\Folder1\Folder2 Folder2 has two files a.txt and b.txt My current code uses "FastZip" FastZip fastzip = new…
JADE
  • 475
  • 4
  • 12
  • 24
0
votes
3 answers

SharpZipLib ~ File Version

How do I get the version attribute of a file? I tried the "Version" prop but it gives me the same number for all files My Code: while (getNextEntry) { ZipEntry entry = inStream.GetNextEntry(); getNextEntry = (entry != null); if…
KevinDeus
  • 11,988
  • 20
  • 65
  • 97
0
votes
1 answer

Does ICSharpCode.SharpZipLib's FastZip supports setting compression level?

It seems fast, what could be its compression level? Can it be changed? I'm using FastZip so I can show a progressbar. I tried Peter Bromberg's sample code first, setting the compression level is possible, but don't have a sample code for progress…
Hao
  • 8,047
  • 18
  • 63
  • 92
0
votes
2 answers

Using SharpZipLib and getting progress status?

How would i show the progress of compressing in SharpZipLib? I'm developing a small application that Zip many file to a single zip file. it may got a while to be done, there might be a progress bar that shows the progress of compressing, so is there…
Murhaf Sousli
  • 12,622
  • 20
  • 119
  • 185
-1
votes
1 answer

Why am I getting GZip compression size of a string more than the original size after compression when using SharpZipLib in C#

My string is a Json file (test.json) with the below content { "objectId": "bbad4cc8-bce8-438e-8683-3e603d746dee", "timestamp": "2021-04-28T14:02:42.247Z", "variable": "temperatureArray", "model": "abc.abcdefg.abcdef", "quality": 5, …
KBNanda
  • 595
  • 1
  • 8
  • 25
-1
votes
2 answers

TriLib SharpZipLib.Zip.ZipEntry - Cannot access a closed Stream for GetInputStream()

(This is using Unity 2020.1.4f1 with Trilib 2.0.9 Model Loader) I'm trying to extract the bytes from a zipStream (to load the bytes[] into a Texture2D.LoadImage() in Unity). How do you do this? Here's what I have tried and the error I am…
ina
  • 19,167
  • 39
  • 122
  • 201
-1
votes
1 answer

Determine file or directory from string

I'm trying to extract some files from a Zip file, but the FastZip.ExtractZip method I was using is having some issues, for example: Output location: C:\testing\output\ File 1: PhysicalMemory/idx - this is a file, but is created as a directory File…
Tony
  • 3,587
  • 8
  • 44
  • 77
-1
votes
1 answer

Compressing C# objects using SharpZipLib?

Is it possible to compress a List using SharpZipLib? Turning the List to a byte array gives me around 60000 bytes (uncompressed). Compression this with System.IO.Compression.DeflateStream gives me around a 1/3 compression rate but this is far…
lordvlad30
  • 391
  • 1
  • 17
-1
votes
1 answer

C# - Sharpziplib - Extracting contents of sub zip, sub gz, sub tar.gz

I'm new to C# and object-oriented programming in general. I am trying to create an application to extract the contents of a compressed file. Upon searching, I found out that .NET does not by default support gz or tar files. Thus downloaded…
Tango
  • 386
  • 1
  • 6
  • 29
-2
votes
1 answer

app.exe is used by another process while extracting zip

When I try to extract my zip that I just downloaded from server I get System.IO.IOException Process cant access file "myappsolution".exe because it is used by another process. WebClient webClient = new WebClient(); var client = new…
Bombacinka
  • 11
  • 2
-2
votes
1 answer

How to Zip Excel file using CLOSEDXML and Sharpziplib C#

i am new C# Beginner, I created a function to generate Excel using ClosedXML.Excel, but i also want to zip the excel fill, how to zip excel file using Sharpziplib? anybody could give an adivse?thanks public FileResult Export() { DataTable test…
ericso
  • 109
  • 1
  • 9
-2
votes
1 answer

How to generate TAR Zip(.tar.gz) of multiple CSV Azure Blob Storage V2 and Output the result file in Blob using SharpZipLib library

I need to TarZip(.tar.gz) multiple CSV files that are present in Azure blob storageV2 inside container named input and save resultant file in another container output using SharpZipLib library in C# using Azure function. File Size of CSV's could be…
-2
votes
2 answers

How can I [ go to ] using switch

How can I edit this code, if the user enter wrong char? Like " g " or " H " or anything else, repeat this step again, and don't go to the next step [ I mean ] if I loop for 10 loops, if I enter wrong char it will loop for 9 just char grade; //…
Ahmed Ibrahim
  • 380
  • 5
  • 22
1 2 3
18
19