[
  {
    "Id": "642242",
    "ThreadId": "265135",
    "Html": "\r\n<p>Hello,</p>\r\n<p>I create <span style=\"font-size:10pt\">OpenXML documents</span>. For Zipping I use:</p>\r\n<p></p>\r\n<div style=\"color:black; background-color:white\">\r\n<pre><span style=\"color:blue\">Using</span> zip <span style=\"color:blue\">As</span> Ionic.Utils.Zip.ZipFile = <span style=\"color:blue\">New</span> Ionic.Utils.Zip.ZipFile(targetNewName, Console.Out)\r\n    zip.AddDirectory(tempFolder, <span style=\"color:#a31515\">&quot;&quot;</span>)\r\n    zip.Save()\r\n<span style=\"color:blue\">End</span> <span style=\"color:blue\">Using</span>\r\n</pre>\r\n</div>\r\n<p></p>\r\n<p>and then I rename the file to <strong>Filename.pptm</strong></p>\r\n<p>This File works <strong>not</strong>.</p>\r\n<p>If I zip this <em>tempFolder </em>via WinZip (Compression: &bdquo;Super Fast&ldquo;) the file works fine.</p>\r\n<p>Documentation <span style=\"font-size:10pt\">&bdquo;</span>Open Packaging Convention&ldquo;:<br>\r\n<em>&quot;The compression algorithm supported is DEFLATE, as described in the .ZIP specification. The package</em><br>\r\n<em>implementer shall not use any compression algorithm other than DEFLATE.&quot;</em></p>\r\n<p>How can I create this zip file using DotNetZip Library.<br>\r\nCan you send me a vb.net sample Code?</p>\r\n<p>Thanks and best regards<br>\r\nGunter</p>\r\n",
    "PostedDate": "2011-07-14T03:49:23.003-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "642257",
    "ThreadId": "265135",
    "Html": "<p>Hello,</p>\r\n<p>I found a way ;-)</p>\r\n<p>\r\n<div style=\"color: black; background-color: white;\">\r\n<pre><span style=\"color: blue;\">Using</span> zip <span style=\"color: blue;\">As</span> Ionic.Zip.ZipFile = <span style=\"color: blue;\">New</span> Ionic.Zip.ZipFile(targetNewName)\r\n    zip.CompressionLevel = Ionic.Zlib.CompressionLevel.Level0\r\n    zip.AddDirectory(tempFolder)\r\n    zip.Save()\r\n<span style=\"color: blue;\">End</span> <span style=\"color: blue;\">Using</span>\r\n</pre>\r\n</div>\r\n</p>\r\n<p>right?</p>\r\n<p>Thanks and best regards<br /> Gunter</p>",
    "PostedDate": "2011-07-14T04:45:03.483-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "642286",
    "ThreadId": "265135",
    "Html": "<p>Yes - seems good to me.&nbsp; With your code, the files in the tempFolder are not compressed at all.&nbsp; They are \"stored\".&nbsp;</p>\r\n<p>That seems to directly oppose the OPC spec, which says \"use DEFLATE\".&nbsp; Also it's my understanding that WinZip's \"superfast\" uses DEFLATE.</p>\r\n<p>But your code works for you, that is the proof, isn't it ?</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-07-14T05:35:43.747-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "642289",
    "ThreadId": "265135",
    "Html": "<p>Hello Cheeso,</p>\r\n<p>thanks for your answer.</p>\r\n<p><span id=\"result_box\" class=\"long_text short_text\" lang=\"en\"><span class=\"hps\" title=\"Zur Anzeige alternativer &Uuml;bersetzungen klicken\">What</span> <span class=\"hps\" title=\"Zur Anzeige alternativer &Uuml;bersetzungen klicken\">would be the</span> <span class=\"hps\" title=\"Zur Anzeige alternativer &Uuml;bersetzungen klicken\">correct code</span> <span class=\"hps\" title=\"Zur Anzeige alternativer &Uuml;bersetzungen klicken\">for</span> <span class=\"hps\" title=\"Zur Anzeige alternativer &Uuml;bersetzungen klicken\">the </span></span>OPC spec \"use <span id=\"result_box\" class=\"long_text short_text\" lang=\"en\"><span class=\"hps\" title=\"Zur Anzeige alternativer &Uuml;bersetzungen klicken\">DEFLATE\" ?</span></span></p>\r\n<p>Thanks and best regards<br /> Gunter</p>\r\n<p><span class=\"long_text short_text\" lang=\"en\"><span class=\"hps\" title=\"Zur Anzeige alternativer &Uuml;bersetzungen klicken\"><br /></span></span></p>",
    "PostedDate": "2011-07-14T05:40:43.807-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "642370",
    "ThreadId": "265135",
    "Html": "<p>By default, DotNetZip will use DEFLATE.&nbsp; If the application does not set the CompressionLevel property, or sets it to a value that is not ZERO (implies no compression at all), then DEFLATE is the algorithm employed.&nbsp; DEFLATE has a few options in it, and setting the compressionlevel to some non-zero level (Level6, Level1, Level9, etc) turns those options ON or OFF.&nbsp; But in all cases, the algorithm is DEFLATE.</p>\n<p>I don't know about the OPC spec, and I haven't ever used it.&nbsp; There have been some users of DotNetZip that have read/extracted OPC format, but I don't recall anyone asking about how to produce a file in OPC format.&nbsp;</p>\n<p>It's surprising to me that you see a difference between the case where you set CompressionLevel=Level0 and the case where you do nothing. It's my understanding that OPC is simply a ZIP format, with a prescribed internal structure.&nbsp;&nbsp; In that case it should not matter whether you use compression or not - the ZIP format allows the use of compression, or allows \"no compression\", in other words simply storing the data uncompressed.&nbsp;</p>\n<p>You said the OPC created with regular compression \"works not\", but you haven't explained just what error you receive.&nbsp; If I were investigating this, I'd try to get more information as to exactly why it \"works not\".</p>\n<p>&nbsp;</p>\n<p>&nbsp;</p>\n<p>&nbsp;</p>",
    "PostedDate": "2011-07-14T07:57:53.917-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "642376",
    "ThreadId": "265135",
    "Html": "<p>Gunter, just looking at your code a little further, you do have one major difference beyond setting the compression level.</p>\r\n<p>In the first case you have specified AddDirectory(dirName, \"\").&nbsp; In the second case you use AddDirectory(dirName) (with no second argument).</p>\r\n<p>I suspect this is the source of the problem - not the compression level.&nbsp;&nbsp; You need to use No second argument when you call AddDirectory - it preserves the directory structure within the zip file.&nbsp;&nbsp; If you simply DO NOT set the CompressionLevel, you will get the default compression, which is DEFLATE, and I suspect all will work.</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-07-14T08:03:26.147-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "642381",
    "ThreadId": "265135",
    "Html": "<p>Hello Chesso,</p>\r\n<p>Thanks for your answer.</p>\r\n<p>Works not: If i open the file createt from Post1: \"<strong>Filename.pptm</strong>\" in PowerPoint 2010 = PowerPoint crash.<br />(DotNetZip Library Ver: 1.6.2.12)</p>\r\n<p>With the code from Post 2: PowerPoint opens the file. <br />(DotNetZip Library Ver: 1.9.1.5))</p>\r\n<p>Thanks and best regards<br />Gunter</p>",
    "PostedDate": "2011-07-14T08:08:31.12-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "642385",
    "ThreadId": "265135",
    "Html": "<p>ok, so it's all working, yes?</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-07-14T08:14:32.29-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "642396",
    "ThreadId": "265135",
    "Html": "<p>Hello Chesso,</p>\r\n<p>Yes. Thank you for your help!</p>\r\n<p>Best Regards<br />Gunter</p>",
    "PostedDate": "2011-07-14T08:26:37.997-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]