many answers above, but I used this below, mentioning the code to honor or unzip the file using 7zip
7zip .
public void ExtractFile(string source, string destination)
{
if (!Directory.Exists(destination))
Directory.CreateDirectory(destination);
string zPath = @"C:\Program Files\7-Zip\7zG.exe";
try
{
ProcessStartInfo pro = new ProcessStartInfo();
pro.WindowStyle = ProcessWindowStyle.Hidden;
pro.FileName = zPath;
pro.Arguments = "x \"" + source + "\" -o" + destination;
Process x = Process.Start(pro);
x.WaitForExit();
}
catch (System.Exception Ex) {
}
}
zip
public void CreateZip()
{
string sourceName = @"d:\a\example.txt";
string targetName = @"d:\a\123.zip";
ProcessStartInfo p = new ProcessStartInfo();
p.FileName = @"C:\Program Files\7-Zip\7zG.exe";
p.Arguments = "a -tgzip \"" + targetName + "\" \"" + sourceName + "\" -mx=9";
p.WindowStyle = ProcessWindowStyle.Hidden;
Process x = Process.Start(p);
x.WaitForExit();
}