Android Utililty Methods GZip String

List of utility methods to do GZip String

Description

The list of methods to do GZip String are organized into topic(s).

Method

Stringcompress(String str)
compress
if (str == null || str.length() == 0) {
    return str;
ByteArrayOutputStream out = new ByteArrayOutputStream();
GZIPOutputStream gzip = new GZIPOutputStream(out);
gzip.write(str.getBytes());
gzip.close();
return out.toString("ISO-8859-1");
...
Stringuncompress(String str)
uncompress
if (str == null || str.length() == 0) {
    return str;
ByteArrayInputStream in = new ByteArrayInputStream(
        str.getBytes("UTF-8"));
return uncompress(in);