Android Utililty Methods ByteBuffer Ungzip

List of utility methods to do ByteBuffer Ungzip

Description

The list of methods to do ByteBuffer Ungzip are organized into topic(s).

Method

StringuncompressGZip(ByteBuffer bytes)
uncompress G Zip
GZIPInputStream gzipInputStream = new GZIPInputStream(
        new ByteArrayInputStream(bytes.array()));
OutputStream out = new ByteArrayOutputStream();
byte[] buf = new byte[1024];
int len;
while ((len = gzipInputStream.read(buf)) > 0) {
    out.write(buf, 0, len);
gzipInputStream.close();
out.close();
String res = out.toString();
Log.i("ZipUtil", "## unpacked length: "
        + getKilobytes(res.length()));
return res;
StringuncompressGZip(ByteBuffer bytes)
uncompress G Zip
Log.w("ZipUtil",
        "## packed length: " + getKilobytes(bytes.capacity()));
GZIPInputStream gzipInputStream = new GZIPInputStream(
        new ByteArrayInputStream(bytes.array()));
OutputStream out = new ByteArrayOutputStream();
byte[] buf = new byte[1024];
int len;
while ((len = gzipInputStream.read(buf)) > 0) {
...