제가하고 싶은 것은 디스크에 zip 파일을 저장하는 대신 MemoryStream에서 열어 보는 것입니다.C# - DotNetZip을 MemoryStream에서 엽니 다.
DotNetZip 프로그래밍 예제에 대한 설명서를보고 있습니다 : 필자는 필요할 것으로 생각되는 것에 따라 약간 수정했습니다.
var ms = new MemoryStream();
using (ZipFile zip = new ZipFile())
{
zip.AddFile("ReadMe.txt");
zip.AddFile("7440-N49th.png");
zip.AddFile("2008_Annual_Report.pdf");
zip.Save(ms); // this will save the files in memory steam
}
// now what I need is for the zip file to open up so that
the user can view all the files in it. Not sure what to do next after
zip.Save(ms) for this to happen.
오픈으로 무엇을 의미합니까? 다른 프로그램에서 열리나요? –
환경이란 무엇입니까? 예를 들어 ASP.NET MVC에서이 작업을 수행하고 있습니까? 그렇다면 예제 코드를 게시 할 수 있습니다. –
@Dommer - 예, ASP.NET MVC C#에 있습니다. 매우 도움이 될 것입니다. –