| java.lang.Object org.h2.tools.CompressTool
CompressTool | public class CompressTool (Code) | | A tool to losslessly compress data, and expand the compressed data again.
|
Method Summary | |
public byte[] | compress(byte[] in, String algorithm) Compressed the data using the specified algorithm. | public synchronized int | compress(byte[] in, int len, Compressor compress, byte[] out) | public byte[] | expand(byte[] in) Expands the compressed data. | public void | expand(byte[] in, byte[] out, int outPos) | public int | getCompressAlgorithm(String algorithm) | public static CompressTool | getInstance() Get the singleton. | public static InputStream | wrapInputStream(InputStream in, String compressionAlgorithm, String entryName) | public static OutputStream | wrapOutputStream(OutputStream out, String compressionAlgorithm, String entryName) |
compress | public byte[] compress(byte[] in, String algorithm) throws SQLException(Code) | | Compressed the data using the specified algorithm. If no algorithm is
supplied, LZF is used
Parameters: in - the byte array with the original data Parameters: algorithm - the algorithm (LZF, DEFLATE) the compressed data throws: SQLException - if a error occurs |
compress | public synchronized int compress(byte[] in, int len, Compressor compress, byte[] out)(Code) | | INTERNAL
|
expand | public byte[] expand(byte[] in) throws SQLException(Code) | | Expands the compressed data.
Parameters: in - the byte array with the compressed data the uncompressed data throws: SQLException - if a error occurs |
expand | public void expand(byte[] in, byte[] out, int outPos) throws SQLException(Code) | | INTERNAL
|
getInstance | public static CompressTool getInstance()(Code) | | Get the singleton.
the singleton |
|
|