N
Necqui Teja
Are there any utils/tools to zip files at runtime in C#?
Thanks
Necqui
Thanks
Necqui
Necqui Teja said:Are there any utils/tools to zip files at runtime in C#?
Are there any utils/tools to zip files at runtime in C#?
Fabio said:If you are using vs2005 you can also use the
System.IO.Compression.GZipStream class.
Jordan said:Highly recommended: http://www.7-zip.org/
Here's their Sourceforge page: http://sourceforge.net/projects/sevenzip/
Two versions are available - one with a GUI and a compact (< 500K ) command
line version that you can execute from your code - passing in parameters for
what to zip (input and output file name).
And it's free.
Jordan said:RE:
<< ...a lot more complicated... >>
Can you explain? It seems pretty straight-forward to me.
Nick Malik said:Jon is right, Jordan. Calling a seperate app from your code creates a
slew of dependencies and issues for applications. I'd recommend against
it.
Examples:
-- Customer A works for a large corporation that controls the manner in
which apps can be installed on the desktop. They review the install for
your app and, seeing that you are installing two executables instead of
one, simply refuse to allow the app to be installed. (= lost sale).
-- Customer B installs your app and then, the next day, downloads a zip
file sent from their customer. They double-click the zip file, as always,
but this time, a different app opens up to handle it because your zip app
has registered itself to handle files with the extension of .ZIP. They
freak out and call Customer Support in their company. After hours of
frustration, customer support figures out that the customer had installed
your app, and advises them to uninstall your app. They then place a rule
in the corporate knowledge base to advise everyone else to uninstall the
app as well. (= lost sale and lost reputation)
-- Customer C has a memory constrained environment. They run your app,
which attempts to decompress a large file. This takes a long time.
Because the zip app is external and async, your app thinks that the
uncompression has completed already and attempts to open the uncompressed
file, which fails. (= impression of code defects)
-- Customer D hears of a virus that has shown up and proactively searches
on their machine for files of a specific name. They find the zip program
and delete it. Your app simply starts to fail. (= impression of poor
quality).
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
Jordan said:RE:
<< ...a lot more complicated... >>
Can you explain? It seems pretty straight-forward to me.
TerryFei said:I hope the following article will be helpful for you:
Title: ZIP Code Utility
URL: http://www.codeproject.com/csharp/zipcodeutil.asp
Thanks and have a nice day!
Gecko/20051111 Firefox/1.5,gzip(gfe),gzip(gfe)From: "Jon Skeet [C# MVP]" <[email protected]>
Newsgroups: microsoft.public.dotnet.languages.csharp
Subject: Re: ZIP files in C#
Date: 13 Mar 2006 00:07:44 -0800
Organization: http://groups.google.com
Lines: 18
Message-ID: <[email protected]>
References: <[email protected]>
<[email protected]>
NNTP-Posting-Host: 213.146.158.130
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1142237271 11332 127.0.0.1 (13 Mar 2006 08:07:51 GMT)
X-Complaints-To: (e-mail address removed)
NNTP-Posting-Date: Mon, 13 Mar 2006 08:07:51 +0000 (UTC)
In-Reply-To: <[email protected]>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8)
Starting a separate process makes life a lot more complicated than
using a library from within your own code.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.