压缩或解压缩文件夹或文件 [英] Zip or unzip folder or files

查看:96
本文介绍了压缩或解压缩文件夹或文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想在asp.net c#中压缩或解压缩文件/文件夹,不使用第三方工具。

可以帮助我。

如何以编程方式执行此操作。



提前致谢

Hi
I want to zip or unzip file/folder in asp.net c#, withoout using third party tool.
can any one help me.
How to do this programatically.

Thanks in advance

推荐答案

如果可以的话使用.NET 4.5,它有一个内置的解决方案: http:// msdn。 microsoft.com/en-us/library/vstudio/system.io.compression.zipfile [ ^ ]

否则你可以选择.NET的众多zip库(使用谷歌):

http://icsharpcode.github.io/SharpZipLib/ [ ^ ]

http://dotnetzip.codeplex.com/ [< a href =http://dotnetzip.codeplex.com/target =_ blanktitle =New Window> ^ ]
If you can use .NET 4.5, it has a build in solution: http://msdn.microsoft.com/en-us/library/vstudio/system.io.compression.zipfile[^]
Otherwise you can choose from numerous zip libraries for .NET (use Google):
http://icsharpcode.github.io/SharpZipLib/[^]
http://dotnetzip.codeplex.com/[^]


check ZipStorer - 用于在Zip中存储文件的纯C#类 [ ^ ]

http:// stackoverflow .com / questions / 836736 / unzip-files-programmatically-in-net [ ^ ]
check ZipStorer - A Pure C# Class to Store Files in Zip[^]
and http://stackoverflow.com/questions/836736/unzip-files-programmatically-in-net[^]


这篇关于压缩或解压缩文件夹或文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