This project is read-only.

Using System.IO.Packaging vs. DotNetZip Library

May 26, 2010 at 8:36 PM

Has anyone here used or worked with both both?  If so, can you describe which of the two is a more viable options and why?  Or can anyone point me toward an article or document that compares both directly?  While I have only begun initial research regarding both, it appears there is a lot more helpful documentation regarding DotNetZip compared to the System.IO.Packaging namespace in the .NET framework.

Any help I can get would be greatly appreciated!

May 27, 2010 at 11:54 AM

I don't use System.IO.Packaging.  But here is quick comparison.

  1. Generality - While System.IO.Packaging can be used to write a zip file, it cannot be used to read arbitrary zip files.  All package files are zip files, but not all zip files are package files, in the same way that all squares are rectangles, but not all rectangles are squares.  A zip file is a package file if it has a special set of entries, that the package format defines. I don't know what happens if you try to read an arbitrary zip file with System.IO.Packaging. 
    In contrast DotNetZip is designed to read or write any zip file. It takes advantage of zip features like AES encryption, NTFS timestamps, UTF8-encoding of entry names, spanned archives.
    It's a general library. 
  2. Ease of Use - The metaphor in System.IO.Packaging is a package, made up of multiple parts.  I find that model completely unhelpful when simply reading or writing zip archives.
    In contrast, with DotNetZip, the metaphor for an archive is clear and simple. a ZipFile contains multiple ZipEntry items. You can read or save  zip files.  It's easy.