* @throws IOException
*/
public static byte[] decompress(byte[] compressedData) throws IOException {
ByteArrayInputStream bis = new ByteArrayInputStream(compressedData);
GZIPInputStream in = new GZIPInputStream(bis);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
byte[] transferBuffer = new byte[4096];
int read = 0;
do {
read = in.read(transferBuffer);
if (read != -1) {
bos.write(transferBuffer, 0, read);
}
} while (read != -1);
in.close();
in.close();
bos.close();
return bos.toByteArray();
}