I have a directory that contains several files. I want compress this folder to a zip or tar.gz file. How can I do his work in C#?
i use the System.IO.Packaging Namespace which was introduced with .NET Framework 3.5. I decided to use that one because it's based on .NET Framework Base classes and no 3rd party code is required which blows up the size of the code..
here's another post on Stackoverflow regarding this Question
And here's the Namespace and ZipPackage declaration / explanation @MSDN
hope that helps
Christian