summaryrefslogtreecommitdiffstats
path: root/decoder.h
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 10:16:13 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 10:16:13 +0000
commitf8ec1a9b6de5ccde4220017676cbae1c16205fd1 (patch)
treec76650bdeec7078ff209e394b3d091bbbabb40f9 /decoder.h
parentAdding debian version 1.13~rc1-1. (diff)
downloadlziprecover-f8ec1a9b6de5ccde4220017676cbae1c16205fd1.tar.xz
lziprecover-f8ec1a9b6de5ccde4220017676cbae1c16205fd1.zip
Merging upstream version 1.13~rc2.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'decoder.h')
-rw-r--r--decoder.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/decoder.h b/decoder.h
index 3b5dc7d..f1a48cb 100644
--- a/decoder.h
+++ b/decoder.h
@@ -192,6 +192,8 @@ public:
class LZ_decoder
{
+ const long long outskip;
+ const long long outend;
long long partial_data_pos;
const int dictionary_size;
const int buffer_size;
@@ -203,6 +205,8 @@ class LZ_decoder
const int member_version;
Range_decoder & range_decoder;
+ long long stream_position() const throw()
+ { return partial_data_pos + stream_pos; }
void flush_data();
bool verify_trailer( const Pretty_print & pp ) const;
@@ -243,8 +247,11 @@ class LZ_decoder
}
public:
- LZ_decoder( const File_header & header, Range_decoder & rdec, const int ofd )
+ LZ_decoder( const File_header & header, Range_decoder & rdec, const int ofd,
+ const long long oskip = 0, const long long oend = LLONG_MAX )
:
+ outskip( oskip ),
+ outend( oend ),
partial_data_pos( 0 ),
dictionary_size( header.dictionary_size() ),
buffer_size( std::max( 65536, dictionary_size ) ),