diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 13:48:19 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 13:48:19 +0000 |
commit | f84d656826e79b4c73e42656005c34a80c9bff86 (patch) | |
tree | 445c47ac2fbbf07c76f30ef998e1ff653a99dd2c /lzip.h | |
parent | Adding upstream version 1.4~rc2. (diff) | |
download | lzlib-f84d656826e79b4c73e42656005c34a80c9bff86.tar.xz lzlib-f84d656826e79b4c73e42656005c34a80c9bff86.zip |
Adding upstream version 1.4.upstream/1.4
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
@@ -104,6 +104,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 ); + } + /* Table of CRCs of all 8-bit messages. */ static const uint32_t crc32[256] = |