title: Decompression of uploaded file with: The magic number in GZip header is not correct. Make sure you are passing in a GZip stream
body: <p>Im uploading zip file (compressed with winrar) to my server by FileUpload control. On the server I use this code to  decompress file:</p>
  
  <pre><code>HttpPostedFile myFile = FileUploader.PostedFile;
  
              using (Stream inFile = myFile.InputStream)
              {
                  using (GZipStream decompress = new GZipStream(inFile, CompressionMode.Decompress))
                  {
                      StreamReader reader = new StreamReader(decompress);
                      string text = reader.ReadToEnd(); // Here is an error
                  }
              }
  </code></pre>
  
  <p>But I get error: </p>
  
  <p>The magic number in GZip header is not correct. Make sure you are passing in a GZip stream</p>
  
  <p>Is there any way to repair this ? Im using .net 2.0</p>
  
  <p>Thank You very much for help</p>