<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>All About Interop : Zip</title><link>http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx</link><description>Tags: Zip</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>DotNetZip revs to v1.6 – now with Unicode support</title><link>http://blogs.msdn.com/dotnetinterop/archive/2008/10/14/dotnetzip-revs-to-v1-6-now-with-unicode-support.aspx</link><pubDate>Wed, 15 Oct 2008 00:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9000101</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/9000101.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=9000101</wfw:commentRss><description>&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;The v1.6 release of DotNetZip is now available.&amp;nbsp; DotNetZip is the open source Zip Library for .NET, available at &lt;A href="http://www.codeplex.com/DotNetZip" mce_href="http://www.codeplex.com/DotNetZip"&gt;&lt;SPAN style="COLOR: blue; TEXT-DECORATION: underline"&gt;http://www.codeplex.com/DotNetZip&lt;/SPAN&gt;&lt;/A&gt; . &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Major new features: &lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Unicode support, as well as support for arbitrary code pages. Now you can build zip files that have names with Unicode characters. &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Large file support.&amp;nbsp; Full streaming architecture means you can zip large files without loading them into memory all at one time. &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Partial Trust&amp;nbsp; - for running on shared hosetd ASP.NET servers&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;DotNetZip is still small, fast, and the easiest .NET zip library to use. Check this sample code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 2pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 2pt; FONT-SIZE: 9pt; BACKGROUND: white; PADDING-BOTTOM: 2pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; LINE-HEIGHT: 98%; PADDING-TOP: 2pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Consolas, Courier New"&gt;&lt;PRE&gt;      &lt;SPAN style="COLOR: #a020f0"&gt;using&lt;/SPAN&gt; (&lt;SPAN style="COLOR: #228b22"&gt;var&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;zip&lt;/SPAN&gt; = &lt;SPAN style="COLOR: #a020f0"&gt;new&lt;/SPAN&gt; ZipFile())
      {
        &lt;SPAN style="COLOR: #5f9ea0"&gt;zip&lt;/SPAN&gt;.AddDirectory(directory);
        &lt;SPAN style="COLOR: #5f9ea0"&gt;zip&lt;/SPAN&gt;.Save(targetZip);
      }
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;It is 100% managed code. People love it: &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://blogs.msdn.com/blogfiles/dotnetinterop/101408_2152_DotNetZipre1.png" mce_src="http://blogs.msdn.com/blogfiles/dotnetinterop/101408_2152_DotNetZipre1.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;DotNetZip is powerful, too: it does password-protected zip files, zip comments, self-extracting zips, zip-to-stream, stream-to-zip, and more.&amp;nbsp; You can use it in any .NET app - WinForms, console app, ASP.NET page, etc.&amp;nbsp; In ASP.NET, you can write a zip archive directly to Response.OutputStream as a download to the browser client. On the codeplex site, there are lots of examples and the documentation is solid. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;DotNetZip is free, but is &lt;A href="http://en.wikipedia.org/wiki/Donationware" mce_href="http://en.wikipedia.org/wiki/Donationware"&gt;&lt;SPAN style="COLOR: #666666; TEXT-DECORATION: underline"&gt;donationware&lt;/SPAN&gt;&lt;/A&gt;. For those who are happy with DotNetZip, I am &lt;A href="http://cheeso.members.winisp.net/DotNetZipDonate.aspx" mce_href="http://cheeso.members.winisp.net/DotNetZipDonate.aspx"&gt;&lt;SPAN style="COLOR: #666666; TEXT-DECORATION: underline"&gt;accepting donations&lt;/SPAN&gt;&lt;/A&gt; on behalf of my favorite charity. &lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9000101" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category></item><item><title>DotNetZip users: Please Test Unicode support (free zip library for .NET)</title><link>http://blogs.msdn.com/dotnetinterop/archive/2008/09/19/test-out-unicode-support-in-dotnetzip-free-zip-library-for-net.aspx</link><pubDate>Fri, 19 Sep 2008 22:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8959335</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/8959335.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=8959335</wfw:commentRss><description>&lt;P&gt;&lt;A class="" href="http://www.codeplex.com/DotNetZip" mce_href="http://www.codeplex.com/DotNetZip"&gt;DotNetZip&lt;/A&gt; is an open-source library to allow any .NET application to read and create zip files.&amp;nbsp; If you want your ASP.NET page to grab an uploaded zipfile and unpack it on the server, DotNetZip can help you.&amp;nbsp; If you want to generate a zipfile from a server-based app like an ASP.NET page and send it as a download, DotNetZip can be the library you need.&amp;nbsp; If you have a windows forms app or a WPF app that needs to read or write zipfiles, DotNetZip can help.&amp;nbsp; If you have an agent application that watches for files to be dropped into a directory, then zips or unzips them, DotNetZip is the thing you need. &lt;/P&gt;
&lt;P&gt;DotNetZip has been available as an open source project &lt;A class="" href="http://www.codeplex.com/" mce_href="http://www.codeplex.com"&gt;on CodePlex&lt;/A&gt;&amp;nbsp;for about a year. In that time I've added a bunch of features as requested by people who are using it - support for passwords, support for stream-based interfaces, zipfile comments, the ability to remove entries from zip files, progress events for zipping up or unzipping, finer control over the use of compression, and so on.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The &lt;A class="" href="http://www.codeplex.com/DotNetZip/WorkItem/View.aspx?WorkItemId=3152" mce_href="http://www.codeplex.com/DotNetZip/WorkItem/View.aspx?WorkItemId=3152"&gt;#1 most requested feature&lt;/A&gt; for the DotNetZip library is Unicode support - people want to be able to zip up files that have filenames with non-ASCII characters.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;I've produced a &lt;A class="" href="http://www.codeplex.com/DotNetZip/Release/ProjectReleases.aspx?ReleaseId=14569" mce_href="http://www.codeplex.com/DotNetZip/Release/ProjectReleases.aspx?ReleaseId=14569"&gt;preliminary release&lt;/A&gt; with support for Unicode, and I'm asking for&amp;nbsp;people to&amp;nbsp;try it out, test it and tell&amp;nbsp;me if this does what they need&amp;nbsp;it to do.&amp;nbsp; The thing is, Unicode was added to the &lt;A class="" href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT" mce_href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT"&gt;PKWare specification for zip files&lt;/A&gt; only about a year ago.&amp;nbsp; There are few tools out there that properly support the spec.&amp;nbsp; In particular, &lt;A class="" href='http://search.msn.com/results.aspx?q=windows+"compressed+folderS"+unicode&amp;amp;FORM=QBHP' mce_href='http://search.msn.com/results.aspx?q=windows+"compressed+folderS"+unicode&amp;amp;FORM=QBHP'&gt;Windows XP and Windows Vista do not support the PKWare Unicode specification&lt;/A&gt; in the "compressed folders" feature.&amp;nbsp; In Windows, if you click on a zip file that complies with the PKWare spec, you won't get what you want to get.&amp;nbsp; And it's not just Windows.&amp;nbsp; Most tools don't support Unicode zip files.&amp;nbsp; As a result, I don't know how to test the Unicode support effectively.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Because zip tools that do Unicode are few and far between, I used a fallback approach in the library.&amp;nbsp; In the latest prelim release, DotNetZip uses the &lt;A class="" href="http://en.wikipedia.org/wiki/Code_page_437" mce_href="http://en.wikipedia.org/wiki/Code_page_437"&gt;IBM437 code page&lt;/A&gt; to encode non-ASCII characters by default.&amp;nbsp; This is not in the PKWare spec, but zip files that people have sent me are using this encoding.&amp;nbsp; IBM437 in zip files may be a quiet, unspecified, &lt;EM&gt;de-facto standard, &lt;/EM&gt;"good enough" for many people.&amp;nbsp; Of course, using the IBM437 mode, you cannot do Chinese characters, which is a huge hole.&amp;nbsp; But IBM437 does cover characters with umlauts and tildes and so on, a lot of Latin languages.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;And now I'm asking for your help.&amp;nbsp; I'd like everyone who uses DotNetZip to try out the new Unicode and IBM437 stuff.&amp;nbsp; It is available in the latest &lt;A class="" href="http://www.codeplex.com/DotNetZip/Release/ProjectReleases.aspx?ReleaseId=14569" mce_href="http://www.codeplex.com/DotNetZip/Release/ProjectReleases.aspx?ReleaseId=14569"&gt;v1.6 prelim release availalble&lt;/A&gt; on the releases tab.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;For tests:&amp;nbsp; &lt;BR&gt;Use the library to zip up files that have "Unicode filenames", or more accurately, filenames with characters that cannot be represented in 7-bit ASCII.&amp;nbsp; This might be characters with umlauts, tildes, and so on, in addition to characters from the non-Latin languages&amp;nbsp; - Hebrew, Greek, Cyrillic, and of course, Chinese.&amp;nbsp; &lt;BR&gt;&lt;BR&gt;See if it works, see if the files zip up and unzip properly.&amp;nbsp; See if the files open in Explorer the way you expect.&amp;nbsp; See if it works intuitively, if the library behaves the way you would like it to behave.&amp;nbsp; See if the zip files can be read by other tools and libraries (&lt;A class="" href="http://www.7-zip.org/" mce_href="http://www.7-zip.org/"&gt;7-zip&lt;/A&gt; or &lt;A class="" href="http://www.zlib.net/" mce_href="http://www.zlib.net/"&gt;zlib&lt;/A&gt; or &lt;A class="" href="http://www.rarlab.com/" mce_href="http://www.rarlab.com/"&gt;winrar&lt;/A&gt;).&amp;nbsp; That kind of thing. &lt;/P&gt;
&lt;P&gt;You will have to &lt;A class="" href="http://www.codeplex.com/DotNetZip/Release/ProjectReleases.aspx?ReleaseId=14569" mce_href="http://www.codeplex.com/DotNetZip/Release/ProjectReleases.aspx?ReleaseId=14569"&gt;check the doc&lt;/A&gt; on the UseUnicode property on the ZipFile to see the options and the details of the implementation.&amp;nbsp; I encourage you to try all your tests with that flag both ON and OFF - to see how it behaves and what you would prefer.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;If find something that breaks, or surprises you, then please do &lt;A class="" href="http://www.codeplex.com/DotNetZip/WorkItem/AdvancedList.aspx" mce_href="http://www.codeplex.com/DotNetZip/WorkItem/AdvancedList.aspx"&gt;report it&lt;/A&gt;.&amp;nbsp; If you are really ambitious, you can write up a test case that reproduces the problem you observed and attach it to a &lt;A class="" href="http://www.codeplex.com/DotNetZip/WorkItem/AdvancedList.aspx" mce_href="http://www.codeplex.com/DotNetZip/WorkItem/AdvancedList.aspx"&gt;new workitem&lt;/A&gt;.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The new Unicode support in the library is easy to describe, but it is hard for me to test.&amp;nbsp; It is hard for me to know if I am testing the right things.&amp;nbsp; I need help on this, before I can declare the unicode support useful,&amp;nbsp;stable, and interoperable. &lt;/P&gt;
&lt;P mce_keep="true"&gt;Check it out!&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8959335" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Unicode/default.aspx">Unicode</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/CodePlex/default.aspx">CodePlex</category></item><item><title>Create Zip files within Powershell</title><link>http://blogs.msdn.com/dotnetinterop/archive/2008/06/26/zip-creation-within-powershell.aspx</link><pubDate>Fri, 27 Jun 2008 00:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8658510</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/8658510.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=8658510</wfw:commentRss><description>&lt;P&gt;You can use DotNetZip library from within &lt;A class="" href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx" mce_href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;Powershell&lt;/A&gt;.&amp;nbsp; It's pretty simple, fast, easy. &lt;/P&gt;
&lt;P&gt;example:&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 2pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 2pt; FONT-SIZE: 9pt; BACKGROUND: white; PADDING-BOTTOM: 2pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; PADDING-TOP: 2pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Courier New"&gt;&lt;PRE&gt;&lt;SPAN style="COLOR: #a020f0"&gt;function&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;ZipUp-Files&lt;/SPAN&gt; ( &lt;SPAN style="COLOR: #b8860b"&gt;$directory&lt;/SPAN&gt; )
{

  &lt;SPAN style="COLOR: #b8860b"&gt;$children&lt;/SPAN&gt; = &lt;SPAN style="COLOR: #0000ff"&gt;get-childitem&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;-path&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;$directory&lt;/SPAN&gt;
  &lt;SPAN style="COLOR: #a020f0"&gt;foreach&lt;/SPAN&gt; (&lt;SPAN style="COLOR: #b8860b"&gt;$o&lt;/SPAN&gt; in &lt;SPAN style="COLOR: #b8860b"&gt;$children&lt;/SPAN&gt;) 
  {
    &lt;SPAN style="COLOR: #a020f0"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="COLOR: #b8860b"&gt;$o.Name&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;-ne&lt;/SPAN&gt; &lt;SPAN style="COLOR: #bc8f8f"&gt;"TestResults"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;-and&lt;/SPAN&gt; 
        &lt;SPAN style="COLOR: #b8860b"&gt;$o.Name&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;-ne&lt;/SPAN&gt; &lt;SPAN style="COLOR: #bc8f8f"&gt;"obj"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;-and&lt;/SPAN&gt; 
        &lt;SPAN style="COLOR: #b8860b"&gt;$o.Name&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;-ne&lt;/SPAN&gt; &lt;SPAN style="COLOR: #bc8f8f"&gt;"bin"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;-and&lt;/SPAN&gt; 
        &lt;SPAN style="COLOR: #b8860b"&gt;$o.Name&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;-ne&lt;/SPAN&gt; &lt;SPAN style="COLOR: #bc8f8f"&gt;"tfs"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;-and&lt;/SPAN&gt; 
        &lt;SPAN style="COLOR: #b8860b"&gt;$o.Name&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;-ne&lt;/SPAN&gt; &lt;SPAN style="COLOR: #bc8f8f"&gt;"notused"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;-and&lt;/SPAN&gt; 
        &lt;SPAN style="COLOR: #b8860b"&gt;$o.Name&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;-ne&lt;/SPAN&gt; &lt;SPAN style="COLOR: #bc8f8f"&gt;"Release"&lt;/SPAN&gt;)
    {
      &lt;SPAN style="COLOR: #a020f0"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="COLOR: #b8860b"&gt;$o.PSIsContainer&lt;/SPAN&gt;)
      {
        &lt;SPAN style="COLOR: #0000ff"&gt;ZipUp-Files&lt;/SPAN&gt; ( &lt;SPAN style="COLOR: #b8860b"&gt;$o.FullName&lt;/SPAN&gt; )
      }
      &lt;SPAN style="COLOR: #a020f0"&gt;else&lt;/SPAN&gt; 
      {
        &lt;SPAN style="COLOR: #a020f0"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="COLOR: #b8860b"&gt;$o.Name&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;-ne&lt;/SPAN&gt; &lt;SPAN style="COLOR: #bc8f8f"&gt;".tfs-ignore"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;-and&lt;/SPAN&gt;
           !&lt;SPAN style="COLOR: #b8860b"&gt;$o.Name.EndsWith&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #bc8f8f"&gt;".cache"&lt;/SPAN&gt;) &lt;SPAN style="COLOR: #228b22"&gt;-and&lt;/SPAN&gt;
           !&lt;SPAN style="COLOR: #b8860b"&gt;$o.Name.EndsWith&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #bc8f8f"&gt;".zip"&lt;/SPAN&gt;) )
        {
          &lt;SPAN style="COLOR: #0000ff"&gt;Write-output&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;$o.FullName&lt;/SPAN&gt;
          &lt;SPAN style="COLOR: #b8860b"&gt;$e&lt;/SPAN&gt;= &lt;SPAN style="COLOR: #b8860b"&gt;$zipfile.AddFile&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #b8860b"&gt;$o.FullName&lt;/SPAN&gt;)
        }
      }
    }
  }
}


