summaryrefslogtreecommitdiffstats
path: root/fast_encoder.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2017-05-07 15:50:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2017-05-07 15:50:01 +0000
commitefe11df4b26426c3db4f96592e899b1f005a878e (patch)
tree4195bbbd046bc3e44a30202dc3284e45bad0f516 /fast_encoder.h
parentReleasing debian version 1.8-5. (diff)
downloadclzip-efe11df4b26426c3db4f96592e899b1f005a878e.tar.xz
clzip-efe11df4b26426c3db4f96592e899b1f005a878e.zip
Merging upstream version 1.9.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fast_encoder.h')
-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 );
}