如何在.net 3.5中创建一个zip文件 [英] How to create a zip file in .net 3.5
本文介绍了如何在.net 3.5中创建一个zip文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我想在.net 3.5框架中创建一个zip文件并提取相同的文件。
请帮助我..
谢谢
Ramana
Hi everyone,
I want to create a zip file in .net 3.5 framework and extract the same file also.
Please help me..
Thanks
Ramana
推荐答案
你可以使用System.IO.Packaging或System.IO.Compression,它们具有可用于将内容放入zip文件的类。然而,它并不简单。
这里有一些博客文章(这些解释了如何这样做)
* http://weblogs.asp.net/jgalloway/archive/2007 /10/25/creating-zip-archives-in-net-without-an-external-library-like-sharpziplib.aspx [ ^ ]
* http://www.4guysfromrolla.com/articles/092910-1.aspx [ ^ ]
希望这些会有所帮助。
问候
You can use System.IO.Packaging or System.IO.Compression, these have classes that can be used to drop content into a zip file. Its not simple, however.
Here's some blog posts (these explains how to do so)
* http://weblogs.asp.net/jgalloway/archive/2007/10/25/creating-zip-archives-in-net-without-an-external-library-like-sharpziplib.aspx[^]
*http://www.4guysfromrolla.com/articles/092910-1.aspx[^]
Hope these would help.
Regards
请参阅以下链接
< a href =http://www.aspdotnet-suresh.com/2013/04/create-zip-files-in-as pnet-c-vbnet-zip.html> create-zip-files-in-aspnet-c-vbnet-zip.html [ ^ ]
http://msdn.microsoft.com/en-us /library/system.io.compression.gzipstream(v=vs.80).aspx [ ^ ]
See the following links
create-zip-files-in-aspnet-c-vbnet-zip.html[^]
http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream(v=vs.80).aspx[^]
我们仍然使用 ICSharpCode.SharpZipLib
,它也可用于商业闭源应用程序。请查看 http://www.icsharpcode.net/opensource/sharpziplib/ [ ^ ]。
We still use ICSharpCode.SharpZipLib
, it may also be used in commercial closed source applications. Take a look at http://www.icsharpcode.net/opensource/sharpziplib/[^].
这篇关于如何在.net 3.5中创建一个zip文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文