1
0
Fork 0

Merging upstream version 1.20.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-21 11:28:50 +01:00
parent 72bcf08df5
commit e24aefbbb2
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
31 changed files with 1242 additions and 685 deletions

View file

@ -1,5 +1,5 @@
/* Lziprecover - Data recovery tool for the lzip format
Copyright (C) 2009-2017 Antonio Diaz Diaz.
Copyright (C) 2009-2018 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -227,11 +227,7 @@ class LZ_decoder
bool verify_trailer( const Pretty_print & pp ) const;
uint8_t peek_prev() const
{
if( pos > 0 ) return buffer[pos-1];
if( pos_wrapped ) return buffer[dictionary_size-1];
return 0; // prev_byte of first byte
}
{ return buffer[((pos > 0) ? pos : dictionary_size)-1]; }
uint8_t peek( const unsigned distance ) const
{
@ -296,7 +292,8 @@ public:
crc_( 0xFFFFFFFFU ),
outfd( ofd ),
pos_wrapped( false )
{}
// prev_byte of first byte; also for peek( 0 ) on corrupt file
{ buffer[dictionary_size-1] = 0; }
~LZ_decoder() { delete[] buffer; }