如何使用System.IO.Com pression读/写ZIP文件? [英] How to use System.IO.Compression to read/write ZIP files?

查看:148
本文介绍了如何使用System.IO.Com pression读/写ZIP文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有库在那里与ZIP文件的工作。而且,你也可以使用Windows内置的功能为工作ZIP文件

I know there are libraries out there for working with ZIP files. And, you can alternatively use the functionality built into Windows for working ZIP files.

不过,我想知道是否有人制定了如何使用内置的System.IO.Com pression命名空间中的工具,在.NET读/写ZIP文件?或者,仅使用此命名空间是不可能的?

But, I'm wondering if anyone has worked out how to use the tools built into the System.IO.Compression namespace within .NET for reading/writing ZIP files? Or, is it not possible using only this namespace?

更新:我已经好像有人评论说,在System.IO.Packaging程序命名空间可能是有用的与此也。有谁知道究竟该怎么办呢?

UPDATED: I've seem someone comment that the System.IO.Packaging namespace might be usefull with this also. Does anyone know exactly how to do it?

推荐答案

MSDN有一个完整的例如 <一href="http://msdn.microsoft.com/en-us/library/system.io.packaging.zippackage.aspx">http://msdn.microsoft.com/en-us/library/system.io.packaging.zippackage.aspx使用ZipPackage类。需要.NET 3.5。

MSDN has a complete example http://msdn.microsoft.com/en-us/library/system.io.packaging.zippackage.aspx using the ZipPackage class. Requires .NET 3.5.

这篇关于如何使用System.IO.Com pression读/写ZIP文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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