{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "fixed in changeset 42829.  First binary&#58; v1.9.0.4.  ",
    "ClosedDate": "2009-09-09T19:41:56.227-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "This was a weird one - We've been using your (awesomely fantastic) zip library for months without any issues, until I generated a tiff file and compressed it just like always, using Level9 compression, and copped an index out of range error.. We were using 1.7x, so I downloaded the latest dll to test if it had been addressed in the latest release, but it's still an issue...\n \nSystem.IndexOutOfRangeException was unhandled\n  Message=\"Index was outside the bounds of the array.\"\n  Source=\"Ionic.Zip\"\n  StackTrace:\n       at Ionic.Zlib.Tree.d_code(Int32 dist) in C:\\Projects\\DotNetZip-src-v1.8.4.22\\DotNetZip\\Zlib\\Tree.cs:line 138\n       at Ionic.Zlib.DeflateManager.send_compressed_block(Int16[] ltree, Int16[] dtree) in C:\\Projects\\DotNetZip-src-v1.8.4.22\\DotNetZip\\Zlib\\Deflate.cs:line 829\n       at Ionic.Zlib.DeflateManager._tr_flush_block(Int32 buf, Int32 stored_len, Boolean eof) in C:\\Projects\\DotNetZip-src-v1.8.4.22\\DotNetZip\\Zlib\\Deflate.cs:line 1064\n       at Ionic.Zlib.DeflateManager.flush_block_only(Boolean eof) in C:\\Projects\\DotNetZip-src-v1.8.4.22\\DotNetZip\\Zlib\\Deflate.cs:line 927\n       at Ionic.Zlib.DeflateManager.DeflateSlow(FlushType flush) in C:\\Projects\\DotNetZip-src-v1.8.4.22\\DotNetZip\\Zlib\\Deflate.cs:line 1397\n       at Ionic.Zlib.DeflateManager.Deflate(FlushType flush) in C:\\Projects\\DotNetZip-src-v1.8.4.22\\DotNetZip\\Zlib\\Deflate.cs:line 1814\n       at Ionic.Zlib.ZlibCodec.Deflate(FlushType flush) in C:\\Projects\\DotNetZip-src-v1.8.4.22\\DotNetZip\\Zlib\\ZlibCodec.cs:line 588\n       at Ionic.Zlib.ZlibBaseStream.Write(Byte[] buffer, Int32 offset, Int32 count) in C:\\Projects\\DotNetZip-src-v1.8.4.22\\DotNetZip\\Zlib\\ZlibStream.cs:line 797\n       at Ionic.Zlib.DeflateStream.Write(Byte[] buffer, Int32 offset, Int32 count) in C:\\Projects\\DotNetZip-src-v1.8.4.22\\DotNetZip\\Zlib\\DeflateStream.cs:line 556\n       at Ionic.Zip.ZipEntry._WriteFileData(Stream s) in C:\\Projects\\DotNetZip-src-v1.8.4.22\\DotNetZip\\Zip Partial DLL\\ZipEntry.Write.cs:line 1111\n       at Ionic.Zip.ZipEntry._EmitOne(Stream outstream) in C:\\Projects\\DotNetZip-src-v1.8.4.22\\DotNetZip\\Zip Partial DLL\\ZipEntry.Write.cs:line 1518\n       at Ionic.Zip.ZipEntry.Write(Stream s) in C:\\Projects\\DotNetZip-src-v1.8.4.22\\DotNetZip\\Zip Partial DLL\\ZipEntry.Write.cs:line 1465\n       at Ionic.Zip.ZipFile.Save() in C:\\Projects\\DotNetZip-src-v1.8.4.22\\DotNetZip\\Zip Partial DLL\\ZipFile.Save.cs:line 114\n       at Ionic.Zip.ZipFile.Save(String fileName) in C:\\Projects\\DotNetZip-src-v1.8.4.22\\DotNetZip\\Zip Partial DLL\\ZipFile.Save.cs:line 340\n       at ConsoleApplication1.Program.Main(String[] args) in C:\\Users\\seanm\\AppData\\Local\\Temporary Projects\\ConsoleApplication1\\Program.cs:line 20\n       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\n       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)\n       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\n       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\n       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\n       at System.Threading.ThreadHelper.ThreadStart()\n \n \nI've attached a zipped up version of the tiff that is causing the problem. I thought it might have been an easy fix, but once I saw it was in the Deflate algorithm I thought it best to just hand ball it over to you\n \nUnzip the attached file.. then\n \n            using (var zip = new ZipFile())\n            {\n                zip.CompressionLevel = CompressionLevel.Level9;\n                zip.AddFile(\"PaletteLatLong-PaletteLatLong.tif\", \"\");\n                zip.Save(\"PaletteLatLong-PaletteLatLong.zip\");\n            }",
    "LastUpdatedDate": "2013-05-16T05:32:10.237-07:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2009-08-31T18:37:15.637-07:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "Index out of range error when using Level9 compression",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 8647
  },
  "FileAttachments": [
    {
      "FileId": 2244,
      "FileName": "BrokenFile.zip",
      "DownloadUrl": ".\\2244"
    }
  ],
  "Comments": [
    {
      "Message": "ok, got it.  I've reproduced the problem here.",
      "PostedDate": "2009-09-09T15:30:34.237-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2009-09-09T19:41:56.227-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:44:03.117-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:32:10.237-07:00",
      "Id": -2147483648
    }
  ]
}