summaryrefslogtreecommitdiffstats
path: root/fast_encoder.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2017-05-07 15:51:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2017-05-07 15:51:44 +0000
commitcc3f3c236235378698bbb66b093fac72e9784f38 (patch)
tree1065102b9e5e48b9b4812608bd00ae987fd54f87 /fast_encoder.h
parentAdding upstream version 1.18. (diff)
downloadlzip-cc3f3c236235378698bbb66b093fac72e9784f38.tar.xz
lzip-cc3f3c236235378698bbb66b093fac72e9784f38.zip
Adding upstream version 1.19.upstream/1.19
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fast_encoder.h')
-rw-r--r--fast_encoder.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/fast_encoder.h b/fast_encoder.h
index 2e0bd50..37ab8ef 100644
--- a/fast_encoder.h
+++ b/fast_encoder.h
@@ -1,5 +1,5 @@
/* Lzip - LZMA lossless data compressor
- Copyright (C) 2008-2016 Antonio Diaz Diaz.
+ Copyright (C) 2008-2017 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
class FLZ_encoder : public LZ_encoder_base
{
- int key4; // key made from latest 4 bytes
+ unsigned key4; // key made from latest 4 bytes
void reset_key4()
{
@@ -35,9 +35,8 @@ class FLZ_encoder : public LZ_encoder_base
if( available_bytes() >= 4 )
{
key4 = ( ( key4 << 4 ) ^ buffer[pos+3] ) & key4_mask;
- const int newpos = prev_positions[key4];
+ pos_array[cyclic_pos] = prev_positions[key4];
prev_positions[key4] = pos + 1;
- pos_array[cyclic_pos] = newpos;
}
move_pos();
}