I feel confused with these two classes, both of them seem used to create or extract zip files? Can anyone explain the difference?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.Zipfile Class– Provides static methods for creating, extracting, and opening zip archives.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 Classis 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.when you want just only the zip file I would prefer using zipFile class until I want my zip to be a package.
If you only want to zip your file and extract it use zipClass instead