.net rar zip压缩包解压
引入 SharpCompress
https://files.cnblogs.com/files/blogs/707150/SharpCompress_dll_0.24.0.zip?t=1708670187&download=true
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 });
}
}
}
浙公网安备 33010602011771号