1
0
Fork 0

Merging upstream version 1.7~rc1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-20 20:54:52 +01:00
parent cb8306f68b
commit f559c459b4
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
17 changed files with 120 additions and 123 deletions

View file

@ -167,16 +167,15 @@ bool FLZe_encode_member( struct 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] );
int price = price0( fe->eb.bm_match[*state][pos_state] );
int short_rep_price;
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 );
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] );
if( short_rep_price < price )
{
Re_encode_bit( &fe->eb.renc, &fe->eb.bm_match[*state][pos_state], 1 );