summaryrefslogtreecommitdiffstats
path: root/mtester.cc
diff options
context:
space:
mode:
Diffstat (limited to 'mtester.cc')
-rw-r--r--mtester.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/mtester.cc b/mtester.cc
index a9ac06e..92de2e0 100644
--- a/mtester.cc
+++ b/mtester.cc
@@ -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 );