{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "fixed in 33895.  First binary&#58;  v1.8.4.1",
    "ClosedDate": "2009-07-01T17:37:39.577-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "I'm experiencing the following problem: When I try to zip a small file (eg. 3 bytes) and encrypt it as well I get the following error on the zip.Save statement:\n \nAn attempt was made to move the position before the beginning of the stream. () \n \nThis error does not occur when the file content is larger or when the file is 0 bytes. \n \nThis is the test case:\n \n            System.Random rnd = new System.Random();\n            byte[] buffer = new byte[3];\n            rnd.NextBytes(buffer);\n            MemoryStream source = new MemoryStream(buffer);\n            string password = Path.GetRandomFileName() + Path.GetFileNameWithoutExtension(Path.GetRandomFileName());\n            MemoryStream zippedStream = new MemoryStream();\n            ZipFile zip = new ZipFile();\n            string filename = Path.GetRandomFileName();\n            source.Seek(0, SeekOrigin.Begin);\n            Console.WriteLine(\"The output for the report <{0}> will be zipped.\", filename);\n \n            Console.WriteLine(\"The output for the report <{0}> will be encrypted with AES 256,\\nusing password <{1}>\",\n                              filename, password);\n \n            zip.Password = password;\n            zip.Encryption = EncryptionAlgorithm.WinZipAes256;\n \n            zip.AddFileStream(filename, \"\", source);\n \n            // exception\n            zip.Save(zippedStream);\n          \n            zip.Dispose();",
    "LastUpdatedDate": "2013-05-16T05:32:15.663-07:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2009-07-01T11:39:09.6-07:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "Exception on zipping and encrypting a small file",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 7967
  },
  "FileAttachments": [],
  "Comments": []
}