Class: Omnizip::Algorithms::LZMA::ProbabilityModels
- Inherits:
-
Object
- Object
- Omnizip::Algorithms::LZMA::ProbabilityModels
- Defined in:
- lib/omnizip/algorithms/lzma/probability_models.rb
Overview
Container for all LZMA probability models Ported from lzma_encoder_private.h
Constant Summary collapse
- STATES =
Constants
12- POS_STATES_MAX =
16- LEN_LOW_SYMBOLS =
8- LEN_MID_SYMBOLS =
8- LEN_HIGH_SYMBOLS =
16- LEN_SYMBOLS =
272- MATCH_LEN_MIN =
2- MATCH_LEN_MAX =
273- DIST_STATES =
4- DIST_SLOTS =
64- DIST_MODEL_START =
4- DIST_MODEL_END =
14- FULL_DISTANCES =
128- ALIGN_SIZE =
16
Instance Attribute Summary collapse
-
#dist_align ⇒ Object
Returns the value of attribute dist_align.
-
#dist_slot ⇒ Object
Returns the value of attribute dist_slot.
-
#dist_special ⇒ Object
Returns the value of attribute dist_special.
-
#is_match ⇒ Object
Returns the value of attribute is_match.
-
#is_rep ⇒ Object
Returns the value of attribute is_rep.
-
#is_rep0 ⇒ Object
Returns the value of attribute is_rep0.
-
#is_rep0_long ⇒ Object
Returns the value of attribute is_rep0_long.
-
#is_rep1 ⇒ Object
Returns the value of attribute is_rep1.
-
#is_rep2 ⇒ Object
Returns the value of attribute is_rep2.
-
#literal ⇒ Object
Returns the value of attribute literal.
-
#match_len_encoder ⇒ Object
Returns the value of attribute match_len_encoder.
-
#rep_len_encoder ⇒ Object
Returns the value of attribute rep_len_encoder.
Instance Method Summary collapse
-
#initialize(lc: 3, lp: 0, pb: 2) ⇒ ProbabilityModels
constructor
A new instance of ProbabilityModels.
Constructor Details
#initialize(lc: 3, lp: 0, pb: 2) ⇒ ProbabilityModels
Returns a new instance of ProbabilityModels.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/omnizip/algorithms/lzma/probability_models.rb', line 30 def initialize(lc: 3, lp: 0, pb: 2) @lc = lc @lp = lp @pb = pb @literal = init_literal_models @is_match = init_is_match_models @is_rep = init_array(STATES, BitModel) @is_rep0 = init_array(STATES, BitModel) @is_rep1 = init_array(STATES, BitModel) @is_rep2 = init_array(STATES, BitModel) @is_rep0_long = init_is_rep0_long_models @dist_slot = init_dist_slot_models @dist_special = init_array(FULL_DISTANCES - DIST_MODEL_END, BitModel) @dist_align = init_array(ALIGN_SIZE, BitModel) end |
Instance Attribute Details
#dist_align ⇒ Object
Returns the value of attribute dist_align.
25 26 27 |
# File 'lib/omnizip/algorithms/lzma/probability_models.rb', line 25 def dist_align @dist_align end |
#dist_slot ⇒ Object
Returns the value of attribute dist_slot.
25 26 27 |
# File 'lib/omnizip/algorithms/lzma/probability_models.rb', line 25 def dist_slot @dist_slot end |
#dist_special ⇒ Object
Returns the value of attribute dist_special.
25 26 27 |
# File 'lib/omnizip/algorithms/lzma/probability_models.rb', line 25 def dist_special @dist_special end |
#is_match ⇒ Object
Returns the value of attribute is_match.
25 26 27 |
# File 'lib/omnizip/algorithms/lzma/probability_models.rb', line 25 def is_match @is_match end |
#is_rep ⇒ Object
Returns the value of attribute is_rep.
25 26 27 |
# File 'lib/omnizip/algorithms/lzma/probability_models.rb', line 25 def is_rep @is_rep end |
#is_rep0 ⇒ Object
Returns the value of attribute is_rep0.
25 26 27 |
# File 'lib/omnizip/algorithms/lzma/probability_models.rb', line 25 def is_rep0 @is_rep0 end |
#is_rep0_long ⇒ Object
Returns the value of attribute is_rep0_long.
25 26 27 |
# File 'lib/omnizip/algorithms/lzma/probability_models.rb', line 25 def is_rep0_long @is_rep0_long end |
#is_rep1 ⇒ Object
Returns the value of attribute is_rep1.
25 26 27 |
# File 'lib/omnizip/algorithms/lzma/probability_models.rb', line 25 def is_rep1 @is_rep1 end |
#is_rep2 ⇒ Object
Returns the value of attribute is_rep2.
25 26 27 |
# File 'lib/omnizip/algorithms/lzma/probability_models.rb', line 25 def is_rep2 @is_rep2 end |
#literal ⇒ Object
Returns the value of attribute literal.
25 26 27 |
# File 'lib/omnizip/algorithms/lzma/probability_models.rb', line 25 def literal @literal end |
#match_len_encoder ⇒ Object
Returns the value of attribute match_len_encoder.
25 26 27 |
# File 'lib/omnizip/algorithms/lzma/probability_models.rb', line 25 def match_len_encoder @match_len_encoder end |
#rep_len_encoder ⇒ Object
Returns the value of attribute rep_len_encoder.
25 26 27 |
# File 'lib/omnizip/algorithms/lzma/probability_models.rb', line 25 def rep_len_encoder @rep_len_encoder end |