Click here to Skip to main content
15,892,298 members
Articles / Programming Languages / C#

How to compress/decompress directories using GZipStream

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
1 Feb 2012CPOL 14.9K   7  
My alternative is to rather use a tried and tested compression api. It's simpler to use and you don't have to spend time developing helper methods to zip and unzip files.http://dotnetzip.codeplex.com/[^]Create a zip file using (ZipFile zip = new ZipFile()) { ...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
25 Jan 2012Andrew Novik 2 alternatives  
Very simple console utility to compress/decompress directories uses GZipStream from the System.IO.Compression namespace.
Please Sign up or sign in to vote.
4 Feb 2012msmits
Note this code will not unzip general zip files. It only works with files zipped according to the package standard.To unzip regular zip files, there are several components available.I've used the Windows built-in COM component "Microsoft Shell Controls And Automation" (Add Reference, COM...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer BBD Johannesburg
South Africa South Africa
Bsc (Hons) Business Information Systems.
MCTS: Web Applications Development with Microsoft .NET Framework 4
MCTS: Windows Communication Foundation Development with Microsoft .NET Framework 4
MCTS: Accessing Data with Microsoft .NET Framework 4
Microsoft Certified Professional Developer Certification.

Comments and Discussions