use of java.util.zip.InflaterOutputStream in project voltdb by VoltDB.
the class HashinatorLite method gunzipBytes.
// copy and pasted code below from the compression service
// to avoid linking all that jazz into the client code
public static byte[] gunzipBytes(byte[] compressedBytes) throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream((int) (compressedBytes.length * 1.5));
InflaterOutputStream dos = new InflaterOutputStream(bos);
dos.write(compressedBytes);
dos.close();
return bos.toByteArray();
}
Aggregations