1
0
Fork 0

Adding upstream version 1.15~pre1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-21 11:16:33 +01:00
parent c78d56fd7a
commit 0ff20a5602
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
36 changed files with 793 additions and 495 deletions

View file

@ -176,11 +176,11 @@ public:
match_byte <<= 1;
const int match_bit = match_byte & 0x100;
const int bit = decode_bit( bm1[match_bit+symbol] );
symbol = ( symbol << 1 ) + bit;
symbol = ( symbol << 1 ) | bit;
if( match_bit != bit << 8 )
{
while( symbol < 0x100 )
symbol = ( symbol << 1 ) + decode_bit( bm[symbol] );
symbol = ( symbol << 1 ) | decode_bit( bm[symbol] );
break;
}
}
@ -213,7 +213,6 @@ class LZ_decoder
int stream_pos; // first byte not yet written to file
uint32_t crc_;
const int outfd; // output file descriptor
const int member_version;
unsigned long long stream_position() const { return partial_data_pos + stream_pos; }
void flush_data();
@ -273,8 +272,7 @@ public:
pos( 0 ),
stream_pos( 0 ),
crc_( 0xFFFFFFFFU ),
outfd( ofd ),
member_version( header.version() )
outfd( ofd )
{ buffer[buffer_size-1] = 0; } // prev_byte of first_byte
~LZ_decoder() { delete[] buffer; }