diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2025-01-18 06:19:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2025-01-18 06:19:26 +0000 |
commit | 2e1b4b4780bbe42de4fbb74000a49fa657981f59 (patch) | |
tree | fea9fcea3461d7f046ea3e566be56a6e53202e9d /fast_encoder.c | |
parent | Adding upstream version 1.15~rc1. (diff) | |
download | clzip-2e1b4b4780bbe42de4fbb74000a49fa657981f59.tar.xz clzip-2e1b4b4780bbe42de4fbb74000a49fa657981f59.zip |
Adding upstream version 1.15.upstream/1.15upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fast_encoder.c')
-rw-r--r-- | fast_encoder.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fast_encoder.c b/fast_encoder.c index f55ca2c..e7a746a 100644 --- a/fast_encoder.c +++ b/fast_encoder.c @@ -1,5 +1,5 @@ /* Clzip - LZMA lossless data compressor - Copyright (C) 2010-2024 Antonio Diaz Diaz. + Copyright (C) 2010-2025 Antonio Diaz Diaz. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -153,22 +153,22 @@ bool FLZe_encode_member( FLZ_encoder * const fe, if( match_byte == cur_byte ) { - const int short_rep_price = price1( fe->eb.bm_match[state][pos_state] ) + - price1( fe->eb.bm_rep[state] ) + - price0( fe->eb.bm_rep0[state] ) + - price0( fe->eb.bm_len[state][pos_state] ); + const int shortrep_price = price1( fe->eb.bm_match[state][pos_state] ) + + price1( fe->eb.bm_rep[state] ) + + price0( fe->eb.bm_rep0[state] ) + + price0( fe->eb.bm_len[state][pos_state] ); int price = price0( fe->eb.bm_match[state][pos_state] ); if( St_is_char( state ) ) price += LZeb_price_literal( &fe->eb, prev_byte, cur_byte ); else price += LZeb_price_matched( &fe->eb, prev_byte, cur_byte, match_byte ); - if( short_rep_price < price ) + if( shortrep_price < price ) { Re_encode_bit( &fe->eb.renc, &fe->eb.bm_match[state][pos_state], 1 ); Re_encode_bit( &fe->eb.renc, &fe->eb.bm_rep[state], 1 ); Re_encode_bit( &fe->eb.renc, &fe->eb.bm_rep0[state], 0 ); Re_encode_bit( &fe->eb.renc, &fe->eb.bm_len[state][pos_state], 0 ); - state = St_set_short_rep( state ); + state = St_set_shortrep( state ); continue; } } |