我解压缩了我下载的文件。如何以及在我的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?
}
}
感谢