Top Description Fields Constructors Methods
org.h2.compress

public Class CompressDeflate

extends Object
implements Compressor
Class Inheritance
All Implemented Interfaces
org.h2.compress.Compressor
Imports
java.util.StringTokenizer, java.util.zip.DataFormatException, .Deflater, .Inflater, org.h2.api.ErrorCode, org.h2.mvstore.DataUtils

This is a wrapper class for the Deflater class. This algorithm supports the following options: See also java.util.zip.Deflater for details.

Field Summary

Modifier and TypeField and Description
private int
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
compress(byte[]
the input data
in
,
int
the offset at the input array
inPos
,
int
the number of bytes to compress
inLen
,
byte[]
the output area
out
,
int
the offset at the output array
outPos
)

Implements org.h2.compress.Compressor.compress.

Compress a number of bytes.

public void
expand(byte[]
the compressed data
in
,
int
the offset at the input array
inPos
,
int
the number of bytes to read
inLen
,
byte[]
the output area
out
,
int
the offset at the output array
outPos
,
int
the size of the uncompressed data
outLen
)

Implements org.h2.compress.Compressor.expand.

Expand a number of compressed bytes.

public int
getAlgorithm()

Implements org.h2.compress.Compressor.getAlgorithm.

Get the compression algorithm type.

public void
setOptions(String
the options
options
)

Implements org.h2.compress.Compressor.setOptions.

Set the compression options.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

levelback to summary
private int level
strategyback to summary
private int strategy

Constructor Detail

CompressDeflateback to summary
public CompressDeflate()

Method Detail

compressback to summary
public int compress(byte[] in, int inPos, int inLen, byte[] out, int outPos)

Implements org.h2.compress.Compressor.compress.

Doc from org.h2.compress.Compressor.compress.

Compress a number of bytes.

Parameters
in:byte[]

the input data

inPos:int

the offset at the input array

inLen:int

the number of bytes to compress

out:byte[]

the output area

outPos:int

the offset at the output array

Returns:int

the end position

Annotations
@Override
expandback to summary
public void expand(byte[] in, int inPos, int inLen, byte[] out, int outPos, int outLen)

Implements org.h2.compress.Compressor.expand.

Doc from org.h2.compress.Compressor.expand.

Expand a number of compressed bytes.

Parameters
in:byte[]

the compressed data

inPos:int

the offset at the input array

inLen:int

the number of bytes to read

out:byte[]

the output area

outPos:int

the offset at the output array

outLen:int

the size of the uncompressed data

Annotations
@Override
getAlgorithmback to summary
public int getAlgorithm()

Implements org.h2.compress.Compressor.getAlgorithm.

Doc from org.h2.compress.Compressor.getAlgorithm.

Get the compression algorithm type.

Returns:int

the type

Annotations
@Override
setOptionsback to summary
public void setOptions(String options)

Implements org.h2.compress.Compressor.setOptions.

Doc from org.h2.compress.Compressor.setOptions.

Set the compression options. This may include settings for higher performance but less compression.

Parameters
options:String

the options

Annotations
@Override