summaryrefslogtreecommitdiffstats
path: root/decoder.c
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 05:08:40 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 05:08:40 +0000
commit764b37c93badf5e9c029b43efaba917bf871928e (patch)
tree82ba102c617592b6c73a95a2a217d8f5d591eeb2 /decoder.c
parentAdding debian version 1.6-2. (diff)
downloadlunzip-764b37c93badf5e9c029b43efaba917bf871928e.tar.xz
lunzip-764b37c93badf5e9c029b43efaba917bf871928e.zip
Merging upstream version 1.7~pre1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'decoder.c')
-rw-r--r--decoder.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/decoder.c b/decoder.c
index 38bfd3a..8416adb 100644
--- a/decoder.c
+++ b/decoder.c
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for lzip files
- Copyright (C) 2010, 2011, 2012, 2013, 2014 Antonio Diaz Diaz.
+ Copyright (C) 2010-2015 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
@@ -222,7 +222,7 @@ int LZd_decode_member( struct LZ_decoder * const d,
const int pos_state = LZd_data_position( d ) & pos_state_mask;
if( Rd_decode_bit( rdec, &d->bm_match[state][pos_state] ) == 0 ) /* 1st bit */
{
- const uint8_t prev_byte = LZd_get_prev_byte( d );
+ const uint8_t prev_byte = LZd_peek1( d );
if( St_is_char( state ) )
{
state -= ( state < 4 ) ? state : 3;
@@ -234,7 +234,7 @@ int LZd_decode_member( struct LZ_decoder * const d,
state -= ( state < 10 ) ? 3 : 6;
LZd_put_byte( d, Rd_decode_matched( rdec,
d->bm_literal[get_lit_state(prev_byte)],
- LZd_get_byte( d, rep0 ) ) );
+ LZd_peek( d, rep0 ) ) );
}
}
else
@@ -262,7 +262,7 @@ int LZd_decode_member( struct LZ_decoder * const d,
{
if( Rd_decode_bit( rdec, &d->bm_len[state][pos_state] ) == 0 ) /* 4th bit */
{ state = St_set_short_rep( state );
- LZd_put_byte( d, LZd_get_byte( d, rep0 ) ); continue; }
+ LZd_put_byte( d, LZd_peek( d, rep0 ) ); continue; }
}
state = St_set_rep( state );
len = min_match_len + Rd_decode_len( rdec, &d->rep_len_model, pos_state );
@@ -285,7 +285,7 @@ int LZd_decode_member( struct LZ_decoder * const d,
{
rep0 += Rd_decode( rdec, direct_bits - dis_align_bits ) << dis_align_bits;
rep0 += Rd_decode_tree_reversed4( rdec, d->bm_align );
- if( rep0 == 0xFFFFFFFFU ) /* Marker found */
+ if( rep0 == 0xFFFFFFFFU ) /* marker found */
{
rep0 = rep0_saved;
Rd_normalize( rdec );