{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "",
    "ClosedDate": null,
    "CommentCount": 0,
    "Custom": null,
    "Description": "http://stackoverflow.com/questions/15337186/dotnetzip-badreadexception-on-extract\n\n\n```\npublic class Program\n{\n\tpublic static void Main(string[] args)\n\t{\n\t\tvar source = new FileInfo(\"foo.txt\");\n\t\tusing (var writer = source.CreateText())\n\t\t\twriter.Write(new string('a', 1179648));\n\n\t\tvar target = new FileInfo(Path.ChangeExtension(source.FullName, \"zip\"));\n\t\tvar folder = new DirectoryInfo(Path.ChangeExtension(source.FullName, null));\n\n\t\tif (target.Exists)\n\t\t\ttarget.Delete();\n\n\t\tif (folder.Exists)\n\t\t\tfolder.Delete(true);\n\n\t\tusing (var zip = new ZipFile(target.FullName))\n\t\t{\n\t\t\tzip.AddFile(source.FullName, string.Empty);\n\t\t\tzip.Save();\n\t\t}\n\n\t\tusing (var zip = new ZipFile(target.FullName))\n\t\t\tzip.ExtractAll(folder.FullName);\n\t}\n}\n```\n\n```\nUnhandled Exception: Ionic.Zip.BadReadException: bad read of entry foo.txt from compressed archive.\n   at Ionic.Zip.ZipEntry._CheckRead(Int32 nbytes)\n   at Ionic.Zip.ZipEntry.ExtractOne(Stream output)\n   at Ionic.Zip.ZipEntry.InternalExtract(String baseDir, Stream outstream, String password)\n   at Ionic.Zip.ZipFile._InternalExtractAll(String path, Boolean overrideExtractExistingProperty)\n   at Ionic.Zip.ZipFile.ExtractAll(String path)\n   at ConsoleApplication1.Program.Main(String[] args) in C:\\ZipDemo\\ConsoleApplication1\\ConsoleApplication1\\Program.cs:line 32\n```",
    "LastUpdatedDate": "2013-08-20T08:06:05.887-07:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Unassigned",
      "Severity": 0,
      "Id": 0
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2013-03-11T05:46:38.147-07:00",
    "Status": {
      "Name": "Proposed",
      "Id": 1
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "BadReadException on byte[1179648]",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 4,
    "Id": 16092
  },
  "FileAttachments": [
    {
      "FileId": 4721,
      "FileName": "ZipTest.zip",
      "DownloadUrl": ".\\4721"
    }
  ],
  "Comments": [
    {
      "Message": "Was able to replicate this issue. Code works well with v1.9. Attached sample code with working version (using v1.9 of DotNetZip)\r\n\r\nVS2012 used for testing.",
      "PostedDate": "2013-03-11T05:59:17.893-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-04-02T14:33:21.263-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-22T23:47:42.253-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-08-20T08:05:00.583-07:00",
      "Id": -2147483648
    },
    {
      "Message": "This is probably a duplicate of https://dotnetzip.codeplex.com/workitem/14087",
      "PostedDate": "2013-08-20T08:06:05.887-07:00",
      "Id": -2147483648
    }
  ]
}