如何解压缩文件夹或文件 [英] how to unzip folder or file
本文介绍了如何解压缩文件夹或文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在不添加外部引用的情况下使用vb.net以编程方式解压缩文件或文件夹?
How to unzip files or folders programmatically using vb.net without adding external references?
推荐答案
Clickety [ ^ ]
您可以使用GZipStream类:
http://msdn.microsoft.com/en-us/library/system. io.compression.gzipstream.aspx [ ^ ]
但是,正如我记得的那样,.NET的功能也要求文件/文件夹也使用GZipStream压缩.它无法处理解压缩普通zip文件的情况.
要解压缩普通档案,您应该使用外部组件,例如SharpZipLib库:
http://www.icsharpcode.net/OpenSource/SharpZipLib/ [
Hi,
you can use the GZipStream class:
http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream.aspx[^]
but as I remember this feature of .NET requires that the files/folders were zipped with GZipStream too. It can''t handle unzipping normal zip files.
To unzip normal archives, you should use an external component such as the SharpZipLib library:
http://www.icsharpcode.net/OpenSource/SharpZipLib/[^]
这篇关于如何解压缩文件夹或文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文