Merging upstream version 1.15.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e735d4f439
commit
fd935bd59c
27 changed files with 89 additions and 90 deletions
23
ChangeLog
23
ChangeLog
|
@ -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.
|
* Version 1.15 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.
|
|
||||||
* decoder.h (Rd_try_reload): Reject a nonzero first LZMA byte.
|
* decoder.h (Rd_try_reload): Reject a nonzero first LZMA byte.
|
||||||
* minilzip.c (do_decompress): Reject empty member in multimember.
|
* minilzip.c (do_decompress): Reject empty member in multimember.
|
||||||
(Pp_free): New function.
|
(Pp_free): New function.
|
||||||
* configure, Makefile.in: Don't use '--soname'; create 'liblz.so.1'.
|
* lzlib.h: Declare LZ_Errno, LZ_Encoder, and LZ_Decoder as typedef.
|
||||||
(Reported by Michael Sullivan).
|
|
||||||
|
|
||||||
2024-04-19 Antonio Diaz Diaz <antonio@gnu.org>
|
|
||||||
|
|
||||||
* Version 1.15-pre1 released.
|
|
||||||
* Makefile.in: New target 'lib' which builds just the library.
|
* Makefile.in: New target 'lib' which builds just the library.
|
||||||
New target 'bin' which builds the library and minilzip.
|
New target 'bin' which builds the library and minilzip.
|
||||||
'lib' is now the default; minilzip is no longer built by default.
|
'lib' is now the default; minilzip is no longer built by default.
|
||||||
'install-bin' installs minilzip and its man page again.
|
'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'.
|
* INSTALL: Document use of 'make bin'.
|
||||||
|
* check.sh: Use 'cp' instead of 'cat'.
|
||||||
|
|
||||||
2024-01-20 Antonio Diaz Diaz <antonio@gnu.org>
|
2024-01-20 Antonio Diaz Diaz <antonio@gnu.org>
|
||||||
|
|
||||||
|
@ -282,7 +273,7 @@
|
||||||
* Version 0.1 released.
|
* 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
|
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.
|
in case, you have unlimited permission to copy, distribute, and modify it.
|
||||||
|
|
5
INSTALL
5
INSTALL
|
@ -3,7 +3,8 @@ Requirements
|
||||||
You will need a C99 compiler. (gcc 3.3.6 or newer is recommended).
|
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
|
I use gcc 6.1.0 and 3.3.6, but the code should compile with any standards
|
||||||
compliant compiler.
|
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
|
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
|
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.
|
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,
|
This file is free documentation: you have unlimited permission to copy,
|
||||||
distribute, and modify it.
|
distribute, and modify it.
|
||||||
|
|
6
NEWS
6
NEWS
|
@ -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
|
minilzip now exits with error status 2 if any empty member is found in a
|
||||||
multimember file.
|
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
|
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
|
default and builds just the library. 'bin' builds both the library and
|
||||||
minilzip.
|
minilzip.
|
||||||
|
@ -13,7 +15,7 @@ minilzip is no longer built by default.
|
||||||
|
|
||||||
'install-bin' installs minilzip and its man page again.
|
'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.
|
To improve portability, the linker option '--soname' is now used conditionally.
|
||||||
(Reported by Michael Sullivan).
|
(Reported by Michael Sullivan).
|
||||||
|
|
||||||
|
The use of the target 'bin' has been documented in INSTALL.
|
||||||
|
|
9
README
9
README
|
@ -1,3 +1,5 @@
|
||||||
|
See the file INSTALL for compilation and installation instructions.
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
Lzlib is a data compression library providing in-memory LZMA compression and
|
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
|
in the files 'bbexample.c', 'ffexample.c', and 'minilzip.c' from the source
|
||||||
distribution.
|
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
|
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'
|
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
|
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
|
been compressed. Decompressed is used to refer to data which have undergone
|
||||||
the process of decompression.
|
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,
|
This file is free documentation: you have unlimited permission to copy,
|
||||||
distribute, and modify it.
|
distribute, and modify it.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Buffer to buffer example - Test program for the library lzlib
|
/* 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
|
This program is free software: you have unlimited permission
|
||||||
to copy, distribute, and modify it.
|
to copy, distribute, and modify it.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Arg_parser - POSIX/GNU command-line argument parser. (C version)
|
/* 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
|
This library is free software. Redistribution and use in source and
|
||||||
binary forms, with or without modification, are permitted provided
|
binary forms, with or without modification, are permitted provided
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Arg_parser - POSIX/GNU command-line argument parser. (C version)
|
/* 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
|
This library is free software. Redistribution and use in source and
|
||||||
binary forms, with or without modification, are permitted provided
|
binary forms, with or without modification, are permitted provided
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Lzlib - Compression library for the lzip format
|
/* 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
|
This library is free software. Redistribution and use in source and
|
||||||
binary forms, with or without modification, are permitted provided
|
binary forms, with or without modification, are permitted provided
|
||||||
|
|
6
configure
vendored
6
configure
vendored
|
@ -1,12 +1,12 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# configure script for Lzlib - Compression library for the lzip format
|
# 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
|
# This configure script is free software: you have unlimited permission
|
||||||
# to copy, distribute, and modify it.
|
# to copy, distribute, and modify it.
|
||||||
|
|
||||||
pkgname=lzlib
|
pkgname=lzlib
|
||||||
pkgversion=1.15-rc1
|
pkgversion=1.15
|
||||||
soversion=1
|
soversion=1
|
||||||
libname=lz
|
libname=lz
|
||||||
libname_static=lib${libname}.a
|
libname_static=lib${libname}.a
|
||||||
|
@ -212,7 +212,7 @@ echo "MAKEINFO = ${MAKEINFO}"
|
||||||
rm -f Makefile
|
rm -f Makefile
|
||||||
cat > Makefile << EOF
|
cat > Makefile << EOF
|
||||||
# Makefile for Lzlib - Compression library for the lzip format
|
# 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 file was generated automatically by configure. Don't edit.
|
||||||
#
|
#
|
||||||
# This Makefile is free software: you have unlimited permission
|
# This Makefile is free software: you have unlimited permission
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Lzlib - Compression library for the lzip format
|
/* 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
|
This library is free software. Redistribution and use in source and
|
||||||
binary forms, with or without modification, are permitted provided
|
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_rep0[*state] ) == 0 ) /* 3rd bit */
|
||||||
{
|
{
|
||||||
if( Rd_decode_bit( rdec, &d->bm_len[*state][pos_state] ) == 0 ) /* 4th 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; }
|
LZd_put_byte( d, LZd_peek( d, d->rep0 ) ); continue; }
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Lzlib - Compression library for the lzip format
|
/* 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
|
This library is free software. Redistribution and use in source and
|
||||||
binary forms, with or without modification, are permitted provided
|
binary forms, with or without modification, are permitted provided
|
||||||
|
|
|
@ -11,7 +11,7 @@ File: lzlib.info, Node: Top, Next: Introduction, Up: (dir)
|
||||||
Lzlib Manual
|
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:
|
* Menu:
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ This manual is for Lzlib (version 1.15-rc1, 19 November 2024).
|
||||||
* Concept index:: Index of concepts
|
* 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,
|
This manual is free documentation: you have unlimited permission to copy,
|
||||||
distribute, and modify it.
|
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
|
are given in the files 'bbexample.c', 'ffexample.c', and 'minilzip.c' from
|
||||||
the source distribution.
|
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
|
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
|
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
|
'lzlib.h' some header that declares the type 'uint8_t'. There are at least
|
||||||
|
@ -1280,28 +1280,28 @@ Concept index
|
||||||
|
|
||||||
Tag Table:
|
Tag Table:
|
||||||
Node: Top215
|
Node: Top215
|
||||||
Node: Introduction1343
|
Node: Introduction1337
|
||||||
Node: Library version5506
|
Node: Library version5500
|
||||||
Node: Buffering8057
|
Node: Buffering8051
|
||||||
Node: Parameter limits9282
|
Node: Parameter limits9276
|
||||||
Node: Compression functions10236
|
Node: Compression functions10230
|
||||||
Ref: member_size12012
|
Ref: member_size12006
|
||||||
Ref: sync_flush13753
|
Ref: sync_flush13747
|
||||||
Node: Decompression functions18319
|
Node: Decompression functions18313
|
||||||
Node: Error codes25706
|
Node: Error codes25700
|
||||||
Node: Error messages28051
|
Node: Error messages28045
|
||||||
Node: Invoking minilzip28634
|
Node: Invoking minilzip28628
|
||||||
Node: File format39716
|
Node: File format39710
|
||||||
Ref: coded-dict-size41214
|
Ref: coded-dict-size41208
|
||||||
Node: Examples42621
|
Node: Examples42615
|
||||||
Node: Buffer compression43582
|
Node: Buffer compression43576
|
||||||
Node: Buffer decompression45095
|
Node: Buffer decompression45089
|
||||||
Node: File compression46502
|
Node: File compression46496
|
||||||
Node: File decompression47478
|
Node: File decompression47472
|
||||||
Node: File compression mm48475
|
Node: File compression mm48469
|
||||||
Node: Skipping data errors51486
|
Node: Skipping data errors51480
|
||||||
Node: Problems52784
|
Node: Problems52778
|
||||||
Node: Concept index53345
|
Node: Concept index53339
|
||||||
|
|
||||||
End Tag Table
|
End Tag Table
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
@finalout
|
@finalout
|
||||||
@c %**end of header
|
@c %**end of header
|
||||||
|
|
||||||
@set UPDATED 19 November 2024
|
@set UPDATED 9 January 2025
|
||||||
@set VERSION 1.15-rc1
|
@set VERSION 1.15
|
||||||
|
|
||||||
@dircategory Compression
|
@dircategory Compression
|
||||||
@direntry
|
@direntry
|
||||||
|
@ -52,7 +52,7 @@ This manual is for Lzlib (version @value{VERSION}, @value{UPDATED}).
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@sp 1
|
@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,
|
This manual is free documentation: you have unlimited permission to copy,
|
||||||
distribute, and modify it.
|
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
|
given in the files @file{bbexample.c}, @file{ffexample.c}, and
|
||||||
@file{minilzip.c} from the source distribution.
|
@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
|
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
|
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
|
@file{lzlib.h} some header that declares the type @samp{uint8_t}. There are
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
.\" 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
|
.SH NAME
|
||||||
minilzip \- reduces the size of files
|
minilzip \- reduces the size of files
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -116,12 +116,12 @@ Report bugs to lzip\-bug@nongnu.org
|
||||||
.br
|
.br
|
||||||
Lzlib home page: http://www.nongnu.org/lzip/lzlib.html
|
Lzlib home page: http://www.nongnu.org/lzip/lzlib.html
|
||||||
.SH COPYRIGHT
|
.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>
|
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
|
||||||
.br
|
.br
|
||||||
This is free software: you are free to change and redistribute it.
|
This is free software: you are free to change and redistribute it.
|
||||||
There is NO WARRANTY, to the extent permitted by law.
|
There is NO WARRANTY, to the extent permitted by law.
|
||||||
Using lzlib 1.15\-rc1
|
Using lzlib 1.15
|
||||||
Using LZ_API_VERSION = 1015
|
Using LZ_API_VERSION = 1015
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
The full documentation for
|
The full documentation for
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Lzlib - Compression library for the lzip format
|
/* 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
|
This library is free software. Redistribution and use in source and
|
||||||
binary forms, with or without modification, are permitted provided
|
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;
|
cur_state = e->trials[prev_index].state;
|
||||||
if( prev_index + 1 == cur ) /* len == 1 */
|
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 cur_state = St_set_char( cur_state ); /* literal */
|
||||||
}
|
}
|
||||||
else if( dis4 < num_rep_distances ) cur_state = St_set_rep( cur_state );
|
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 )
|
if( dis > 1 )
|
||||||
Re_encode_bit( &e->eb.renc, &e->eb.bm_rep2[*state], dis > 2 );
|
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
|
else
|
||||||
{
|
{
|
||||||
Re_encode_len( &e->eb.renc, &e->eb.rep_len_model, len, pos_state );
|
Re_encode_len( &e->eb.renc, &e->eb.rep_len_model, len, pos_state );
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Lzlib - Compression library for the lzip format
|
/* 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
|
This library is free software. Redistribution and use in source and
|
||||||
binary forms, with or without modification, are permitted provided
|
binary forms, with or without modification, are permitted provided
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Lzlib - Compression library for the lzip format
|
/* 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
|
This library is free software. Redistribution and use in source and
|
||||||
binary forms, with or without modification, are permitted provided
|
binary forms, with or without modification, are permitted provided
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Lzlib - Compression library for the lzip format
|
/* 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
|
This library is free software. Redistribution and use in source and
|
||||||
binary forms, with or without modification, are permitted provided
|
binary forms, with or without modification, are permitted provided
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Lzlib - Compression library for the lzip format
|
/* 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
|
This library is free software. Redistribution and use in source and
|
||||||
binary forms, with or without modification, are permitted provided
|
binary forms, with or without modification, are permitted provided
|
||||||
|
@ -142,22 +142,22 @@ static bool FLZe_encode_member( FLZ_encoder * const fe )
|
||||||
|
|
||||||
if( match_byte == cur_byte )
|
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] ) +
|
price1( fe->eb.bm_rep[*state] ) +
|
||||||
price0( fe->eb.bm_rep0[*state] ) +
|
price0( fe->eb.bm_rep0[*state] ) +
|
||||||
price0( fe->eb.bm_len[*state][pos_state] );
|
price0( fe->eb.bm_len[*state][pos_state] );
|
||||||
int price = price0( fe->eb.bm_match[*state][pos_state] );
|
int price = price0( fe->eb.bm_match[*state][pos_state] );
|
||||||
if( St_is_char( *state ) )
|
if( St_is_char( *state ) )
|
||||||
price += LZeb_price_literal( &fe->eb, prev_byte, cur_byte );
|
price += LZeb_price_literal( &fe->eb, prev_byte, cur_byte );
|
||||||
else
|
else
|
||||||
price += LZeb_price_matched( &fe->eb, prev_byte, cur_byte, match_byte );
|
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_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_rep[*state], 1 );
|
||||||
Re_encode_bit( &fe->eb.renc, &fe->eb.bm_rep0[*state], 0 );
|
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 );
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Lzlib - Compression library for the lzip format
|
/* 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
|
This library is free software. Redistribution and use in source and
|
||||||
binary forms, with or without modification, are permitted provided
|
binary forms, with or without modification, are permitted provided
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* File to file example - Test program for the library lzlib
|
/* 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
|
This program is free software: you have unlimited permission
|
||||||
to copy, distribute, and modify it.
|
to copy, distribute, and modify it.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Lzcheck - Test program for the library lzlib
|
/* 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
|
This program is free software: you have unlimited permission
|
||||||
to copy, distribute, and modify it.
|
to copy, distribute, and modify it.
|
||||||
|
|
4
lzip.h
4
lzip.h
|
@ -1,5 +1,5 @@
|
||||||
/* Lzlib - Compression library for the lzip format
|
/* 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
|
This library is free software. Redistribution and use in source and
|
||||||
binary forms, with or without modification, are permitted provided
|
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; }
|
{ return ( st < 7 ) ? 7 : 10; }
|
||||||
static inline State St_set_rep( const State st )
|
static inline State St_set_rep( const State st )
|
||||||
{ return ( st < 7 ) ? 8 : 11; }
|
{ 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; }
|
{ return ( st < 7 ) ? 9 : 11; }
|
||||||
|
|
||||||
|
|
||||||
|
|
2
lzlib.c
2
lzlib.c
|
@ -1,5 +1,5 @@
|
||||||
/* Lzlib - Compression library for the lzip format
|
/* 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
|
This library is free software. Redistribution and use in source and
|
||||||
binary forms, with or without modification, are permitted provided
|
binary forms, with or without modification, are permitted provided
|
||||||
|
|
4
lzlib.h
4
lzlib.h
|
@ -1,5 +1,5 @@
|
||||||
/* Lzlib - Compression library for the lzip format
|
/* 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
|
This library is free software. Redistribution and use in source and
|
||||||
binary forms, with or without modification, are permitted provided
|
binary forms, with or without modification, are permitted provided
|
||||||
|
@ -26,7 +26,7 @@ extern "C" {
|
||||||
|
|
||||||
#define LZ_API_VERSION 1015
|
#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
|
typedef enum LZ_Errno
|
||||||
{ LZ_ok = 0, LZ_bad_argument, LZ_mem_error,
|
{ LZ_ok = 0, LZ_bad_argument, LZ_mem_error,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Minilzip - Test program for the library lzlib
|
/* 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
|
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
|
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;
|
int verbosity = 0;
|
||||||
|
|
||||||
static const char * const program_name = "minilzip";
|
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 char * invocation_name = "minilzip"; /* default value */
|
||||||
|
|
||||||
static const struct { const char * from; const char * to; } known_extensions[] = {
|
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 )
|
static const char * format_num3( unsigned long long num )
|
||||||
{
|
{
|
||||||
enum { buffers = 8, bufsize = 4 * sizeof num, n = 10 };
|
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]; }
|
{ num /= 1000; prefix = si_prefix[i]; }
|
||||||
if( prefix ) *(--p) = prefix;
|
if( prefix ) *(--p) = prefix;
|
||||||
}
|
}
|
||||||
const bool split = num >= 100000;
|
const bool split = num >= 10000;
|
||||||
|
|
||||||
for( i = 0; ; )
|
for( i = 0; ; )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# check script for Lzlib - Compression library for the lzip format
|
# 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
|
# This script is free software: you have unlimited permission
|
||||||
# to copy, distribute, and modify it.
|
# to copy, distribute, and modify it.
|
||||||
|
|
Loading…
Add table
Reference in a new issue