public static String decompress(String gzString) { ByteArrayInputStream gzStream = new ByteArrayInputStream(gzString.getBytes()); BufferedReader in2 = new BufferedReader( new InputStreamReader( New GZIPInputStream(gzStream))); String s; while ((s = in2.readLine()) != null) { System.out.println(s); } }