title: Use zlib.js to decompress python zlib compress
body: <p>On the server side I use python zlib to compress a string as follows:</p>
  
  <pre><code>import zlib
  
  s = '{"foo": "bar"}'
  compress = zlib.compress(s)
  print compress
  </code></pre>
  
  <p>The result of the previous code is the following</p>
  
  <pre><code>xœ«VJËÏW²RPJJ,Rª
  </code></pre>
  
  <p>On the client side I use <a href="https://github.com/imaya/zlib.js/blob/develop/README.en.md" rel="nofollow noreferrer">zlib.js</a> to decompress</p>
  
  <pre><code>var s = "xœ«VJËÏW²RPJJ,Rª"
  var data = new Array(s.length);
  for (i = 0, il = s.length; i &lt; il; ++i) {
      data[i] = s.charCodeAt(i);
  }
  var inflate = new Zlib.Inflate(data);
  </code></pre>
  
  <p>I get the following error</p>
  
  <pre><code>zlib_and_gzip.min.js:1 Uncaught Error: invalid fcheck flag:28
      at new tb (zlib_and_gzip.min.js:48)
      at &lt;anonymous&gt;:1:15
  </code></pre>
  
  <p>what am I doing wrong?</p>