[
  {
    "Id": "1477634",
    "ThreadId": "655989",
    "Html": "Hi experts,<br />\n<pre><code>  I am unzipping the file. The file is gzip. I am using GZipStream with CompressionMode.Decompress\n</code></pre>\n\nIt is working means extracting the file but only top 10 lines only. If I extract manually with 7gip, the file is extracted full with the size 58MB. Using the code, it is extracting only 10KB or like that.\r<br />\n<br />\nIt's not giving any error but just extracting only small portion of the file.\r<br />\n<br />\nHow can I debug? What could be the issue? It is working well previously. I don't know what is the difference between old and new files. It's not generating any errors.\r<br />\n<br />\nIf I manually unzip and zip again, the code working well.\r<br />\n<br />\nMy code as below\r<br />\n<br />\n Dim DecompressedFile As String = NewZipFile.Substring(0, NewZipFile.Length - 3)<br />\n<pre><code>        Dim working(2048) As Byte\n        Dim n As Integer = 1\n        Using input As Stream = File.OpenRead(NewZipFile)\n            Using decompressor As Stream = New Ionic.Zlib.GZipStream(input, CompressionMode.Decompress, True)\n\n                Using output As Stream = File.Create(DecompressedFile)\n                    Do\n                        n = decompressor.Read(working, 0, working.Length)\n\n                        If n &gt; 0 Then\n                            output.Write(working, 0, n)\n                        End If\n                    Loop While (n &gt; 0)\n                End Using\n            End Using\n        End Using</code></pre>\n\n",
    "PostedDate": "2016-06-29T06:38:14.537-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]