[
  {
    "Id": "507412",
    "ThreadId": "230961",
    "Html": "<p>Hey Cheeso, I am getting a NullReferenceException when extracting.&nbsp; Here's the stackTrace</p>\r\n<p>&nbsp;&nbsp; at Ionic.Zip.ZipEntry.InternalExtract(String baseDir, Stream outstream, String password) in C:\\DotNetZip\\v1.9.1.5\\DotNetZip\\Zip Partial DLL\\ZipEntry.Extract.cs:line 602<br>&nbsp;&nbsp; at Ionic.Zip.ZipEntry.Extract(Stream stream) in C:\\DotNetZip\\v1.9.1.5\\DotNetZip\\Zip Partial DLL\\ZipEntry.Extract.cs:line 112<br>&nbsp;&nbsp; at MyConsole.Program.Main(String[] args) in C:\\NetTiers\\SourceAnywhere\\NoMoreConsole\\Program.cs:line 34<br>&nbsp;&nbsp; at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)<br>&nbsp;&nbsp; at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)<br>&nbsp;&nbsp; at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()<br>&nbsp;&nbsp; at System.Threading.ThreadHelper.ThreadStart_Context(Object state)<br>&nbsp;&nbsp; at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<br>&nbsp;&nbsp; at System.Threading.ThreadHelper.ThreadStart()</p>\r\n<p>And here's my code.&nbsp;</p>\r\n<p><span style=\"color:blue\">class</span> Program<br>{<br>&nbsp; <span style=\"color:blue\">static</span> <span style=\"color:blue\">void</span> Main(<span style=\"color:blue\">string</span>[] args)<br>&nbsp; {<br>&nbsp;&nbsp;&nbsp; Item1 item = DataRepository.Provider.Item1Provider.Get(<span style=\"color:blue\">new</span> Item1Key(33170));<br>&nbsp;&nbsp;&nbsp; FileInfo1 fileInfo = DataRepository.Provider.FileInfo1Provider.Get(<span style=\"color:blue\">new</span> FileInfo1Key(item.BiFlInfoId));<span style=\"color:green\">//Vss.GetFileBytes(47013);</span><br><br>&nbsp;&nbsp;&nbsp; <span style=\"color:blue\">using</span> (FileStream fileStream = File.Create(item.StrItnme))<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style=\"color:blue\">byte</span>[] fileBytes = fileInfo.ImEfldat;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style=\"color:blue\">byte</span>[] fileBytes2 = fileInfo.ImFldat;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MemoryStream memStream = <span style=\"color:blue\">new</span> MemoryStream();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; memStream.Write(fileBytes, 0, fileBytes.Length);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; memStream.Write(fileBytes2, 0, fileBytes2.Length);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; memStream.Seek(0, SeekOrigin.Begin);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ZipInputStream zipInStream = <span style=\"color:blue\">new</span> ZipInputStream(memStream);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ZipEntry zipEntry = zipInStream.GetNextEntry();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zipEntry.Extract(fileStream);<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp; }<br>}</p>\r\n<p>&nbsp;</p>\r\n<p>Am I doing anything really dumb and obvious to you?&nbsp; I am trying to take those bytes which contain compressed data, get the first file contained in the compressed bytes and then write the decompressed file to the fileStream.</p>\r\n<p>&nbsp;</p>\r\n<p>It appears that</p>\r\n<p>&nbsp;_container.ZipFile.Reset();</p>\r\n<p>&nbsp;is failing in ZipEntry.Extract.cs</p>",
    "PostedDate": "2010-10-14T13:30:51.36-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "507460",
    "ThreadId": "230961",
    "Html": "<p>Seems like a bug!</p>",
    "PostedDate": "2010-10-14T15:04:02.123-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "507461",
    "ThreadId": "230961",
    "Html": "This discussion has been copied to a work item. Click <a href=\"http://dotnetzip.codeplex.com/workitem/12242\">here</a> to go to the work item and continue the discussion.",
    "PostedDate": "2010-10-14T15:04:16.517-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "578083",
    "ThreadId": "230961",
    "Html": "<p>I added to the work item another code example and what I found on the issue after stepping through the source code. &nbsp;I hope my addition helps push a fix out for the work item soon.</p>",
    "PostedDate": "2011-03-09T14:44:26.41-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]