[
  {
    "Id": "429959",
    "ThreadId": "209029",
    "Html": "<p>Hi,</p>\r\n<p>I am having problems extracting zip files. When I extract a small zipfile (1,74 MB) it works fine, but when I try to extract a larger zip file (395 MB),</p>\r\n<p>I got this error message: ZipEntry::ReadHeader(): Bad signature (0x21726152) at position&nbsp; 0x00000000</p>\r\n<p>The code:</p>\r\n<p>public void unZip(string fromPath, string toPath)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using (ZipFile zip = ZipFile.Read(fromPath))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (ZipEntry entry in zip)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; entry.Extract(toPath, ExtractExistingFileAction.OverwriteSilently);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catch(Exception ex)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ex.Message.ToString();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>\r\n<p>I am using DotnetZip 1.9.</p>\r\n<p>What am I doing wrong?</p>",
    "PostedDate": "2010-04-12T03:50:15.373-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "430031",
    "ThreadId": "209029",
    "Html": "<p>I don't know.&nbsp; How did you create the zip file that you are trying to extract?</p>\r\n<p>DotNetZip seems to think the zip file in question is not actually a zip file.</p>\r\n<p>you can try <strong>unzip -t</strong> or <strong>unzip -i&nbsp; </strong>to investigate the inner structure of the zip file you're trying to extract.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-04-12T07:39:07.56-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "430297",
    "ThreadId": "209029",
    "Html": "<p>To my big surprise the file I was trying to unzip was not a .zip file, it war a .rar file...</p>\r\n<p>Thanks for the quick response!!</p>\r\n<p>:)</p>",
    "PostedDate": "2010-04-12T22:46:42.747-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "522143",
    "ThreadId": "209029",
    "Html": "\r\n<p>Cheeso, I have the same error as MissyJ because I'm using Ionic.Zip.dll (v 1.9) to extract .rar file. I have read the documentation and it did mention that the dll support WinRAR and WinZip program. But seems the dll not working for .rar file. Any idea on\r\n below errormessage:</p>\r\n<p>'Ionic.Zip.BadReadException' occurred in Ionic.Zip.dll</p>\r\n<p>ZipEntry::ReadHeader(): Bad signature (0x21726152) at position&nbsp; 0x00000000</p>\r\n<p>&nbsp;</p>\r\n<p>Below is my VB.Net SourceCode:</p>\r\n<p>Dim ZipToUnpack As String = &quot;d:\\log\\log.rar&quot;<br>\r\nDim UnpackDirectory As String = &quot;d:\\log\\ExtractedFiles&quot;<br>\r\nUsing zip1 As ZipFile = ZipFile.Read(ZipToUnpack)<br>\r\n&nbsp;&nbsp; Dim e As ZipEntry<br>\r\n&nbsp;&nbsp; For Each e In zip1<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e.Extract(UnpackDirectory, ExtractExistingFileAction.OverwriteSilently)<br>\r\n&nbsp;&nbsp; Next<br>\r\nEnd Using</p>\r\n",
    "PostedDate": "2010-11-15T07:11:39.333-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "522173",
    "ThreadId": "209029",
    "Html": "\r\n<p>DotNetZip does not read or write RAR files.&nbsp; WinRAR can produce ZIP files that DotNetZip can read; also DotNetZip can produce zip files that WinRAR can read.</p>\r\n<p>&nbsp;</p>\r\n",
    "PostedDate": "2010-11-15T07:55:57.157-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "522528",
    "ThreadId": "209029",
    "Html": "\r\n<p>Cheeso,&nbsp; thanks for the reply. I have read through the document again and notice that only zip file supported.</p>\r\n",
    "PostedDate": "2010-11-15T23:37:28.487-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "854247",
    "ThreadId": "209029",
    "Html": "<p>Hi Cheeso,</p>\r\n<p>I am getting the similar error when trying to run the zipped exe that is created by Ionic 1.9. I have a folder in which 3 files total size 470mb.I have to create zipped exe for this folder . Zip exe is created fine. this exe need to be downloaded by client browser.After the client downloaded this exe ,then unable to run or extract this exe. when try to run this exe,he is getting the error as</p>\r\n<p><span style=\"color: #ff0000;\">exception while resetting size ionic.zip.zipexception Ionic.Zip.ZipException: Cannot read that as a ZipFile ---&gt; Ionic.Zip.BadReadException:&nbsp;&nbsp; Bad signature (0x00905A4D) at position&nbsp; 0x00000000</span></p>\r\n<p>The code below is :</p>\r\n<p>-- creating zip exe code<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style=\"color: #000080;\">Using zip1 As New ZipFile()</span><br /><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip1.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always</span><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip1.AlternateEncoding = Text.Encoding.UTF8</span><br /><br /><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip1.UseZip64WhenSaving = Zip64Option.AsNecessary</span><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip1.AddDirectory(sMoveDirectory)</span><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip1.Comment = \"This will be embedded into a self-extracting exe\"</span><br /><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim sSaveOption As New SelfExtractorSaveOptions</span><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sSaveOption.Flavor = SelfExtractorFlavor.WinFormsApplication</span><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sSaveOption.Quiet = False</span><br /><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip1.SaveSelfExtractor(StageDir &amp; \"\\\" &amp; sTargetFile &amp; \".exe\", sSaveOption)</span><br /><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Using</span></p>\r\n<p>&nbsp;</p>\r\n<p>--- the downloading exe code</p>\r\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style=\"color: #000080;\">filename = \"ABC.exe\" ' zipped exe created using ionic.zip at server</span><br /><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strStagingPath = \"\\\\servername\\\" &amp; filename</span><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'downloadexe(strStagingPath, filename)</span><br /><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'strStagingPath = Application(\"AnswerLinkPublicRoot\") &amp; \"\\staging\\\" &amp; filename</span><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'strStagingPath = \"\\\\inhyvwxtreamspt\\eservice\\webs\\es\\public\\staging\\\" &amp; filename</span><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim strContentType As String = \"application/octet-stream\"</span><br /><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.AddHeader(\"Content-disposition\", \"attachment; filename=\" &amp; filename)</span><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.ContentType = strContentType</span><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.WriteFile(strStagingPath)</span><br /><span style=\"color: #000080;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HttpContext.Current.ApplicationInstance.CompleteRequest()</span></p>\r\n<p>please help me</p>\r\n<p>Thanks</p>\r\n<p>krishna</p>",
    "PostedDate": "2012-06-27T02:23:54.763-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]