ZipPackage类VS压缩文件类 [英] ZipPackage Class vs Zipfile class

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

问题描述

我感到困惑与这两个班,他们俩似乎用于创建或提取zip文件? ?谁能解释的差异

I feel confused with these two classes, both of them seem used to create or extract zip files? Can anyone explain the difference?

推荐答案

ZipPackage类 - 实现派生抽象包基类的ZipPackage类的子类使用一个ZIP文件作为容器存储。这个类不能被继承

ZipPackage Class - Implements a derived subclass of the abstract Package base class—the ZipPackage class uses a ZIP archive as the container store. This class cannot be inherited.

zip文件类 - 提供用于创建,提取,开放ZIP压缩文件的静态方法。

Zipfile Class - Provides static methods for creating, extracting, and opening zip archives.

指这些链接获得确切的差异
http://msdn.microsoft.com/en-us/library/system.io.packaging.zippackage.aspx

refer these links to get exact differences http://msdn.microsoft.com/en-us/library/system.io.packaging.zippackage.aspx

的http:// MSDN。 microsoft.com/en-us/library/system.io.compression.zipfile.aspx

ZipPackage类是用来处理包,它使用存储的zip格式,但包含在zip特殊的元文件。包是一个zip,但所有的压缩文件不是包。您只能打开使用包类,而不是任何压缩文件包。

ZipPackage Class is used to handle packages, which uses the zip format for storage, but has special meta files included in the zip. A package is a zip, but all zip files aren't packages. You can only open a package using the Package class, not any zip file.

是一个包。

如果你只是想压缩文件并提取使用它来代替zipClass

If you only want to zip your file and extract it use zipClass instead

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

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