{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "",
    "ClosedDate": null,
    "CommentCount": 0,
    "Custom": null,
    "Description": "Hello,\n\nI am using below code to zip the performance log files(.blg).\nHowever ocassionally I am getting the error as \"destination file not found\" (or) CRC error(with winzip) when extracting the zip files. \nCould you pls help me why sometimes the zip files are getting corrupted occasionally?\n\ncode:\nHRESULT hr = zipFilePtr.CreateInstance(__uuidof(ZipFile));\t\t\n\tHRESULT hr2 = zipEntryPtr.CreateInstance(__uuidof(ZipEntry));\t\n\t\n\tzipFilePtr->Initialize(_bstr_t(m_ArchivePath));\n\tzipFilePtr->put_Comment(_bstr_t(m_Comment));\n\t\n\n\t\n\tzipFilePtr->AddFile_2(_bstr_t(m_FileList[i].c_str()), _bstr_t(\"\"), &zipEntryPtr);\n\t\t\t\t\n\t\n\n\tlistSize = m_ExcludeList.size();\n\tlong nNumEntries = 0;\n\tfor (size_t i=0; i<listSize; i++)\n\t{\n\t\tzipFilePtr->RemoveSelectedEntries(_bstr_t(m_ExcludeList[i].c_str()), &nNumEntries);\n\t}\n\n\tzipFilePtr->Save();\n\t\n\tm_FileList.clear();\n\tm_ExcludeList.clear();\n\tm_TargetPath = \"\";",
    "LastUpdatedDate": "2014-10-13T03:32:16.04-07:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Unassigned",
      "Severity": 0,
      "Id": 0
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2014-10-12T23:28:59.237-07:00",
    "Status": {
      "Name": "Proposed",
      "Id": 1
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "Dotnet Zip extraction issue",
    "Type": {
      "Name": "Unassigned",
      "Id": 5
    },
    "VoteCount": 1,
    "Id": 17050
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "If you're getting an intermittent CRC error when you try to unzip then it's possibly related to the size of your source file. There's a known bug in the parallel deflate code used by DotNetZip - it creates a corrupt zip file if the source file is a multiple of 64kb.\r\n\r\nSee https://dotnetzip.codeplex.com/workitem/14087 for full details.\r\n\r\nThe workaround in this case is to disable parallel deflate using \"zip.ParallelDeflateThreshold = -1\".\r\n\r\nIf that doesn't solve your problem I'm afraid I don't have any other suggestions.\r\n\r\nCheers,\r\n\r\nMike",
      "PostedDate": "2014-10-13T00:11:04.243-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Hi Mike ,\nThanks for the workaround.\nI am using ioniczip in c++ via COM calls.\r\n\r\nSo is the below call is what I should be using for workaround as you have suggested?  \nzip->put_ParallelDeflateThreshold(-1); \r\n\r\n\nThanks,\nrln.",
      "PostedDate": "2014-10-13T03:32:16.04-07:00",
      "Id": -2147483648
    }
  ]
}