1
0
Fork 0

Merging upstream version 1.14.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-17 20:53:44 +01:00
parent 02cc7331f8
commit 4fbdc37ab6
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
24 changed files with 98 additions and 112 deletions

View file

@ -6,8 +6,8 @@
@finalout
@c %**end of header
@set UPDATED 20 December 2023
@set VERSION 1.14-rc1
@set UPDATED 22 January 2024
@set VERSION 1.14
@dircategory Compression
@direntry
@ -51,7 +51,7 @@ This manual is for Clzip (version @value{VERSION}, @value{UPDATED}).
@end menu
@sp 1
Copyright @copyright{} 2010-2023 Antonio Diaz Diaz.
Copyright @copyright{} 2010-2024 Antonio Diaz Diaz.
This manual is free documentation: you have unlimited permission to copy,
distribute, and modify it.
@ -63,10 +63,9 @@ distribute, and modify it.
@cindex introduction
@uref{http://www.nongnu.org/lzip/clzip.html,,Clzip}
is a C language version of lzip, fully compatible with @w{lzip 1.4} or
newer. As clzip is written in C, it may be easier to integrate in
applications like package managers, embedded devices, or systems lacking a
C++ compiler.
is a C language version of lzip, compatible with @w{lzip 1.4} or newer.
As clzip is written in C, it may be easier to integrate in applications like
package managers, embedded devices, or systems lacking a C++ compiler.
@uref{http://www.nongnu.org/lzip/lzip.html,,Lzip}
is a lossless data compressor with a user interface similar to the one
@ -516,14 +515,9 @@ method is far more difficult.@*
Lzip has been designed, written, and tested with great care to replace gzip
and bzip2 as the standard general-purpose compressed format for Unix-like
systems. This chapter describes the lessons learned from these previous
formats, and their application to the design of lzip.
Lzip is developed by volunteers who lack the resources required for
extensive testing in all circumstances. It is up to you to test lzip before
using it in mission-critical applications. However, a compressor like lzip
is not a toy, and maintaining it is not a hobby. Many people's data depend
on it. Therefore the lzip file format has been reviewed carefully and is
believed to be free from negligent design errors.
formats, and their application to the design of lzip. The lzip format
specification has been reviewed carefully and is believed to be free from
design errors.
@sp 1
@section Format design
@ -1092,9 +1086,7 @@ not yet decoded) and @samp{code} (representing the current point within
@samp{code} is initialized to 0.
The range encoder produces a first 0 byte that must be ignored by the
range decoder. This is done by shifting 5 bytes in the initialization of
@samp{code} instead of 4. (See the @samp{Range_decoder} constructor in
the source).
range decoder. (See the @samp{Range_decoder} constructor in the source).
@sp 1
@section Decoding and checking the LZMA stream
@ -1315,7 +1307,7 @@ find by running @w{@samp{clzip --version}}.
@verbatim
/* Lzd - Educational decompressor for the lzip format
Copyright (C) 2013-2023 Antonio Diaz Diaz.
Copyright (C) 2013-2024 Antonio Diaz Diaz.
This program is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided
@ -1486,9 +1478,9 @@ public:
return symbol;
}
unsigned decode_bit( Bit_model & bm )
bool decode_bit( Bit_model & bm )
{
unsigned symbol;
bool symbol;
const uint32_t bound = ( range >> bit_model_total_bits ) * bm.probability;
if( code < bound )
{
@ -1534,8 +1526,8 @@ public:
unsigned symbol = 1;
for( int i = 7; i >= 0; --i )
{
const unsigned match_bit = ( match_byte >> i ) & 1;
const unsigned bit = decode_bit( bm[symbol+(match_bit<<8)+0x100] );
const bool match_bit = ( match_byte >> i ) & 1;
const bool bit = decode_bit( bm[symbol+(match_bit<<8)+0x100] );
symbol = ( symbol << 1 ) | bit;
if( match_bit != bit )
{
@ -1739,7 +1731,7 @@ int main( const int argc, const char * const argv[] )
"See the lzip manual for an explanation of the code.\n"
"\nUsage: %s [-d] < file.lz > file\n"
"Lzd decompresses from standard input to standard output.\n"
"\nCopyright (C) 2023 Antonio Diaz Diaz.\n"
"\nCopyright (C) 2024 Antonio Diaz Diaz.\n"
"License 2-clause BSD.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"