Adding upstream version 1.15~pre1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
7684d13d23
commit
f9a7449f7c
13 changed files with 107 additions and 83 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,12 @@
|
||||||
|
2024-04-19 Antonio Diaz Diaz <antonio@gnu.org>
|
||||||
|
|
||||||
|
* Version 1.15-pre1 released.
|
||||||
|
* 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.
|
||||||
|
* INSTALL: Document use of 'make bin'.
|
||||||
|
|
||||||
2024-01-20 Antonio Diaz Diaz <antonio@gnu.org>
|
2024-01-20 Antonio Diaz Diaz <antonio@gnu.org>
|
||||||
|
|
||||||
* Version 1.14 released.
|
* Version 1.14 released.
|
||||||
|
@ -261,6 +270,5 @@
|
||||||
|
|
||||||
Copyright (C) 2009-2024 Antonio Diaz Diaz.
|
Copyright (C) 2009-2024 Antonio Diaz Diaz.
|
||||||
|
|
||||||
This file is a collection of facts, and thus it is not copyrightable,
|
This file is a collection of facts, and thus it is not copyrightable, but just
|
||||||
but just in case, you have unlimited permission to copy, distribute, and
|
in case, you have unlimited permission to copy, distribute, and modify it.
|
||||||
modify it.
|
|
||||||
|
|
14
INSTALL
14
INSTALL
|
@ -35,10 +35,16 @@ extracted from the archive.
|
||||||
|
|
||||||
./configure CFLAGS+='-D __USE_MINGW_ANSI_STDIO'
|
./configure CFLAGS+='-D __USE_MINGW_ANSI_STDIO'
|
||||||
|
|
||||||
3. Run make.
|
3. Run make
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
|
to build the library, or
|
||||||
|
|
||||||
|
make bin
|
||||||
|
|
||||||
|
to build also minilzip.
|
||||||
|
|
||||||
4. Optionally, type 'make check' to run the tests that come with lzlib.
|
4. Optionally, type 'make check' to run the tests that come with lzlib.
|
||||||
|
|
||||||
5. Type 'make install' to install the library and any data files and
|
5. Type 'make install' to install the library and any data files and
|
||||||
|
@ -52,9 +58,9 @@ extracted from the archive.
|
||||||
You can install only the library or the info manual by typing
|
You can install only the library or the info manual by typing
|
||||||
'make install-lib' or 'make install-info' respectively.
|
'make install-lib' or 'make install-info' respectively.
|
||||||
|
|
||||||
'make install-bin install-man' installs the program minilzip and its man
|
'make install-bin' installs the program minilzip and its man page. It
|
||||||
page. 'install-bin' installs a shared minilzip if the shared library has
|
installs a shared minilzip if the shared library has been configured.
|
||||||
been configured. Else it installs a static minilzip.
|
Else it installs a static minilzip.
|
||||||
'make install-bin-compress' additionally compresses the man page after
|
'make install-bin-compress' additionally compresses the man page after
|
||||||
installation.
|
installation.
|
||||||
|
|
||||||
|
|
21
Makefile.in
21
Makefile.in
|
@ -20,7 +20,9 @@ objs = carg_parser.o minilzip.o
|
||||||
uninstall uninstall-bin uninstall-lib uninstall-info uninstall-man \
|
uninstall uninstall-bin uninstall-lib uninstall-info uninstall-man \
|
||||||
doc info man check dist clean distclean
|
doc info man check dist clean distclean
|
||||||
|
|
||||||
all : $(progname_static) $(progname_shared)
|
all : lib
|
||||||
|
|
||||||
|
lib : $(libname_static) $(libname_shared)
|
||||||
|
|
||||||
lib$(libname).a : lzlib.o
|
lib$(libname).a : lzlib.o
|
||||||
$(AR) $(ARFLAGS) $@ $<
|
$(AR) $(ARFLAGS) $@ $<
|
||||||
|
@ -28,6 +30,8 @@ lib$(libname).a : lzlib.o
|
||||||
lib$(libname).so.$(pkgversion) : lzlib_sh.o
|
lib$(libname).so.$(pkgversion) : lzlib_sh.o
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -fpic -fPIC -shared -Wl,--soname=lib$(libname).so.$(soversion) -o $@ $<
|
$(CC) $(CFLAGS) $(LDFLAGS) -fpic -fPIC -shared -Wl,--soname=lib$(libname).so.$(soversion) -o $@ $<
|
||||||
|
|
||||||
|
bin : $(progname_static) $(progname_shared)
|
||||||
|
|
||||||
$(progname) : $(objs) lib$(libname).a
|
$(progname) : $(objs) lib$(libname).a
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(objs) lib$(libname).a
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(objs) lib$(libname).a
|
||||||
|
|
||||||
|
@ -54,7 +58,8 @@ lzlib_sh.o : lzlib.c
|
||||||
|
|
||||||
# prevent 'make' from trying to remake source files
|
# prevent 'make' from trying to remake source files
|
||||||
$(VPATH)/configure $(VPATH)/Makefile.in $(VPATH)/doc/$(pkgname).texi : ;
|
$(VPATH)/configure $(VPATH)/Makefile.in $(VPATH)/doc/$(pkgname).texi : ;
|
||||||
%.h %.c : ;
|
MAKEFLAGS += -r
|
||||||
|
.SUFFIXES :
|
||||||
|
|
||||||
lzdeps = lzlib.h lzip.h cbuffer.c decoder.h decoder.c encoder_base.h \
|
lzdeps = lzlib.h lzip.h cbuffer.c decoder.h decoder.c encoder_base.h \
|
||||||
encoder_base.c encoder.h encoder.c fast_encoder.h fast_encoder.c
|
encoder_base.c encoder.h encoder.c fast_encoder.h fast_encoder.c
|
||||||
|
@ -93,21 +98,21 @@ install-strip-compress : install-lib-strip install-info-compress
|
||||||
install-bin-compress : install-bin install-man-compress
|
install-bin-compress : install-bin install-man-compress
|
||||||
install-bin-strip-compress : install-bin-strip install-man-compress
|
install-bin-strip-compress : install-bin-strip install-man-compress
|
||||||
|
|
||||||
install-bin : all
|
install-bin : bin install-man
|
||||||
if [ ! -d "$(DESTDIR)$(bindir)" ] ; then $(INSTALL_DIR) "$(DESTDIR)$(bindir)" ; fi
|
if [ ! -d "$(DESTDIR)$(bindir)" ] ; then $(INSTALL_DIR) "$(DESTDIR)$(bindir)" ; fi
|
||||||
$(INSTALL_PROGRAM) ./$(progname_lzip) "$(DESTDIR)$(bindir)/$(progname)"
|
$(INSTALL_PROGRAM) ./$(progname_lzip) "$(DESTDIR)$(bindir)/$(progname)"
|
||||||
|
|
||||||
install-bin-strip : all
|
install-bin-strip : bin
|
||||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install-bin
|
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install-bin
|
||||||
|
|
||||||
install-lib : all
|
install-lib : lib
|
||||||
if [ ! -d "$(DESTDIR)$(includedir)" ] ; then $(INSTALL_DIR) "$(DESTDIR)$(includedir)" ; fi
|
if [ ! -d "$(DESTDIR)$(includedir)" ] ; then $(INSTALL_DIR) "$(DESTDIR)$(includedir)" ; fi
|
||||||
if [ ! -d "$(DESTDIR)$(libdir)" ] ; then $(INSTALL_DIR) "$(DESTDIR)$(libdir)" ; fi
|
if [ ! -d "$(DESTDIR)$(libdir)" ] ; then $(INSTALL_DIR) "$(DESTDIR)$(libdir)" ; fi
|
||||||
$(INSTALL_DATA) $(VPATH)/$(libname)lib.h "$(DESTDIR)$(includedir)/$(libname)lib.h"
|
$(INSTALL_DATA) $(VPATH)/$(libname)lib.h "$(DESTDIR)$(includedir)/$(libname)lib.h"
|
||||||
if [ -n "$(progname_static)" ] ; then \
|
if [ -n "$(libname_static)" ] ; then \
|
||||||
$(INSTALL_DATA) ./lib$(libname).a "$(DESTDIR)$(libdir)/lib$(libname).a" ; \
|
$(INSTALL_DATA) ./lib$(libname).a "$(DESTDIR)$(libdir)/lib$(libname).a" ; \
|
||||||
fi
|
fi
|
||||||
if [ -n "$(progname_shared)" ] ; then \
|
if [ -n "$(libname_shared)" ] ; then \
|
||||||
$(INSTALL_PROGRAM) ./lib$(libname).so.$(pkgversion) "$(DESTDIR)$(libdir)/lib$(libname).so.$(pkgversion)" ; \
|
$(INSTALL_PROGRAM) ./lib$(libname).so.$(pkgversion) "$(DESTDIR)$(libdir)/lib$(libname).so.$(pkgversion)" ; \
|
||||||
if [ -e "$(DESTDIR)$(libdir)/lib$(libname).so.$(soversion)" ] ; then \
|
if [ -e "$(DESTDIR)$(libdir)/lib$(libname).so.$(soversion)" ] ; then \
|
||||||
run_ldconfig=no ; \
|
run_ldconfig=no ; \
|
||||||
|
@ -121,7 +126,7 @@ install-lib : all
|
||||||
[ -x "$(LDCONFIG)" ] ; then "$(LDCONFIG)" -n "$(DESTDIR)$(libdir)" || true ; fi ; \
|
[ -x "$(LDCONFIG)" ] ; then "$(LDCONFIG)" -n "$(DESTDIR)$(libdir)" || true ; fi ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install-lib-strip : all
|
install-lib-strip : lib
|
||||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install-lib
|
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install-lib
|
||||||
|
|
||||||
install-info :
|
install-info :
|
||||||
|
|
22
NEWS
22
NEWS
|
@ -1,19 +1,11 @@
|
||||||
Changes in version 1.14:
|
Changes in version 1.15:
|
||||||
|
|
||||||
In minilzip, file diagnostics have been reformatted as 'PROGRAM: FILE: MESSAGE'.
|
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.
|
||||||
|
|
||||||
In minilzip, diagnostics caused by invalid arguments to command-line options
|
minilzip is no longer built by default.
|
||||||
now show the argument and the name of the option.
|
|
||||||
|
|
||||||
The option '-o, --output' of minilzip now preserves dates, permissions, and
|
'install-bin' installs minilzip and its man page again.
|
||||||
ownership of the file, when (de)compressing exactly one file.
|
|
||||||
|
|
||||||
It has been documented in the manual that it is the responsibility of the
|
The use of the target 'bin' has been documented in INSTALL.
|
||||||
program using lzlib to include before 'lzlib.h' some header that declares
|
|
||||||
the type 'uint8_t'. (Reported by Michal Górny).
|
|
||||||
|
|
||||||
The variable MAKEINFO has been added to configure and Makefile.in.
|
|
||||||
|
|
||||||
It has been documented in INSTALL that when choosing a C standard, the POSIX
|
|
||||||
features need to be enabled explicitly:
|
|
||||||
./configure CFLAGS+='--std=c99 -D_XOPEN_SOURCE=500'
|
|
||||||
|
|
2
README
2
README
|
@ -83,7 +83,7 @@ Lzlib currently implements two variants of the LZMA algorithm: fast (used by
|
||||||
option '-0' of minilzip) and normal (used by all other compression levels).
|
option '-0' of minilzip) and normal (used by all other compression levels).
|
||||||
|
|
||||||
The high compression of LZMA comes from combining two basic, well-proven
|
The high compression of LZMA comes from combining two basic, well-proven
|
||||||
compression ideas: sliding dictionaries (LZ77) and markov models (the thing
|
compression ideas: sliding dictionaries (LZ77) and Markov models (the thing
|
||||||
used by every compression algorithm that uses a range encoder or similar
|
used by every compression algorithm that uses a range encoder or similar
|
||||||
order-0 entropy coder as its last stage) with segregation of contexts
|
order-0 entropy coder as its last stage) with segregation of contexts
|
||||||
according to what the bits are used for.
|
according to what the bits are used for.
|
||||||
|
|
13
configure
vendored
13
configure
vendored
|
@ -6,14 +6,16 @@
|
||||||
# to copy, distribute, and modify it.
|
# to copy, distribute, and modify it.
|
||||||
|
|
||||||
pkgname=lzlib
|
pkgname=lzlib
|
||||||
pkgversion=1.14
|
pkgversion=1.15-pre1
|
||||||
soversion=1
|
soversion=1
|
||||||
|
libname=lz
|
||||||
|
libname_static=lib${libname}.a
|
||||||
|
libname_shared=
|
||||||
progname=minilzip
|
progname=minilzip
|
||||||
progname_static=${progname}
|
progname_static=${progname}
|
||||||
progname_shared=
|
progname_shared=
|
||||||
progname_lzip=${progname}
|
progname_lzip=${progname}
|
||||||
disable_ldconfig=
|
disable_ldconfig=
|
||||||
libname=lz
|
|
||||||
srctrigger=doc/${pkgname}.texi
|
srctrigger=doc/${pkgname}.texi
|
||||||
|
|
||||||
# clear some things potentially inherited from environment.
|
# clear some things potentially inherited from environment.
|
||||||
|
@ -115,10 +117,13 @@ while [ $# != 0 ] ; do
|
||||||
--mandir=*) mandir=${optarg} ;;
|
--mandir=*) mandir=${optarg} ;;
|
||||||
--no-create) no_create=yes ;;
|
--no-create) no_create=yes ;;
|
||||||
--disable-static)
|
--disable-static)
|
||||||
|
libname_static=
|
||||||
|
libname_shared=lib${libname}.so.${pkgversion}
|
||||||
progname_static=
|
progname_static=
|
||||||
progname_shared=${progname}_shared
|
progname_shared=${progname}_shared
|
||||||
progname_lzip=${progname}_shared ;;
|
progname_lzip=${progname}_shared ;;
|
||||||
--enable-shared)
|
--enable-shared)
|
||||||
|
libname_shared=lib${libname}.so.${pkgversion}
|
||||||
progname_shared=${progname}_shared
|
progname_shared=${progname}_shared
|
||||||
progname_lzip=${progname}_shared ;;
|
progname_lzip=${progname}_shared ;;
|
||||||
--disable-ldconfig) disable_ldconfig=yes ;;
|
--disable-ldconfig) disable_ldconfig=yes ;;
|
||||||
|
@ -216,12 +221,14 @@ cat > Makefile << EOF
|
||||||
pkgname = ${pkgname}
|
pkgname = ${pkgname}
|
||||||
pkgversion = ${pkgversion}
|
pkgversion = ${pkgversion}
|
||||||
soversion = ${soversion}
|
soversion = ${soversion}
|
||||||
|
libname = ${libname}
|
||||||
|
libname_static = ${libname_static}
|
||||||
|
libname_shared = ${libname_shared}
|
||||||
progname = ${progname}
|
progname = ${progname}
|
||||||
progname_static = ${progname_static}
|
progname_static = ${progname_static}
|
||||||
progname_shared = ${progname_shared}
|
progname_shared = ${progname_shared}
|
||||||
progname_lzip = ${progname_lzip}
|
progname_lzip = ${progname_lzip}
|
||||||
disable_ldconfig = ${disable_ldconfig}
|
disable_ldconfig = ${disable_ldconfig}
|
||||||
libname = ${libname}
|
|
||||||
VPATH = ${srcdir}
|
VPATH = ${srcdir}
|
||||||
prefix = ${prefix}
|
prefix = ${prefix}
|
||||||
exec_prefix = ${exec_prefix}
|
exec_prefix = ${exec_prefix}
|
||||||
|
|
10
decoder.c
10
decoder.c
|
@ -40,7 +40,7 @@ static int LZd_decode_member( struct LZ_decoder * const d )
|
||||||
{
|
{
|
||||||
struct Range_decoder * const rdec = d->rdec;
|
struct Range_decoder * const rdec = d->rdec;
|
||||||
State * const state = &d->state;
|
State * const state = &d->state;
|
||||||
/* unsigned old_mpos = rdec->member_position; */
|
unsigned old_mpos = rdec->member_position;
|
||||||
|
|
||||||
if( d->member_finished ) return 0;
|
if( d->member_finished ) return 0;
|
||||||
if( !Rd_try_reload( rdec ) )
|
if( !Rd_try_reload( rdec ) )
|
||||||
|
@ -49,9 +49,9 @@ static int LZd_decode_member( struct LZ_decoder * const d )
|
||||||
|
|
||||||
while( !Rd_finished( rdec ) )
|
while( !Rd_finished( rdec ) )
|
||||||
{
|
{
|
||||||
/* const unsigned mpos = rdec->member_position;
|
const unsigned mpos = rdec->member_position;
|
||||||
if( mpos - old_mpos > rd_min_available_bytes ) return 5;
|
if( mpos - old_mpos > rd_min_available_bytes ) return 5;
|
||||||
old_mpos = mpos; */
|
old_mpos = mpos;
|
||||||
if( !Rd_enough_available_bytes( rdec ) ) /* check unexpected EOF */
|
if( !Rd_enough_available_bytes( rdec ) ) /* check unexpected EOF */
|
||||||
{ if( !rdec->at_stream_end ) return 0;
|
{ if( !rdec->at_stream_end ) return 0;
|
||||||
if( Cb_empty( &rdec->cb ) ) break; } /* decode until EOF */
|
if( Cb_empty( &rdec->cb ) ) break; } /* decode until EOF */
|
||||||
|
@ -116,9 +116,9 @@ static int LZd_decode_member( struct LZ_decoder * const d )
|
||||||
if( distance == 0xFFFFFFFFU ) /* marker found */
|
if( distance == 0xFFFFFFFFU ) /* marker found */
|
||||||
{
|
{
|
||||||
Rd_normalize( rdec );
|
Rd_normalize( rdec );
|
||||||
/* const unsigned mpos = rdec->member_position;
|
const unsigned mpos = rdec->member_position;
|
||||||
if( mpos - old_mpos > rd_min_available_bytes ) return 5;
|
if( mpos - old_mpos > rd_min_available_bytes ) return 5;
|
||||||
old_mpos = mpos; */
|
old_mpos = mpos;
|
||||||
if( len == min_match_len ) /* End Of Stream marker */
|
if( len == min_match_len ) /* End Of Stream marker */
|
||||||
{
|
{
|
||||||
d->check_trailer_pending = true;
|
d->check_trailer_pending = true;
|
||||||
|
|
|
@ -11,7 +11,7 @@ File: lzlib.info, Node: Top, Next: Introduction, Up: (dir)
|
||||||
Lzlib Manual
|
Lzlib Manual
|
||||||
************
|
************
|
||||||
|
|
||||||
This manual is for Lzlib (version 1.14, 20 January 2024).
|
This manual is for Lzlib (version 1.15-pre1, 19 April 2024).
|
||||||
|
|
||||||
* Menu:
|
* Menu:
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ using the LZMA coding scheme.
|
||||||
levels).
|
levels).
|
||||||
|
|
||||||
The high compression of LZMA comes from combining two basic, well-proven
|
The high compression of LZMA comes from combining two basic, well-proven
|
||||||
compression ideas: sliding dictionaries (LZ77) and markov models (the thing
|
compression ideas: sliding dictionaries (LZ77) and Markov models (the thing
|
||||||
used by every compression algorithm that uses a range encoder or similar
|
used by every compression algorithm that uses a range encoder or similar
|
||||||
order-0 entropy coder as its last stage) with segregation of contexts
|
order-0 entropy coder as its last stage) with segregation of contexts
|
||||||
according to what the bits are used for.
|
according to what the bits are used for.
|
||||||
|
@ -647,7 +647,9 @@ File: lzlib.info, Node: Invoking minilzip, Next: Data format, Prev: Error mes
|
||||||
*******************
|
*******************
|
||||||
|
|
||||||
Minilzip is a test program for the compression library lzlib, compatible
|
Minilzip is a test program for the compression library lzlib, compatible
|
||||||
with lzip 1.4 or newer.
|
(interoperable) with lzip 1.4 or newer. Minilzip is not intended to be
|
||||||
|
installed because lzip has more features, but minilzip is well tested and
|
||||||
|
you can use it as your main compressor if so you wish.
|
||||||
|
|
||||||
Lzip is a lossless data compressor with a user interface similar to the
|
Lzip is a lossless data compressor with a user interface similar to the
|
||||||
one of gzip or bzip2. Lzip uses a simplified form of the 'Lempel-Ziv-Markov
|
one of gzip or bzip2. Lzip uses a simplified form of the 'Lempel-Ziv-Markov
|
||||||
|
@ -1305,28 +1307,28 @@ Concept index
|
||||||
|
|
||||||
Tag Table:
|
Tag Table:
|
||||||
Node: Top215
|
Node: Top215
|
||||||
Node: Introduction1338
|
Node: Introduction1341
|
||||||
Node: Library version6778
|
Node: Library version6781
|
||||||
Node: Buffering9329
|
Node: Buffering9332
|
||||||
Node: Parameter limits10554
|
Node: Parameter limits10557
|
||||||
Node: Compression functions11508
|
Node: Compression functions11511
|
||||||
Ref: member_size13301
|
Ref: member_size13304
|
||||||
Ref: sync_flush15063
|
Ref: sync_flush15066
|
||||||
Node: Decompression functions19751
|
Node: Decompression functions19754
|
||||||
Node: Error codes27308
|
Node: Error codes27311
|
||||||
Node: Error messages29598
|
Node: Error messages29601
|
||||||
Node: Invoking minilzip30177
|
Node: Invoking minilzip30180
|
||||||
Node: Data format40595
|
Node: Data format40774
|
||||||
Ref: coded-dict-size42041
|
Ref: coded-dict-size42220
|
||||||
Node: Examples43446
|
Node: Examples43625
|
||||||
Node: Buffer compression44407
|
Node: Buffer compression44586
|
||||||
Node: Buffer decompression45927
|
Node: Buffer decompression46106
|
||||||
Node: File compression47341
|
Node: File compression47520
|
||||||
Node: File decompression48324
|
Node: File decompression48503
|
||||||
Node: File compression mm49328
|
Node: File compression mm49507
|
||||||
Node: Skipping data errors52357
|
Node: Skipping data errors52536
|
||||||
Node: Problems53662
|
Node: Problems53841
|
||||||
Node: Concept index54223
|
Node: Concept index54402
|
||||||
|
|
||||||
End Tag Table
|
End Tag Table
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
@finalout
|
@finalout
|
||||||
@c %**end of header
|
@c %**end of header
|
||||||
|
|
||||||
@set UPDATED 20 January 2024
|
@set UPDATED 19 April 2024
|
||||||
@set VERSION 1.14
|
@set VERSION 1.15-pre1
|
||||||
|
|
||||||
@dircategory Compression
|
@dircategory Compression
|
||||||
@direntry
|
@direntry
|
||||||
|
@ -158,7 +158,7 @@ Lzlib currently implements two variants of the LZMA algorithm: fast (used by
|
||||||
option @option{-0} of minilzip) and normal (used by all other compression levels).
|
option @option{-0} of minilzip) and normal (used by all other compression levels).
|
||||||
|
|
||||||
The high compression of LZMA comes from combining two basic, well-proven
|
The high compression of LZMA comes from combining two basic, well-proven
|
||||||
compression ideas: sliding dictionaries (LZ77) and markov models (the thing
|
compression ideas: sliding dictionaries (LZ77) and Markov models (the thing
|
||||||
used by every compression algorithm that uses a range encoder or similar
|
used by every compression algorithm that uses a range encoder or similar
|
||||||
order-0 entropy coder as its last stage) with segregation of contexts
|
order-0 entropy coder as its last stage) with segregation of contexts
|
||||||
according to what the bits are used for.
|
according to what the bits are used for.
|
||||||
|
@ -735,7 +735,9 @@ The value of @var{lz_errno} normally comes from a call to
|
||||||
@cindex options
|
@cindex options
|
||||||
|
|
||||||
Minilzip is a test program for the compression library lzlib, compatible
|
Minilzip is a test program for the compression library lzlib, compatible
|
||||||
with lzip 1.4 or newer.
|
(interoperable) with lzip 1.4 or newer. Minilzip is not intended to be
|
||||||
|
installed because lzip has more features, but minilzip is well tested and
|
||||||
|
you can use it as your main compressor if so you wish.
|
||||||
|
|
||||||
@uref{http://www.nongnu.org/lzip/lzip.html,,Lzip}
|
@uref{http://www.nongnu.org/lzip/lzip.html,,Lzip}
|
||||||
is a lossless data compressor with a user interface similar to the one
|
is a lossless data compressor with a user interface similar to the one
|
||||||
|
|
|
@ -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" "January 2024" "minilzip 1.14" "User Commands"
|
.TH MINILZIP "1" "April 2024" "minilzip 1.15-pre1" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
minilzip \- reduces the size of files
|
minilzip \- reduces the size of files
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -7,7 +7,7 @@ minilzip \- reduces the size of files
|
||||||
[\fI\,options\/\fR] [\fI\,files\/\fR]
|
[\fI\,options\/\fR] [\fI\,files\/\fR]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Minilzip is a test program for the compression library lzlib, compatible
|
Minilzip is a test program for the compression library lzlib, compatible
|
||||||
with lzip 1.4 or newer.
|
(interoperable) with lzip 1.4 or newer.
|
||||||
.PP
|
.PP
|
||||||
Lzip is a lossless data compressor with a user interface similar to the one
|
Lzip is a lossless data compressor with a user interface similar to the one
|
||||||
of gzip or bzip2. Lzip uses a simplified form of the 'Lempel\-Ziv\-Markov
|
of gzip or bzip2. Lzip uses a simplified form of the 'Lempel\-Ziv\-Markov
|
||||||
|
@ -116,12 +116,12 @@ Report bugs to lzip\-bug@nongnu.org
|
||||||
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 2024 Antonio Diaz Diaz.
|
||||||
Using lzlib 1.14
|
|
||||||
Using LZ_API_VERSION = 1014
|
|
||||||
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\-pre1
|
||||||
|
Using LZ_API_VERSION = 1015
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
The full documentation for
|
The full documentation for
|
||||||
.B minilzip
|
.B minilzip
|
||||||
|
|
|
@ -126,9 +126,8 @@ static void Mb_reset( struct Matchfinder_base * const mb )
|
||||||
/* End Of Stream marker => (dis == 0xFFFFFFFFU, len == min_match_len) */
|
/* End Of Stream marker => (dis == 0xFFFFFFFFU, len == min_match_len) */
|
||||||
static void LZeb_try_full_flush( struct LZ_encoder_base * const eb )
|
static void LZeb_try_full_flush( struct LZ_encoder_base * const eb )
|
||||||
{
|
{
|
||||||
if( eb->member_finished ||
|
if( eb->member_finished || Cb_free_bytes( &eb->renc.cb ) <
|
||||||
Cb_free_bytes( &eb->renc.cb ) < max_marker_size + eb->renc.ff_count + Lt_size )
|
max_marker_size + eb->renc.ff_count + Lt_size ) return;
|
||||||
return;
|
|
||||||
eb->member_finished = true;
|
eb->member_finished = true;
|
||||||
const int pos_state = Mb_data_position( &eb->mb ) & pos_state_mask;
|
const int pos_state = Mb_data_position( &eb->mb ) & pos_state_mask;
|
||||||
const State state = eb->state;
|
const State state = eb->state;
|
||||||
|
@ -171,9 +170,8 @@ static void LZeb_reset( struct LZ_encoder_base * const eb,
|
||||||
const unsigned long long max_member_size = 0x0008000000000000ULL; /* 2 PiB */
|
const unsigned long long max_member_size = 0x0008000000000000ULL; /* 2 PiB */
|
||||||
int i;
|
int i;
|
||||||
Mb_reset( &eb->mb );
|
Mb_reset( &eb->mb );
|
||||||
eb->member_size_limit =
|
eb->member_size_limit = min( max( min_member_size, member_size ),
|
||||||
min( max( min_member_size, member_size ), max_member_size ) -
|
max_member_size ) - Lt_size - max_marker_size;
|
||||||
Lt_size - max_marker_size;
|
|
||||||
eb->crc = 0xFFFFFFFFU;
|
eb->crc = 0xFFFFFFFFU;
|
||||||
Bm_array_init( eb->bm_literal[0], (1 << literal_context_bits) * 0x300 );
|
Bm_array_init( eb->bm_literal[0], (1 << literal_context_bits) * 0x300 );
|
||||||
Bm_array_init( eb->bm_match[0], states * pos_states );
|
Bm_array_init( eb->bm_match[0], states * pos_states );
|
||||||
|
|
4
lzlib.h
4
lzlib.h
|
@ -24,9 +24,9 @@ extern "C" {
|
||||||
/* LZ_API_VERSION was first defined in lzlib 1.8 to 1.
|
/* LZ_API_VERSION was first defined in lzlib 1.8 to 1.
|
||||||
Since lzlib 1.12, LZ_API_VERSION is defined as (major * 1000 + minor). */
|
Since lzlib 1.12, LZ_API_VERSION is defined as (major * 1000 + minor). */
|
||||||
|
|
||||||
#define LZ_API_VERSION 1014
|
#define LZ_API_VERSION 1015
|
||||||
|
|
||||||
static const char * const LZ_version_string = "1.14";
|
static const char * const LZ_version_string = "1.15-pre1";
|
||||||
|
|
||||||
enum LZ_Errno { LZ_ok = 0, LZ_bad_argument, LZ_mem_error,
|
enum LZ_Errno { LZ_ok = 0, LZ_bad_argument, LZ_mem_error,
|
||||||
LZ_sequence_error, LZ_header_error, LZ_unexpected_eof,
|
LZ_sequence_error, LZ_header_error, LZ_unexpected_eof,
|
||||||
|
|
10
minilzip.c
10
minilzip.c
|
@ -26,7 +26,7 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <limits.h> /* SSIZE_MAX */
|
#include <limits.h> /* CHAR_BIT, SSIZE_MAX */
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h> /* SIZE_MAX */
|
#include <stdint.h> /* SIZE_MAX */
|
||||||
|
@ -117,7 +117,7 @@ static bool delete_output_on_interrupt = false;
|
||||||
static void show_help( void )
|
static void show_help( void )
|
||||||
{
|
{
|
||||||
printf( "Minilzip is a test program for the compression library lzlib, compatible\n"
|
printf( "Minilzip is a test program for the compression library lzlib, compatible\n"
|
||||||
"with lzip 1.4 or newer.\n"
|
"(interoperable) with lzip 1.4 or newer.\n"
|
||||||
"\nLzip is a lossless data compressor with a user interface similar to the one\n"
|
"\nLzip is a lossless data compressor with a user interface similar to the one\n"
|
||||||
"of gzip or bzip2. Lzip uses a simplified form of the 'Lempel-Ziv-Markov\n"
|
"of gzip or bzip2. Lzip uses a simplified form of the 'Lempel-Ziv-Markov\n"
|
||||||
"chain-Algorithm' (LZMA) stream format to maximize interoperability. The\n"
|
"chain-Algorithm' (LZMA) stream format to maximize interoperability. The\n"
|
||||||
|
@ -196,10 +196,10 @@ static void show_version( void )
|
||||||
{
|
{
|
||||||
printf( "%s %s\n", program_name, PROGVERSION );
|
printf( "%s %s\n", program_name, PROGVERSION );
|
||||||
printf( "Copyright (C) %s Antonio Diaz Diaz.\n", program_year );
|
printf( "Copyright (C) %s Antonio Diaz Diaz.\n", program_year );
|
||||||
show_lzlib_version();
|
|
||||||
printf( "License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>\n"
|
printf( "License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>\n"
|
||||||
"This is free software: you are free to change and redistribute it.\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" );
|
"There is NO WARRANTY, to the extent permitted by law.\n" );
|
||||||
|
show_lzlib_version();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -294,6 +294,9 @@ static void Pp_init( struct Pretty_print * const pp,
|
||||||
if( pp->longest_name == 0 ) pp->longest_name = stdin_name_len;
|
if( pp->longest_name == 0 ) pp->longest_name = stdin_name_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Pp_free( struct Pretty_print * const pp )
|
||||||
|
{ if( pp->padded_name ) { free( pp->padded_name ); pp->padded_name = 0; } }
|
||||||
|
|
||||||
static void Pp_set_name( struct Pretty_print * const pp,
|
static void Pp_set_name( struct Pretty_print * const pp,
|
||||||
const char * const filename )
|
const char * const filename )
|
||||||
{
|
{
|
||||||
|
@ -1286,6 +1289,7 @@ int main( const int argc, const char * const argv[] )
|
||||||
program_name, failed_tests,
|
program_name, failed_tests,
|
||||||
( failed_tests == 1 ) ? "file" : "files" );
|
( failed_tests == 1 ) ? "file" : "files" );
|
||||||
free( output_filename );
|
free( output_filename );
|
||||||
|
Pp_free( &pp );
|
||||||
free( filenames );
|
free( filenames );
|
||||||
ap_free( &parser );
|
ap_free( &parser );
|
||||||
return retval;
|
return retval;
|
||||||
|
|
Loading…
Add table
Reference in a new issue