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

byte[]decompress(byte[] data)
Decompresses data.
byte[] buffer = new byte[_BUFFER_SIZE];
ByteArrayInputStream bais = null;
GZIPInputStream gis = null;
ByteArrayOutputStream baos = null;
int byteRead = 0;
try {
    bais = new ByteArrayInputStream(data);
    gis = new GZIPInputStream(bais);
...
byte[]decompress(byte[] data)
decompress
return decompress(data, data.length * 4);
byte[]decompress(byte[] data)
decompress
ByteArrayOutputStream buffer = null;
GZIPInputStream gizpInputStream = null;
try {
    buffer = new ByteArrayOutputStream();
    gizpInputStream = new GZIPInputStream(new ByteArrayInputStream(data));
    int n = -1;
    byte[] _buffer = new byte[1024 * 12];
    while (-1 != (n = gizpInputStream.read(_buffer))) {
...
byte[]decompress(byte[] data)
decompress
ByteArrayOutputStream bout = new ByteArrayOutputStream(1024);
ZipInputStream zip = new ZipInputStream(new ByteArrayInputStream(data));
try {
    while (true) {
        ZipEntry zipEntry = zip.getNextEntry();
        if (zipEntry == null)
            break;
        while (true) {
...
byte[]decompress(byte[] data, int off, int len)
decompress
byte[] output = null;
Inflater decompresser = new Inflater();
decompresser.reset();
decompresser.setInput(data, off, len);
ByteArrayOutputStream out = new ByteArrayOutputStream(data.length);
try {
    byte[] result = new byte[1024];
    while (!decompresser.finished()) {
...
byte[]decompress(byte[] data, int offset, int length)
decompress
try (ByteArrayInputStream buffer = new ByteArrayInputStream(data)) {
    try (GZIPInputStream input = new GZIPInputStream(buffer)) {
        return null;
} catch (Exception e) {
    throw new RuntimeException(e);
Stringdecompress(byte[] gzipped)
decompress
if ((gzipped == null) || (gzipped.length == 0)) {
    return "";
StringBuilder outStr = new StringBuilder();
GZIPInputStream gis = new GZIPInputStream(new ByteArrayInputStream(gzipped));
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(gis, "UTF-8"));
String line;
while ((line = bufferedReader.readLine()) != null) {
...
byte[]decompress(byte[] in)
decompress
ByteArrayOutputStream bos = null;
if (in != null) {
    ByteArrayInputStream bis = new ByteArrayInputStream(in);
    bos = new ByteArrayOutputStream();
    GZIPInputStream gis = null;
    try {
        gis = new GZIPInputStream(bis);
        byte[] buf = new byte[8192];
...
byte[]decompress(byte[] input)
decompress
if (input == null || input.length == 0) {
    return input;
Inflater inflator = new Inflater();
inflator.setInput(input);
ByteArrayOutputStream bin = new ByteArrayOutputStream(input.length);
byte[] buf = new byte[BUFFER_SIZE];
try {
...
byte[]decompress(byte[] source)
decompress
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ByteArrayInputStream bais = new ByteArrayInputStream(source);
GZIPInputStream gzipis = null;
try {
    gzipis = new GZIPInputStream(bais);
    int n;
    final int MAX_BUF = 1024;
    byte[] buf = new byte[MAX_BUF];
...