Class Parameters
java.lang.Object
org.apache.commons.compress.compressors.lz77support.Parameters
Parameters of the
compressor.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe hard-coded absolute minimal length of a back-reference. -
Method Summary
Modifier and TypeMethodDescriptionstatic Parameters.Builderbuilder(int windowSize) Initializes the builder for the compressor's parameters with aminBackReferenceLengthof 3 andmax*Lengthequal towindowSize - 1.booleanGets whether to perform lazy matching.intGets the threshold for lazy matching.intGets the maximal length of a back-reference found.intGets the maximum number of back-reference candidates to consider.intGets the maximal length of a literal block.intGets the maximal offset of a back-reference found.intGets the minimal length of a back-reference found.intGets the length of a back-reference that is considered nice enough to stop searching for longer ones.intGets the size of the sliding window - this determines the maximum offset a back-reference can take.
-
Field Details
-
TRUE_MIN_BACK_REFERENCE_LENGTH
The hard-coded absolute minimal length of a back-reference.- See Also:
-
-
Method Details
-
builder
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:
IllegalArgumentException- if windowSize is not a power of two.
-
getLazyMatching
Gets whether to perform lazy matching.- Returns:
- whether to perform lazy matching
-
getLazyMatchingThreshold
Gets the threshold for lazy matching.- Returns:
- the threshold for lazy matching
-
getMaxBackReferenceLength
Gets the maximal length of a back-reference found.- Returns:
- the maximal length of a back-reference found
-
getMaxCandidates
Gets the maximum number of back-reference candidates to consider.- Returns:
- the maximum number of back-reference candidates to consider
-
getMaxLiteralLength
Gets the maximal length of a literal block.- Returns:
- the maximal length of a literal block
-
getMaxOffset
Gets the maximal offset of a back-reference found.- Returns:
- the maximal offset of a back-reference found
-
getMinBackReferenceLength
Gets the minimal length of a back-reference found.- Returns:
- the minimal length of a back-reference found
-
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
Gets the size of the sliding window - this determines the maximum offset a back-reference can take.- Returns:
- the size of the sliding window
-