Saving Face

Chris posted a little .net code that took J#'s gzip class and brought it into c#. I did that once back in the 1.1 days when I was desperate to escape implode.DLL(Talk about a fun library) at any rate it sucked so bad (J# runtime dependency anyone?)  That I moved my code to SharpZipLib which rocks.  Any way I digress I happened to comment to Chris that .NET 2.0 has compression.  And Chris says

How does .NET 2.0 provider for zip file decompression? That's new to me.
And why would I use an external library when I can use one that's built in?

Great now I have to find the info to pull files out of a zip archive with  By chance the MSDN documentation says

This class does not inherently provide functionality for adding files to or extracting files from .zip archives. For an example of manipulating compressed file archives, see Compression Application Sample.

Ok, groovy I can look at your sample application. 

This sample demonstrates compression capabilities available in the .NET Framework. It builds a Windows Forms application that employs the GZipStream and DeflateStream types to compress and decompress files. The sample also introduces several types that are new in the .NET Framework version 2.0.

Great lets compile this bad boy and bask in its coolness.


Ok right what the hell is a .xip file?

I know this can be done and I know I am far to lazy to just write the code myself tonight.  Also I am almost positive some one has done all the work for me.

Indeed Dino has a blog entry System.IO.Compression and zip files 

So now I have proved that maybe I do know what I am talking about.

Comments [0]