diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 13:48:27 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 13:48:27 +0000 |
commit | 4da07136ac4461ad1ba6113f5772e2c0a6468b49 (patch) | |
tree | ce21d421f4b44db833a4f4d48c6ef5310f6fa1bc /lzip.h | |
parent | Adding debian version 1.4~rc2-1. (diff) | |
download | lzlib-4da07136ac4461ad1ba6113f5772e2c0a6468b49.tar.xz lzlib-4da07136ac4461ad1ba6113f5772e2c0a6468b49.zip |
Merging upstream version 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] = |