C#(.net 4.0) 如何用自带的类解压Zip文件?
C#(.net4.0)如何用自带的类解压Zip文件?不要用donet,Isharp,这样的第三方,一定用.net自带的。.NET4.0没有ZipFile这样的类...
C#(.net 4.0) 如何用自带的类解压Zip文件?不要用donet,Isharp,这样的第三方,一定用.net自带的。.NET4.0没有 ZipFile这样的类
展开
1个回答
展开全部
.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文件,还是用第三方库吧。
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文件,还是用第三方库吧。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询