Class Parameters
- java.lang.Object
 - 
- org.apache.commons.compress.compressors.lz77support.Parameters
 
 
- 
public final class Parameters extends java.lang.ObjectParameters of thecompressor. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParameters.BuilderBuilder forParametersinstances. 
- 
Field Summary
Fields Modifier and Type Field Description static intTRUE_MIN_BACK_REFERENCE_LENGTHThe hard-coded absolute minimal length of a back-reference. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Parameters.Builderbuilder(int windowSize)Initializes the builder for the compressor's parameters with aminBackReferenceLengthof 3 andmax*Lengthequal towindowSize - 1.booleangetLazyMatching()Gets whether to perform lazy matching.intgetLazyMatchingThreshold()Gets the threshold for lazy matching.intgetMaxBackReferenceLength()Gets the maximal length of a back-reference found.intgetMaxCandidates()Gets the maximum number of back-reference candidates to consider.intgetMaxLiteralLength()Gets the maximal length of a literal block.intgetMaxOffset()Gets the maximal offset of a back-reference found.intgetMinBackReferenceLength()Gets the minimal length of a back-reference found.intgetNiceBackReferenceLength()Gets the length of a back-reference that is considered nice enough to stop searching for longer ones.intgetWindowSize()Gets the size of the sliding window - this determines the maximum offset a back-reference can take. 
 - 
 
- 
- 
Field Detail
- 
TRUE_MIN_BACK_REFERENCE_LENGTH
public static final int TRUE_MIN_BACK_REFERENCE_LENGTH
The hard-coded absolute minimal length of a back-reference.- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
builder
public static Parameters.Builder builder(int windowSize)
Initializes the builder for the compressor's parameters with aminBackReferenceLengthof 3 andmax*Lengthequal towindowSize - 1.It is recommended to not use this method directly but rather tune a pre-configured builder created by a format specific factory like
SnappyCompressorOutputStream.createParameterBuilder(int).- Parameters:
 windowSize- the size of the sliding window - this determines the maximum offset a back-reference can take. Must be a power of two.- Returns:
 - a builder configured for the given window size
 - Throws:
 java.lang.IllegalArgumentException- if windowSize is not a power of two.
 
- 
getLazyMatching
public boolean getLazyMatching()
Gets whether to perform lazy matching.- Returns:
 - whether to perform lazy matching
 
 
- 
getLazyMatchingThreshold
public int getLazyMatchingThreshold()
Gets the threshold for lazy matching.- Returns:
 - the threshold for lazy matching
 
 
- 
getMaxBackReferenceLength
public int getMaxBackReferenceLength()
Gets the maximal length of a back-reference found.- Returns:
 - the maximal length of a back-reference found
 
 
- 
getMaxCandidates
public int getMaxCandidates()
Gets the maximum number of back-reference candidates to consider.- Returns:
 - the maximum number of back-reference candidates to consider
 
 
- 
getMaxLiteralLength
public int getMaxLiteralLength()
Gets the maximal length of a literal block.- Returns:
 - the maximal length of a literal block
 
 
- 
getMaxOffset
public int getMaxOffset()
Gets the maximal offset of a back-reference found.- Returns:
 - the maximal offset of a back-reference found
 
 
- 
getMinBackReferenceLength
public int getMinBackReferenceLength()
Gets the minimal length of a back-reference found.- Returns:
 - the minimal length of a back-reference found
 
 
- 
getNiceBackReferenceLength
public int getNiceBackReferenceLength()
Gets the length of a back-reference that is considered nice enough to stop searching for longer ones.- Returns:
 - the length of a back-reference that is considered nice enough to stop searching
 
 
- 
getWindowSize
public int getWindowSize()
Gets the size of the sliding window - this determines the maximum offset a back-reference can take.- Returns:
 - the size of the sliding window
 
 
 - 
 
 -