Merging upstream version 1.25~pre1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
8062cdcacd
commit
3e4c2fba01
60 changed files with 5261 additions and 1250 deletions
12
decoder.h
12
decoder.h
|
@ -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 ); }
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue