summaryrefslogtreecommitdiffstats
path: root/fast_encoder.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2017-05-07 15:49:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2017-05-07 15:49:03 +0000
commit1adf9f41888bd0630227a02cf387f6b5d9a13227 (patch)
tree6eb2672c16756c89f04790466061ce12e9b46f86 /fast_encoder.h
parentAdding upstream version 1.8. (diff)
downloadclzip-1adf9f41888bd0630227a02cf387f6b5d9a13227.tar.xz
clzip-1adf9f41888bd0630227a02cf387f6b5d9a13227.zip
Adding upstream version 1.9.upstream/1.9
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--fast_encoder.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/fast_encoder.h b/fast_encoder.h
index df1741d..9825068 100644
--- a/fast_encoder.h
+++ b/fast_encoder.h
@@ -1,5 +1,5 @@
/* Clzip - LZMA lossless data compressor
- Copyright (C) 2010-2016 Antonio Diaz Diaz.
+ Copyright (C) 2010-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
@@ -18,7 +18,7 @@
struct FLZ_encoder
{
struct LZ_encoder_base eb;
- int key4; /* key made from latest 4 bytes */
+ unsigned key4; /* key made from latest 4 bytes */
};
static inline void FLZe_reset_key4( struct FLZ_encoder * const fe )
@@ -37,12 +37,10 @@ static inline void FLZe_update_and_move( struct FLZ_encoder * const fe, int n )
{
if( Mb_available_bytes( &fe->eb.mb ) >= 4 )
{
- int newpos;
fe->key4 = ( ( fe->key4 << 4 ) ^ fe->eb.mb.buffer[fe->eb.mb.pos+3] ) &
fe->eb.mb.key4_mask;
- newpos = fe->eb.mb.prev_positions[fe->key4];
+ fe->eb.mb.pos_array[fe->eb.mb.cyclic_pos] = fe->eb.mb.prev_positions[fe->key4];
fe->eb.mb.prev_positions[fe->key4] = fe->eb.mb.pos + 1;
- fe->eb.mb.pos_array[fe->eb.mb.cyclic_pos] = newpos;
}
Mb_move_pos( &fe->eb.mb );
}