summaryrefslogtreecommitdiffstats
path: root/encoder.h
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 10:08:36 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 10:08:36 +0000
commit62327bcaed81d8c02f11aec2c49f7d09c5edddb7 (patch)
tree7eb93beb78b7ee8ab3288c5b31a3f7c99c8f2572 /encoder.h
parentAdding upstream version 1.17~rc2. (diff)
downloadlzip-62327bcaed81d8c02f11aec2c49f7d09c5edddb7.tar.xz
lzip-62327bcaed81d8c02f11aec2c49f7d09c5edddb7.zip
Adding upstream version 1.17.upstream/1.17
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'encoder.h')
-rw-r--r--encoder.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/encoder.h b/encoder.h
index 81cc1e0..9579a85 100644
--- a/encoder.h
+++ b/encoder.h
@@ -76,7 +76,7 @@ public:
class LZ_encoder : public LZ_encoder_base
{
- struct Pair /* distance-length pair */
+ struct Pair // distance-length pair
{
int dis;
int len;
@@ -90,12 +90,12 @@ class LZ_encoder : public LZ_encoder_base
struct Trial
{
State state;
- int price; /* dual use var; cumulative price, match length */
- int dis; /* rep index or match distance. (-1 for literal) */
- int prev_index; /* index of prev trial in trials[] */
- int prev_index2; /* -2 trial is single step */
- /* -1 literal + rep0 */
- /* >= 0 ( rep or match ) + literal + rep0 */
+ int price; // dual use var; cumulative price, match length
+ int dis; // rep index or match distance. (-1 for literal)
+ int prev_index; // index of prev trial in trials[]
+ int prev_index2; // -2 trial is single step
+ // -1 literal + rep0
+ // >= 0 ( rep or match ) + literal + rep0
int reps[num_rep_distances];
void update( const int pr, const int distance, const int p_i )
@@ -145,7 +145,7 @@ class LZ_encoder : public LZ_encoder_base
int get_match_pairs( Pair * pairs = 0 );
void update_distance_prices();
- /* move-to-front dis in/into reps if( dis > 0 ) */
+ // move-to-front dis in/into reps if( dis > 0 )
static void mtf_reps( const int dis, int reps[num_rep_distances] )
{
if( dis >= num_rep_distances )
@@ -255,7 +255,7 @@ class LZ_encoder : public LZ_encoder_base
const State state );
enum { before = max_num_trials + 1,
- /* bytes to keep in buffer after pos */
+ // bytes to keep in buffer after pos
after_size = ( 2 * max_match_len ) + 1,
dict_factor = 2,
num_prev_positions3 = 1 << 16,