PC Review


Reply
Thread Tools Rate Thread

Class to process ZIP or CAB files

 
 
Gaetan
Guest
Posts: n/a
 
      19th Sep 2005
A summary search in MSDN did not produce anything.

Is there a class in .NET which allows management of ZIP or CAB files? Add/modify/remove
files in a specified CAB or ZIP file. I could always call an external process but I rather
do the ZIP/CAB file management from within my C# program.

 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      19th Sep 2005
Gaetan,

There is nothing in .NET 1.1 and before. You will have to use a third
party library (I think there is something galled SharpLib or something of
that nature which has been recommended a number of times).

For .NET 2.0, you can use the classes in the System.IO.Compression
namespace to zip/unzip zip archives.

For cab files, there is still no support, but I believe there are APIs
that you can use to access them. You should be able to call these through
the P/Invoke layer.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Gaetan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>A summary search in MSDN did not produce anything.
>
> Is there a class in .NET which allows management of ZIP or CAB files?
> Add/modify/remove
> files in a specified CAB or ZIP file. I could always call an external
> process but I rather
> do the ZIP/CAB file management from within my C# program.
>



 
Reply With Quote
 
=?Utf-8?B?S0g=?=
Guest
Posts: n/a
 
      19th Sep 2005
In .NET 2.0 there is the System.IO.Compression.GZipStream class


"Gaetan" wrote:

> A summary search in MSDN did not produce anything.
>
> Is there a class in .NET which allows management of ZIP or CAB files? Add/modify/remove
> files in a specified CAB or ZIP file. I could always call an external process but I rather
> do the ZIP/CAB file management from within my C# program.
>
>

 
Reply With Quote
 
Gaetan
Guest
Posts: n/a
 
      19th Sep 2005
Thanks Nicholas for the prompt reply.

Although it is not what I was looking for, I found an article that could allow me to
manipulate ZIP files through C# calls to J#:

"Using the Zip Classes in the J# Class Libraries to Compress Files and Data with C#"
http://msdn.microsoft.com/msdnmag/is...n/default.aspx

thanks again.

On Mon, 19 Sep 2005 12:19:23 -0400, "Nicholas Paldino [.NET/C# MVP]"
<(E-Mail Removed)> wrote:

>Gaetan,
>
> There is nothing in .NET 1.1 and before. You will have to use a third
>party library (I think there is something galled SharpLib or something of
>that nature which has been recommended a number of times).
>
> For .NET 2.0, you can use the classes in the System.IO.Compression
>namespace to zip/unzip zip archives.
>
> For cab files, there is still no support, but I believe there are APIs
>that you can use to access them. You should be able to call these through
>the P/Invoke layer.
>
> Hope this helps.

 
Reply With Quote
 
John Wood
Guest
Posts: n/a
 
      19th Sep 2005
If you don't mind installing the J# runtime you can use the
java.util.zip.ZipEntry class.
There's a tutorial here:
http://codeproject.com/csharp/VmEasyZipUnZip.asp

Very little support for CAB files exists, either managed or unmanaged, so I
would stick with zip files if I were you.

"Gaetan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> A summary search in MSDN did not produce anything.
>
> Is there a class in .NET which allows management of ZIP or CAB files?

Add/modify/remove
> files in a specified CAB or ZIP file. I could always call an external

process but I rather
> do the ZIP/CAB file management from within my C# program.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU load of process started from .Net Process class is low leszek.doniec@googlemail.com Microsoft Dot NET Framework 2 19th Dec 2005 10:24 AM
Permission class required to use Process class =?Utf-8?B?U2ltb24gSGFydA==?= Microsoft C# .NET 0 16th Nov 2005 11:34 AM
Running batch files using Process class =?Utf-8?B?U3JlZWx1?= Microsoft ASP .NET 1 28th Jul 2005 08:58 PM
.NET Web Services, the process class and remote files Shacker Microsoft C# .NET 0 25th May 2005 12:45 AM
Copying files using process class in ASP.NET Mark Microsoft C# .NET 5 28th Jul 2004 11:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:21 AM.