0

我解压缩了我下载的文件。我如何以及在我的 asp.net mvc 3 应用程序中访问什么库才能解压缩包含多个文件的文件?

我的控制器代码:

 public ActionResult Upload(ScormUploadViewModel model)
{
  if (ModelState.IsValid)
  {
    if (model.ScormPackageFile != null)
    {
      string zipCurFile = model.ScormPackageFile.FileName;
      string fullPath = Path.GetDirectoryName(zipCurFile);
      string directoryName = Path.GetFileNameWithoutExtension(zipCurFile);
      Directory.CreateDirectory(Path.Combine(fullPath, directoryName));

      using (FileStream zipFile = new FileStream(zipCurFile, FileMode.Open))
      {
        using (GZipStream zipStream = new GZipStream(zipFile, CompressionMode.Decompress))
        {
          StreamReader reader = new StreamReader(zipStream);  
         //next unzip the file? how to get the library i need?
        }
      }

谢谢

4

0 回答 0