1
0
Fork 0

Merging upstream version 1.15.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-20 21:35:19 +01:00
parent e735d4f439
commit fd935bd59c
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
27 changed files with 89 additions and 90 deletions

View file

@ -1,5 +1,5 @@
/* Lzlib - Compression library for the lzip format
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided
@ -291,7 +291,7 @@ static int LZe_sequence_optimizer( LZ_encoder * const e,
cur_state = e->trials[prev_index].state;
if( prev_index + 1 == cur ) /* len == 1 */
{
if( dis4 == 0 ) cur_state = St_set_short_rep( cur_state );
if( dis4 == 0 ) cur_state = St_set_shortrep( cur_state );
else cur_state = St_set_char( cur_state ); /* literal */
}
else if( dis4 < num_rep_distances ) cur_state = St_set_rep( cur_state );
@ -555,7 +555,7 @@ static bool LZe_encode_member( LZ_encoder * const e )
if( dis > 1 )
Re_encode_bit( &e->eb.renc, &e->eb.bm_rep2[*state], dis > 2 );
}
if( len == 1 ) *state = St_set_short_rep( *state );
if( len == 1 ) *state = St_set_shortrep( *state );
else
{
Re_encode_len( &e->eb.renc, &e->eb.rep_len_model, len, pos_state );