1
0
Fork 0

Merging upstream version 1.15.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-20 21:35:19 +01:00
parent e735d4f439
commit fd935bd59c
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
27 changed files with 89 additions and 90 deletions

View file

@ -1,27 +1,18 @@
2024-11-19 Antonio Diaz Diaz <antonio@gnu.org>
2025-01-09 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.15-rc1 released.
* lzlib.h: Declare LZ_Errno, LZ_Encoder, and LZ_Decoder as typedef.
* configure, Makefile.in: Use '--soname' conditionally.
* check.sh: Use 'cp' instead of 'cat'.
2024-10-16 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.15-pre2 released.
* Version 1.15 released.
* decoder.h (Rd_try_reload): Reject a nonzero first LZMA byte.
* minilzip.c (do_decompress): Reject empty member in multimember.
(Pp_free): New function.
* configure, Makefile.in: Don't use '--soname'; create 'liblz.so.1'.
(Reported by Michael Sullivan).
2024-04-19 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.15-pre1 released.
* lzlib.h: Declare LZ_Errno, LZ_Encoder, and LZ_Decoder as typedef.
* Makefile.in: New target 'lib' which builds just the library.
New target 'bin' which builds the library and minilzip.
'lib' is now the default; minilzip is no longer built by default.
'install-bin' installs minilzip and its man page again.
* configure, Makefile.in: Use '--soname' conditionally.
(Reported by Michael Sullivan).
* INSTALL: Document use of 'make bin'.
* check.sh: Use 'cp' instead of 'cat'.
2024-01-20 Antonio Diaz Diaz <antonio@gnu.org>
@ -282,7 +273,7 @@
* Version 0.1 released.
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This file is a collection of facts, and thus it is not copyrightable, but just
in case, you have unlimited permission to copy, distribute, and modify it.

View file

@ -3,7 +3,8 @@ Requirements
You will need a C99 compiler. (gcc 3.3.6 or newer is recommended).
I use gcc 6.1.0 and 3.3.6, but the code should compile with any standards
compliant compiler.
Gcc is available at http://gcc.gnu.org.
Gcc is available at http://gcc.gnu.org
Lzip is available at http://www.nongnu.org/lzip/lzip.html
The operating system must allow signal handlers read access to objects with
static storage duration so that the cleanup handler for Control-C can delete
@ -85,7 +86,7 @@ After running 'configure', you can run 'make' and 'make install' as
explained above.
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This file is free documentation: you have unlimited permission to copy,
distribute, and modify it.

6
NEWS
View file

@ -5,6 +5,8 @@ Lzlib now reports a nonzero first LZMA byte as a LZ_data_error.
minilzip now exits with error status 2 if any empty member is found in a
multimember file.
LZ_Errno, LZ_Encoder, and LZ_Decoder are now declared in lzlib.h as typedef.
The targets 'lib' and 'bin' have been added to Makefile.in. 'lib' is the new
default and builds just the library. 'bin' builds both the library and
minilzip.
@ -13,7 +15,7 @@ minilzip is no longer built by default.
'install-bin' installs minilzip and its man page again.
The use of the target 'bin' has been documented in INSTALL.
To improve portability, the linker option '--soname' is now used conditionally.
(Reported by Michael Sullivan).
The use of the target 'bin' has been documented in INSTALL.

9
README
View file

@ -1,3 +1,5 @@
See the file INSTALL for compilation and installation instructions.
Description
Lzlib is a data compression library providing in-memory LZMA compression and
@ -10,7 +12,7 @@ are declared in the file 'lzlib.h'. Usage examples of the library are given
in the files 'bbexample.c', 'ffexample.c', and 'minilzip.c' from the source
distribution.
As 'lzlib.h' can be used by C and C++ programs, it must not impose a choice
As 'lzlib.h' can be used in C and C++ programs, it must not impose a choice
of system headers on the program by including one of them. Therefore it is
the responsibility of the program using lzlib to include before 'lzlib.h'
some header that declares the type 'uint8_t'. There are at least four such
@ -74,8 +76,11 @@ LANGUAGE NOTE: Uncompressed = not compressed = plain data; it may never have
been compressed. Decompressed is used to refer to data which have undergone
the process of decompression.
minilzip uses Arg_parser for command-line argument parsing:
http://www.nongnu.org/arg-parser/arg_parser.html
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This file is free documentation: you have unlimited permission to copy,
distribute, and modify it.

