[
  {
    "Id": "641700",
    "ThreadId": "264999",
    "Html": "\r\n<p>Hi,</p>\r\n<p>&nbsp;</p>\r\n<p>When I call ZipInputStream.GetNextEntry(), it's throwing an exception that says:</p>\r\n<p>&#43;<span> </span>exception<span> </span>{Ionic.Zip.BadReadException: &nbsp; ZipEntry::ReadHeader(): Bad signature (0x86635B9F)</p>\r\n<p>&nbsp;</p>\r\n<p>Now, this only happens when I am on the last entry, so the expected result of GetNextEntry is null, but instead it throws this error.</p>\r\n<p>&nbsp;</p>\r\n<p>Any ideas on why this is happening when there should be no more entries?</p>\r\n<p>&nbsp;</p>\r\n<p>Thanks</p>\r\n",
    "PostedDate": "2011-07-13T07:37:11.993-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "641799",
    "ThreadId": "264999",
    "Html": "<p>Alright so in my zipping up function, I am setting the compression levels<span style=\"white-space: pre;\"> </span></p>\r\n<p><span style=\"white-space: pre;\">\r\n<pre>if(compress)\r\n    zipOutStream.CompressionLevel = CompressionLevel.BestSpeed;\r\nelse\r\n   zipOutStream.CompressionLevel = CompressionLevel.None;\r\n</pre>\r\n<pre><br /></pre>\r\n<pre>But if I remove this block of code, I dont get the error mentioned above.</pre>\r\n<pre>Why is this??</pre>\r\n<pre><br /></pre>\r\n<pre>I dont mind removing this code, but some of the files that are going to be added to the archive are already compressed.</pre>\r\n<pre>Is this going to effect the already compressed files?</pre>\r\n</span></p>",
    "PostedDate": "2011-07-13T09:48:08-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "641841",
    "ThreadId": "264999",
    "Html": "<p>Hi Bowman,</p>\r\n<p>I have a test case that covers this kind of scenario, but it does not fail the way you are reporting.</p>\r\n<p>Seems like you have 2 blocks of code: one that produces the zip and another that reads it. What I understand is that by modifying how you produce the zip file, it causes an error while attempting to read the zip file.&nbsp; Is that right? Can you provide&nbsp;a &nbsp;short and sweet code snip that reproduces this behavior ?</p>\r\n<p>Here's the code I just used, it exhibits no problems:</p>\r\n<div style=\"color: black; background-color: white;\">\r\n<pre>\r\n[TestMethod]\r\n<span style=\"color: blue;\">public</span> <span style=\"color: blue;\">void</span> ZIS_ZOS_VaryCompression()\r\n{\r\n    <span style=\"color: blue;\">string</span> testBin = TestUtilities.GetTestBinDir(CurrentDir);\r\n    <span style=\"color: blue;\">string</span> resourceDir = Path.Combine(testBin, <span style=\"color: #a31515;\">\"Resources\"</span>);\r\n    <span style=\"color: blue;\">var</span> filesToAdd = Directory.GetFiles(resourceDir);\r\n\r\n    Func&lt;<span style=\"color: blue;\">int</span>, <span style=\"color: blue;\">int</span>, <span style=\"color: blue;\">bool</span>&gt; chooseCompression = (ix, cycle) =&gt; {\r\n        <span style=\"color: blue;\">var</span> name = Path.GetFileName(filesToAdd[ix]);\r\n        <span style=\"color: blue;\">switch</span> (cycle)\r\n        {\r\n            <span style=\"color: blue;\">case</span> 0:\r\n                <span style=\"color: blue;\">return</span> !(name.EndsWith(<span style=\"color: #a31515;\">\".zip\"</span>) ||\r\n                         name.EndsWith(<span style=\"color: #a31515;\">\".docx\"</span>) ||\r\n                         name.EndsWith(<span style=\"color: #a31515;\">\".xslx\"</span>));\r\n            <span style=\"color: blue;\">case</span> 1:\r\n                <span style=\"color: blue;\">return</span> ((ix%2)==0);\r\n\r\n            <span style=\"color: blue;\">default</span>:\r\n                <span style=\"color: blue;\">return</span> (ix == filesToAdd.Length - 1);\r\n        }\r\n    };\r\n\r\n    <span style=\"color: green;\">// Three cycles - three different ways to vary compression</span>\r\n    <span style=\"color: blue;\">for</span> (<span style=\"color: blue;\">int</span> k=0; k &lt; 3; k++)\r\n    {\r\n        <span style=\"color: blue;\">string</span> zipFileToCreate = String.Format(<span style=\"color: #a31515;\">\"VaryCompression-{0}.zip\"</span>, k);\r\n\r\n        TestContext.WriteLine(<span style=\"color: #a31515;\">\"\"</span>);\r\n        TestContext.WriteLine(<span style=\"color: #a31515;\">\"Creating zip, cycle {0}\"</span>, k);\r\n        <span style=\"color: blue;\">using</span> (<span style=\"color: blue;\">var</span> fileStream = File.OpenWrite(zipFileToCreate))\r\n        {\r\n            <span style=\"color: blue;\">using</span> (<span style=\"color: blue;\">var</span> zos = <span style=\"color: blue;\">new</span> ZipOutputStream(fileStream, <span style=\"color: blue;\">true</span>))\r\n            {\r\n                <span style=\"color: blue;\">for</span> (<span style=\"color: blue;\">int</span> i=0; i &lt; filesToAdd.Length; i++)\r\n                {\r\n                    <span style=\"color: blue;\">var</span> file = filesToAdd[i];\r\n                    <span style=\"color: blue;\">var</span> shortName = Path.GetFileName(file);\r\n                    <span style=\"color: blue;\">bool</span> compress = chooseCompression(i, k);\r\n\r\n                    <span style=\"color: blue;\">if</span> (compress)\r\n                        zos.CompressionLevel = Ionic.Zlib.CompressionLevel.Default;\r\n                    <span style=\"color: blue;\">else</span>\r\n                        zos.CompressionLevel = Ionic.Zlib.CompressionLevel.None;\r\n\r\n                    zos.PutNextEntry(shortName);\r\n                    <span style=\"color: blue;\">using</span> (<span style=\"color: blue;\">var</span> input = File.OpenRead(file))\r\n                    {\r\n                        CopyStream(input, zos);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        TestContext.WriteLine(<span style=\"color: #a31515;\">\"\"</span>);\r\n        TestContext.WriteLine(<span style=\"color: #a31515;\">\"Extracting cycle {0}\"</span>, k);\r\n        <span style=\"color: blue;\">string</span> extractDir = <span style=\"color: #a31515;\">\"extract-\"</span> + k;\r\n        Directory.CreateDirectory(extractDir);\r\n        <span style=\"color: blue;\">using</span> (<span style=\"color: blue;\">var</span> raw = File.OpenRead(zipFileToCreate))\r\n        {\r\n            <span style=\"color: blue;\">using</span> (<span style=\"color: blue;\">var</span> input = <span style=\"color: blue;\">new</span> ZipInputStream(raw))\r\n            {\r\n                ZipEntry e;\r\n                <span style=\"color: blue;\">while</span> ((e = input.GetNextEntry()) != <span style=\"color: blue;\">null</span>)\r\n                {\r\n                    TestContext.WriteLine(<span style=\"color: #a31515;\">\"entry: {0}\"</span>, e.FileName);\r\n                    <span style=\"color: blue;\">string</span> outputPath = Path.Combine(extractDir, e.FileName);\r\n                    <span style=\"color: blue;\">if</span> (e.IsDirectory)\r\n                    {\r\n                        <span style=\"color: green;\">// create the directory</span>\r\n                        Directory.CreateDirectory(outputPath);\r\n                    }\r\n                    <span style=\"color: blue;\">else</span>\r\n                    {\r\n                        <span style=\"color: green;\">// create the file</span>\r\n                        <span style=\"color: blue;\">using</span> (<span style=\"color: blue;\">var</span> output = File.Create(outputPath))\r\n                        {\r\n                            CopyStream(input,output);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        <span style=\"color: blue;\">string</span>[] filesUnzipped = Directory.GetFiles(extractDir);\r\n        Assert.AreEqual&lt;<span style=\"color: blue;\">int</span>&gt;(filesToAdd.Length, filesUnzipped.Length,\r\n                             <span style=\"color: #a31515;\">\"Incorrect number of files extracted.\"</span>);\r\n\r\n    }\r\n}\r\n\r\n</pre>\r\n</div>",
    "PostedDate": "2011-07-13T11:15:25.053-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "641882",
    "ThreadId": "264999",
    "Html": "<p>Alright Im just going to copy and paste the examples you have for zipping and unzipping using zipinputstream and zipoutputstream and add&nbsp;</p>\r\n<p>significant part of my code in.</p>\r\n<p>im using Ionic.Zip, not Ionic.Zlib</p>\r\n<p>Ok so here is for Zipping:</p>\r\n<p>\r\n<pre>private void Zipup(bool needsCompression)\r\n{\r\n    if (filesToZip.Count == 0)\r\n    {\r\n        System.Console.WriteLine(\"Nothing to do.\");\r\n        return;\r\n    }\r\n\r\n    using (var output= new ZipOutputStream(outputFileName))\r\n    {\r\n        output.Password = \"VerySecret!\";\r\n        output.Encryption = EncryptionAlgorithm.WinZipAes256;\r\n\r\n        foreach (string inputFileName in filesToZip)\r\n        {\r\n            System.Console.WriteLine(\"file: {0}\", inputFileName);\r\n\r\n            if(needsCompression)\r\n                 output.CompressionLevel = CompressionLevel.BestSpeed; //&lt;--causing badread exception during unzip (it seems)\r\n            else\r\n                 output.CompressionLevel = CompressionLevel.None;\r\n\r\n           //NOTE TO CHEESO:\r\n           //CompressionLevel seems to belong to Zlib, not\r\n           //not Zip, so it wount let me use CompressionMethod\r\n           //instead of CompressionLevel =(\r\n\r\n            output.PutNextEntry(inputFileName);\r\n            using (var input = File.Open(inputFileName, FileMode.Open, FileAccess.Read,\r\n                                         FileShare.Read | FileShare.Write ))\r\n            {\r\n                byte[] buffer= new byte[2048];\r\n                int n;\r\n                while ((n= input.Read(buffer,0,buffer.Length)) &gt; 0)\r\n                {\r\n                    output.Write(buffer,0,n);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}</pre>\r\n<pre><br /></pre>\r\n<pre>And for Unzipping:</pre>\r\n<pre><br /></pre>\r\n<pre>//this method fails when the compression levels are explicitly set</pre>\r\n<pre>//while zipping, works fine otherwise</pre>\r\n<pre><pre>private void Unzip(filePath)\r\n{\r\n    byte[] buffer= new byte[2048];\r\n    int n;\r\n    using (var input= new ZipInputStream(inputFileName))\r\n    {\r\n        ZipEntry e;\r\n        while (( e = input.GetNextEntry()) != null)\r\n        {\r\n            if (e.IsDirectory) continue;\r\n            string outputPath = Path.Combine(extractDir, e.FileName);\r\n            using (var output = File.Open(outputPath, FileMode.Create, FileAccess.ReadWrite))\r\n            {\r\n                while ((n= input.Read(buffer, 0, buffer.Length)) &gt; 0)\r\n                {\r\n                    output.Write(buffer,0,n);\r\n                }\r\n            }\r\n            if(Path.GetExtension(fileName).Equals(ZIP_EXTENSION))\r\n            {\r\n                Unzip(filePath); //Recursion here is zip file within zip file\r\n            }\r\n        }\r\n    }\r\n}</pre>\r\n<br /></pre>\r\nI hope this helps&nbsp;</p>",
    "PostedDate": "2011-07-13T12:44:32.927-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "642052",
    "ThreadId": "264999",
    "Html": "<p>ok, I just ran the code you gave me - still no error.&nbsp; I had to make a few changes to get it to compile.&nbsp; I tried with v1.9.1.5, and also with v1.9.1.6001 (prelim build for next version).&nbsp;</p>\r\n<p>I've enclosed the code I used in its entirety, below.&nbsp; If I can't reproduce the problem you're reporting, then I won't be able to fix it.&nbsp; Maybe you can have a look at what I produced and see if you can cajole it into something that produces the problem you see.</p>\r\n<p>I noticed that in Unzip() you had some uncompilable parts; also in your code the recursion appears to use the original file.&nbsp;&nbsp;I'm not sure because as I said it does not compile, the way you gave it to me.&nbsp; You might want to check that part in your code&nbsp;- confused paths could be&nbsp; the source of your troubles.</p>\r\n<p>&nbsp;</p>\r\n<div style=\"color: black; background-color: white;\">\r\n<pre><span style=\"color: green;\">// BowmanZis.cs</span>\r\n<span style=\"color: green;\">// ------------------------------------------------------------------</span>\r\n<span style=\"color: green;\">//</span>\r\n<span style=\"color: green;\">// Test something for Bowman</span>\r\n<span style=\"color: green;\">//</span>\r\n<span style=\"color: green;\">// Author     : Dino</span>\r\n<span style=\"color: green;\">// Created    : Wed Jul 13 20:06:47 2011</span>\r\n<span style=\"color: green;\">// Last Saved : &lt;2011-July-13 20:38:50&gt;</span>\r\n<span style=\"color: green;\">//</span>\r\n<span style=\"color: green;\">// ------------------------------------------------------------------</span>\r\n<span style=\"color: green;\">//</span>\r\n<span style=\"color: green;\">// Copyright (c) 2011 by Dino Chiesa</span>\r\n<span style=\"color: green;\">// All rights reserved!</span>\r\n<span style=\"color: green;\">//</span>\r\n<span style=\"color: green;\">// ------------------------------------------------------------------</span>\r\n<span style=\"color: green;\">//</span>\r\n<span style=\"color: green;\">// compile: csc.exe /t:exe /debug+ /r:Ionic.Zip.dll  BowmanZis.cs</span>\r\n<span style=\"color: green;\">//</span>\r\n\r\n<span style=\"color: blue;\">using</span> System;\r\n<span style=\"color: blue;\">using</span> System.IO;\r\n<span style=\"color: blue;\">using</span> System.Collections.Generic;\r\n<span style=\"color: blue;\">using</span> System.Linq;\r\n<span style=\"color: blue;\">using</span> System.Reflection;\r\n<span style=\"color: blue;\">using</span> Ionic.Zlib;\r\n<span style=\"color: blue;\">using</span> Ionic.Zip;\r\n\r\n\r\n\r\n<span style=\"color: blue;\">namespace</span> Ionic.ToolsAndTests\r\n{\r\n    <span style=\"color: blue;\">public</span> <span style=\"color: blue;\">class</span> BowmanZis\r\n    {\r\n        List&lt;String&gt; filesToZip;\r\n        <span style=\"color: blue;\">string</span> basefile = <span style=\"color: #a31515;\">\"BowmanZis.zip\"</span>;\r\n        <span style=\"color: blue;\">string</span> baseExtractDir = <span style=\"color: #a31515;\">\"BowmanZis\"</span>;\r\n        <span style=\"color: blue;\">string</span> password = <span style=\"color: #a31515;\">\"VerySecret!\"</span>;\r\n\r\n        <span style=\"color: blue;\">public</span> BowmanZis () {}\r\n        <span style=\"color: blue;\">public</span> BowmanZis (<span style=\"color: blue;\">string</span>[] args) { }\r\n\r\n\r\n        <span style=\"color: blue;\">private</span> <span style=\"color: blue;\">void</span> Zipup(<span style=\"color: blue;\">bool</span> needsCompression)\r\n        {\r\n            Console.WriteLine(<span style=\"color: #a31515;\">\"\\nZip up {0}, {1} compression\"</span>,\r\n                              <span style=\"color: blue;\">this</span>.basefile, needsCompression ? <span style=\"color: #a31515;\">\"with\"</span> : <span style=\"color: #a31515;\">\"without\"</span>);\r\n\r\n            <span style=\"color: blue;\">if</span> (filesToZip.Count == 0)\r\n            {\r\n                Console.WriteLine(<span style=\"color: #a31515;\">\"Nothing to do.\"</span>);\r\n                <span style=\"color: blue;\">return</span>;\r\n            }\r\n\r\n            <span style=\"color: blue;\">using</span> (<span style=\"color: blue;\">var</span> output= <span style=\"color: blue;\">new</span> ZipOutputStream(<span style=\"color: blue;\">this</span>.basefile))\r\n            {\r\n                output.Password = <span style=\"color: blue;\">this</span>.password;\r\n                output.Encryption = EncryptionAlgorithm.WinZipAes256;\r\n\r\n                <span style=\"color: blue;\">foreach</span> (<span style=\"color: blue;\">string</span> inputFileName <span style=\"color: blue;\">in</span> filesToZip)\r\n                {\r\n                    Console.WriteLine(<span style=\"color: #a31515;\">\"  file: {0}\"</span>, inputFileName);\r\n\r\n                    <span style=\"color: blue;\">if</span>(needsCompression)\r\n                        output.CompressionLevel = CompressionLevel.BestSpeed; <span style=\"color: green;\">//&lt;--causing badread exception during unzip (it seems)</span>\r\n                    <span style=\"color: blue;\">else</span>\r\n                        output.CompressionLevel = CompressionLevel.None;\r\n\r\n                    <span style=\"color: green;\">//NOTE TO CHEESO:</span>\r\n                    <span style=\"color: green;\">//CompressionLevel seems to belong to Zlib, not</span>\r\n                    <span style=\"color: green;\">//not Zip, so it wount let me use CompressionMethod</span>\r\n                    <span style=\"color: green;\">//instead of CompressionLevel =(</span>\r\n\r\n                    output.PutNextEntry(inputFileName);\r\n                    <span style=\"color: blue;\">using</span> (<span style=\"color: blue;\">var</span> input = File.Open(inputFileName, FileMode.Open, FileAccess.Read,\r\n                                                 FileShare.Read | FileShare.Write ))\r\n                    {\r\n                        <span style=\"color: blue;\">byte</span>[] buffer= <span style=\"color: blue;\">new</span> <span style=\"color: blue;\">byte</span>[2048];\r\n                        <span style=\"color: blue;\">int</span> n;\r\n                        <span style=\"color: blue;\">while</span> ((n= input.Read(buffer,0,buffer.Length)) &gt; 0)\r\n                        {\r\n                            output.Write(buffer,0,n);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n\r\n        <span style=\"color: blue;\">private</span> <span style=\"color: blue;\">void</span> Unzip()\r\n        {\r\n            Unzip(<span style=\"color: blue;\">this</span>.basefile, <span style=\"color: blue;\">this</span>.baseExtractDir);\r\n        }\r\n\r\n\r\n        <span style=\"color: blue;\">private</span> <span style=\"color: blue;\">void</span> Unzip(<span style=\"color: blue;\">string</span> filePath, <span style=\"color: blue;\">string</span> extractDir)\r\n        {\r\n            Console.WriteLine(<span style=\"color: #a31515;\">\"\\nUnzip {0}\"</span>, filePath);\r\n            <span style=\"color: blue;\">byte</span>[] buffer= <span style=\"color: blue;\">new</span> <span style=\"color: blue;\">byte</span>[2048];\r\n            <span style=\"color: blue;\">int</span> n;\r\n            <span style=\"color: blue;\">using</span> (<span style=\"color: blue;\">var</span> input= <span style=\"color: blue;\">new</span> ZipInputStream(filePath))\r\n            {\r\n                input.Password = <span style=\"color: blue;\">this</span>.password;\r\n                ZipEntry e;\r\n                <span style=\"color: blue;\">while</span> (( e = input.GetNextEntry()) != <span style=\"color: blue;\">null</span>)\r\n                {\r\n                    <span style=\"color: blue;\">if</span> (e.IsDirectory) <span style=\"color: blue;\">continue</span>;\r\n                    <span style=\"color: blue;\">string</span> outputPath = Path.Combine(extractDir, e.FileName);\r\n                    Console.WriteLine(<span style=\"color: #a31515;\">\"  file: {0}\"</span>, outputPath);\r\n\r\n                    <span style=\"color: blue;\">string</span> containingDir = Path.GetDirectoryName(outputPath);\r\n                    <span style=\"color: blue;\">if</span> (!Directory.Exists(containingDir))\r\n                        Directory.CreateDirectory(containingDir);\r\n\r\n                    <span style=\"color: blue;\">using</span> (<span style=\"color: blue;\">var</span> output = File.Create(outputPath))\r\n                    {\r\n                        <span style=\"color: blue;\">while</span> ((n= input.Read(buffer, 0, buffer.Length)) &gt; 0)\r\n                        {\r\n                            output.Write(buffer,0,n);\r\n                        }\r\n                    }\r\n                    <span style=\"color: blue;\">if</span> (Path.GetExtension(outputPath).Equals(<span style=\"color: #a31515;\">\".zip\"</span>)) <span style=\"color: green;\">// recurse</span>\r\n                        Unzip(outputPath,\r\n                              Path.Combine(extractDir,\r\n                                           Path.GetFileNameWithoutExtension(outputPath)));\r\n                }\r\n            }\r\n        }\r\n\r\n\r\n        <span style=\"color: blue;\">void</span> Reset()\r\n        {\r\n            <span style=\"color: blue;\">if</span> (File.Exists(<span style=\"color: blue;\">this</span>.basefile))\r\n            {\r\n                Console.WriteLine(<span style=\"color: #a31515;\">\"Removing {0}\"</span>, <span style=\"color: blue;\">this</span>.basefile);\r\n                File.Delete(<span style=\"color: blue;\">this</span>.basefile);\r\n            }\r\n            <span style=\"color: blue;\">if</span> (Directory.Exists(<span style=\"color: blue;\">this</span>.baseExtractDir))\r\n            {\r\n                Console.WriteLine(<span style=\"color: #a31515;\">\"Removing {0}\"</span>, <span style=\"color: blue;\">this</span>.baseExtractDir);\r\n                Directory.Delete(<span style=\"color: blue;\">this</span>.baseExtractDir,<span style=\"color: blue;\">true</span>);\r\n            }\r\n        }\r\n\r\n\r\n        <span style=\"color: blue;\">public</span> <span style=\"color: blue;\">void</span> Run()\r\n        {\r\n            <span style=\"color: blue;\">var</span> fileInfos = (<span style=\"color: blue;\">from</span> fi <span style=\"color: blue;\">in</span> (<span style=\"color: blue;\">from</span> fn <span style=\"color: blue;\">in</span> Directory.GetFiles(<span style=\"color: #a31515;\">\".\"</span>, <span style=\"color: #a31515;\">\"*.cs\"</span>)\r\n                                         <span style=\"color: blue;\">select</span> <span style=\"color: blue;\">new</span> FileInfo(fn))\r\n                <span style=\"color: blue;\">orderby</span> fi.Length <span style=\"color: blue;\">descending</span>\r\n                <span style=\"color: blue;\">select</span> fi).Take(12);\r\n\r\n            filesToZip = fileInfos.ToList().ConvertAll((fi)=&gt;fi.Name);\r\n\r\n            <span style=\"color: green;\">// pass 1: use compression</span>\r\n            Reset();\r\n\r\n            Zipup(<span style=\"color: blue;\">true</span>);\r\n            Unzip();\r\n\r\n            Console.WriteLine(<span style=\"color: #a31515;\">\"--------------------------------------------\"</span>);\r\n\r\n            <span style=\"color: green;\">// pass 2: no compression</span>\r\n            Reset();\r\n\r\n            Zipup(<span style=\"color: blue;\">false</span>);\r\n            Unzip();\r\n\r\n            Reset();\r\n        }\r\n\r\n\r\n        <span style=\"color: blue;\">public</span> <span style=\"color: blue;\">static</span> <span style=\"color: blue;\">void</span> Usage()\r\n        {\r\n            Console.WriteLine(<span style=\"color: #a31515;\">\"\\nBowmanZis: test a DotNetZip scenario for bowman.\\n\"</span>);\r\n            Console.WriteLine(<span style=\"color: #a31515;\">\"Usage:\\n  BowmanZis\"</span>);\r\n        }\r\n\r\n\r\n        <span style=\"color: blue;\">public</span> <span style=\"color: blue;\">static</span> <span style=\"color: blue;\">void</span> Main(<span style=\"color: blue;\">string</span>[] args)\r\n        {\r\n            <span style=\"color: blue;\">try</span>\r\n            {\r\n                <span style=\"color: blue;\">new</span> BowmanZis(args)\r\n                    .Run();\r\n            }\r\n            <span style=\"color: blue;\">catch</span> (System.Exception exc1)\r\n            {\r\n                Console.WriteLine(<span style=\"color: #a31515;\">\"Exception: {0}\"</span>, exc1.ToString());\r\n                Usage();\r\n            }\r\n        }\r\n\r\n    }\r\n}\r\n\r\n</pre>\r\n</div>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-07-13T17:44:24.153-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "642380",
    "ThreadId": "264999",
    "Html": "<p>Thanks Cheeso, Ill try and reproduce the error with the above code. Did you try zipping/unzipping a zip file with multiple zip files inside&gt;?</p>",
    "PostedDate": "2011-07-14T08:07:52.573-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "642467",
    "ThreadId": "264999",
    "Html": "<div style=\"width: 800px;\">\r\n<p>No - i hadn't tried nested zip files.</p>\r\n<p>The use of nested zips should have no bearing on the failure you described&nbsp; - <span style=\"font-family: Courier;\">﻿﻿﻿﻿﻿ZipEntry::ReadHeader(): Bad signature (0x86635B9F)</span> - unless you have a bug in <strong>your </strong>code.</p>\r\n<p>I just tried nested zips now - it works fine for me. I think maybe you have a bug in your code. If you try to wrap a ﻿ZipInputStream over a stream that is already open, you would get the error you're seeing. Check your code again, especially the recursion.</p>\r\n<p>&nbsp;</p>\r\n</div>",
    "PostedDate": "2011-07-14T10:28:02.7-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]