diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:53:03 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:53:03 +0000 |
commit | 585fba50b00b5716bbde7a1b05cbab114af8cdb0 (patch) | |
tree | df705039ddf6d248ae0755a2a80c439b7b2aeee6 /mtester.cc | |
parent | Adding upstream version 1.18~pre1. (diff) | |
download | lziprecover-585fba50b00b5716bbde7a1b05cbab114af8cdb0.tar.xz lziprecover-585fba50b00b5716bbde7a1b05cbab114af8cdb0.zip |
Adding upstream version 1.18~pre2.upstream/1.18_pre2
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'mtester.cc')
-rw-r--r-- | mtester.cc | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -56,7 +56,7 @@ void LZ_mtester::flush_data() { const int size = pos - stream_pos; crc32.update_buf( crc_, buffer + stream_pos, size ); - if( pos >= buffer_size ) { partial_data_pos += pos; pos = 0; } + if( pos >= dictionary_size ) { partial_data_pos += pos; pos = 0; } stream_pos = pos; } } @@ -89,11 +89,11 @@ void LZ_mtester::print_block( const int len ) void LZ_mtester::duplicate_buffer() { - uint8_t * const tmp = new uint8_t[buffer_size]; + uint8_t * const tmp = new uint8_t[dictionary_size]; if( data_position() > 0 ) std::memcpy( tmp, buffer, std::min( data_position(), - (unsigned long long)buffer_size ) ); - else tmp[buffer_size-1] = 0; // prev_byte of first byte + (unsigned long long)dictionary_size ) ); + else tmp[dictionary_size-1] = 0; // prev_byte of first byte buffer = tmp; } @@ -232,7 +232,7 @@ int LZ_mtester::debug_decode_member( const long long dpos, const long long mpos, format_byte( match_byte ) ); } } - else /* match or repeated match */ + else // match or repeated match { int len; if( rdec.decode_bit( bm_rep[state()] ) != 0 ) // 2nd bit @@ -271,7 +271,7 @@ int LZ_mtester::debug_decode_member( const long long dpos, const long long mpos, std::printf( "%6llu %6llu rep%c %6u,%3d (%6llu)", mp, dp, rep + '0', rep0 + 1, len, dp - rep0 - 1 ); } - else /* match */ + else // match { const unsigned rep0_saved = rep0; len = min_match_len + rdec.decode_len( match_len_model, pos_state ); |