diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 14:25:10 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 14:25:10 +0000 |
commit | 6e28aeaf5536d0286476c71e5f7c7e20cbc17036 (patch) | |
tree | 00e0a83335bbfbf765c8660ab27a199f0c68fce5 /LzmaEnc.c | |
parent | Adding debian version 1.0-1. (diff) | |
download | pdlzip-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.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 );
|