I can find plenty of functions that let you decompress a GZip file, but how do I decompress a GZip string?
I\'m trying to parse a HTTP response where the response body i
May be this helps :
try (final GZIPInputStream gzipInput = new GZIPInputStream(new ByteArrayInputStream(compressedByteArray));
final StringWriter stringWriter = new StringWriter()) {
org.apache.commons.io.IOUtils.copy(gzipInput, stringWriter, "UTF_8");
String decodedString = stringWriter.toString();
} catch (IOException e) {
throw new UncheckedIOException("Error while decompression!", e);
}