static String gunzipToText(String dataID) ctex { File file = loadBinarySnippet(dataID); InputStream fis = new FileInputStream(file); GZIPInputStream gis = newGZIPInputStream(fis); ByteArrayOutputStream fos = new ByteArrayOutputStream(); byte[] buffer = new byte[65536]; int len; while((len = gis.read(buffer)) != -1){ fos.write(buffer, 0, len); } fis.close(); fos.close(); return new String(fos.toByteArray(), "UTF-8"); }