引入 SharpCompress
https://download.csdn.net/download/weixin_42020830/87737306
string targetFile="c:\\test.zip";
string zipFile="c:\\test";
using (Stream stream =System.IO.File.OpenRead(targetFile))
{
var reader = ReaderFactory.Open(stream);
while (reader.MoveToNextEntry())
{
if (!reader.Entry.IsDirectory)
{
reader.WriteEntryToDirectory(zipFile, new ExtractionOptions { ExtractFullPath = true, Overwrite = true });
}
}
}