压缩解压缩
-
如何在ASP.NET中使用WinRAR实现文件压缩与解压缩的代码?
“csharp,using System.Diagnostics;public void Compress(string inputPath, string outputPath),{, ProcessStartInfo startInfo = new ProcessStartInfo(“WinRAR.exe”);, startInfo.Arguments = $”a -ep \”{outputPath}\” \”{inputPath}\””;, Process.Start(startInfo);,}public void Decompress(string archivePath, string extractPath),{, ProcessStartInfo startInfo = new ProcessStartInfo(“WinRAR.exe”);, startInfo.Arguments = $”x \”{archivePath}\” \”{extractPath}\””;, Process.Start(startInfo);,},“