How can I unzip a file to a .NET memory stream?

前端 未结 6 602
鱼传尺愫
鱼传尺愫 2020-12-14 00:16

I have files (from 3rd parties) that are being FTP\'d to a directory on our server. I download them and process them even \'x\' minutes. Works great.

Now, some of th

6条回答
  •  既然无缘
    2020-12-14 00:47

    using (ZipArchive archive = new ZipArchive(webResponse.GetResponseStream()))
    {
         foreach (ZipArchiveEntry entry in archive.Entries)
         {
            Stream s = entry.Open();
            var sr = new StreamReader(s);
            var myStr = sr.ReadToEnd();
         }
    } 
    

提交回复
热议问题