[
  {
    "Id": "1436034",
    "ThreadId": "641949",
    "Html": "How (or can) I zip one ZipFile up within another ZipFile?\r<br />\n<br />\nSaving the nested ZipFile to a memory stream that is then written to the other ZipFile seems like the best way to do this, however when I use the code below the nested ZipFile (once I unpacked zip1) is 0KB large and has nothing in it. \r<br />\n<br />\nIs this possible without writing the nested ZipFile to disk first and then adding that into zip1 afterwards? <br />\n<pre><code>            ZipFile zip1 = new ZipFile()\n            {\n                ParallelDeflateThreshold = -1\n            };\n            ZipFile zip2 = new ZipFile()\n            {\n                ParallelDeflateThreshold = -1\n            };\n\n            zip1.AddEntry(&quot;test.txt&quot;, &quot;hello world&quot;);\n            zip2.AddEntry(&quot;test2.txt&quot;, &quot;hello dark world&quot;);\n            \n            MemoryStream stream = new MemoryStream();\n            zip2.Save(stream);\n            Console.WriteLine(Encoding.ASCII.GetString(stream.ToArray()));\n            zip1.AddEntry(&quot;test.zip&quot;, stream);\n\n            zip2.Dispose();\n            zip1.Save(&quot;C:/output.zip&quot;);</code></pre>\n\n",
    "PostedDate": "2015-07-26T21:17:51.41-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]