1
0
Fork 0

Merging upstream version 1.25~pre1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-21 11:33:15 +01:00
parent 8062cdcacd
commit 3e4c2fba01
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
60 changed files with 5261 additions and 1250 deletions

View file

@ -106,12 +106,12 @@ public:
return false;
}
bool load( const bool ignore_marking = true )
bool load( const bool ignore_nonzero )
{
code = 0;
range = 0xFFFFFFFFU;
// check and discard first byte of the LZMA stream
if( get_byte() != 0 && !ignore_marking ) return false;
// check first byte of the LZMA stream
if( get_byte() != 0 && !ignore_nonzero ) return false;
for( int i = 0; i < 4; ++i ) code = ( code << 8 ) | get_byte();
return true;
}
@ -305,7 +305,7 @@ class LZ_decoder
unsigned long long stream_position() const
{ return partial_data_pos + stream_pos; }
void flush_data();
int check_trailer( const Pretty_print & pp, const bool ignore_empty ) const;
bool check_trailer( const Pretty_print & pp ) const;
uint8_t peek_prev() const
{ return buffer[((pos > 0) ? pos : dictionary_size)-1]; }
@ -381,7 +381,7 @@ public:
unsigned crc() const { return crc_ ^ 0xFFFFFFFFU; }
unsigned long long data_position() const { return partial_data_pos + pos; }
int decode_member( const Cl_options & cl_opts, const Pretty_print & pp );
int decode_member( const Pretty_print & pp, const bool ignore_nonzero );
int decode_member()
{ return decode_member( Cl_options(), Pretty_print( "" ) ); }
{ return decode_member( Pretty_print( "" ), true ); }
};