summaryrefslogtreecommitdiffstats
path: root/lzip.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lzip.h (renamed from clzip.h)18
1 files changed, 18 insertions, 0 deletions
diff --git a/clzip.h b/lzip.h
index dd63438..1996e97 100644
--- a/clzip.h
+++ b/lzip.h
@@ -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
{