[
  {
    "Id": "242684",
    "ThreadId": "71159",
    "Html": "<p>Do you have any examples for unzipping a GZip file in C#?</p>",
    "PostedDate": "2009-10-06T12:43:32.837-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "242687",
    "ThreadId": "71159",
    "Html": "<p>In the <a href=\"http://cheeso.members.winisp.net/DotNetZipHelp/html/6be2fda6-50ea-f13e-f1d4-7b631f9d99f6.htm\">doc for GZipStream</a></p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre><span style=\"color:Blue\">private</span> <span style=\"color:Blue\">void</span> GunZipFile(<span style=\"color:Blue\">string</span> filename)\r\n{\r\n    <span style=\"color:Blue\">if</span> (!filename.EndsWith(&quot;.gz))\r\n        <span style=\"color:Blue\">throw</span> <span style=\"color:Blue\">new</span> ArgumentException(<span style=\"color:#A31515\">&quot;filename&quot;</span>);\r\n    <span style=\"color:Blue\">var</span> DecompressedFile = filename.Substring(0,filename.Length-3);\r\n    <span style=\"color:Blue\">byte</span>[] working = <span style=\"color:Blue\">new</span> <span style=\"color:Blue\">byte</span>[WORKING_BUFFER_SIZE];\r\n    <span style=\"color:Blue\">int</span> n= 1;\r\n    <span style=\"color:Blue\">using</span> (System.IO.Stream input = System.IO.File.OpenRead(filename))\r\n    {\r\n        <span style=\"color:Blue\">using</span> (Stream decompressor= <span style=\"color:Blue\">new</span> Ionic.Zlib.GZipStream(input, CompressionMode.Decompress, <span style=\"color:Blue\">true</span>))\r\n        {\r\n            <span style=\"color:Blue\">using</span> (<span style=\"color:Blue\">var</span> output = System.IO.File.Create(DecompressedFile))\r\n            {\r\n                <span style=\"color:Blue\">while</span> (n !=0)\r\n                {\r\n                    n= decompressor.Read(working, 0, working.Length);\r\n                    <span style=\"color:Blue\">if</span> (n &gt; 0) \r\n                    {\r\n                        output.Write(working, 0, n);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\n</pre>\r\n</div>",
    "PostedDate": "2009-10-06T12:52:10-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "242692",
    "ThreadId": "71159",
    "Html": "<p>Thank you,&nbsp; I must have missed that example.</p>",
    "PostedDate": "2009-10-06T12:58:36.547-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]