public class GZIPUtils
extends java.lang.Object
| Constructor and Description |
|---|
GZIPUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
unzip(byte[] in)
Returns an gunzipped copy of the input array.
|
static byte[] |
unzipBestEffort(byte[] in)
Returns an gunzipped copy of the input array.
|
static byte[] |
unzipBestEffort(byte[] in,
int sizeLimit)
Returns an gunzipped copy of the input array, truncated to
sizeLimit bytes, if necessary. |
static byte[] |
zip(byte[] in)
Returns an gzipped copy of the input array.
|
public static final byte[] unzipBestEffort(byte[] in)
null is returned.public static final byte[] unzipBestEffort(byte[] in,
int sizeLimit)
sizeLimit bytes, if necessary. If the gzipped input has been
truncated or corrupted, a best-effort attempt is made to unzip as much as
possible. If no data can be extracted null is returned.public static final byte[] unzip(byte[] in)
throws java.io.IOException
java.io.IOException - if the input cannot be properly decompressedpublic static final byte[] zip(byte[] in)
Copyright © 2019 The Apache Software Foundation