How to zip multiple files using only .net api in c#

前端 未结 9 1262
灰色年华
灰色年华 2020-12-01 09:04

I like to zip multiple files which are being created dynamically in my web application. Those files should be zipped. For this, i dont want to use any third-party tools. jus

9条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-01 09:46

    Use System.IO.Packaging in .NET 3.0+.

    See this introduction to System.IO.Packaging


    If you're able to take a .NET 4.5 dependency, there's a System.IO.Compression.ZipArchive in that universe; see walkthrough article here (via InfoQ news summary article here)

提交回复
热议问题