summaryrefslogtreecommitdiffstats
path: root/LzmaEnc.c
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 14:25:10 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 14:25:10 +0000
commit6e28aeaf5536d0286476c71e5f7c7e20cbc17036 (patch)
tree00e0a83335bbfbf765c8660ab27a199f0c68fce5 /LzmaEnc.c
parentAdding debian version 1.0-1. (diff)
downloadpdlzip-6e28aeaf5536d0286476c71e5f7c7e20cbc17036.tar.xz
pdlzip-6e28aeaf5536d0286476c71e5f7c7e20cbc17036.zip
Merging upstream version 1.1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'LzmaEnc.c')
-rw-r--r--LzmaEnc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/LzmaEnc.c b/LzmaEnc.c
index dfba154..fba2349 100644
--- a/LzmaEnc.c
+++ b/LzmaEnc.c
@@ -3,7 +3,6 @@
#define _FILE_OFFSET_BITS 64
-#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
@@ -1562,18 +1561,17 @@ static UInt32 GetOptimumFast(CLzmaEnc *p, UInt32 *backRes)
static void LZe_full_flush(CLzmaEnc *p, UInt32 posState)
{
- UInt32 len;
+ const UInt32 len = LZMA_MATCH_LEN_MIN;
+ File_trailer trailer;
RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1);
RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0);
p->state = kMatchNextStates[p->state];
- len = LZMA_MATCH_LEN_MIN;
LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);
RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, (1 << kNumPosSlotBits) - 1);
RangeEnc_EncodeDirectBits(&p->rc, (((UInt32)1 << 30) - 1) >> kNumAlignBits, 30 - kNumAlignBits);
RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, kAlignMask);
RangeEnc_FlushData(&p->rc);
RangeEnc_FlushStream(&p->rc);
- File_trailer trailer;
Ft_set_data_crc( trailer, p->matchFinderBase.crc ^ 0xFFFFFFFFU );
Ft_set_data_size( trailer, p->nowPos64 );
Ft_set_member_size( trailer, p->rc.processed + Fh_size + Ft_size );