{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "",
    "ClosedDate": null,
    "CommentCount": 0,
    "Custom": null,
    "Description": "When running this code I get a BadReadException when extracting the compressed entry. I have tried values 1, 2 and 3 for n and all fails so it seems to be a systematic error. I have also tried + n and - n instead of * n  (with n = 1)  and then the code works. This was introduced when I switched from Ionic.Zip.Reduced.dll version 1.9.1.5 to 1.9.1.8,\n \n//Code snippet start\n \n            int n = 1;\n            var data = new byte[1024 * 1024 * n];\n            var inStream = new MemoryStream(data);\n            byte[] compressed;\n            using (var zip = new ZipFile())\n            {\n                zip.CompressionLevel = CompressionLevel.Default;\n                zip.AddEntry(\"x\", inStream);\n                MemoryStream outStream = new MemoryStream();\n                zip.Save(outStream);\n                compressed = outStream.ToArray();\n            }\n \n            var decompressed = new MemoryStream();\n            var memStream = new MemoryStream(compressed);\n            using (var zip = ZipFile.Read(memStream))\n            {\n                ICollection<ZipEntry> entries = zip.Entries;\n                entries.Single().Extract(decompressed); //Throws BadReadException\n            }\n \n            var sameData = decompressed.ToArray();\n//Code snippet end",
    "LastUpdatedDate": "2013-02-21T18:43:01.477-08:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2011-09-26T00:37:35.563-07:00",
    "Status": {
      "Name": "Proposed",
      "Id": 1
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "Extract entry throws BadReadException when size of uncompressed data is multiple of 1mb",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 4,
    "Id": 14295
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "This happens with some other values (not multiple of 1 Mb) as well. At least with 1900544.\r\nThe compressed size of the zip entry is always different.\r\nIt does not happen if ZipFile.ParallelDeflateThreshold is -1.",
      "PostedDate": "2011-09-29T05:37:23.633-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-09-29T05:43:30.673-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-10-06T13:54:59.633-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-10-10T02:36:01.3-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:43:01.477-08:00",
      "Id": -2147483648
    }
  ]
}