diff options
Diffstat (limited to '')
-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; } |