compressor.
| Modifier and Type | Class and Description |
|---|---|
| public static class | Parameters.Builder
Builder for |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final int | |
| private final int | |
| private final int | |
| private final int | |
| private final int | |
| private final int | |
| private final int | |
| public static final int | TRUE_MIN_BACK_REFERENCE_LENGTH
The hard-coded absolute minimal length of a back-reference. |
| private final int |
| Access | Constructor and Description |
|---|---|
| private | Parameters(final int windowSize, final int minBackReferenceLength, final int maxBackReferenceLength, final int maxOffset, final int maxLiteralLength, final int niceBackReferenceLength, final int maxCandidates, final boolean lazyMatching, final int lazyThreshold)
|
| Modifier and Type | Method and Description |
|---|---|
| public static Parameters. | Returns: a builder configured for the given window sizethe size of the sliding window - this determines the maximum offset a back-reference can take. Must be a power of two. windowSize)Initializes the builder for the compressor's parameters with a |
| public boolean | |
| public int | Returns: the threshold for lazy matchingGets the threshold for lazy matching. |
| public int | Returns: the maximal length of a back-reference foundGets the maximal length of a back-reference found. |
| public int | Returns: the maximum number of back-reference candidates to considerGets the maximum number of back-reference candidates to consider. |
| public int | Returns: the maximal length of a literal blockGets the maximal length of a literal block. |
| public int | Returns: the maximal offset of a back-reference foundGets the maximal offset of a back-reference found. |
| public int | Returns: the minimal length of a back-reference foundGets the minimal length of a back-reference found. |
| public int | Returns: the length of a back-reference that is considered nice enough to stop searchingGets the length of a back-reference that is considered nice enough to stop searching for longer ones. |
| public int | Returns: the size of the sliding windowGets the size of the sliding window - this determines the maximum offset a back-reference can take. |
| private static boolean |
| lazyMatching | back to summary |
|---|---|
| private final boolean lazyMatching | |
| lazyThreshold | back to summary |
|---|---|
| private final int lazyThreshold | |
| maxBackReferenceLength | back to summary |
|---|---|
| private final int maxBackReferenceLength | |
| maxCandidates | back to summary |
|---|---|
| private final int maxCandidates | |
| maxLiteralLength | back to summary |
|---|---|
| private final int maxLiteralLength | |
| maxOffset | back to summary |
|---|---|
| private final int maxOffset | |
| minBackReferenceLength | back to summary |
|---|---|
| private final int minBackReferenceLength | |
| niceBackReferenceLength | back to summary |
|---|---|
| private final int niceBackReferenceLength | |
| TRUE_MIN_BACK_REFERENCE_LENGTH | back to summary |
|---|---|
| public static final int TRUE_MIN_BACK_REFERENCE_LENGTH The hard-coded absolute minimal length of a back-reference. | |
| windowSize | back to summary |
|---|---|
| private final int windowSize | |
| Parameters | back to summary |
|---|---|
| private Parameters(final int windowSize, final int minBackReferenceLength, final int maxBackReferenceLength, final int maxOffset, final int maxLiteralLength, final int niceBackReferenceLength, final int maxCandidates, final boolean lazyMatching, final int lazyThreshold) | |
| builder | back to summary |
|---|---|
| public static Parameters. Initializes the builder for the compressor's parameters with a
It is recommended to not use this method directly but rather tune a pre-configured builder created by a format specific factory like
| |
| getLazyMatching | back to summary |
|---|---|
| public boolean getLazyMatching() Gets whether to perform lazy matching.
| |
| getLazyMatchingThreshold | back to summary |
|---|---|
| public int getLazyMatchingThreshold() Gets the threshold for lazy matching.
| |
| getMaxBackReferenceLength | back to summary |
|---|---|
| public int getMaxBackReferenceLength() Gets the maximal length of a back-reference found.
| |
| getMaxCandidates | back to summary |
|---|---|
| public int getMaxCandidates() Gets the maximum number of back-reference candidates to consider.
| |
| getMaxLiteralLength | back to summary |
|---|---|
| public int getMaxLiteralLength() Gets the maximal length of a literal block.
| |
| getMaxOffset | back to summary |
|---|---|
| public int getMaxOffset() Gets the maximal offset of a back-reference found.
| |
| getMinBackReferenceLength | back to summary |
|---|---|
| public int getMinBackReferenceLength() Gets the minimal length of a back-reference found.
| |
| getNiceBackReferenceLength | back to summary |
|---|---|
| public int getNiceBackReferenceLength() Gets the length of a back-reference that is considered nice enough to stop searching for longer ones.
| |
| getWindowSize | back to summary |
|---|---|
| public int getWindowSize() Gets the size of the sliding window - this determines the maximum offset a back-reference can take.
| |
| isPowerOfTwo | back to summary |
|---|---|
| private static boolean isPowerOfTwo(final int x) | |
Parameters instances.
| Modifier and Type | Field and Description |
|---|---|
| private Boolean | |
| private Integer | |
| private int | |
| private Integer | |
| private int | |
| private int | |
| private int | |
| private Integer | |
| private final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Parameters | |
| public Parameters. | Returns: the builderChanges the default setting for "nice back-reference length" and "maximum number of candidates" for improved compression ratio at the cost of compression speed. |
| public Parameters. | Returns: the builderChanges the default setting for "nice back-reference length" and "maximum number of candidates" for improved compression speed at the cost of compression ratio. |
| public Parameters. | Returns: the builderwhether lazy matching should be performed lazy)Sets whether lazy matching should be performed. |
| public Parameters. | Returns: the builderthe threshold for lazy matching threshold)Sets the threshold for lazy matching. |
| public Parameters. | Returns: the buildermaximal length of a back-reference found. A value smaller than maxBackReferenceLength)minBackReferenceLength is interpreted as
minBackReferenceLength. maxBackReferenceLength is capped at windowSize - 1.Sets the maximal length of a back-reference. |
| public Parameters. | Returns: the buildermaximal length of a literal block. Negative numbers and 0 as well as values bigger than maxLiteralLength)windowSize are interpreted as
windowSize.Sets the maximal length of a literal block. |
| public Parameters. | Returns: the buildermaximum number of back-reference candidates maxCandidates)Sets the maximum number of back-reference candidates that should be consulted. |
| public Parameters. | Returns: the buildermaximal offset of a back-reference. A non-positive value as well as values bigger than maxOffset)windowSize - 1 are interpreted as
windowSize
- 1 .Sets the maximal offset of a back-reference. |
| public Parameters. | Returns: the builderthe minimal length of a back-reference found. A true minimum of 3 is hard-coded inside of this implementation but
bigger lengths can be configured. minBackReferenceLength)Sets the minimal length of a back-reference. |
| public Parameters. | Returns: the builderthe "nice length" of a back-reference niceLen)Sets the "nice length" of a back-reference. |
| lazyMatches | back to summary |
|---|---|
| private Boolean lazyMatches | |
| lazyThreshold | back to summary |
|---|---|
| private Integer lazyThreshold | |
| maxBackReferenceLength | back to summary |
|---|---|
| private int maxBackReferenceLength | |
| maxCandidates | back to summary |
|---|---|
| private Integer maxCandidates | |
| maxLiteralLength | back to summary |
|---|---|
| private int maxLiteralLength | |
| maxOffset | back to summary |
|---|---|
| private int maxOffset | |
| minBackReferenceLength | back to summary |
|---|---|
| private int minBackReferenceLength | |
| niceBackReferenceLength | back to summary |
|---|---|
| private Integer niceBackReferenceLength | |
| windowSize | back to summary |
|---|---|
| private final int windowSize | |
| Builder | back to summary |
|---|---|
| private Builder(final int windowSize) | |
| build | back to summary |
|---|---|
| public Parameters build() Creates the
| |
| tunedForCompressionRatio | back to summary |
|---|---|
| public Parameters. Changes the default setting for "nice back-reference length" and "maximum number of candidates" for improved compression ratio at the cost of compression speed. Use this method after configuring "maximum back-reference length".
| |
| tunedForSpeed | back to summary |
|---|---|
| public Parameters. Changes the default setting for "nice back-reference length" and "maximum number of candidates" for improved compression speed at the cost of compression ratio. Use this method after configuring "maximum back-reference length".
| |
| withLazyMatching | back to summary |
|---|---|
| public Parameters. Sets whether lazy matching should be performed. Lazy matching means that after a back-reference for a certain position has been found the compressor will try to find a longer match for the next position. Lazy matching is enabled by default and disabled when tuning for speed.
| |
| withLazyThreshold | back to summary |
|---|---|
| public Parameters. Sets the threshold for lazy matching. Even if lazy matching is enabled it will not be performed if the length of the back-reference found for the current position is longer than this value.
| |
| withMaxBackReferenceLength | back to summary |
|---|---|
| public Parameters. Sets the maximal length of a back-reference.
It is recommended to not use this method directly but rather tune a pre-configured builder created by a format specific factory like
| |
| withMaxLiteralLength | back to summary |
|---|---|
| public Parameters. Sets the maximal length of a literal block.
It is recommended to not use this method directly but rather tune a pre-configured builder created by a format specific factory like
| |
| withMaxNumberOfCandidates | back to summary |
|---|---|
| public Parameters. Sets the maximum number of back-reference candidates that should be consulted. This settings can be used to tune the tradeoff between compression speed and compression ratio.
| |
| withMaxOffset | back to summary |
|---|---|
| public Parameters. Sets the maximal offset of a back-reference.
It is recommended to not use this method directly but rather tune a pre-configured builder created by a format specific factory like
| |
| withMinBackReferenceLength | back to summary |
|---|---|
| public Parameters. Sets the minimal length of a back-reference.
Ensures
It is recommended to not use this method directly but rather tune a pre-configured builder created by a format specific factory like
| |
| withNiceBackReferenceLength | back to summary |
|---|---|
| public Parameters. Sets the "nice length" of a back-reference. When a back-references if this size has been found, stop searching for longer back-references. This settings can be used to tune the tradeoff between compression speed and compression ratio.
| |