title: Javascript gzip decompression
body: <p>I want do decompress images in JavaScript. I have compressed the images with C# using <em>gzip</em>. How do I decompress <em>gzipped</em> data in JavaScript?</p>
  
  <p>C# code</p>
  
  <pre><code>public static byte[] Compress(byte[] raw)
  {
      using (MemoryStream memory = new MemoryStream())
      {
          using (GZipStream gzip = new GZipStream(memory, CompressionMode.Compress, true))
          {
              gzip.Write(raw, 0, raw.Length);
          }
          return memory.ToArray();
      }
  }
  </code></pre>