diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:41:41 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:41:41 +0000 |
commit | 9317e4b89644635a9ce309c4626d917d886ae20b (patch) | |
tree | 768c1cbb87e5c29ddcfcf2853ff1d5ce5b511e6b /decoder.h | |
parent | Adding debian version 1.14-1. (diff) | |
download | lziprecover-9317e4b89644635a9ce309c4626d917d886ae20b.tar.xz lziprecover-9317e4b89644635a9ce309c4626d917d886ae20b.zip |
Merging upstream version 1.15~pre1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'decoder.h')
-rw-r--r-- | decoder.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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; } |