View file

@ -1,5 +1,5 @@
/* Buffer to buffer example - Test program for the library lzlib
Copyright (C) 2010-2024 Antonio Diaz Diaz.
Copyright (C) 2010-2025 Antonio Diaz Diaz.
This program is free software: you have unlimited permission
to copy, distribute, and modify it.

View file

@ -1,5 +1,5 @@
/* Arg_parser - POSIX/GNU command-line argument parser. (C version)
Copyright (C) 2006-2024 Antonio Diaz Diaz.
Copyright (C) 2006-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided

View file

@ -1,5 +1,5 @@
/* Arg_parser - POSIX/GNU command-line argument parser. (C version)
Copyright (C) 2006-2024 Antonio Diaz Diaz.
Copyright (C) 2006-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided

View file

@ -1,5 +1,5 @@
/* Lzlib - Compression library for the lzip format
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided

6
configure vendored
View file

@ -1,12 +1,12 @@
#! /bin/sh
# configure script for Lzlib - Compression library for the lzip format
# Copyright (C) 2009-2024 Antonio Diaz Diaz.
# Copyright (C) 2009-2025 Antonio Diaz Diaz.
#
# This configure script is free software: you have unlimited permission
# to copy, distribute, and modify it.
pkgname=lzlib
pkgversion=1.15-rc1
pkgversion=1.15
soversion=1
libname=lz
libname_static=lib${libname}.a
@ -212,7 +212,7 @@ echo "MAKEINFO = ${MAKEINFO}"
rm -f Makefile
cat > Makefile << EOF
# Makefile for Lzlib - Compression library for the lzip format
# Copyright (C) 2009-2024 Antonio Diaz Diaz.
# Copyright (C) 2009-2025 Antonio Diaz Diaz.
# This file was generated automatically by configure. Don't edit.
#
# This Makefile is free software: you have unlimited permission

View file

@ -1,5 +1,5 @@
/* Lzlib - Compression library for the lzip format
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided
@ -75,7 +75,7 @@ static int LZd_decode_member( LZ_decoder * const d )
if( Rd_decode_bit( rdec, &d->bm_rep0[*state] ) == 0 ) /* 3rd bit */
{
if( Rd_decode_bit( rdec, &d->bm_len[*state][pos_state] ) == 0 ) /* 4th bit */
{ *state = St_set_short_rep( *state );
{ *state = St_set_shortrep( *state );
LZd_put_byte( d, LZd_peek( d, d->rep0 ) ); continue; }
}
else

View file

@ -1,5 +1,5 @@
/* Lzlib - Compression library for the lzip format
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided

View file

@ -11,7 +11,7 @@ File: lzlib.info, Node: Top, Next: Introduction, Up: (dir)
Lzlib Manual
************
This manual is for Lzlib (version 1.15-rc1, 19 November 2024).
This manual is for Lzlib (version 1.15, 9 January 2025).
* Menu:
@ -30,7 +30,7 @@ This manual is for Lzlib (version 1.15-rc1, 19 November 2024).
* Concept index:: Index of concepts
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This manual is free documentation: you have unlimited permission to copy,
distribute, and modify it.
@ -51,7 +51,7 @@ library are declared in the file 'lzlib.h'. Usage examples of the library
are given in the files 'bbexample.c', 'ffexample.c', and 'minilzip.c' from
the source distribution.
As 'lzlib.h' can be used by C and C++ programs, it must not impose a
As 'lzlib.h' can be used in C and C++ programs, it must not impose a
choice of system headers on the program by including one of them. Therefore
it is the responsibility of the program using lzlib to include before
'lzlib.h' some header that declares the type 'uint8_t'. There are at least
@ -1280,28 +1280,28 @@ Concept index

Tag Table:
Node: Top215
Node: Introduction1343
Node: Library version5506
Node: Buffering8057
Node: Parameter limits9282
Node: Compression functions10236
Ref: member_size12012
Ref: sync_flush13753
Node: Decompression functions18319
Node: Error codes25706
Node: Error messages28051
Node: Invoking minilzip28634
Node: File format39716
Ref: coded-dict-size41214
Node: Examples42621
Node: Buffer compression43582
Node: Buffer decompression45095
Node: File compression46502
Node: File decompression47478
Node: File compression mm48475
Node: Skipping data errors51486
Node: Problems52784
Node: Concept index53345
Node: Introduction1337
Node: Library version5500
Node: Buffering8051
Node: Parameter limits9276
Node: Compression functions10230
Ref: member_size12006
Ref: sync_flush13747
Node: Decompression functions18313
Node: Error codes25700
Node: Error messages28045
Node: Invoking minilzip28628
Node: File format39710
Ref: coded-dict-size41208
Node: Examples42615
Node: Buffer compression43576
Node: Buffer decompression45089
Node: File compression46496
Node: File decompression47472
Node: File compression mm48469
Node: Skipping data errors51480
Node: Problems52778
Node: Concept index53339

End Tag Table

View file

@ -6,8 +6,8 @@
@finalout
@c %**end of header
@set UPDATED 19 November 2024
@set VERSION 1.15-rc1
@set UPDATED 9 January 2025
@set VERSION 1.15
@dircategory Compression
@direntry
@ -52,7 +52,7 @@ This manual is for Lzlib (version @value{VERSION}, @value{UPDATED}).
@end menu
@sp 1
Copyright @copyright{} 2009-2024 Antonio Diaz Diaz.
Copyright @copyright{} 2009-2025 Antonio Diaz Diaz.
This manual is free documentation: you have unlimited permission to copy,
distribute, and modify it.
@ -75,7 +75,7 @@ are declared in the file @file{lzlib.h}. Usage examples of the library are
given in the files @file{bbexample.c}, @file{ffexample.c}, and
@file{minilzip.c} from the source distribution.
As @file{lzlib.h} can be used by C and C++ programs, it must not impose a
As @file{lzlib.h} can be used in C and C++ programs, it must not impose a
choice of system headers on the program by including one of them. Therefore
it is the responsibility of the program using lzlib to include before
@file{lzlib.h} some header that declares the type @samp{uint8_t}. There are

View file

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
.TH MINILZIP "1" "November 2024" "minilzip 1.15-rc1" "User Commands"
.TH MINILZIP "1" "January 2025" "minilzip 1.15" "User Commands"
.SH NAME
minilzip \- reduces the size of files
.SH SYNOPSIS
@ -116,12 +116,12 @@ Report bugs to lzip\-bug@nongnu.org
.br
Lzlib home page: http://www.nongnu.org/lzip/lzlib.html
.SH COPYRIGHT
Copyright \(co 2024 Antonio Diaz Diaz.
Copyright \(co 2025 Antonio Diaz Diaz.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Using lzlib 1.15\-rc1
Using lzlib 1.15
Using LZ_API_VERSION = 1015
.SH "SEE ALSO"
The full documentation for

View file

@ -1,5 +1,5 @@
/* Lzlib - Compression library for the lzip format
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided
@ -291,7 +291,7 @@ static int LZe_sequence_optimizer( LZ_encoder * const e,
cur_state = e->trials[prev_index].state;
if( prev_index + 1 == cur ) /* len == 1 */
{
if( dis4 == 0 ) cur_state = St_set_short_rep( cur_state );
if( dis4 == 0 ) cur_state = St_set_shortrep( cur_state );
else cur_state = St_set_char( cur_state ); /* literal */
}
else if( dis4 < num_rep_distances ) cur_state = St_set_rep( cur_state );
@ -555,7 +555,7 @@ static bool LZe_encode_member( LZ_encoder * const e )
if( dis > 1 )
Re_encode_bit( &e->eb.renc, &e->eb.bm_rep2[*state], dis > 2 );
}
if( len == 1 ) *state = St_set_short_rep( *state );
if( len == 1 ) *state = St_set_shortrep( *state );
else
{
Re_encode_len( &e->eb.renc, &e->eb.rep_len_model, len, pos_state );

View file

@ -1,5 +1,5 @@
/* Lzlib - Compression library for the lzip format
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided

View file

@ -1,5 +1,5 @@
/* Lzlib - Compression library for the lzip format
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided

View file

@ -1,5 +1,5 @@
/* Lzlib - Compression library for the lzip format
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided

View file

@ -1,5 +1,5 @@
/* Lzlib - Compression library for the lzip format
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided
@ -142,7 +142,7 @@ static bool FLZe_encode_member( FLZ_encoder * const fe )
if( match_byte == cur_byte )
{
const int short_rep_price = price1( fe->eb.bm_match[*state][pos_state] ) +
const int shortrep_price = price1( fe->eb.bm_match[*state][pos_state] ) +
price1( fe->eb.bm_rep[*state] ) +
price0( fe->eb.bm_rep0[*state] ) +
price0( fe->eb.bm_len[*state][pos_state] );
@ -151,13 +151,13 @@ static bool FLZe_encode_member( FLZ_encoder * const fe )
price += LZeb_price_literal( &fe->eb, prev_byte, cur_byte );
else
price += LZeb_price_matched( &fe->eb, prev_byte, cur_byte, match_byte );
if( short_rep_price < price )
if( shortrep_price < price )
{
Re_encode_bit( &fe->eb.renc, &fe->eb.bm_match[*state][pos_state], 1 );
Re_encode_bit( &fe->eb.renc, &fe->eb.bm_rep[*state], 1 );
Re_encode_bit( &fe->eb.renc, &fe->eb.bm_rep0[*state], 0 );
Re_encode_bit( &fe->eb.renc, &fe->eb.bm_len[*state][pos_state], 0 );
*state = St_set_short_rep( *state );
*state = St_set_shortrep( *state );
continue;
}
}

View file

@ -1,5 +1,5 @@
/* Lzlib - Compression library for the lzip format
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided

View file

@ -1,5 +1,5 @@
/* File to file example - Test program for the library lzlib
Copyright (C) 2010-2024 Antonio Diaz Diaz.
Copyright (C) 2010-2025 Antonio Diaz Diaz.
This program is free software: you have unlimited permission
to copy, distribute, and modify it.

View file

@ -1,5 +1,5 @@
/* Lzcheck - Test program for the library lzlib
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This program is free software: you have unlimited permission
to copy, distribute, and modify it.

4
lzip.h
View file

@ -1,5 +1,5 @@
/* Lzlib - Compression library for the lzip format
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided
@ -40,7 +40,7 @@ static inline State St_set_match( const State st )
{ return ( st < 7 ) ? 7 : 10; }
static inline State St_set_rep( const State st )
{ return ( st < 7 ) ? 8 : 11; }
static inline State St_set_short_rep( const State st )
static inline State St_set_shortrep( const State st )
{ return ( st < 7 ) ? 9 : 11; }

View file

@ -1,5 +1,5 @@
/* Lzlib - Compression library for the lzip format
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided

View file

@ -1,5 +1,5 @@
/* Lzlib - Compression library for the lzip format
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided
@ -26,7 +26,7 @@ extern "C" {
#define LZ_API_VERSION 1015
static const char * const LZ_version_string = "1.15-rc1";
static const char * const LZ_version_string = "1.15";
typedef enum LZ_Errno
{ LZ_ok = 0, LZ_bad_argument, LZ_mem_error,

View file

@ -1,5 +1,5 @@
/* Minilzip - Test program for the library lzlib
Copyright (C) 2009-2024 Antonio Diaz Diaz.
Copyright (C) 2009-2025 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -91,7 +91,7 @@ static const char * const mem_msg = "Not enough memory.";
int verbosity = 0;
static const char * const program_name = "minilzip";
static const char * const program_year = "2024";
static const char * const program_year = "2025";
static const char * invocation_name = "minilzip"; /* default value */
static const struct { const char * from; const char * to; } known_extensions[] = {
@ -348,7 +348,7 @@ static void show_header( const unsigned dictionary_size )
}
/* separate numbers of 6 or more digits in groups of 3 digits using '_' */
/* separate numbers of 5 or more digits in groups of 3 digits using '_' */
static const char * format_num3( unsigned long long num )
{
enum { buffers = 8, bufsize = 4 * sizeof num, n = 10 };
@ -371,7 +371,7 @@ static const char * format_num3( unsigned long long num )
{ num /= 1000; prefix = si_prefix[i]; }
if( prefix ) *(--p) = prefix;
}
const bool split = num >= 100000;
const bool split = num >= 10000;
for( i = 0; ; )
{

View file

@ -1,6 +1,6 @@
#! /bin/sh
# check script for Lzlib - Compression library for the lzip format
# Copyright (C) 2009-2024 Antonio Diaz Diaz.
# Copyright (C) 2009-2025 Antonio Diaz Diaz.
#
# This script is free software: you have unlimited permission
# to copy, distribute, and modify it.