473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Unzip with C#

Hi,

I am uploading ZIP archives to a server and I need to unzip them on a
server folder.

How can I do this?

Thanks,
Miguel
Oct 3 '08 #1
4 2103
#ZipLib is the common answer - it has examples in the docs showing you
how to unzip.

http://www.icsharpcode.net/OpenSourc...b/Default.aspx

Marc [C# MVP]
Oct 3 '08 #2
On Oct 3, 3:04 pm, shapper <mdmo...@gmail.comwrote:
Hi,

I am uploading ZIP archives to a server and I need to unzip them on a
server folder.

How can I do this?

Thanks,
Miguel
Hi,
SharpzipLib has been around since 1.1:
http://www.icsharpcode.net/OpenSource/SharpZipLib/
Also you can use the libraries from J# in java.util.zip
and I would swear that 2.0 included a Zip class, but I cannot find it :
(
Oct 3 '08 #3
On Oct 3, 1:19*pm, "Ignacio Machin ( .NET/ C# MVP )"
<ignacio.mac...@gmail.comwrote:
On Oct 3, 3:04 pm, shapper <mdmo...@gmail.comwrote:
Hi,
I am uploadingZIParchives to a server and I need to unzip them on a
server folder.
How can I do this?
Thanks,
Miguel

Hi,
SharpzipLib has been around since 1.1:http://www.icsharpcode.net/OpenSource/SharpZipLib/
Also you can use the libraries from J# in java.util.zip
and I would swear that 2.0 included aZipclass, but I cannot find it :
(
If what you mean by "I would swear..." is that .NET 2.0 Base Class
Library has a zip class - that is not correct.
..NET 2.0 does include a DeflateStream class.

To manipulate zip files you need something more that DeflateStream.

DotNetZip will do what you want, nicely.
http://www.codeplex.com/DotNetZip .

free, open source, small, simple, easy.
Oct 4 '08 #4
Hi,
why don't you take a look to the 7z libs? Those are written in C/C++
and are the fastest available I know about.
There's also a wrapper for .net in: http://www.codeproject.com/KB/DLL/cs...face_7zip.aspx
Also I recommend you to take care and watch out what the users send to
you, because the unzipping process migth be really expensive for a
server (actually, I'm doing it without controlling it, but I'll pay
for that some day ;) )

Diego
Oct 5 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Chris | last post by:
Hi Where can I find info on unzipping file with VB.NET. I need to unzip a winzip file with my application Thanks
1
by: Jean Christophe Avard | last post by:
Hi! Finally I figure out what was wrong... "objZipEntry.size = strmFile" I wasn't giving the right file length... But now, I have issue with the unzip function... I can't unzip it, the unzip function...
3
by: SDRoy | last post by:
Hello Can someone tell me how I can unzip a .zip file in C#. The zip file is already there and I just need to unzip..not zip and unzip. -- Thanks, SDRoy
4
by: DataSmash | last post by:
I need to unzip all zip file(s) in the current directory into their own subdirectories. The zip file name(s) always start with the string "usa" and end with ".zip". The code below will make the...
0
by: Rocky Zhou | last post by:
python unzip At first, I tried to use 'os.popen3("unzip ...") like this: fin, fout, ferr = os.popen3("unzip -o -d %s %s" % (dest, zipfile)) strerr = ferr.read() # This makes the program hanging...
3
by: sdoty044 | last post by:
I am a true n00b... and I just using Python to complete some very small uneventful task, but need help with one last thing. Basically, this I what I am trying to do. make a temp directory...
1
by: sudhivns | last post by:
Looking for Zip/Unzip handling code. Unzip feature should extract the files including the absolute path. Eg: Input data.zip contains 1. folder IMP 2. some *.txt files. On Unzip, i choose...
5
by: =?Utf-8?B?anVsaW8=?= | last post by:
Hi, I write a program to unzip a Tar file generated on a Unix environment file using SharpZipLib, but returns a error "Header checksum is invalid" when execute the program. This error appears...
1
by: olddocks | last post by:
I want to upload a zip file and then extract/unzip it. I am accomplishing this with php exec command. I am calling unzip from php exec command within a php script and it is not extracting files. why?...
2
by: somsub | last post by:
Hi all, Here is my samle code use strict ; use warnings ; use IO::Uncompress::Unzip ; When I compiled this three lines of code in win32 I got error like below.
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.