code: public static ByteArrayHolder zlibUncompressBuffer(byte[] bytes, int length,
        Integer uncompressedLen) throws
        IOException, DataFormatException, FileParsingException {
  
      Inflater inflater = new Inflater();
      inflater.setInput(bytes, 0, length);
      int bufSize = uncompressedLen == null ? length * 2 : uncompressedLen;
  
      ByteArrayHolder bah = null;
      try {
        bah = pool.borrowObject();
      } catch (Exception e) {
        throw new FileParsingException("Could not borrow ByteArrayHolder from the pool.", e);
      }
  
      try {
        // Decompress the data
        int pos = 0;
        // at the beginning we can afford to just allocate a new buffer, if the one we got was not enough
        bah.ensureCapacity(bufSize, false);
        while (!inflater.finished()) {
          if (pos != 0) {
            // when pos>0, it means we were not able to decompress the whole thing
            // in one iteration, meaning there is something left in the input buffer
            // but most likely not much, so we won't be overzealous about
            // additional space allocation
            //System.out.println("RAN OUT OF SPACE IN INFLATER!");
            bah.ensureHasSpace(length / 2);
          }
          pos += inflater.inflate(bah.getUnderlyingBytes(), pos, bah.getCapacityLeft());
          bah.setPosition(pos);
        }
  
      } finally {
        inflater.end();
      }
      return bah;
    }
docs: Inflates zLib compressed byte[].
  
  @param bytes zLib compressed bytes in a holder, with properly set position
  @param length length of data in the input array to be used
  @param uncompressedLen length of data in bytes when uncompressed. Optional.
  @return inflated byte array, which is borrowed from pool ({@link #getPool() }). You MUST return
  the byte holder back to the pool after usage.
  @throws IOException should never happen, ByteArrayOutputStream is in-memory
  @throws DataFormatException in case of malformed input byte array