[
  {
    "Id": "843999",
    "ThreadId": "358118",
    "Html": "\r\n<p>How to realise plainly I do not know (. Recently only has started to write on C#</p>\r\n",
    "PostedDate": "2012-06-03T00:48:02.29-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "1232752",
    "ThreadId": "358118",
    "Html": "Here is some code I recently used that seems to do the job, not sure if it is the most efficient, wpf .net framework 4.5<br />\n<pre><code>private async void ZipIt(string src, string dest)\n{\n    await Task.Run(() =&gt;\n    {\n        using (var zipFile = new ZipFile())\n        {\n            // add content to zip here \n            zipFile.AddDirectory(src);\n            zipFile.SaveProgress +=\n                (o, args) =&gt;\n                {\n                    var percentage = (int)(1.0d / args.TotalBytesToTransfer * args.BytesTransferred * 100.0d);\n                    // report your progress\n                    pbCurrentFile.Dispatcher.Invoke(\n                        System.Windows.Threading.DispatcherPriority.Normal,\n                        new Action(\n                        delegate()\n                        {\n\n                            pbCurrentFile.Value = percentage;\n                        }\n                        ));\n                };\n            zipFile.Save(dest);\n        }\n    });\n}</code></pre>\n\n",
    "PostedDate": "2014-04-10T03:37:02.423-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]