Merging upstream version 1.10.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
b2b52b515a
commit
9ad9f8e387
12 changed files with 276 additions and 193 deletions
12
LzmaEnc.c
12
LzmaEnc.c
|
@ -1352,7 +1352,7 @@ static uint32_t GetOptimumFast(CLzmaEnc *p, uint32_t *backRes)
|
|||
static void LZe_full_flush(CLzmaEnc *p, uint32_t posState)
|
||||
{
|
||||
const uint32_t len = LZMA_MATCH_LEN_MIN;
|
||||
File_trailer trailer;
|
||||
Lzip_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];
|
||||
|
@ -1362,15 +1362,15 @@ static void LZe_full_flush(CLzmaEnc *p, uint32_t posState)
|
|||
RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, kAlignMask);
|
||||
RangeEnc_FlushData(&p->rc);
|
||||
RangeEnc_FlushStream(&p->rc);
|
||||
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 );
|
||||
if( writeblock( p->rc.outfd, trailer, Ft_size ) != Ft_size )
|
||||
Lt_set_data_crc( trailer, p->matchFinderBase.crc ^ 0xFFFFFFFFU );
|
||||
Lt_set_data_size( trailer, p->nowPos64 );
|
||||
Lt_set_member_size( trailer, p->rc.processed + Lh_size + Lt_size );
|
||||
if( writeblock( p->rc.outfd, trailer, Lt_size ) != Lt_size )
|
||||
p->rc.res = SZ_ERROR_WRITE;
|
||||
if( verbosity >= 1 )
|
||||
{
|
||||
unsigned long long in_size = p->nowPos64;
|
||||
unsigned long long out_size = p->rc.processed + Fh_size + Ft_size;
|
||||
unsigned long long out_size = p->rc.processed + Lh_size + Lt_size;
|
||||
if( in_size == 0 || out_size == 0 )
|
||||
fputs( " no data compressed.\n", stderr );
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue