title: Compressing with Java Decompressing with PHP
body: <p>I have a situation where a servlet is providing compressed data to a PHP script. I compress the data on the Java side no problem, but PHP seems unable to decompress. </p>
  
  <p>Here is the relevent code snippets
    Java Side:</p>
  
  <pre><code>  OutputStream o=response.getOutputStream();
  
  GZIPOutputStream gz=new GZIPOutputStream(o);
  gz.write(GridCoder.encode(rs,id, perPage, page).getBytes());
  gz.close();
  o.close();
  </code></pre>
  
  <p>PHP Side:</p>
  
  <pre><code>$xml= gzuncompress($xml);
  </code></pre>
  
  <p>Can someone please point me in the right direction.</p>