public static String decompressString ( byte [ ] compressed ) throws IOException { ByteArrayInputStream is = new ByteArrayInputStream ( compressed ) ; try ( InputStream gis = new GZIPInputStream ( is ) ) { return new String ( Base64 . decode ( IOUtils . toByteArray ( gis ) ) , StandardCharsets . UTF_8 ) ; } }
Decompresses the given byte array and decodes with Base64 decoding