當前位置:編程學習大全網 - 網站源碼 - C#(.net 4.0) 如何用自帶的類解壓Zip文件?

C#(.net 4.0) 如何用自帶的類解壓Zip文件?

.NET自帶類支持GZIP算法壓縮/解壓流。

System.IO.Compression.GZipStream

這個類不能直接用來解壓.zip文件,看看老外怎麽說的

It is possible, with extra code, to produce or read a zip file, with the help of GZipStream, but it is not trivial.

If you want to read or write Zip files, the best bet is to use a third party library, like DotNetZip. This library is free, and enables your applications to read or write zip files that contain multiple compressed files. These are standard zip files that can be opened by Windows Explorer, or WinZip, or other zip tools. It's simple to use. It works with VB, or c#, or any .NET language

總之,如果妳要解壓ZIP文件,還是用第三方庫吧。

  • 上一篇:百度網盤歷史
  • 下一篇:2、問題:嵌入式防盜門和普通防盜門有什麽不同?亮點在哪兒?
  • copyright 2024編程學習大全網