Compressor

Each data compression algorithm must implement this interface.

Methods
int compress(byte[] in, int inLen, byte[] out, int outPos)
Compress a number of bytes.
int compress(byte[] in, int inLen, byte[] out, int outPos)
Compress a number of bytes.
Parameters:
in - the input data
inLen - the number of bytes to compress
out - the output area
outPos - the offset at the output array
Returns:
the end position
void expand(byte[] in, int inPos, int inLen, byte[] out, int outPos, int outLen)
Expand a number of compressed bytes.
void expand(byte[] in, int inPos, int inLen, byte[] out, int outPos, int outLen)
Expand a number of compressed bytes.
Parameters:
in - the compressed data
inPos - the offset at the input array
inLen - the number of bytes to read
out - the output area
outPos - the offset at the output array
outLen - the size of the uncompressed data
int getAlgorithm()
Get the compression algorithm type.
int getAlgorithm()
Get the compression algorithm type.
Returns:
the type
void setOptions(String options)
Set the compression options.
void setOptions(String options)
Set the compression options. This may include settings for higher performance but less compression.
Parameters:
options - the options

Fields
static int DEFLATE = 2
static int LZF = 1
static int NO = 0

NO = 0

No compression is used.

LZF = 1

The LZF compression algorithm is used

DEFLATE = 2

The DEFLATE compression algorithm is used.