[
  {
    "Id": "708873",
    "ThreadId": "282159",
    "Html": "\r\n<p>Hi,</p>\r\n<p>I need to save several data measure streams in a same zip file.<br>\r\nEach MemoryStream is around 30MB, and I need to save 8 of them.&nbsp;<br>\r\n<br>\r\nWhat is the best and fastest way to achieve it ?</p>\r\n<p>1) Create temporay folder -&gt; Populate it with 8 files -&gt; Zip the entire folder</p>\r\n<p><span style=\"white-space:pre\"></span>A lot of disk access !</p>\r\n<p>2) Create zipfile -&gt; 8x AddEntry(memorystream) -&gt;zip.Save()</p>\r\n<p><span style=\"white-space:pre\"></span>I got some OutOfMemory errors</p>\r\n<p>3) Create empty zipfile -&gt; AddEntry() -&gt; zip.Save() -&gt; AddEntry() -&gt; zip.Save() -&gt; AddEntry() -&gt; .....</p>\r\n<p>&nbsp;</p>\r\n<p><span style=\"white-space:pre\">T</span>hanks</p>\r\n",
    "PostedDate": "2011-12-07T08:33:44.517-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "709048",
    "ThreadId": "282159",
    "Html": "<p>I'm also interested in hearing this.</p>\r\n<p>I'm in the habit of wrapping my memory streams in using statements, so I don't have remember to close them, and it is very inconvenient that I have to keep the memory streams around for when I call save some time later.</p>\r\n<p>I wish that when you call AddEntry()--or something like it--the ZipFile would read the the data from the stream, add it to a memory stream of its own, compressing it along the way.&nbsp; So before you call Save(), ZipFile has a compressed memory stream member containing all of the data in the zip file.&nbsp; This data would be smaller because it is uncompressed.&nbsp; Then when you call Save() it writes to disk the data in the memory stream.</p>\r\n<p>This is somewhat like how the zip package stuff works in System.IO.Packaging.&nbsp; The issue there is that it includes this unnecessary [Content_Types].xml file in the zip file and doesn't seem to do as good of a job compressing certain file types.</p>",
    "PostedDate": "2011-12-07T14:42:08.077-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]