Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 61df7b7

Browse files
author
Antonio Diaz Diaz
committed
LZLib version 1.12 from January 4, 2021
git-svn-id: file:///srv/devel/repo-conversion/dumps/svni@22 5c7ffd35-e7a3-48a6-a47a-8795029375b0
1 parent 99c6c68 commit 61df7b7

40 files changed

+3235
-1868
lines changed

AUTHORS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Lzlib was written by Antonio Diaz Diaz.
22

33
The ideas embodied in lzlib are due to (at least) the following people:
4-
Abraham Lempel and Jacob Ziv (for the LZ algorithm), Andrey Markov (for
5-
the definition of Markov chains), G.N.N. Martin (for the definition of
6-
range encoding), Igor Pavlov (for putting all the above together in
7-
LZMA), and Julian Seward (for bzip2's CLI).
4+
Abraham Lempel and Jacob Ziv (for the LZ algorithm), Andrey Markov (for the
5+
definition of Markov chains), G.N.N. Martin (for the definition of range
6+
encoding), Igor Pavlov (for putting all the above together in LZMA), and
7+
Julian Seward (for bzip2's CLI).

COPYING

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
Lzlib - Compression library for the lzip format
2-
Copyright (C) Antonio Diaz Diaz.
1+
Lzlib - Compression library for the lzip format
2+
Copyright (C) Antonio Diaz Diaz.
33

4-
This library is free software. Redistribution and use in source and
5-
binary forms, with or without modification, are permitted provided
6-
that the following conditions are met:
4+
This library is free software. Redistribution and use in source and
5+
binary forms, with or without modification, are permitted provided
6+
that the following conditions are met:
77

8-
1. Redistributions of source code must retain the above copyright
9-
notice, this list of conditions and the following disclaimer.
8+
1. Redistributions of source code must retain the above copyright
9+
notice, this list of conditions, and the following disclaimer.
1010

11-
2. Redistributions in binary form must reproduce the above copyright
12-
notice, this list of conditions and the following disclaimer in the
13-
documentation and/or other materials provided with the distribution.
11+
2. Redistributions in binary form must reproduce the above copyright
12+
notice, this list of conditions, and the following disclaimer in the
13+
documentation and/or other materials provided with the distribution.
1414

15-
This library is distributed in the hope that it will be useful,
16-
but WITHOUT ANY WARRANTY; without even the implied warranty of
17-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15+
This library is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ChangeLog

Lines changed: 83 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,55 @@
1+
2021-01-02 Antonio Diaz Diaz <[email protected]>
2+
3+
* Version 1.12 released.
4+
* lzlib.h: Define LZ_API_VERSION as 1000 * major + minor. 1.12 = 1012.
5+
This change does not affect the soversion.
6+
* lzlib.h, lzlib.c: New function LZ_api_version.
7+
* LZd_try_verify_trailer: Return 2 if EOF at trailer or EOS marker.
8+
* Decompression speed has been slightly increased.
9+
* decoder.h: Increase 'rd_min_available_bytes' from 8 to 10.
10+
* encoder_base.c (LZeb_try_sync_flush):
11+
Compensate for the increase in 'rd_min_available_bytes'.
12+
* main.c (do_decompress): Fix false report about library stall.
13+
* main.c: New option '--check-lib'.
14+
* main.c (main): Report an error if a file name is empty.
15+
Make '-o' behave like '-c', but writing to file instead of stdout.
16+
Make '-c' and '-o' check whether the output is a terminal only once.
17+
Do not open output if input is a terminal.
18+
Replace 'decompressed', 'compressed' with 'out', 'in' in output.
19+
Set a valid invocation_name even if argc == 0.
20+
* lzlib.texi: Document the new way of verifying the library version.
21+
Document that 'LZ_(de)compress_close' and 'LZ_(de)compress_errno'
22+
can be called with a null argument.
23+
Document that sync flush marker is not allowed in lzip files.
24+
Document the consequences of not calling 'LZ_decompress_finish'.
25+
Document that 'LZ_decompress_read' returns at least once per member.
26+
Document that 'LZ_(de)compress_read' can be called with a null
27+
buffer pointer argument.
28+
Real code examples for common uses have been added to the tutorial.
29+
* bbexample.c: Don't use 'LZ_(de)compress_write_size'.
30+
* lzcheck.c: New options '-s' (sync) and '-m' (member by member).
31+
Test member by member without 'LZ_decompress_finish'.
32+
* ffexample.c: New file containing example functions for file-to-file
33+
compression/decompression.
34+
* Document extraction from tar.lz in '--help' output and man page.
35+
* Makefile.in: 'install-bin' no longer installs the man page.
36+
New targets 'install-bin-compress' and 'install-bin-strip-compress'.
37+
* testsuite: Add 9 new test files.
38+
139
2019-01-02 Antonio Diaz Diaz <[email protected]>
240

341
* Version 1.11 released.
4-
* File_* renamed to Lzip_*.
42+
* Rename File_* to Lzip_*.
543
* LZ_decompress_read: Don't return error until all data is read.
644
* decoder.c (LZd_decode_member): Decode truncated data until EOF.
45+
* cbuffer.c (Cb_read_data): Allow a null buffer pointer.
746
* main.c: Don't allow mixing different operations (-d and -t).
847
* main.c: Check return value of close( infd ).
948
* main.c: Compile on DOS with DJGPP.
10-
* lzlib.texi: Improved descriptions of '-0..-9', '-m' and '-s'.
49+
* lzlib.texi: Improve descriptions of '-0..-9', '-m', and '-s'.
1150
Document that 'LZ_(de)compress_finish' can be called repeatedly.
1251
* configure: Accept appending to CFLAGS, 'CFLAGS+=OPTIONS'.
13-
* Makefile.in: Targets 'install-bin*' renamed to 'install-lib*'.
52+
* Makefile.in: Rename targets 'install-bin*' to 'install-lib*'.
1453
* Makefile.in: Targets 'install-bin*' now install minilzip.
1554
* INSTALL: Document use of CFLAGS+='-D __USE_MINGW_ANSI_STDIO'.
1655

@@ -19,13 +58,13 @@
1958
* Version 1.10 released.
2059
* LZ_compress_finish now adjusts dictionary size for each member.
2160
* lzlib.c (LZ_decompress_read): Detect corrupt header with HD=3.
22-
* main.c: Added new option '--loose-trailing'.
61+
* main.c: New option '--loose-trailing'.
2362
* main.c (main): Option '-S, --volume-size' now keeps input files.
24-
* main.c: Replaced 'bits/byte' with inverse compression ratio.
63+
* main.c: Replace 'bits/byte' with inverse compression ratio.
2564
* main.c: Show final diagnostic when testing multiple files.
2665
* main.c: Do not add a second .lz extension to the arg of -o.
2766
* main.c: Show dictionary size at verbosity level 4 (-vvvv).
28-
* lzlib.texi: Added chapter 'Invoking minilzip'.
67+
* lzlib.texi: New chapter 'Invoking minilzip'.
2968

3069
2017-04-11 Antonio Diaz Diaz <[email protected]>
3170

@@ -34,14 +73,15 @@
3473
* Compression time of options -1 to -9 has been reduced by 1%.
3574
* Decompression time has been reduced by 3%.
3675
* main.c: Continue testing if any input file is a terminal.
37-
* License of the library changed to "2-clause BSD".
76+
* Change the license of the library to "2-clause BSD".
3877

3978
2016-05-17 Antonio Diaz Diaz <[email protected]>
4079

4180
* Version 1.8 released.
4281
* lzlib.h: Define LZ_API_VERSION to 1.
43-
* decoder.c (LZd_verify_trailer): Removed test of final code.
44-
* main.c: Added new option '-a, --trailing-error'.
82+
* lzlib.c (LZ_decompress_sync_to_member): Add skipped size to in_size.
83+
* decoder.c (LZd_verify_trailer): Remove test of final code.
84+
* main.c: New option '-a, --trailing-error'.
4585
* main.c (main): Delete '--output' file if infd is a terminal.
4686
* main.c (main): Don't use stdin more than once.
4787
* configure: Avoid warning on some shells when testing for gcc.
@@ -52,26 +92,25 @@
5292
2015-07-08 Antonio Diaz Diaz <[email protected]>
5393

5494
* Version 1.7 released.
55-
* Ported fast encoder and option '-0' from lzip.
95+
* Port fast encoder and option '-0' from lzip.
5696
* If open-->write-->finish, produce same dictionary size as lzip.
57-
* Makefile.in: Added new targets 'install*-compress'.
97+
* Makefile.in: New targets 'install*-compress'.
5898

5999
2014-08-27 Antonio Diaz Diaz <[email protected]>
60100

61101
* Version 1.6 released.
62102
* Compression ratio of option '-9' has been slightly increased.
63-
* configure: Added new option '--disable-static'.
64-
* configure: Added new option '--disable-ldconfig'.
103+
* configure: New options '--disable-static' and '--disable-ldconfig'.
65104
* Makefile.in: Ignore errors from ldconfig.
66105
* Makefile.in: Use 'CFLAGS' in every invocation of 'CC'.
67106
* main.c (close_and_set_permissions): Behave like 'cp -p'.
68-
* lzlib.texinfo: Renamed to lzlib.texi.
69-
* License changed to "GPL version 2 or later with link exception".
107+
* lzlib.texinfo: Rename to lzlib.texi.
108+
* Change license to "GPL version 2 or later with link exception".
70109

71110
2013-09-15 Antonio Diaz Diaz <[email protected]>
72111

73112
* Version 1.5 released.
74-
* Removed decompression support for version 0 files.
113+
* Remove decompression support for version 0 files.
75114
* The LZ_compress_sync_flush mechanism has been fixed (again).
76115
* Minor fixes.
77116

@@ -82,20 +121,19 @@
82121
* Compression ratio has been slightly increased.
83122
* Compression time has been reduced by 8%.
84123
* Decompression time has been reduced by 7%.
85-
* lzlib.h: Changed 'long long' values to 'unsigned long long'.
124+
* lzlib.h: Change 'long long' values to 'unsigned long long'.
86125
* encoder.c (Mf_init): Reduce minimum buffer size to 64KiB.
87126
* lzlib.c (LZ_decompress_read): Tell LZ_header_error from
88127
LZ_unexpected_eof the same way as lzip does.
89-
* Makefile.in: Added new target 'install-as-lzip'.
90-
* Makefile.in: Added new target 'install-bin'.
128+
* Makefile.in: New targets 'install-as-lzip' and 'install-bin'.
91129
* main.c: Use 'setmode' instead of '_setmode' on Windows and OS/2.
92130
* main.c: Define 'strtoull' to 'strtoul' on Windows.
93131

94132
2012-02-29 Antonio Diaz Diaz <[email protected]>
95133

96134
* Version 1.3 released.
97135
* Translated to C from the C++ source of lzlib 1.2.
98-
* configure: 'datadir' renamed to 'datarootdir'.
136+
* configure: Rename 'datadir' to 'datarootdir'.
99137

100138
2011-10-25 Antonio Diaz Diaz <[email protected]>
101139

@@ -104,10 +142,9 @@
104142
independently of the value of 'pos_state'. This gives better
105143
compression for large values of '--match-length' without being
106144
slower.
107-
* encoder.h encoder.cc: Optimize pair price calculations. This
108-
reduces compression time for large values of '--match-length'
109-
by up to 6%.
110-
* main.cc: Added new option '-F, --recompress'.
145+
* encoder.h, encoder.cc: Optimize pair price calculations, reducing
146+
compression time for large values of '--match-length' by up to 6%.
147+
* main.cc: New option '-F, --recompress'.
111148
* Makefile.in: 'make install' no longer tries to run
112149
'/sbin/ldconfig' on systems lacking it.
113150

@@ -117,7 +154,7 @@
117154
* Compression time has been reduced by 2%.
118155
* All declarations not belonging to the API have been
119156
encapsulated in the namespace 'Lzlib'.
120-
* testsuite: 'test1' renamed to 'test.txt'. Added new tests.
157+
* testsuite: Rename 'test1' to 'test.txt'. New tests.
121158
* Match length limits set by options -1 to -9 of minilzip have
122159
been changed to match those of lzip 1.11.
123160
* main.cc: Set stdin/stdout in binary mode on OS2.
@@ -127,14 +164,11 @@
127164
2010-05-08 Antonio Diaz Diaz <[email protected]>
128165

129166
* Version 1.0 released.
130-
* Added new function LZ_decompress_member_finished.
131-
* Added new function LZ_decompress_member_version.
132-
* Added new function LZ_decompress_dictionary_size.
133-
* Added new function LZ_decompress_data_crc.
134-
* Variables declared 'extern' have been encapsulated in a
135-
namespace.
136-
* main.cc: Fixed warning about fchown's return value being ignored.
137-
* decoder.h: Input_buffer integrated in Range_decoder.
167+
* New functions LZ_decompress_member_version, LZ_decompress_data_crc,
168+
LZ_decompress_member_finished, and LZ_decompress_dictionary_size.
169+
* Variables declared 'extern' have been encapsulated in a namespace.
170+
* main.cc: Fix warning about fchown's return value being ignored.
171+
* decoder.h: Integrate Input_buffer in Range_decoder.
138172

139173
2010-02-10 Antonio Diaz Diaz <[email protected]>
140174

@@ -145,28 +179,26 @@
145179
2010-01-17 Antonio Diaz Diaz <[email protected]>
146180

147181
* Version 0.8 released.
148-
* Added new function LZ_decompress_reset.
149-
* Added new function LZ_decompress_sync_to_member.
150-
* Added new function LZ_decompress_write_size.
151-
* Added new function LZ_strerror.
152-
* lzlib.h: API change. Replaced 'enum' with functions for values
153-
of dictionary size limits to make interface names consistent.
154-
* lzlib.h: API change. 'LZ_errno' replaced with 'LZ_Errno'.
155-
* lzlib.h: API change. Replaced 'void *' with 'struct LZ_Encoder *'
182+
* New functions LZ_decompress_reset, LZ_decompress_sync_to_member,
183+
LZ_decompress_write_size, and LZ_strerror.
184+
* lzlib.h: API change. Replace 'enum' with functions for values of
185+
dictionary size limits to make interface names consistent.
186+
* lzlib.h: API change. Rename 'LZ_errno' to 'LZ_Errno'.
187+
* lzlib.h: API change. Replace 'void *' with 'struct LZ_Encoder *'
156188
and 'struct LZ_Decoder *' to make interface type safe.
157-
* decoder.cc: Truncated member trailer is now correctly detected.
189+
* decoder.cc: A truncated member trailer is now correctly detected.
158190
* encoder.cc: Matchfinder::reset now also clears at_stream_end_,
159191
allowing LZ_compress_restart_member to restart a finished stream.
160192
* lzlib.cc: Accept only query or close operations after a fatal
161193
error has occurred.
162-
* Shared version of lzlib is no longer built by default.
194+
* The shared version of lzlib is no longer built by default.
163195
* check.sh: Use 'test1' instead of 'COPYING' for testing.
164196

165197
2009-10-20 Antonio Diaz Diaz <[email protected]>
166198

167199
* Version 0.7 released.
168200
* Compression time has been reduced by 4%.
169-
* check.sh: Removed -9 to run in less than 256MiB of RAM.
201+
* check.sh: Remove -9 to run in less than 256MiB of RAM.
170202
* lzcheck.cc: Read files of any size up to 2^63 bytes.
171203

172204
2009-09-02 Antonio Diaz Diaz <[email protected]>
@@ -178,15 +210,14 @@
178210

179211
* Version 0.5 released.
180212
* Decompression speed has been improved.
181-
* main.cc (signal_handler): Declared as 'extern "C"'.
213+
* main.cc (signal_handler): Declare as 'extern "C"'.
182214

183215
2009-06-03 Antonio Diaz Diaz <[email protected]>
184216

185217
* Version 0.4 released.
186-
* Added new function LZ_compress_sync_flush.
187-
* Added new function LZ_compress_write_size.
218+
* New functions LZ_compress_sync_flush and LZ_compress_write_size.
188219
* Decompression speed has been improved.
189-
* Added chapter 'Buffering' to the manual.
220+
* lzlib.texinfo: New chapter 'Buffering'.
190221

191222
2009-05-03 Antonio Diaz Diaz <[email protected]>
192223

@@ -196,16 +227,16 @@
196227
2009-04-26 Antonio Diaz Diaz <[email protected]>
197228

198229
* Version 0.2 released.
199-
* Fixed a segfault when decompressing trailing garbage.
200-
* Fixed a false positive in LZ_(de)compress_finished.
230+
* Fix a segfault when decompressing trailing garbage.
231+
* Fix a false positive in LZ_(de)compress_finished.
201232

202233
2009-04-21 Antonio Diaz Diaz <[email protected]>
203234

204235
* Version 0.1 released.
205236

206237

207-
Copyright (C) 2009-2019 Antonio Diaz Diaz.
238+
Copyright (C) 2009-2021 Antonio Diaz Diaz.
208239

209240
This file is a collection of facts, and thus it is not copyrightable,
210-
but just in case, you have unlimited permission to copy, distribute and
241+
but just in case, you have unlimited permission to copy, distribute, and
211242
modify it.

INSTALL

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Requirements
22
------------
3-
You will need a C compiler.
4-
I use gcc 5.3.0 and 4.1.2, but the code should compile with any standards
3+
You will need a C99 compiler. (gcc 3.3.6 or newer is recommended).
4+
I use gcc 6.1.0 and 4.1.2, but the code should compile with any standards
55
compliant compiler.
66
Gcc is available at http://gcc.gnu.org.
77

88
The operating system must allow signal handlers read access to objects with
99
static storage duration so that the cleanup handler for Control-C can delete
10-
the partial output file.
10+
the partial output file. (This requirement is for minilzip only).
1111

1212

1313
Procedure
@@ -41,27 +41,29 @@ the main archive.
4141
documentation. (You may need to run ldconfig also).
4242

4343
Or type 'make install-compress', which additionally compresses the
44-
info manual after installation. (Installing compressed docs may
45-
become the default in the future).
44+
info manual after installation.
45+
(Installing compressed docs may become the default in the future).
4646

47-
You can install only the library, the info manual or the man page by
48-
typing 'make install-lib', 'make install-info' or 'make install-man'
49-
respectively.
47+
You can install only the library or the info manual by typing
48+
'make install-lib' or 'make install-info' respectively.
5049

51-
'make install-bin' installs the minilzip program and its man page.
52-
'install-bin' installs a shared minilzip if the shared library has
50+
'make install-bin install-man' installs the program minilzip and its man
51+
page. 'install-bin' installs a shared minilzip if the shared library has
5352
been configured. Else it installs a static minilzip.
54-
'make install-as-lzip' runs 'make install-bin' and then links
55-
minilzip to the name 'lzip'.
53+
'make install-bin-compress' additionally compresses the man page after
54+
installation.
55+
56+
'make install-as-lzip' runs 'make install-bin' and then links minilzip to
57+
the name 'lzip'.
5658

5759

5860
Another way
5961
-----------
6062
You can also compile lzlib into a separate directory.
61-
To do this, you must use a version of 'make' that supports the 'VPATH'
62-
variable, such as GNU 'make'. 'cd' to the directory where you want the
63+
To do this, you must use a version of 'make' that supports the variable
64+
'VPATH', such as GNU 'make'. 'cd' to the directory where you want the
6365
object files and executables to go and run the 'configure' script.
64-
'configure' automatically checks for the source code in '.', in '..' and
66+
'configure' automatically checks for the source code in '.', in '..', and
6567
in the directory that 'configure' is in.
6668

6769
'configure' recognizes the option '--srcdir=DIR' to control where to
@@ -72,7 +74,7 @@ After running 'configure', you can run 'make' and 'make install' as
7274
explained above.
7375

7476

75-
Copyright (C) 2009-2019 Antonio Diaz Diaz.
77+
Copyright (C) 2009-2021 Antonio Diaz Diaz.
7678

7779
This file is free documentation: you have unlimited permission to copy,
78-
distribute and modify it.
80+
distribute, and modify it.

0 commit comments

Comments
 (0)