{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "Not a defect.  Moved to discussions",
    "ClosedDate": "2009-07-02T05:17:53.38-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "After placing some pdf files taken from database as stream into zip file and directing it as a stram too just into browser .... there is a problem with openinig a zip file with windows compressed folders or winrar ....\nit works fine in total commander. During winrar opening one can see 0 CRC sum of pdf files ....after changing a name of the file CRC is calculated and everything works great.\n \nIt looks like there is no CRC calculated in my routine. Your help would be apreciated.\nBartZip\n \npublic byte[] GetRptFile(ArrayList rptFilesIds)\n        {\n            if (rptFilesIds.Count == 0)\n                return null;\n            \n            byte[] result=null;\n \n \n            if (rptFilesIds.Count == 1)\n            {\n                QueriesTableAdapter dtQuery = new QueriesTableAdapter(this.connectionString);\n                result = dtQuery.GetRptFile(Convert.ToInt32(rptFilesIds[0])) as byte[];\n                return result;\n            }           \n            \n            ZipFile zip = new Ionic.Zip.ZipFile();         \n   \n            zip.CompressionLevel= Ionic.Zlib.CompressionLevel.BestCompression;\n \n            \n            for (int i = 0; i < rptFilesIds.Count; i++)\n            {\n                QueriesTableAdapter dtQuery = new QueriesTableAdapter(this.connectionString);\n                result = dtQuery.GetRptFile(Convert.ToInt32(rptFilesIds[i])) as byte[];\n                               \n                \n                string folder =dtQuery.GetZipFolderName(Convert.ToInt32(rptFilesIds[i]));\n                string fileName=dtQuery.GetRptFileName(Convert.ToInt32(rptFilesIds[i])) as string;\n                \n                folder = folder.Replace(\"  \", \"\");\n                fileName = fileName.Replace(\"  \", \"\").Replace(\" \", \"_\").Replace(\".\", \"-\").Replace(\":\", \"-\") + \".pdf\";                                \n            \n                folder = null; // ;-)\n \n                MemoryStream ms = new MemoryStream(result);\n                zip.AddEntry(fileName, folder, ms);                      \n            }\n \n            MemoryStream msr = new MemoryStream();\n \n            \n            zip.Save(msr);\n            \n            byte[] zipbyte = new byte[msr.Capacity];\n \n            //msr.Position = 0;\n            \n            msr.Seek(0, SeekOrigin.Begin);\n            msr.Read(zipbyte,0,msr.Capacity);\n            \n \n            return zipbyte;\n        }",
    "LastUpdatedDate": "2013-05-16T05:32:15.943-07:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2009-07-01T00:27:04.457-07:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "Problem with opening zip file created from memory stream",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 7961
  },
  "FileAttachments": [],
  "Comments": []
}