There is no need to compute the number of bytes to inflate, the 3rd argument here is the maximum number of bytes that outBuffer can receive.  So you can simplify your code to be:

  int r = inf.inflate(outBuffer, 0, outBuffer.length);