title: How to decompress a byte Array in Java
body: <p>Can anybody tell me how to decompress a byte array?</p>
  
  <p>Here is my code. I have been trying it for ages and it is giving me a <code>DataFormatException</code>.</p>
  
  <pre><code>byte bArray[] = new byte[tSizeOfTile];
  input.read(bArray, offset, limit);
  
  byte[] unComp = new byte[bArray.length + 100];
  
  Inflater inflate = new Inflater();
  inflate.setInput(bArray);
  inflate.inflate(unComp, offset, bArray.length + 100);
  inflate.end();
  </code></pre>