[
  {
    "Id": "247250",
    "ThreadId": "72415",
    "Html": "<p>Just wondering if there are any methods which can be used for compressing images such as emf/wmf file and strings.</p>\r\n<p>Thanks</p>\r\n<p>N</p>",
    "PostedDate": "2009-10-19T05:35:46.563-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "247401",
    "ThreadId": "72415",
    "Html": "<p>Yes, for example there are CompressString and CompressBuffer methods on each of the GZipStream, DeflateStream, and ZlibStream classes in the Ionic.Zlib namespace within DotNetZip.&nbsp; Links to the doc:</p>\r\n<p><a href=\"http://cheeso.members.winisp.net/DotNetZipHelp/html/25cea5a4-b09c-9b1d-3e8a-fffe52ef925e.htm\">ZlibStream.CompressString</a><br><a href=\"http://cheeso.members.winisp.net/DotNetZipHelp/html/cc034f7c-02da-925d-f063-81fc992b1c11.htm\">ZlibStream.CompressBuffer</a><br><a href=\"http://cheeso.members.winisp.net/DotNetZipHelp/html/20d46978-4148-0e71-01e5-b93e4857f673.htm\">GZipStream.CompressString</a><br><a href=\"http://cheeso.members.winisp.net/DotNetZipHelp/html/75312a87-b6cb-2db6-904d-f90808a723ae.htm\">GZipStream.CompressBuffer</a><br><a href=\"http://cheeso.members.winisp.net/DotNetZipHelp/html/b1d910c8-a036-dc5d-321e-c2d63e724130.htm\">DeflateStream.CompressString</a><br><a href=\"http://cheeso.members.winisp.net/DotNetZipHelp/html/612f55f5-ef7c-0f8c-9c0d-1a8a45851bd7.htm\">DeflateStream.CompressBuffer</a></p>\r\n<p>What's the scenario?</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-10-19T11:59:48.157-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "248935",
    "ThreadId": "72415",
    "Html": "<p>Hi Cheeso</p>\r\n<p>Here is the scenario:</p>\r\n<p>I have a string which is converted to Base64string and i am trying to send it via a webservice to a client.</p>\r\n<p>Will anyone of the above methods be ok or is there a preferred one.</p>\r\n<p>Thanks</p>\r\n<p>N</p>",
    "PostedDate": "2009-10-23T03:15:24.957-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "248992",
    "ThreadId": "72415",
    "Html": "<p>hmmm, &nbsp;&quot;a string converted to a base64string&quot;?&nbsp;&nbsp;&nbsp;&nbsp; A base64string is a base64 string-encoded version of a byte array, right?&nbsp;&nbsp; It is normally used as a mechanism for encoding of binary data, so that it can be transmitted as text, say... in a webservices call.&nbsp;&nbsp;</p>\r\n<p>You cannot, therefore, compress a base64string.&nbsp; Well you can, but it doesn't make sense to do so.&nbsp;&nbsp; What you get from compressing a base64string is a byte array, which then needs to be encoded into a string again.&nbsp; Which is likely just as large as the original.&nbsp; You see, it doesn't make sense to do it in that order.</p>\r\n<p>I think what you may want to do is compress the byte array *before* it is encoded as a base64string.&nbsp;&nbsp; When you compress a byte array, you get... a smaller byte array.&nbsp; then when encoded for transmission it becomes a base64string, as in the original, uncompressed version of things, but smaller than the original base64string.</p>\r\n<p>Any of those methods will work just fine.&nbsp; The DeflateStream will produce the smallest result.</p>\r\n<p>Good luck.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-10-23T06:44:58.37-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]