title: Decompress gzip and zlib string in javascript
body: <p>I want to get compress layer data from tmx file . Who knows libraries for decompress gzip and zlib string in javascript ? I try <a href="https://github.com/imaya/zlib.js">zlib</a> but it doesn't work for me . Ex , layer data in tmx file is :</p>
  
  <pre><code>  &lt;data encoding="base64" compression="zlib"&gt;
         eJztwTEBAAAAwqD1T20JT6AAAHgaCWAAAQ==
    &lt;/data&gt;
  </code></pre>
  
  <p>My javascript code is </p>
  
  <pre><code>var base64Data = "eJztwTEBAAAAwqD1T20JT6AAAHgaCWAAAQ==";
  var compressData = atob(base64Data);
  var inflate = new Zlib.Inflate(compressData);
  var output = inflate.decompress();
  </code></pre>
  
  <p>It runs with displays message error "unsupported compression method" . But I try decompress with online tool as <a href="http://i-tools.org/gzip">http://i-tools.org/gzip</a> , it returns correct string.</p>