summaryrefslogtreecommitdiffstats
path: root/decoder.h
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 11:51:28 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 11:51:28 +0000
commit79cd96ee549de2d24d5ba81d6f8fa4d642943b52 (patch)
tree61504e983e7adf383ff88c409233c92e5ff9ed4a /decoder.h
parentAdding debian version 1.17~rc1-1. (diff)
downloadlziprecover-79cd96ee549de2d24d5ba81d6f8fa4d642943b52.tar.xz
lziprecover-79cd96ee549de2d24d5ba81d6f8fa4d642943b52.zip
Merging upstream version 1.17~rc2.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'decoder.h')
-rw-r--r--decoder.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/decoder.h b/decoder.h
index 6d8c919..5e6e16c 100644
--- a/decoder.h
+++ b/decoder.h
@@ -19,12 +19,12 @@ class Range_decoder
{
enum { buffer_size = 16384 };
unsigned long long partial_member_pos;
- uint8_t * const buffer; // input buffer
- int pos; // current pos in buffer
- int stream_pos; // when reached, a new block must be read
+ uint8_t * const buffer; /* input buffer */
+ int pos; /* current pos in buffer */
+ int stream_pos; /* when reached, a new block must be read */
uint32_t code;
uint32_t range;
- const int infd; // input file descriptor
+ const int infd; /* input file descriptor */
bool at_stream_end;
bool read_block();
@@ -215,24 +215,24 @@ class LZ_decoder
Range_decoder & rdec;
const unsigned dictionary_size;
const int buffer_size;
- uint8_t * const buffer; // output buffer
- int pos; // current pos in buffer
- int stream_pos; // first byte not yet written to file
+ uint8_t * const buffer; /* output buffer */
+ int pos; /* current pos in buffer */
+ int stream_pos; /* first byte not yet written to file */
uint32_t crc_;
- const int outfd; // output file descriptor
+ const int outfd; /* output file descriptor */
unsigned long long stream_position() const
{ return partial_data_pos + stream_pos; }
void flush_data();
bool verify_trailer( const Pretty_print & pp ) const;
- uint8_t get_prev_byte() const
+ uint8_t peek_prev() const
{
const int i = ( ( pos > 0 ) ? pos : buffer_size ) - 1;
return buffer[i];
}
- uint8_t get_byte( const int distance ) const
+ uint8_t peek( const int distance ) const
{
int i = pos - distance - 1;
if( i < 0 ) i += buffer_size;