diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-06 11:37:40 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-06 11:37:40 +0000 |
commit | c33e1de813af248d4249725ac859dd3a26393704 (patch) | |
tree | 2a277fd093d46566d11b96d68ee4b9ba950e96be /lzip.h | |
parent | Adding upstream version 1.4. (diff) | |
download | clzip-c33e1de813af248d4249725ac859dd3a26393704.tar.xz clzip-c33e1de813af248d4249725ac859dd3a26393704.zip |
Adding upstream version 1.5~pre1.upstream/1.5_pre1
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r-- | lzip.h (renamed from clzip.h) | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -94,6 +94,24 @@ static inline void Bm_init( Bit_model * const probability ) static inline void Bm_array_init( Bit_model * const p, const int size ) { int i = 0; while( i < size ) p[i++] = bit_model_total / 2; } +struct Len_model + { + Bit_model choice1; + Bit_model choice2; + Bit_model bm_low[pos_states][len_low_symbols]; + Bit_model bm_mid[pos_states][len_mid_symbols]; + Bit_model bm_high[len_high_symbols]; + }; + +static inline void Lm_init( struct Len_model * const lm ) + { + Bm_init( &lm->choice1 ); + Bm_init( &lm->choice2 ); + Bm_array_init( lm->bm_low[0], pos_states * len_low_symbols ); + Bm_array_init( lm->bm_mid[0], pos_states * len_mid_symbols ); + Bm_array_init( lm->bm_high, len_high_symbols ); + } + struct Pretty_print { |