here's an example of how it's done in standard java
link
which doesn't differ greatly from gZip reading of inputStream
Code:
StringBuffer rawResponse = new StringBuffer();
InputStream inputStream = //some input stream
GZIPInputStream gzipInputStream = new GZIPInputStream(inputStream);
while (-1 != (length = gzipInputStream.read(responseData))) {
rawResponse.append(new String(responseData, 0, length));
}