I want to compress a file and a directory in C#. I found some solution in Internet but they are so complex and I couldn\'t run them in my project. Can anybody suggest me a clear
Using DotNetZip http://dotnetzip.codeplex.com/, there's an AddDirectory() method on the ZipFile class that does what you want:
using (var zip = new Ionic.Zip.ZipFile()) { zip.AddDirectory("DirectoryOnDisk", "rootInZipFile"); zip.Save("MyFile.zip"); }
Bonne continuation...