diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-01-31 05:24:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-01-31 05:24:47 +0000 |
commit | 3090a754d28713fbc1a047f7007ef8e487bc2003 (patch) | |
tree | 4c7ff2dab61fd7ceac1ac7fce60f7684431774ab /doc/clzip.texi | |
parent | Adding upstream version 1.14~rc1. (diff) | |
download | clzip-3090a754d28713fbc1a047f7007ef8e487bc2003.tar.xz clzip-3090a754d28713fbc1a047f7007ef8e487bc2003.zip |
Adding upstream version 1.14.upstream/1.14upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | doc/clzip.texi | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/doc/clzip.texi b/doc/clzip.texi index 633526b..c98e026 100644 --- a/doc/clzip.texi +++ b/doc/clzip.texi @@ -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" |