{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "wrong project.",
    "ClosedDate": "2009-07-19T09:02:52.257-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "i have an automated process that traverses a grouping of folders and archives the files to zip.  in this one case, i had 8677 files spread across 14 folders, my process is such that I create one zip per folder.  for the entire directory that contains the 14 directories with 8677 files the total size is 11.8 GB.  The strange thing is that my application is a console and I can see things being written out to the console that I'm not writing \"System.OutOfMemoryException\".  \n \nI was on the 9th folder with 947 files and 6 GB in the file - this one folder was going to go into just one zip file.  I can't tell at what point it fails - as i'm using ICSharpCode.SharpZipLib DLL.  Version:  0.85.5.452\n \nMy next step for debugging purposes, i'm downloading just this one folder to my local PC and going to run the zip just on that one folder.  It should be possible to see what the \"limit\" is that I'm reaching.\n \n \ncode is straight forward from some of the examples i've found:\n \nusing (ZipOutputStream s = new ZipOutputStream(File.Create(zipFileName)))\n            {\n                s.SetLevel(9); // 0 - store only to 9 - means best compression\n \n                byte[] buffer = new byte[4096]; // 2048\n \n                foreach (FileInfo fileInfo in fileInfos)\n                {\n \n                    // Using GetFileName makes the result compatible with XP\n                    // as the resulting path is not absolute.\n                    ZipEntry entry = new ZipEntry(Path.GetFileName(fileInfo.FullName));\n \n                    // Setup the entry data as required.\n                    entry.Size = fileInfo.Length;\n                    entry.DateTime = fileInfo.LastWriteTime;\n \n                    // track our totalsize for this particular zip file (pre-zip)\n                    totalSize += fileInfo.Length;\n \n                    s.PutNextEntry(entry);\n \n                    using (FileStream fs = File.OpenRead(fileInfo.FullName))\n                    {\n                        // Using a fixed size buffer here makes no noticeable difference for output\n                        // but keeps a lid on memory usage.\n                        int sourceBytes;\n                        do\n                        {\n                            sourceBytes = fs.Read(buffer, 0, buffer.Length);\n                            s.Write(buffer, 0, sourceBytes);\n                        } while (sourceBytes > 0);\n                    }\n \n \n                    zippedFiles++;\n                }\n \n                // Finish/Close arent needed strictly as the using statement does this automatically\n \n                // Finish is important to ensure trailing information for a Zip file is appended.  Without this\n                // the created file would be invalid.\n                s.Finish();\n \n                // not entirely necessary due to the using, but good practice\n                s.Close();\n                s.Dispose();\n            }",
    "LastUpdatedDate": "2013-05-16T05:32:14.757-07:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2009-07-14T14:37:37.06-07:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "System.OutOfMemoryException when zipping multiple large files",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 8016
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "Hmmm,  I can see the problem right away.  The problem is, you are using SharpZipLib.  You need to be using DotNetZip.  ps:  Just so you know: It seems that you are in the wrong place.  This workitem management system supports DotNetZip - use it to report problems or request features with DotNetZip.  You appear to be using something else.  you need to find the forum for SharpZipLib if you want help with that. \r\n",
      "PostedDate": "2009-07-14T20:21:29.403-07:00",
      "Id": -2147483648
    },
    {
      "Message": "hah.  sorry bout that!",
      "PostedDate": "2009-07-15T05:41:13.477-07:00",
      "Id": -2147483648
    },
    {
      "Message": "well, looks like i might switch over to your version!!  (the confusion lies in the fact that i thought that the software had switched names)\r\n\r\nagain, thanks.",
      "PostedDate": "2009-07-15T05:47:02.647-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2009-07-19T09:02:52.257-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:44:08.977-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:32:14.757-07:00",
      "Id": -2147483648
    }
  ]
}