Module: Omnizip::Algorithms::LZMA::Constants
- Included in:
- DistanceCoder, Encoder, LengthCoder, LengthEncoder, LiteralDecoder, LiteralEncoder, RangeCoder, XzBufferedRangeEncoder::Probability, XzEncoder, XzEncoderFast, XzMatchFinderAdapter, XzPriceCalculator, XzProbabilityModels, XzRangeEncoder, XzUtilsDecoder, Implementations::SevenZip::LZMA::Decoder, Implementations::SevenZip::LZMA::Encoder, Implementations::SevenZip::LZMA::MatchFinder, Implementations::SevenZip::LZMA::RangeDecoder, Implementations::SevenZip::LZMA::RangeEncoder, Implementations::XZUtils::LZMA2::Encoder
- Defined in:
- lib/omnizip/algorithms/lzma/constants.rb
Overview
LZMA algorithm constants
This module contains all constants used by the LZMA algorithm, including range coding parameters, probability models, and compression limits.
Constant Summary collapse
- TOP =
Range coder constants TOP: Threshold for range normalization (2^24)
0x01000000- BIT_MODEL_TOTAL =
BIT_MODEL_TOTAL: Total probability range for bit models (2^11)
0x800- MOVE_BITS =
BIT_MODEL_MOVE_BITS: Number of bits to shift for prob updates
5- INIT_PROBS =
INIT_PROBS: Initial probability value (0.5 probability)
BIT_MODEL_TOTAL >> 1
- NUM_DIRECT_BITS =
Number of bits used in direct bit encoding
8- NUM_LIT_POS_BITS_MAX =
LZMA state constants Number of position bits for literal context (lp)
4- NUM_LIT_CONTEXT_BITS_MAX =
Number of literal context bits (lc)
8- NUM_POS_BITS_MAX =
Number of position bits (pb)
4- NUM_STATES =
Number of LZMA states (from state machine)
12- DICT_SIZE_MIN =
Dictionary size limits
1 << 12
- DICT_SIZE_MAX =
4KB
1 << 30
- MATCH_LEN_MIN =
Match length constants
2- MATCH_LEN_MAX =
273- NUM_DIST_SLOTS =
Number of distance slots
64- POS_STATES_MAX =
Position states
1 << NUM_POS_BITS_MAX
- LIT_SIZE_MAX =
Literal coder size
(1 << (NUM_LIT_POS_BITS_MAX + NUM_LIT_CONTEXT_BITS_MAX))
- NUM_LEN_TO_POS_STATES =
Number of length to position states
4- COMPRESSION_LEVEL_MIN =
Compression levels
0- COMPRESSION_LEVEL_MAX =
9- COMPRESSION_LEVEL_DEFAULT =
5- EOS_MARKER =
End of stream marker
true- NUM_LEN_LOW_BITS =
SDK-specific encoding constants Length encoding constants
3- NUM_LEN_MID_BITS =
3- NUM_LEN_HIGH_BITS =
8- LEN_LOW_SYMBOLS =
1 << NUM_LEN_LOW_BITS
- LEN_MID_SYMBOLS =
1 << NUM_LEN_MID_BITS
- LEN_HIGH_SYMBOLS =
1 << NUM_LEN_HIGH_BITS
- NUM_DIST_SLOT_BITS =
Distance encoding constants
6- DIST_ALIGN_BITS =
4- DIST_ALIGN_SIZE =
1 << DIST_ALIGN_BITS
- START_POS_MODEL_INDEX =
4- END_POS_MODEL_INDEX =
14- NUM_FULL_DISTANCES =
1 << (END_POS_MODEL_INDEX >> 1)
- DIST_SLOT_FAST_LIMIT =
Distance slot calculation helper
1 << (NUM_DIST_SLOT_BITS + 1)