summaryrefslogtreecommitdiffstats
path: root/encoder.h
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 13:38:34 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 13:38:34 +0000
commit63af4e067acaebd2c134bcef91755c1be7eb3535 (patch)
tree7b36db2d56f6d6f129ba6a7d0467523fa21c10f0 /encoder.h
parentAdding debian version 0.8-1. (diff)
downloadlzlib-63af4e067acaebd2c134bcef91755c1be7eb3535.tar.xz
lzlib-63af4e067acaebd2c134bcef91755c1be7eb3535.zip
Merging upstream version 0.9.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r--encoder.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/encoder.h b/encoder.h
index dde87e5..590dea1 100644
--- a/encoder.h
+++ b/encoder.h
@@ -172,6 +172,7 @@ class Matchfinder
int32_t * const prev_positions; // last seen position of key
int32_t * prev_pos_tree;
bool at_stream_end_; // stream_pos shows real end of file
+ bool been_flushed;
public:
Matchfinder( const int dict_size, const int len_limit );
@@ -575,8 +576,8 @@ class LZ_encoder
{
const int prev_index = trials[cur].prev_index;
Trial & prev_trial = trials[prev_index];
- std::swap( dis, prev_trial.dis );
- prev_trial.price = cur - prev_index; // len
+ prev_trial.price = cur - prev_index; // len
+ cur = dis; dis = prev_trial.dis; prev_trial.dis = cur;
cur = prev_index;
}
}