CompressToolA tool to losslessly compress data, and expand the compressed data again.
byte[] compress(byte[] in, String algorithm) throws SQLExceptionCompressed the data using the specified algorithm. If no algorithm is supplied, LZF is usedParameters:
in - the byte array with the original data
algorithm - the algorithm (LZF, DEFLATE)
Returns:
the compressed data
Throws:
SQLException - if a error occurs
byte[] expand(byte[] in) throws SQLExceptionExpands the compressed data.Parameters:
in - the byte array with the compressed data
Returns:
the uncompressed data
Throws:
SQLException - if a error occurs
static CompressTool getInstance()Get the singleton.Returns:
the singleton
|