[System.Reflection.Assembly]::LoadFrom(&lt;SPAN style="COLOR: #bc8f8f"&gt;"c:\\\bin\\Ionic.Utils.Zip.dll"&lt;/SPAN&gt;);

&lt;SPAN style="COLOR: #b8860b"&gt;$zipfile&lt;/SPAN&gt; =  &lt;SPAN style="COLOR: #0000ff"&gt;new-object&lt;/SPAN&gt; Ionic.Utils.Zip.ZipFile(&lt;SPAN style="COLOR: #bc8f8f"&gt;"zipsrc.zip"&lt;/SPAN&gt;);

&lt;SPAN style="COLOR: #0000ff"&gt;ZipUp-Files&lt;/SPAN&gt; &lt;SPAN style="COLOR: #bc8f8f"&gt;"DotNetZip"&lt;/SPAN&gt;

&lt;SPAN style="COLOR: #b8860b"&gt;$zipfile.Save&lt;/SPAN&gt;()

&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example above shows how to create a zip.&amp;nbsp; I use it to zip up a directory containing source files, and I&amp;nbsp;leave out any unwanted files or&amp;nbsp;directories. Of course you can also extract a zip, view a zip, Update a zip, and so on.&amp;nbsp; &amp;nbsp;Anything you can do in the DotNetZip library, you can do in Powershell. &lt;/P&gt;
&lt;P&gt;Visit &lt;A href="http://www.codeplex.com/DotNetZip" mce_href="http://www.codeplex.com/DotNetZip"&gt;http://www.codeplex.com/DotNetZip&lt;/A&gt;&amp;nbsp; to get DotNetZip. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8658510" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Powershell/default.aspx">Powershell</category></item><item><title>DotNetZip, open source library for .ZIP files, revs to v1.5 - nice ASP.NET capability</title><link>http://blogs.msdn.com/dotnetinterop/archive/2008/06/20/dotnetzip-open-source-library-for-zip-files-revs-to-v1-5-nice-asp-net-capability.aspx</link><pubDate>Fri, 20 Jun 2008 21:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8626374</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/8626374.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=8626374</wfw:commentRss><description>DotNetZip, the open source Zip Library for .NET, is now at v1.5.&amp;nbsp; 
&lt;P&gt;Find it at &lt;A href="http://www.codeplex.com/DotNetZip"&gt;&lt;FONT color=#666666&gt;http://www.codeplex.com/DotNetZip&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;. &lt;/P&gt;
&lt;P&gt;New features:&amp;nbsp; &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;ASP.NET - save a zip archive directly to Response.OutputStream to send down to the browser client, no need to create an intermediate file on the server disk. &lt;/LI&gt;
&lt;LI&gt;The ZipFile class has a progress event now, which you can hook to show progress bars.&amp;nbsp; &lt;/LI&gt;
&lt;LI&gt;Create self-extracting zip files - exe's that extract themselves.&amp;nbsp;(requires .NET 2.0 on the target machine) &lt;/LI&gt;
&lt;LI&gt;Tons of doc updates, lots of new VB example code.&lt;/LI&gt;
&lt;LI&gt;Ability to update or remove entries in existing zipfiles. (Prior versions allowed you to read or create zips, but not change them). &lt;/LI&gt;
&lt;LI&gt;and more....&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;That's all in the v1.5 library, which is now released and final.&amp;nbsp;&amp;nbsp; 100% managed code. &lt;/P&gt;
&lt;P&gt;There is also a download of command-line zip tools - if you ever wanted to be able to create, read, or extract a zipfile from a command-line, or from a batch file, the utilities in the release are really handy for that.&amp;nbsp; In fact I used the utilities to pack up the zip library itself, for upload to codeplex. &lt;/P&gt;
&lt;P&gt;Also, the library is simple to use within a powershell script, so you can manipulate zipfiles in powershell. Maybe I'll post an example of how to do this in the future. &lt;/P&gt;
&lt;P style="FONT-SIZE: 8pt; COLOR: #7766cc"&gt;If you want some background on the Zip Library, check out &lt;A class="" href="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx" mce_href="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx"&gt;&lt;FONT color=#666666&gt;my prior posts on this topic&lt;/FONT&gt;&lt;/A&gt;.&amp;nbsp; Just for your information, DotNetZip is licensed under the Microsoft Public License, which basically&amp;nbsp;means you can use it free of charge, for any purpose,&amp;nbsp;but there's no warranty.&amp;nbsp; Check the full terms of the license on &lt;A class="" href="http://www.codeplex.com/DotNetZip/license" mce_href="http://www.codeplex.com/DotNetZip/license"&gt;the CodePlex site&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;As always if you have questions on usage, check the CodePlex forums.&lt;/P&gt;
&lt;P&gt;The last bit of news is that DotNetZip is now &lt;A class="" href="http://en.wikipedia.org/wiki/Donationware" mce_href="http://en.wikipedia.org/wiki/Donationware"&gt;donationware&lt;/A&gt;. I am now &lt;A class=externalLink href="http://cheeso.members.winisp.net/DotNetZipDonate.aspx"&gt;accepting donations&lt;SPAN class=externalLinkIcon&gt;&lt;/SPAN&gt;&lt;/A&gt; on behalf of my favorite charity. and &lt;B&gt;Yes&lt;/B&gt;, it is a &lt;I&gt;real&lt;/I&gt; charity. &lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8626374" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category></item><item><title>DotNetZip now can save directly to ASP.NET Response.OutputStream</title><link>http://blogs.msdn.com/dotnetinterop/archive/2008/06/04/dotnetzip-now-can-save-directly-to-asp-net-response-outputstream.aspx</link><pubDate>Wed, 04 Jun 2008 23:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8573942</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/8573942.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=8573942</wfw:commentRss><description>&lt;P&gt;Did you ever want to zip up a file within an ASP.NET page, and then send it as a download for the requesting browser?&amp;nbsp; The DotNetZip lib works within ASP.NET, and a recent update, available in the v1.5 preview release, allows you to create a zip file and save it directly to Response.OutputStream, with no intermediate file i/o, no saving the zip file to a directory on the server, no memorystreams or byte arrays to cache the content. &lt;/P&gt;
&lt;P&gt;The code looks like this: &lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 2pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 2pt; FONT-SIZE: 9pt; BACKGROUND: white; PADDING-BOTTOM: 2pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; PADDING-TOP: 2pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Courier New"&gt;&lt;PRE&gt;&lt;SPAN style="COLOR: #a020f0"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: #228b22"&gt;void&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;btnGo_Click&lt;/SPAN&gt; (&lt;SPAN style="COLOR: #228b22"&gt;Object&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;sender&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #228b22"&gt;EventArgs&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;e&lt;/SPAN&gt;)
{
  &lt;SPAN style="COLOR: #5f9ea0"&gt;Response&lt;/SPAN&gt;.Clear();
  &lt;SPAN style="COLOR: #228b22"&gt;String&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;ReadmeText&lt;/SPAN&gt;= &lt;SPAN style="COLOR: #bc8f8f"&gt;"This is a zip file dynamically generated at "&lt;/SPAN&gt; + &lt;SPAN style="COLOR: #5f9ea0"&gt;System&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #5f9ea0"&gt;DateTime&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #5f9ea0"&gt;Now&lt;/SPAN&gt;.ToString(&lt;SPAN style="COLOR: #bc8f8f"&gt;"G"&lt;/SPAN&gt;);
  &lt;SPAN style="COLOR: #228b22"&gt;string&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;filename&lt;/SPAN&gt; = &lt;SPAN style="COLOR: #5f9ea0"&gt;System&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #5f9ea0"&gt;IO&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #5f9ea0"&gt;Path&lt;/SPAN&gt;.GetFileName(&lt;SPAN style="COLOR: #5f9ea0"&gt;ListOfFiles&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #5f9ea0"&gt;SelectedItem&lt;/SPAN&gt;.Text) + &lt;SPAN style="COLOR: #bc8f8f"&gt;".zip"&lt;/SPAN&gt;;
  &lt;SPAN style="COLOR: #5f9ea0"&gt;Response&lt;/SPAN&gt;.ContentType = &lt;SPAN style="COLOR: #bc8f8f"&gt;"application/zip"&lt;/SPAN&gt;;
  &lt;SPAN style="COLOR: #5f9ea0"&gt;Response&lt;/SPAN&gt;.AddHeader(&lt;SPAN style="COLOR: #bc8f8f"&gt;"content-disposition"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #bc8f8f"&gt;"filename="&lt;/SPAN&gt; + filename);
  
  &lt;SPAN style="COLOR: #a020f0"&gt;using&lt;/SPAN&gt; (&lt;SPAN style="COLOR: #228b22"&gt;ZipFile&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;zip&lt;/SPAN&gt; = &lt;SPAN style="COLOR: #a020f0"&gt;new&lt;/SPAN&gt; ZipFile(&lt;SPAN style="COLOR: #5f9ea0"&gt;Response&lt;/SPAN&gt;.OutputStream)) {
    &lt;SPAN style="COLOR: red"&gt;// Add to the zip archive, the file selected in the dropdownlist.&lt;/SPAN&gt;
    &lt;SPAN style="COLOR: #5f9ea0"&gt;zip&lt;/SPAN&gt;.AddFile(&lt;SPAN style="COLOR: #5f9ea0"&gt;ListOfFiles&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #5f9ea0"&gt;SelectedItem&lt;/SPAN&gt;.Text, &lt;SPAN style="COLOR: #bc8f8f"&gt;"files"&lt;/SPAN&gt;);
    &lt;SPAN style="COLOR: red"&gt;// Add a boilerplate copyright file into the zip.&lt;/SPAN&gt;
    &lt;SPAN style="COLOR: #5f9ea0"&gt;zip&lt;/SPAN&gt;.AddFile&lt;SPAN style="COLOR: #bc8f8f"&gt;"\static\Copyright.txt"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #bc8f8f"&gt;""&lt;/SPAN&gt;);
    &lt;SPAN style="COLOR: red"&gt;// The string ReadmeText becomes the content for an entry in the zip archive, with the filename "Readme.txt".&lt;/SPAN&gt;
    &lt;SPAN style="COLOR: #5f9ea0"&gt;zip&lt;/SPAN&gt;.AddStringAsFile(ReadmeText, &lt;SPAN style="COLOR: #bc8f8f"&gt;"Readme.txt"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #bc8f8f"&gt;""&lt;/SPAN&gt;);
    &lt;SPAN style="COLOR: #5f9ea0"&gt;zip&lt;/SPAN&gt;.Save();
  }

  &lt;SPAN style="COLOR: #5f9ea0"&gt;Response&lt;/SPAN&gt;.End();
}
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;This example assumes there is a DropDownList named &lt;B&gt;ListOfFiles&lt;/B&gt; that contains a list of files. But of course you could get the list of files anywhere. And it goes without saying that you can add more than one file. &lt;/P&gt;
&lt;P&gt;Simple, easy.&lt;/P&gt;
&lt;P&gt;You need to &lt;A class="" href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=DotNetZip&amp;amp;ReleaseId=12712" mce_href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=DotNetZip&amp;amp;ReleaseId=12712"&gt;get the 1.5 release of DotNetZip&lt;/A&gt; to use this new feature.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8573942" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category></item><item><title>Some uses of the Ionic DotNetZip library</title><link>http://blogs.msdn.com/dotnetinterop/archive/2008/05/30/asp-net-app-to-manipulate-zip-files-as-virtual-directories-or-read-only-resource-containers.aspx</link><pubDate>Fri, 30 May 2008 22:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8563451</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/8563451.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=8563451</wfw:commentRss><description>&lt;UL&gt;
&lt;LI&gt;ASP.NET App that compresses a file as it is uploaded&lt;BR&gt;&lt;A href="http://professionalaspnet.com/archive/2007/11/17/Compressing-a-File-as-it-is-Uploaded.aspx" mce_href="http://professionalaspnet.com/archive/2007/11/17/Compressing-a-File-as-it-is-Uploaded.aspx"&gt;http://professionalaspnet.com/archive/2007/11/17/Compressing-a-File-as-it-is-Uploaded.aspx&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;ASP.NET app to manipulate ZIP files as virtual directories or read-only resource containers.&amp;nbsp;&lt;BR&gt;&lt;A href="http://www.codeproject.com/KB/aspnet/aspnetzipfs.aspx" mce_href="http://www.codeproject.com/KB/aspnet/aspnetzipfs.aspx"&gt;http://www.codeproject.com/KB/aspnet/aspnetzipfs.aspx&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Manipulate .DOCX files without using .NET 3.0 library code&lt;BR&gt;&lt;A href="http://conceptdev.blogspot.com/2007/03/open-docx-using-c-to-extract-text-for.html"&gt;http://conceptdev.blogspot.com/2007/03/open-docx-using-c-to-extract-text-for.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;EasyZip: Manipulate XNA Game Studio (xbox game development) content simply and easily &lt;BR&gt;&lt;A href="http://www.codeplex.com/easyzip"&gt;http://www.codeplex.com/easyzip&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Tutorial (en espanol) on zipping multiple files into an archive, using the Ionic library&lt;BR&gt;&lt;A href="http://weblogs.asp.net/carloslone/archive/2008/02/12/comprimiendo-m-250-ltiples-archivos-en-un-zip-con-net.aspx"&gt;http://weblogs.asp.net/carloslone/archive/2008/02/12/comprimiendo-m-250-ltiples-archivos-en-un-zip-con-net.aspx&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;StartMenuSearch - a backport of the Vista start menu search capability.&amp;nbsp; It embeds the Ionic ZIP library&lt;BR&gt;&lt;A href="http://code.google.com/p/startmenusearch/"&gt;http://code.google.com/p/startmenusearch/&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;blogcontroller; &lt;I&gt;&lt;A style="COLOR: #000; TEXT-DECORATION: none" href="http://code.google.com/p/blogcontroller/"&gt;A blog application built on top of ASP.net MVC Framework&lt;/A&gt;&lt;/I&gt; &lt;BR&gt;&lt;A href="http://code.google.com/p/blogcontroller/"&gt;http://code.google.com/p/blogcontroller/&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8563451" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Docx/default.aspx">Docx</category></item><item><title>DotNetZip, open source library for .ZIP files, revs to v1.4</title><link>http://blogs.msdn.com/dotnetinterop/archive/2008/05/30/dotnetzip-open-source-library-for-zip-files-revs-to-v1-4.aspx</link><pubDate>Fri, 30 May 2008 18:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8563441</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/8563441.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=8563441</wfw:commentRss><description>I have updated DotNetZip, the open source Zip Library for .NET, to v1.4.&amp;nbsp; 
&lt;P&gt;Find it at &lt;A href="http://www.codeplex.com/DotNetZip"&gt;&lt;FONT color=#666666&gt;http://www.codeplex.com/DotNetZip&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;. &lt;/P&gt;
&lt;P&gt;New features!!&amp;nbsp; password support is here!&amp;nbsp; Whoohoo!!&amp;nbsp; This is PKzip (weak) encryption.&amp;nbsp; Another new feature:&amp;nbsp; you can now add entries into zips using content from streams.&amp;nbsp; There are clearer exceptions generated in the case of errors.&amp;nbsp;Beyond new features, there are a bunch of other improvements and fixes to the library, too. For example, the internal handling of zip files now uses streams for more&amp;nbsp;optimal memory usage.&amp;nbsp; As another example, there is&amp;nbsp;now a large set of unit tests that ships with the library.&amp;nbsp;As a result, reliability is significantly higher than in v1.3.&amp;nbsp; Finally, the Zip utilities have been updated for better command-line parsing, more options and flexibility.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;That's the v1.4 library, which is released and final.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;For v1.5, I'll be focusing on Update capability - the ability to update an entry in an existing zip archive with new content, as well as the ability to Remove entries in existing zip archives. There's a preview of the v1.5 library already available on&amp;nbsp; &lt;A href="http://www.codeplex.com/DotNetZip"&gt;&lt;FONT color=#666666&gt;http://www.codeplex.com/DotNetZip&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;. &lt;/P&gt;
&lt;P&gt;If you want some background on the Zip Library, check out &lt;A class="" href="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx" mce_href="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx"&gt;&lt;FONT color=#666666&gt;my prior posts on this topic&lt;/FONT&gt;&lt;/A&gt;.&amp;nbsp; Just for your information, DotNetZip is licensed under the Microsoft Public License, which basically&amp;nbsp;means you can use it free of charge, for any purpose,&amp;nbsp;but there's no warranty.&amp;nbsp; Check the full terms of the license on &lt;A class="" href="http://www.codeplex.com/DotNetZip/license" mce_href="http://www.codeplex.com/DotNetZip/license"&gt;the CodePlex site&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;As always if you have questions on usage, check the CodePlex forums.&lt;/P&gt;
&lt;P&gt;Cheers!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8563441" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Java/default.aspx">Java</category></item><item><title>DotNetZip, open source ZIP library for .NET applications, revs to v1.3</title><link>http://blogs.msdn.com/dotnetinterop/archive/2008/02/05/dotnetzip-open-source-zip-library-for-net-applications-revs-to-v1-3.aspx</link><pubDate>Wed, 06 Feb 2008 04:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7479883</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/7479883.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=7479883</wfw:commentRss><description>I have updated DotNetZip, the open source Zip Library for .NET, to v1.3.&amp;nbsp; 
&lt;P style="COLOR: red"&gt;[Update, 3 January 2009:&amp;nbsp; DotNetZip is now at v1.7&amp;nbsp;.&amp;nbsp; It includes Unicode, ZIP64, and runs on the Compact Framework.&amp;nbsp;] &lt;/P&gt;
&lt;P&gt;Find it at &lt;A href="http://www.codeplex.com/DotNetZip"&gt;&lt;FONT color=#666666&gt;http://www.codeplex.com/DotNetZip&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;. &lt;/P&gt;
&lt;P&gt;Some of the&amp;nbsp;key &lt;STRIKE&gt;fixes&lt;/STRIKE&gt; new features&amp;nbsp;include: ability to read and write zips via streams, better interop with Java+Linux, better support for ASPNET (temporary file folder), support for comments in the zipfile and on each zip entry, support for overwrite.&amp;nbsp; There are a bunch of &lt;STRIKE&gt;other&lt;/STRIKE&gt; fixes too. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want some background on the Zip Library, check out &lt;A class="" href="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx" mce_href="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx"&gt;&lt;FONT color=#666666&gt;my prior posts on this topic&lt;/FONT&gt;&lt;/A&gt;.&amp;nbsp; Just for your information, DotNetZip is licensed under the Microsoft &lt;STRIKE&gt;Permissive&lt;/STRIKE&gt; Public License, which basically&amp;nbsp;means you can use it free of charge, for any purpose,&amp;nbsp;but there's no warranty.&amp;nbsp; Check the full terms of the license on &lt;A class="" href="http://www.codeplex.com/DotNetZip/license" mce_href="http://www.codeplex.com/DotNetZip/license"&gt;the CodePlex site&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;As always if you have questions on usage, check the CodePlex forums.&lt;/P&gt;
&lt;P&gt;Cheers!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7479883" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Java/default.aspx">Java</category></item><item><title>DotNet Zip Library Graduates to CodePlex</title><link>http://blogs.msdn.com/dotnetinterop/archive/2007/10/30/dotnet-zip-library-graduates-to-codeplex.aspx</link><pubDate>Wed, 31 Oct 2007 08:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5791058</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/5791058.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=5791058</wfw:commentRss><description>&lt;P&gt;I finally created a CodePlex project for the .NET Zip Library. &lt;/P&gt;
&lt;P&gt;Find it at &lt;A href="http://www.codeplex.com/DotNetZip"&gt;http://www.codeplex.com/DotNetZip&lt;/A&gt;&amp;nbsp;. &lt;/P&gt;
&lt;P&gt;If you want some background on the Zip Library, check out &lt;A class="" href="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx" mce_href="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx"&gt;my prior posts on this topic&lt;/A&gt;. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5791058" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/.NET/default.aspx">.NET</category></item><item><title>More .Net Zip Library/Utility updates</title><link>http://blogs.msdn.com/dotnetinterop/archive/2007/04/13/more-net-zip-library-utility-updates.aspx</link><pubDate>Fri, 13 Apr 2007 21:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2118318</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/2118318.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=2118318</wfw:commentRss><description>&lt;P&gt;&lt;SPAN style="COLOR: red"&gt;[Update:&amp;nbsp; this code has been moved to a codeplex project:&lt;/SPAN&gt; &amp;nbsp; &lt;A href="http://www.codeplex.com/DotNetZip" mce_href="http://www.codeplex.com/DotNetZip"&gt;http://www.codeplex.com/DotNetZip&lt;/A&gt; .&amp;nbsp; &lt;SPAN style="COLOR: red"&gt;Go there for the latest source for ths .NET Zip/compression library.&amp;nbsp; It does ZIP, ZIP64, SFX, passwords, unicode, and streams. All zips are fully interoperable. ] &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I updated the Zip library again, this time to support the adding of fully qualified files or directories. &lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN: 0in 0in 0pt"&gt;A&amp;nbsp;couple people commented that the library did not handle fully-qualified pathnames properly.&amp;nbsp; Hmmm, I guess I need to embrace Test Driven Development a little more tightly eh?&amp;nbsp; The zipfile that got produced would be un-readable by Windows.&amp;nbsp; &lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN: 0in 0in 0pt"&gt;I've changed the zip library to correct that.&amp;nbsp; &lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2118318" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category></item><item><title>.Net Zip Library/Utility updates and fixes</title><link>http://blogs.msdn.com/dotnetinterop/archive/2007/02/22/net-zip-library-utility-updates-and-fixes.aspx</link><pubDate>Fri, 23 Feb 2007 06:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1745203</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/1745203.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=1745203</wfw:commentRss><description>&lt;P&gt;This is an update to my zip library and utility.&amp;nbsp; You can &lt;A class="" href="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx" mce_href="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx"&gt;read previous entries on this here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P style="COLOR: red"&gt;[Update 30 October 2007]: I moved this library to a CodePlex project. See &lt;A href="http://www.codeplex.com/DotNetZip"&gt;www.codeplex.com/DotNetZip&lt;/A&gt;&amp;nbsp; It has been steadily improved since the time of this post.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;A reader mailed me to say that the Zip library did not work with some zip archives.&amp;nbsp; I knew that would be true.&amp;nbsp; The zip library code I had originally posted does not handle all zip files.&amp;nbsp; The zip spec is pretty rich, and has a bunch of advanced features.&amp;nbsp; The simple DotNetZip library I produced intially did not support them all.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;But this particular reader had a pretty simple request. They needed support for&amp;nbsp;the Data Descriptor field&amp;nbsp;when reading a zip archive. &amp;nbsp; &lt;/P&gt;
&lt;P&gt;There's a part of the PKZIP spec that allows the compressed and uncompressed size of the files, and the CRC, to be placed after the actual compressed file data within the zip archive, in what the spec calls a "Data Descriptor".&amp;nbsp; This is to support zip creation where the output stream does not support streaming.&amp;nbsp; The presence of the Data Descriptor&amp;nbsp;is flagged in a zip file when the "BitField" for a Zip entry has bit 3 set.&amp;nbsp; The current &lt;A class="" href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT" mce_href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT"&gt;APPNOTE from PKWare&lt;/A&gt; says: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN style="COLOR: #483d8b"&gt;
&lt;P&gt;This descriptor exists only if bit 3 of the general purpose bit flag is set (see below). It is byte aligned and immediately follows the last byte of compressed data. This descriptor is used only when it was not possible to seek in the output .ZIP file, e.g., when the output .ZIP file was standard output or [another] non-seekable device.&amp;nbsp; &lt;/P&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The person who emailed me also gave a zip archive that included this data descriptor, and asked "why can't your library read this zip?".&amp;nbsp; Using that as a test case, I've updated the Zip library to support the Data Descriptor for reading/extracting.&amp;nbsp; It will work correctly now, upon reading such archives.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Keep in mind that DotNetZip, the zip library implementation I built, &amp;nbsp;is not a streaming implementation, so it will never produce (write) a zip archive that includes a Data Descriptor like this.&amp;nbsp; &lt;SPAN style="COLOR: red"&gt;&lt;EM&gt;[update:&amp;nbsp; this is no longer true, as of 2008]&amp;nbsp; &lt;/EM&gt;&lt;/SPAN&gt;It will produce zips that are interoperable with winzip and pkzip, as well as the Java JAR tool, etc.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: red"&gt;&lt;EM&gt;[update: See the codeplex project for source code ]&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1745203" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/dotnetinterop/attachment/1745203.ashx" length="1249187" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Java/default.aspx">Java</category></item><item><title>Zip Library/Utility updated, works with JAR files now</title><link>http://blogs.msdn.com/dotnetinterop/archive/2006/11/02/zip-library-utility-updated-works-with-jar-files-now.aspx</link><pubDate>Fri, 03 Nov 2006 01:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:937363</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/937363.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=937363</wfw:commentRss><description>&lt;P&gt;I can't believe I didn't test this, but the &lt;A class="" href="http://blogs.msdn.com/dotnetinterop/archive/2006/04/05/567402.aspx" mce_href="http://blogs.msdn.com/dotnetinterop/archive/2006/04/05/567402.aspx"&gt;Zip Library&lt;/A&gt; I built and posted a while ago was not working with Jar files.&amp;nbsp; I fixed it, I think it is working now.&amp;nbsp; Any problems, let me know. &lt;/P&gt;&lt;FONT face=Calibri color=#336b22 size=3&gt;
&lt;P&gt;[Update, 2007 January 4: Someone asked in the comments how to extract a ZipEntry to a particular folder.&amp;nbsp; There is an Extract() method in the ZipEntry class that accepts a string name of a target directory as an argument.&amp;nbsp;&amp;nbsp;When the entry is extracted it is created using the specified directory as the root of the tree.&amp;nbsp; ZipEntry's themselves may have a relative path, so the actual entry may be one or more subdirectory levels deep in the extracted tree.]&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: red"&gt;&lt;EM&gt;[30 October 2007: updated with latest source.&amp;nbsp; Also, the zip library has graduated to a CodePlex project. See &lt;A href="http://www.codeplex.com/DotNetZip"&gt;DotNetZip on CodePlex&lt;/A&gt; &amp;nbsp;]&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=937363" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/dotnetinterop/attachment/937363.ashx" length="1249187" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Java/default.aspx">Java</category></item><item><title>WordProcessingML doc creation in Java</title><link>http://blogs.msdn.com/dotnetinterop/archive/2006/10/03/WordProcessingML-doc-creation-in-Java.aspx</link><pubDate>Tue, 03 Oct 2006 22:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:787750</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/787750.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=787750</wfw:commentRss><description>&lt;P&gt;A while back, the &lt;A class="" href="http://openxmldeveloper.org/" mce_href="http://openXmlDeveloper.org"&gt;OpenXmlDeveloper.org&lt;/A&gt; website offered &lt;A class="" href="http://openxmldeveloper.org/articles/JavaWordProcessingML.aspx" mce_href="http://openxmldeveloper.org/articles/JavaWordProcessingML.aspx"&gt;an example&lt;/A&gt; of how to create a WordProcessingML document from within Java code.&amp;nbsp; I even &lt;A class="" href="http://blogs.msdn.com/dotnetinterop/archive/2006/04/17/576667.aspx" mce_href="http://blogs.msdn.com/dotnetinterop/archive/2006/04/17/576667.aspx"&gt;referenced it briefly here&lt;/A&gt;.&amp;nbsp; Remember, WordProcessingML is the document format produced and consumed by Microsoft Word 2007, and the format will also be supported by back versions of Word via the freely downloadable &lt;A class="" href="http://www.microsoft.com/office/preview/beta/converter.mspx" mce_href="http://www.microsoft.com/office/preview/beta/converter.mspx"&gt;compatibility pack&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;I looked into that post, and found it to be pretty simplistic.&amp;nbsp; Essentially, it is a guide for using the java.util.zip.* packages that are part of Java, to create a valid .docx file.&amp;nbsp; &amp;nbsp;The content of the document itself - the formatted text, the embedded image - in the post I referenced, all that content is manually constructed via text editors. So the post is not so much about "creating" a document, as it is about zipping up the existing&amp;nbsp;parts of a WordProcessingML document. &lt;/P&gt;
&lt;P&gt;I think a better, more thorough approach for Java is required.&amp;nbsp; What is needed is a class library for Java that parallels the &lt;A class="" href="http://windowssdk.msdn.microsoft.com/en-us/library/system.io.packaging.aspx" mce_href="http://windowssdk.msdn.microsoft.com/en-us/library/system.io.packaging.aspx"&gt;System.IO.Packaging namespace&lt;/A&gt; in .NET 3.0.&amp;nbsp;&amp;nbsp; Something that allows a Java application to define the parts of a document, the relationships, and so on... programmatically, much as &lt;A class="" href="http://blogs.msdn.com/dmahugh/archive/2006/06/27/649007.aspx" mce_href="http://blogs.msdn.com/dmahugh/archive/2006/06/27/649007.aspx"&gt;this article&lt;/A&gt; describes for a .NET application.&lt;/P&gt;
&lt;P&gt;Given the support for zip compression already in Java, and the fairly clear &lt;A class="" href="http://www.ecma-international.org/news/TC45_current_work/TC45-2006-50_draft14.htm" mce_href="http://www.ecma-international.org/news/TC45_current_work/TC45-2006-50_draft14.htm"&gt;packaging rules for OpenXML&lt;/A&gt;, this extra step shouldn't be too hard to do.&amp;nbsp; Once you have the packaging utility classes, then you can use the &lt;A class="" href="http://blogs.msdn.com/dotnetinterop/archive/2005/03/29/403331.aspx" mce_href="http://blogs.msdn.com/dotnetinterop/archive/2005/03/29/403331.aspx"&gt;template approach I described a while ago&lt;/A&gt;, for WordML (the XML format from Word 2003), to create the content that gets zipped up.&amp;nbsp; &amp;nbsp; &lt;/P&gt;
&lt;P&gt;What does this get you?&amp;nbsp; the ability to quickly generate OpenXML docs from Java, using a higher-level API that correctly models the packaging metaphor in the OpenXML spec.&amp;nbsp; In theory you would be able to do this from any Java application, whether a thick client, a server-side app, or an agent or batch job that runs with no UI at all.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Sorry, no example code, yet.&amp;nbsp; I'll look into either creating a sample or finding someone else to do it.&amp;nbsp; Any volunteers?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-D&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=787750" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/OpenXML/default.aspx">OpenXML</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Word/default.aspx">Word</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Java/default.aspx">Java</category></item><item><title>.NET System.IO.Compression and zip files</title><link>http://blogs.msdn.com/dotnetinterop/archive/2006/04/05/.NET-System.IO.Compression-and-zip-files.aspx</link><pubDate>Wed, 05 Apr 2006 21:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:567402</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>17</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/567402.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=567402</wfw:commentRss><description>&lt;FONT face=Tahoma size=2&gt;
&lt;H3&gt;DotNetZip Library&lt;/H3&gt;
&lt;H4&gt;.NET 2.0 does Compression&lt;/H4&gt;
&lt;P style="COLOR: red"&gt;[Update 30 October 2007]: I moved this library to a CodePlex project, called DotNetZip. See &lt;A href="http://www.codeplex.com/DotNetZip"&gt;www.codeplex.com/DotNetZip&lt;/A&gt;.&amp;nbsp;&amp;nbsp;It does&amp;nbsp;zip creation, extraction, passwords, ZIP64, Unicode, SFX, and more. It is open source, free Free FREE&amp;nbsp;to use, has a clear license, and comes with .NET-based ZIP utilities.&amp;nbsp;It works on the Compact Framework or the regular .NET Framework.&amp;nbsp; It is not the same as #ziplib or SharpZipLib.&amp;nbsp; DotNetZip is independent.&lt;/P&gt;
&lt;P&gt;There's a new namespace in the .NET Framework base class library for .NET 2.0, called &lt;A href="http://msdn2.microsoft.com/en-US/library/system.io.compression(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-US/library/system.io.compression(VS.80).aspx"&gt;System.IO.Compression&lt;/A&gt;. It has classes called &lt;A href="http://msdn2.microsoft.com/en-US/library/system.io.compression.deflatestream(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-US/library/system.io.compression.deflatestream(VS.80).aspx"&gt;DeflateStream&lt;/A&gt; and &lt;A href="http://msdn2.microsoft.com/en-US/library/system.io.compression.gzipstream(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-US/library/system.io.compression.gzipstream(VS.80).aspx"&gt;GZipStream&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;These classes are streams; they're useful for compressing a stream of bytes as you transfer it, for example across the network to a cooperating application (a peer, or a client, whatever). The DeflateStream implements the Deflate algorithm, see the &lt;A href="http://www.ietf.org/" mce_href="http://www.ietf.org/"&gt;IETF's&lt;/A&gt; &lt;A href="http://www.ietf.org/rfc/rfc1951.txt?number=1951" mce_href="http://www.ietf.org/rfc/rfc1951.txt?number=1951"&gt;RFC 1951. "DEFLATE Compressed Data Format Specification version 1.3."&lt;/A&gt; The GZipStream is an elaboration of the Deflate algorithm, and adds a cyclic-redundancy-check. For more on GZip, see the IETF &lt;A href="http://www.ietf.org/rfc/rfc1951.txt?number=1951" mce_href="http://www.ietf.org/rfc/rfc1951.txt?number=1951"&gt;RFC 1952, "Gzip"&lt;/A&gt;. &lt;/P&gt;
&lt;H4&gt;Gzip has been done&lt;/H4&gt;
&lt;P&gt;The GZip format described in RFC 1952 is also used by the popular &lt;A href="http://www.gzip.org/" mce_href="http://www.gzip.org/"&gt;gzip utility&lt;/A&gt; included in many *nix distributions. The &lt;A href="http://blogs.msdn.com/bclteam/" mce_href="http://blogs.msdn.com/bclteam/"&gt;Base Class Library team&lt;/A&gt; at Microsoft &lt;A href="http://blogs.msdn.com/bclteam/archive/2005/06/15/429542.aspx" mce_href="http://blogs.msdn.com/bclteam/archive/2005/06/15/429542.aspx"&gt;previously published example source code&lt;/A&gt; for a simple utility that behaves just like the *nix gzip, but is written in .NET and based on the GZipStream class. This simple utility can interoperate with the *nix gzip, can read and write .gz files. &lt;/P&gt;
&lt;H4&gt;What about .zip files?&lt;/H4&gt;
&lt;P&gt;As a companion to that example, enclosed here as an attachment (see the bottom of this post) is an example class than can read and write zip archives. It is packaged as a re-usable library, as well as a couple of companion example command-line applications that use the library. The example apps are useful on their own, for example for just zipping up a directory quickly, from within a script or a command-prompt. But the library will be useful also, for including zip capability into arbitrary applications. For example, you could include a zip task in a msbuild session, or into a smart-client GUI application. I've included both the binaries and source code here. &lt;/P&gt;
&lt;P&gt;This is the class diagram for the ZipFile class, and the ZipEntry class, as generated by Visual Studio 2005. The ZipFile is the main class. &lt;/P&gt;&lt;IMG src="http://cheeso.members.winisp.net/images/ZipLib.jpg" mce_src="http://cheeso.members.winisp.net/images/ZipLib.jpg"&gt; 
&lt;P&gt;If you don't quite grok all that notation, I will point out a few highlights. The ZipFile itself supports a generic IEnumerable interface. What this means is you can enumerate the ZipEntry's within the ZipFile using a foreach loop. Makes usage really simple. ( Implementing that little trick is also dead-simple, thanks to the new-for-2.0 &lt;A href="http://msdn.microsoft.com/vcsharp/2005/overview/language/iterators/" mce_href="http://msdn.microsoft.com/vcsharp/2005/overview/language/iterators/"&gt;support for iterators in C# 2.0&lt;/A&gt;, and the "yield return" statement.) &lt;/P&gt;
&lt;H4&gt;Using the ZipFile class&lt;/H4&gt;
&lt;P&gt;You can extract all files from an existing .zip file by doing this: &lt;/P&gt;
&lt;DIV style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ZipFile zip = ZipFile.Read(&lt;SPAN style="COLOR: magenta"&gt;"MyZip.zip"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;foreach&lt;/SPAN&gt; (ZipEntry e &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; zip)&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.Extract(&lt;SPAN style="COLOR: magenta"&gt;"NewDirectory"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;Of course, you don't have want to extract the files, you can just fiddle with the properties on the ZipEntry things in the collection. Creating a new .zip file is also simple: &lt;/P&gt;
&lt;DIV style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; ZipFile zip= &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; ZipFile(&lt;SPAN style="COLOR: magenta"&gt;"MyNewZip.zip"&lt;/SPAN&gt;); &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; zip.AddDirectory(&lt;SPAN style="COLOR: magenta"&gt;"My Pictures"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;); &lt;SPAN style="COLOR: green"&gt;// AddDirectory recurses subdirectories&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; zip.Save(); &lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;You can add a directory at a time, as shown above, and you can add individual files as well. It seems to be pretty fast, though I haven't benchmarked it. It doesn't compress as much as winzip; This library is at the mercy of the DeflateStream class, and that class doesn't support multiple levels of compression. &lt;/P&gt;&lt;!-- -------------------------------------------- --&gt;
&lt;H4&gt;Hmmm, What About Intellectual Property?&lt;/H4&gt;
&lt;P&gt;I am no lawyer, but it seems to me the ZIP format is PKware's intellectual property. PKWare has some text in &lt;A href="http://www.pkware.com/business_and_developers/developer/popups/appnote.txt" mce_href="http://www.pkware.com/business_and_developers/developer/popups/appnote.txt"&gt;their zip spec&lt;/A&gt; which states: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;PKWARE is committed to the interoperability and advancement of the .ZIP format. PKWARE offers a free license for certain technological aspects described above under certain restrictions and conditions. However, the use or implementation in a product of certain technological aspects set forth in the current APPNOTE, including those with regard to strong encryption or patching, requires a license from PKWARE. Please contact PKWARE with regard to acquiring a license. &lt;/BLOCKQUOTE&gt;
&lt;P&gt;I &lt;A href="mailto:zipformat@pkware.com" mce_href="mailto:zipformat@pkware.com"&gt;checked with pkware&lt;/A&gt; for more on that.&amp;nbsp; I described what I was doing with this example, and got a nice email reply from Jim Peterson at PKWare, who wrote:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;From the description of your intended need, no license would be necessary for the compression/decompression features you plan to use. &lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRIKE&gt;Which would mean, anyone could use this example without a license.&lt;/STRIKE&gt; But like I said, I am no lawyer. &lt;/P&gt;
&lt;P&gt;Later,&lt;/P&gt;
&lt;P&gt;-Dino &lt;/P&gt;
&lt;P style="COLOR: red"&gt;[Update 11 April 2006 1036am US Pacific time]: After a bit of testing it seems that there are some anomalies with the DeflateStream class in .NET. One of them is, it performs badly with already compressed data. The DeflateStream in .NET can actually &lt;EM&gt;Inflate&lt;/EM&gt; the size of the stream. The output is still a valid Deflate stream, but it isn't compressed as you'd like. The DotNetZip implementation works around this by using the STORE method rather than DEFLATE when data size increases.&amp;nbsp; But still....&lt;BR&gt;&lt;BR&gt;The &lt;A href="http://blogs.msdn.com/bclteam" mce_href="http://blogs.msdn.com/bclteam"&gt;base class library team&lt;/A&gt; is aware of this anomaly and is considering it. If you'd like to weigh in on this behavior, and I encourage you to do so if you value this class, use the Product Feedback Center, &lt;A class="" href="http://connect.microsoft.com/VisualStudio/feedback/SearchResults.aspx?SearchQuery=DeflateStream" mce_href="http://connect.microsoft.com/VisualStudio/feedback/SearchResults.aspx?SearchQuery=DeflateStream"&gt;see here.&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: red"&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=567402" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/FREE/default.aspx">FREE</category></item><item><title>Office XML Formats updated</title><link>http://blogs.msdn.com/dotnetinterop/archive/2005/06/02/Office-XML-Formats-updated.aspx</link><pubDate>Thu, 02 Jun 2005 15:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:424302</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/424302.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=424302</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Microsoft has announced that the next version of Office (unofficially "Office 12") will deliver support for a new set of XML file formats. Calling them "&lt;STRONG&gt;the Microsoft Office Open XML Formats&lt;/STRONG&gt;", Microsoft wants to produce a more compact, simpler format that is more easily programmable, more reliable, and more secure. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;The skeptic is going to look at this and have a few comments:&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face=Tahoma size=2&gt;Open!?&amp;nbsp; Ha! that's funny!&amp;nbsp; You Microsoft guys are always kidding around! &amp;nbsp;&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Tahoma size=2&gt;See?&amp;nbsp; I told you Microsoft would change the format. This is the problem with vendor-controlled formats:&amp;nbsp; Microsoft can make changes whenever it wants.&amp;nbsp; Anyone who bet on the current XML formats supported in Office 2003 is now seeing their work disrupted.&amp;nbsp;And, it will force everyone to upgrade to the latest version of Office !&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;I can see the reason for the skepticism.&amp;nbsp; Let me comment a bit.&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;"Open" as it is used in this name does not mean the schema are going to be maintained by ISO, W3C, or OASIS.&amp;nbsp;&amp;nbsp; It means, "based on standards that are open".&amp;nbsp;&amp;nbsp; Based on XML, XML NS, W3C XML Schema, and others.&amp;nbsp; The Schema themselves will still be "owned by" Microsoft.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;The schema will be broadly accessible with a royalty-free license supporting use within any app, using any platform technology.&amp;nbsp; Just as today, &lt;A href="http://dinoch.dyndns.org:7070/WordML"&gt;Java apps can produce&amp;nbsp;WordProcessingML&lt;/A&gt;, and PHP apps could do the same thing (sorry no example available!), the same sort of thing will be possible with the formats provided in Office 12 .&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;As to the second comment - about the change in the schema disrupting developers and forcing upgrades. . .&amp;nbsp;&amp;nbsp;Patches will be shipped for back versions of Office, to enable them to deal with the updated XML formats. This will include Office 2000, Office XP, and Office 2003.&amp;nbsp; These patches will be free (gratis).&amp;nbsp; I am not sure if the plan is to enable these apps to produce the new formats, or only consume the new formats.&amp;nbsp; In any case there will be patches. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Likewise, O12 apps will be able to consume the older format.&amp;nbsp; By default Office 12 apps, when saving to XML, will save to the new format. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Some other details:&amp;nbsp; Powerpoint will join the ranks of the XML-enabled apps.&amp;nbsp; Cool!&amp;nbsp; Imagine the possibilities of auto-generating a powerpoint app in XML!&amp;nbsp; Also: you'll be able to set XML as the default file format in Office 12.&amp;nbsp; Nice !&amp;nbsp; So it will no longer be a "special case" - it can be your default format.&amp;nbsp; And -..... drumroll please..... the MAC version of office will also support these new formats. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Why the change?&amp;nbsp; Couple of big reasons:&amp;nbsp; the current formats are XMl-based, but they are kinda verbose for what they do.&amp;nbsp; Lots of boilerplate markup in the XML.&amp;nbsp; The new formats will simplify this.&amp;nbsp; Also, there are changes to make the formats more compact (including ZIP compression), and more robust and reliable. These changes will address some of the issues raised previously by observers such as &lt;A href="http://www.oreillynet.com/pub/wlg/6649"&gt;Simon St. Laurent&lt;/A&gt;&amp;nbsp;. &lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Sadly, the new formats are not available yet. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;There is a &lt;A href="http://channel9.msdn.com/ShowPost.aspx?PostID=73329"&gt;channel9 video&lt;/A&gt; on this. &lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;&lt;EM&gt;Update 1: See &lt;a href="http://blogs.msdn.com/brian_jones/archive/2005/06/01/424085.aspx"&gt;Brian Jones' blog entry&lt;/a&gt; for more info and whitepapers on the new XML formats in Office 12.&lt;/EM&gt;&lt;/FONT&gt;&lt;br /&gt;&lt;FONT color=#ff1493&gt;&lt;EM&gt;[emphasized text added 2 June 2005 10ish US Pacific Time]&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;&lt;EM&gt;Update 2: &lt;A href="http://www.eweek.com/article2/0,1759,1823238,00.asp"&gt;this e-week article&lt;/A&gt; says the XML formats will be published at TechEd. &lt;/EM&gt;&lt;/FONT&gt;&lt;br /&gt;&lt;FONT color=#ff1493&gt;&lt;EM&gt;[emphasized text added 03 June 2005 15:32 US Eastern time]&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=424302" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Zip/default.aspx">Zip</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/OpenXML/default.aspx">OpenXML</category></item></channel></rss>