473,387 Members | 1,540 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,387 software developers and data experts.

how can I extract zip files in C# ???

Hi,
How can I zip/unzip files in C# ????
Nov 16 '05 #1
7 30995
This might help you...

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

Regards,
--
Angel J. Hernández M.
MCSD
"genc ymeri" <ge********@hotmail.com> escribió en el mensaje
news:%2******************@TK2MSFTNGP10.phx.gbl...
Hi,
How can I zip/unzip files in C# ????

Nov 16 '05 #2
Genc,

u can use the way as angel says but there is one other option also using J#
in C#.
J# have a library "vjslib" for zip file handling. only thing is u have to
include the ref to this lib and use the namespace "using java.util.zip;".
then u can do what ever u need. Go to given link for more information and
source code in c#, u can straight away use the code as per ur requirement.
i already implemented this in my application, its working fine.

msdn.microsoft.com/msdnmag/ issues/03/06/ZipCompression/default.aspx

/Ratan

"genc ymeri" wrote:
Hi,
How can I zip/unzip files in C# ????

Nov 16 '05 #3
Ratan <Ra***@discussions.microsoft.com> wrote:
u can use the way as angel says but there is one other option also using J#
in C#.
J# have a library "vjslib" for zip file handling. only thing is u have to
include the ref to this lib and use the namespace "using java.util.zip;".
then u can do what ever u need. Go to given link for more information and
source code in c#, u can straight away use the code as per ur requirement.
i already implemented this in my application, its working fine.

msdn.microsoft.com/msdnmag/ issues/03/06/ZipCompression/default.aspx


You then need to make sure that the VJ# redistributable is installed on
all your client computers though - and that's considerably larger than
SharpZipLib.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #4
Ratan,
Thank you very much for your tip. Actually this is the way we are going....
Jon Skeet made a god point but we are install the JV# destributable anyway
b/c my C#program compiles Java code.

Glad I got someone to think the same as we did ...... :)

Thaks to you all :) :)
PS:
I got some problems with SharpZipLib. Sometime the same program create zip
files with 0 Kb. I noticed that other programmers did occur that too. Plus I
didn't get any wasy way to zip an entire folder with its subfolders and its
files.....


"Ratan" <Ra***@discussions.microsoft.com> wrote in message
news:44**********************************@microsof t.com...
Genc,

u can use the way as angel says but there is one other option also using
J#
in C#.
J# have a library "vjslib" for zip file handling. only thing is u have to
include the ref to this lib and use the namespace "using java.util.zip;".
then u can do what ever u need. Go to given link for more information and
source code in c#, u can straight away use the code as per ur requirement.
i already implemented this in my application, its working fine.

msdn.microsoft.com/msdnmag/ issues/03/06/ZipCompression/default.aspx

/Ratan

"genc ymeri" wrote:
Hi,
How can I zip/unzip files in C# ????

Nov 16 '05 #5
genc ymeri <ge********@hotmail.com> wrote:
Thank you very much for your tip. Actually this is the way we are going....
Jon Skeet made a god point but we are install the JV# destributable anyway
b/c my C#program compiles Java code.

Glad I got someone to think the same as we did ...... :)
If you're using the VJ# library anyway, then yes, it makes sense to use
that. SharpZipLib started out as just a reimplementation of
java.util.zip in C#, I believe.
I got some problems with SharpZipLib. Sometime the same program create zip
files with 0 Kb. I noticed that other programmers did occur that too.
Out of interest, have you reported this to the authors? I'm sure they'd
be happy to fix a bug if you can help them find it.
Plus I didn't get any wasy way to zip an entire folder with its
subfolders and its files.....


I would be surprised if using VJ# made this easier - I don't remember
any java.util.zip classes/methods which made this particularly simple.
Not that it's that hard to recurse using DirectoryInfo and FileInfo...

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #6
> Out of interest, have you reported this to the authors? I'm sure they'd
be happy to fix a bug if you can help them find it.
I did report it yesterday....

I would be surprised if using VJ# made this easier - I don't remember
any java.util.zip classes/methods which made this particularly simple.
:(
Not that it's that hard to recurse using DirectoryInfo and FileInfo...


yeah,,,,

Thanks :)
Nov 16 '05 #7
genc ymeri <ge********@hotmail.com> wrote:
Out of interest, have you reported this to the authors? I'm sure they'd
be happy to fix a bug if you can help them find it.


I did report it yesterday....


Excellent. I'll be interested to see whether there are any new releases
soon. (We actually only use the gzip functionality here, but it's very
handy for that.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #8

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

Similar topics

5
by: Jane Doe | last post by:
Hi I took a quick look in the archives, but didn't find an answer to this one. I'd like to display a list of HTML files in a directory, showing the author's name between brackets after the...
9
by: Sharon | last post by:
hi, I want to extract a string from a file, if the file is like this: 1 This is the string 2 3 4 how could I extract the string, starting from the 10th position (i.e. "T") and...
10
by: Robert Schultz | last post by:
I have a C/C++ file that I simply want to 'extract' a function from. Something like: extract <function name> <c or cpp file> I want it to return from the beginning of the function, to the end. ...
3
by: rahman | last post by:
I have few hundred HTML pages. I need to extract portion of each HTML page into a text/database/HTML files format. You can imagine it is very tedious to do one by one. Is there any automatic...
9
by: trihanhcie | last post by:
Hi, I would like to extract the text in an HTML file For the moment, I'm trying to get all text between <tdand </td>. I used a regular expression because i don't know the "format between...
7
by: John | last post by:
We have created a game and when the user click on "Download New Songs" which requires the user to download songs. This could be over 20 songs. I have these files zipped on the server in one...
8
by: Fabian Braennstroem | last post by:
Hi, I would like to remove certain lines from a log files. I had some sed/awk scripts for this, but now, I want to use python with its re module for this task. Actually, I have two different...
6
by: learnerofpython | last post by:
hi! i have a directory structure(can be of any type) I want to search for the files present in it and extract the names of those files(file can be of any format e.g .txt/.c/.py) How can...
3
by: learningvbnet | last post by:
Hi, I am trying to extract zipped files using Winzip in my VB.net application and I ran into 2 stone walls. 1. How do you handle file names with spaces. See psiProcess.Arguments For...
5
by: Steve | last post by:
Hi all Does anybody please know a way to extract an Image from a pdf file and save it as a TIFF? I have used a scanner to scan documents which are then placed on a server, but I need to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.