1
0
Fork 0

Merging upstream version 1.4.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-17 22:12:30 +01:00
parent bdf9e52c86
commit 7a2627044c
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
9 changed files with 26 additions and 29 deletions

9
lzip.h
View file

@ -54,6 +54,7 @@ enum {
pos_states = 1 << pos_state_bits,
pos_state_mask = pos_states - 1,
len_states = 4,
dis_slot_bits = 6,
start_dis_model = 4,
end_dis_model = 14,
@ -71,12 +72,10 @@ enum {
min_match_len = 2, /* must be 2 */
max_match_len = min_match_len + max_len_symbols - 1, /* 273 */
min_match_len_limit = 5,
min_match_len_limit = 5 };
max_dis_states = 4 };
static inline int get_dis_state( const int len )
{ return min( len - min_match_len, max_dis_states - 1 ); }
static inline int get_len_state( const int len )
{ return min( len - min_match_len, len_states - 1 ); }
static inline int get_lit_state( const uint8_t prev_byte )
{ return ( prev_byte >> ( 8 - literal_context_bits ) ); }