summaryrefslogtreecommitdiffstats
path: root/lzip.h
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-06 11:40:25 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-06 11:40:25 +0000
commit90cd6e9b8b41a5418b87ab3f4832fdcc3cf2c3f5 (patch)
treea728c7e31e9a10563bdf13b21214f69e9d575f04 /lzip.h
parentAdding debian version 1.5~rc1-1. (diff)
downloadclzip-90cd6e9b8b41a5418b87ab3f4832fdcc3cf2c3f5.tar.xz
clzip-90cd6e9b8b41a5418b87ab3f4832fdcc3cf2c3f5.zip
Merging upstream version 1.5.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r--lzip.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/lzip.h b/lzip.h
index 6f11a75..ae4bbf4 100644
--- a/lzip.h
+++ b/lzip.h
@@ -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 ) ); }