Java Utililty Methods Decompress Byte Array

List of utility methods to do Decompress Byte Array

Description

The list of methods to do Decompress Byte Array are organized into topic(s).

Method

StringdecompressString(byte[] compressedString)
De-compresses a GZip compressed byte array.
ByteArrayInputStream bis = new ByteArrayInputStream(compressedString);
GZIPInputStream gis;
StringBuilder sb = new StringBuilder();
try {
    gis = new GZIPInputStream(bis);
    BufferedReader br = new BufferedReader(new InputStreamReader(gis, "UTF-8"));
    String line;
    while ((line = br.readLine()) != null) {
...
StringdecompressStringFromByteArray(byte[] compressedString)
decompress String From Byte Array
StringBuilder stringBuilder = new StringBuilder();
try {
    GZIPInputStream gzipInputStream = new GZIPInputStream(new ByteArrayInputStream(compressedString));
    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(gzipInputStream, "UTF-8"));
    String line;
    while ((line = bufferedReader.readLine()) != null) {
        stringBuilder.append(line);
} catch (IOException e) {
    e.printStackTrace();
return stringBuilder.toString();