summaryrefslogtreecommitdiffstats
path: root/fast_encoder.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2017-05-07 15:51:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2017-05-07 15:51:58 +0000
commitde466aac7b9c2010f3393470cc4825c2dfb0cc54 (patch)
tree4e2cbe6852242de4834c67e23df37ea36e548b9f /fast_encoder.h
parentReleasing debian version 1.18-5. (diff)
downloadlzip-de466aac7b9c2010f3393470cc4825c2dfb0cc54.tar.xz
lzip-de466aac7b9c2010f3393470cc4825c2dfb0cc54.zip
Merging upstream version 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();
}