{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "",
    "ClosedDate": null,
    "CommentCount": 0,
    "Custom": null,
    "Description": "I was working with a friend trying to figure out an issue they were having with ZlibStream.\nReading from an existing zlib file worked fine but after they compressed the EXACT data with your library it rendered it useless.\nThey were using a byte list and compressing all the data at one time everything seemed to work fine until he tried to read the data back.\nHowever if I added an extra byte to the end of the list like so:\n \n_buffer.Add((byte)0);\n \nIt would work completely fine\n \nthe exact code they used for compression is as follows:\n \n        private void EndCompress()\n        {\n            // If the buffer exists.\n            if (_buffer != null)\n            {\n                // Input buffer.\n                byte[] input = _buffer.ToArray();\n \n                // Dump buffer.\n                _buffer.Clear();\n                _buffer = null;\n \n                // Create a new memory stream.\n                using (MemoryStream ms = new MemoryStream())\n                {\n                    // Compress input buffer.\n                    using (ZlibStream compress = new ZlibStream(ms, CompressionMode.Compress, true))\n                    {\n                        // Write compressed bytes.\n                        compress.Write(input, 0, input.Length);\n                    }\n \n                    // Get bytes.\n                    byte[] bytes = ms.ToArray();\n \n                    // Write the size of the limit.\n                    WriteInt((int)ms.Length);\n \n                    // Write compressed bytes.\n                    _writer.Write(bytes, 0, bytes.Length);\n                }\n            }\n        }",
    "LastUpdatedDate": "2013-02-21T18:43:20.71-08:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2010-12-02T18:48:12.763-08:00",
    "Status": {
      "Name": "Proposed",
      "Id": 1
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "Off By One error?",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 12619
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "I don't understand the problem you're reporting here. I also don't understand what your code is attempting to illustrate.   \r\n\r\nOne way to test compression, is to (a) compress a buffer of data, (b) decompress the compressed form, and (c) compare the original buffer with the decompressed version.  In other words, a round-trip.  Your code doesn't do that.  I don't know what your sample code is doing, or where the problem is supposed to occur.  \r\n\r\nI'd love to investigate this problem, and determine what causing what you see.  But to do that, I will need a clearer description of the exact problem, and a test case that reproduces it.  \r\n",
      "PostedDate": "2011-06-16T20:35:02.013-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:43:20.71-08:00",
      "Id": -2147483648
    }
  ]
}