Bump version and soname for 5.2.3.
src/liblzma/Makefile.am | 2 +-
src/liblzma/api/lzma/version.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Update NEWS for 5.2.3.
NEWS | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
xz: Fix the Capsicum rights on user_abort_pipe.
src/xz/file_io.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Mention potential sandboxing bugs in INSTALL.
INSTALL | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
liblzma: Avoid multiple definitions of lzma_coder structures.
Only one definition was visible in a translation unit.
It avoided a few casts and temp variables but seems that
this hack doesn't work with link-time optimizations in compilers
as it's not C99/C11 compliant.
Fixes:
http://www.mail-archive.com/xz-devel@tukaani.org/msg00279.html
src/liblzma/common/alone_decoder.c | 44 +++++----
src/liblzma/common/alone_encoder.c | 34 ++++---
src/liblzma/common/auto_decoder.c | 35 ++++---
src/liblzma/common/block_decoder.c | 41 ++++----
src/liblzma/common/block_encoder.c | 40 ++++----
src/liblzma/common/common.h | 18 ++--
src/liblzma/common/index_decoder.c | 33 ++++---
src/liblzma/common/index_encoder.c | 16 ++--
src/liblzma/common/stream_decoder.c | 50 +++++-----
src/liblzma/common/stream_encoder.c | 56 ++++++-----
src/liblzma/common/stream_encoder_mt.c | 124 ++++++++++++++-----------
src/liblzma/delta/delta_common.c | 25 ++---
src/liblzma/delta/delta_decoder.c | 6 +-
src/liblzma/delta/delta_encoder.c | 12 ++-
src/liblzma/delta/delta_private.h | 4 +-
src/liblzma/lz/lz_decoder.c | 60 ++++++------
src/liblzma/lz/lz_decoder.h | 13 ++-
src/liblzma/lz/lz_encoder.c | 57 +++++++-----
src/liblzma/lz/lz_encoder.h | 9 +-
src/liblzma/lzma/lzma2_decoder.c | 32 ++++---
src/liblzma/lzma/lzma2_encoder.c | 51 +++++-----
src/liblzma/lzma/lzma_decoder.c | 27 +++---
src/liblzma/lzma/lzma_encoder.c | 29 +++---
src/liblzma/lzma/lzma_encoder.h | 9 +-
src/liblzma/lzma/lzma_encoder_optimum_fast.c | 3 +-
src/liblzma/lzma/lzma_encoder_optimum_normal.c | 23 ++---
src/liblzma/lzma/lzma_encoder_private.h | 6 +-
src/liblzma/simple/arm.c | 2 +-
src/liblzma/simple/armthumb.c | 2 +-
src/liblzma/simple/ia64.c | 2 +-
src/liblzma/simple/powerpc.c | 2 +-
src/liblzma/simple/simple_coder.c | 61 ++++++------
src/liblzma/simple/simple_private.h | 12 +--
src/liblzma/simple/sparc.c | 2 +-
src/liblzma/simple/x86.c | 15 +--
35 files changed, 532 insertions(+), 423 deletions(-)
Document --enable-sandbox configure option in INSTALL.
INSTALL | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
xz: Add support for sandboxing with Capsicum (disabled by default).
In the v5.2 branch this feature is considered experimental
and thus disabled by default.
The sandboxing is used conditionally as described in main.c.
This isn't optimal but it was much easier to implement than
a full sandboxing solution and it still covers the most common
use cases where xz is writing to standard output. This should
have practically no effect on performance even with small files
as fork() isn't needed.
C and locale libraries can open files as needed. This has been
fine in the past, but it's a problem with things like Capsicum.
io_sandbox_enter() tries to ensure that various locale-related
files have been loaded before cap_enter() is called, but it's
possible that there are other similar problems which haven't
been seen yet.
Currently Capsicum is available on FreeBSD 10 and later
and there is a port to Linux too.
Thanks to Loganaden Velvindron for help.
configure.ac | 41 +++++++++++++++++++++++++++
src/xz/Makefile.am | 2 +-
src/xz/file_io.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/xz/file_io.h | 6 ++++
src/xz/main.c | 18 ++++++++++++
src/xz/private.h | 4 +++
6 files changed, 151 insertions(+), 1 deletion(-)
Fix bugs and otherwise improve ax_check_capsicum.m4.
AU_ALIAS was removed because the new version is incompatible
with the old version.
It no longer checks for <sys/capability.h> separately.
It's enough to test for it as part of AC_CHECK_DECL.
The defines HAVE_CAPSICUM_SYS_CAPSICUM_H and
HAVE_CAPSICUM_SYS_CAPABILITY_H were removed as unneeded.
HAVE_SYS_CAPSICUM_H from AC_CHECK_HEADERS is enough.
It no longer does a useless search for the Capsicum library
if the header wasn't found.
Fixed a bug in ACTION-IF-FOUND (the first argument). Specifying
the argument omitted the default action but the given action
wasn't used instead.
AC_DEFINE([HAVE_CAPSICUM]) is now always called when Capsicum
support is found. Previously it was part of the default
ACTION-IF-FOUND which a custom action would override. Now
the default action only prepends ${CAPSICUM_LIB} to LIBS.
The documentation was updated.
Since there as no serial number, "#serial 2" was added.
m4/ax_check_capsicum.m4 | 103 ++++++++++++++++++++++++------------------------
1 file changed, 51 insertions(+), 52 deletions(-)
Add m4/ax_check_capsicum.m4 for detecting Capsicum support.
The file was loaded from this web page:
https://github.com/google/capsicum-test/blob/dev/autoconf/m4/ax_check_capsicum.m4
Thanks to Loganaden Velvindron for pointing it out for me.
m4/ax_check_capsicum.m4 | 86 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+)
liblzma: Fix a memory leak in error path of lzma_index_dup().
lzma_index_dup() calls index_dup_stream() which, in case of
an error, calls index_stream_end() to free memory allocated
by index_stream_init(). However, it illogically didn't
actually free the memory. To make it logical, the tree
handling code was modified a bit in addition to changing
index_stream_end().
Thanks to Evan Nemerson for the bug report.
src/liblzma/common/index.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
tuklib_cpucores: Add support for sched_getaffinity().
It's available in glibc (GNU/Linux, GNU/kFreeBSD). It's better
than sysconf(_SC_NPROCESSORS_ONLN) because sched_getaffinity()
gives the number of cores available to the process instead of
the total number of cores online.
As a side effect, this commit fixes a bug on GNU/kFreeBSD where
configure would detect the FreeBSD-specific cpuset_getaffinity()
but it wouldn't actually work because on GNU/kFreeBSD it requires
using -lfreebsd-glue when linking. Now the glibc-specific function
will be used instead.
Thanks to Sebastian Andrzej Siewior for the original patch
and testing.
m4/tuklib_cpucores.m4 | 30 +++++++++++++++++++++++++++++-
src/common/tuklib_cpucores.c | 9 +++++++++
2 files changed, 38 insertions(+), 1 deletion(-)
xz: Fix copying of timestamps on Windows.
xz used to call utime() on Windows, but its result gets lost
on close(). Using _futime() seems to work.
Thanks to Martok for reporting the bug:
http://www.mail-archive.com/xz-devel@tukaani.org/msg00261.html
configure.ac | 2 +-
src/xz/file_io.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
xz: Silence warnings from -Wlogical-op.
Thanks to Evan Nemerson.
src/xz/file_io.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
Build: Fix = to += for xz_SOURCES in src/xz/Makefile.am.
Thanks to Christian Kujau.
src/xz/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Build: Bump GNU Gettext version requirement to 0.19.
It silences a few warnings and most people probably have
0.19 even on stable distributions.
Thanks to Christian Kujau.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
liblzma: Disable external SHA-256 by default.
This is the sane thing to do. The conflict with OpenSSL
on some OSes and especially that the OS-provided versions
can be significantly slower makes it clear that it was
a mistake to have the external SHA-256 support enabled by
default.
Those who want it can now pass --enable-external-sha256 to
configure. INSTALL was updated with notes about OSes where
this can be a bad idea.
The SHA-256 detection code in configure.ac had some bugs that
could lead to a build failure in some situations. These were
fixed, although it doesn't matter that much now that the
external SHA-256 is disabled by default.
MINIX >= 3.2.0 uses NetBSD's libc and thus has SHA256_Init
in libc instead of libutil. Support for the libutil version
was removed.
INSTALL | 36 ++++++++++++++++++++++
configure.ac | 76 +++++++++++++++++++++++------------------------
src/liblzma/check/check.h | 16 ++++------
3 files changed, 79 insertions(+), 49 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Build: Avoid SHA256_Init on FreeBSD and MINIX 3.
On FreeBSD 10 and older, SHA256_Init from libmd conflicts
with libcrypto from OpenSSL. The OpenSSL version has
different sizeof(SHA256_CTX) and it can cause weird
problems if wrong SHA256_Init gets used.
Looking at the source, MINIX 3 seems to have a similar issue but
I'm not sure. To be safe, I disabled SHA256_Init on MINIX 3 too.
NetBSD has SHA256_Init in libc and they had a similar problem,
but they already fixed it in 2009.
Thanks to Jim Wilcoxson for the bug report that helped
in finding the problem.
configure.ac | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
tuklib_physmem: Hopefully silence a warning on Windows.
src/common/tuklib_physmem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
liblzma: Make Valgrind happier with optimized (gcc -O2) liblzma.
When optimizing, GCC can reorder code so that an uninitialized
value gets used in a comparison, which makes Valgrind unhappy.
It doesn't happen when compiled with -O0, which I tend to use
when running Valgrind.
Thanks to Rich Prohaska. I remember this being mentioned long
ago by someone else but nothing was done back then.
src/liblzma/lz/lz_encoder.c | 4 ++++
1 file changed, 4 insertions(+)
liblzma: Rename lzma_presets.c back to lzma_encoder_presets.c.
It would be too annoying to update other build systems
just because of this.
src/liblzma/lzma/Makefile.inc | 2 +-
src/liblzma/lzma/{lzma_presets.c => lzma_encoder_presets.c} | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Build: Disable xzdec, lzmadec, and lzmainfo when they cannot be built.
They all need decoder support and if that isn't available,
there's no point trying to build them.
configure.ac | 3 +++
1 file changed, 3 insertions(+)
Build: Simplify $enable_{encoders,decoders} usage a bit.
configure.ac | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Windows/MSVC: Update config.h.
windows/config.h | 6 ++++++
1 file changed, 6 insertions(+)
DOS: Update config.h.
dos/config.h | 6 ++++++
1 file changed, 6 insertions(+)
xz: Make xz buildable even when encoders or decoders are disabled.
The patch is quite long but it's mostly about adding new #ifdefs
to omit code when encoders or decoders have been disabled.
This adds two new #defines to config.h: HAVE_ENCODERS and
HAVE_DECODERS.
configure.ac | 4 ++++
src/xz/Makefile.am | 8 ++++++--
src/xz/args.c | 16 ++++++++++++++++
src/xz/coder.c | 33 +++++++++++++++++++++++++--------
src/xz/main.c | 9 +++++++--
src/xz/private.h | 5 ++++-
6 files changed, 62 insertions(+), 13 deletions(-)
Build: Build LZMA1/2 presets also when only decoder is wanted.
People shouldn't rely on the presets when decoding raw streams,
but xz uses the presets as the starting point for raw decoder
options anyway.
lzma_encocder_presets.c was renamed to lzma_presets.c to
make it clear it's not used solely by the encoder code.
src/liblzma/lzma/Makefile.inc | 6 +++++-
src/liblzma/lzma/{lzma_encoder_presets.c => lzma_presets.c} | 3 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
Build: Fix configure to handle LZMA1 dependency with LZMA2.
Now it gives an error if LZMA1 encoder/decoder is missing
when LZMA2 encoder/decoder was requested. Even better would
be LZMA2 implicitly enabling LZMA1 but it would need more code.
configure.ac | 5 -----
1 file changed, 5 deletions(-)
Build: Don't omit lzma_cputhreads() unless using --disable-threads.
Previously it was omitted if encoders were disabled
with --disable-encoders. It didn't make sense and
it also broke the build.
src/liblzma/common/Makefile.inc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
liblzma: Fix a build failure related to external SHA-256 support.
If an appropriate header and structure were found by configure,
but a library with a usable SHA-256 functions wasn't, the build
failed.
src/liblzma/check/check.h | 32 +++++++++++++++++++++++---------
1 file changed, 23 insertions(+), 9 deletions(-)
xz: Always close the file before trying to delete it.
unlink() can return EBUSY in errno for open files on some
operating systems and file systems.
src/xz/file_io.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Tests: Add tests for the two bugs fixed in index.c.
tests/test_index.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
liblzma: Fix lzma_index_dup() for empty Streams.
Stream Flags and Stream Padding weren't copied from
empty Streams.
src/liblzma/common/index.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
liblzma: Add a note to index.c for those using static analyzers.
src/liblzma/common/index.c | 3 +++
1 file changed, 3 insertions(+)
Bump version and soname for 5.2.2.
src/liblzma/Makefile.am | 2 +-
src/liblzma/api/lzma/version.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Update NEWS for 5.2.2.
NEWS | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
Fix typo in German translation.
As pointed out by Robert Pollak, there's a typo in the German
translation of the compression preset option (-0 ... -9) help text.
"The compressor" translates to "der Komprimierer", and the genitive
form is "des Komprimierers". The old word makes no sense at all.
po/de.po | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Update German translation, mostly wrt orthography
Provide an update of the German translation.
* A lot of compound words were previously written with spaces, while
German orthography is relatively clear in that the components
should not be separated.
* When referring to the actual process of (de)compression rather than the
concept, replace “(De-)Kompression” with “(De-)Komprimierung”.
Previously, both forms were used in this context and are now used in a
manner consistent with “Komprimierung” being more likely to refer to
a process.
* Consistently translate “standard input”/“output”
* Use “Zeichen” instead of false friend “Charakter” for “character”
* Insert commas around relative clauses (as required in German)
* Some other minor corrections
* Capitalize “ß” as “ẞ”
* Consistently start option descriptions in --help with capital letters
Acked-By: Andre Noll <maan@tuebingen.mpg.de>
* Update after msgmerge
po/de.po | 383 ++++++++++++++++++++++++++++++++-------------------------------
1 file changed, 196 insertions(+), 187 deletions(-)
Build: Minor Cygwin cleanup.
Some tests used "cygwin*" and some used "cygwin". I changed
them all to use "cygwin". Shouldn't affect anything in practice.
configure.ac | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Build: Support building of MSYS2 binaries.
configure.ac | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
Windows: Define DLL_EXPORT when building liblzma.dll with MSVC.
src/liblzma/common/common.h uses it to set __declspec(dllexport)
for the API symbols.
Thanks to Adam Walling.
windows/liblzma_dll.vcxproj | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Windows: Omit unneeded header files from MSVC project files.
windows/liblzma.vcxproj | 5 -----
windows/liblzma_dll.vcxproj | 5 -----
2 files changed, 10 deletions(-)
liblzma: A MSVC-specific hack isn't needed with MSVC 2013 and newer.
src/liblzma/api/lzma.h | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
Update THANKS.
THANKS | 2 ++
1 file changed, 2 insertions(+)
Windows: Update the docs.
INSTALL | 29 ++++++++-----
windows/INSTALL-MSVC.txt | 47 ++++++++++++++++++++++
windows/{INSTALL-Windows.txt => INSTALL-MinGW.txt} | 2 +-
3 files changed, 67 insertions(+), 11 deletions(-)
Windows: Add MSVC project files for building liblzma.
Thanks to Adam Walling for creating these files.
windows/liblzma.vcxproj | 359 ++++++++++++++++++++++++++++++++++++++++
windows/liblzma_dll.vcxproj | 388 ++++++++++++++++++++++++++++++++++++++++++++
windows/xz_win.sln | 48 ++++++
3 files changed, 795 insertions(+)
Tests: Fix a memory leak in test_bcj_exact_size.
Thanks to Cristian Rodríguez.
tests/test_bcj_exact_size.c | 1 +
1 file changed, 1 insertion(+)
Fix NEWS about threading in 5.2.0.
Thanks to Andy Hochhaus.
NEWS | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
xz: Document that threaded decompression hasn't been implemented yet.
src/xz/xz.1 | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Revert "xz: Use pipe2() if available."
This reverts commit 7a11c4a8e5e15f13d5fa59233b3172e65428efdd.
It is a problem when libc has pipe2() but the kernel is too
old to have pipe2() and thus pipe2() fails. In xz it's pointless
to have a fallback for non-functioning pipe2(); it's better to
avoid pipe2() completely.
Thanks to Michael Fox for the bug report.
configure.ac | 4 ++--
src/xz/file_io.c | 9 +--------
2 files changed, 3 insertions(+), 10 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Fix the detection of installed RAM on QNX.
The earlier version compiled but didn't actually work
since sysconf(_SC_PHYS_PAGES) always fails (or so I was told).
Thanks to Ole André Vadla Ravnås for the patch and testing.
m4/tuklib_physmem.m4 | 6 +++---
src/common/tuklib_physmem.c | 14 +++++++++++++-
2 files changed, 16 insertions(+), 4 deletions(-)
Fix CPU core count detection on QNX.
It tried to use sysctl() on QNX but
- it broke the build because sysctl() needs -lsocket on QNX;
- sysctl() doesn't work for detecting the core count on QNX
even if it compiled.
sysconf() works. An alternative would have been to use
QNX-specific SYSPAGE_ENTRY(num_cpu) from <sys/syspage.h>.
Thanks to Ole André Vadla Ravnås.
m4/tuklib_cpucores.m4 | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
xz: size_t/uint32_t cleanup in options.c.
src/xz/options.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
xz: Fix a comment and silence a warning in message.c.
src/xz/message.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
liblzma: Silence more uint32_t vs. size_t warnings.
src/liblzma/lz/lz_encoder.c | 2 +-
src/liblzma/lzma/lzma_encoder.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
xz: Make arg_count an unsigned int to silence a warning.
Actually the value of arg_count cannot exceed INT_MAX
but it's nicer as an unsigned int.
src/xz/args.h | 2 +-
src/xz/main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
liblzma: Fix a warning in index.c.
src/liblzma/common/index.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Build: Fix a CR+LF problem when running autoreconf -fi on OS/2.
build-aux/version.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Bump version and soname for 5.2.1.
src/liblzma/Makefile.am | 2 +-
src/liblzma/api/lzma/version.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Update NEWS for 5.2.1.
NEWS | 14 ++++++++++++++
1 file changed, 14 insertions(+)
xz: Use pipe2() if available.
configure.ac | 4 ++--
src/xz/file_io.c | 9 ++++++++-
2 files changed, 10 insertions(+), 3 deletions(-)
liblzma: Fix a compression-ratio regression in LZMA1/2 in fast mode.
The bug was added in the commit
f48fce093b07aeda95c18850f5e086d9f2383380 and thus
affected 5.1.4beta and 5.2.0. Luckily the bug cannot
cause data corruption or other nasty things.
src/liblzma/lzma/lzma_encoder_optimum_fast.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
xz: Fix the fcntl() usage when creating a pipe for the self-pipe trick.
Now it reads the old flags instead of blindly setting O_NONBLOCK.
The old code may have worked correctly, but this is better.
src/xz/file_io.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
tuklib_cpucores: Use cpuset_getaffinity() on FreeBSD if available.
In FreeBSD, cpuset_getaffinity() is the preferred way to get
the number of available cores.
Thanks to Rui Paulo for the patch. I edited it slightly, but
hopefully I didn't break anything.
m4/tuklib_cpucores.m4 | 23 ++++++++++++++++++++++-
src/common/tuklib_cpucores.c | 18 ++++++++++++++++++
2 files changed, 40 insertions(+), 1 deletion(-)
xzdiff: Make the mktemp usage compatible with FreeBSD's mktemp.
Thanks to Rui Paulo for the fix.
src/scripts/xzdiff.in | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Add a few casts to tuklib_integer.h to silence possible warnings.
I heard that Visual Studio 2013 gave warnings without the casts.
Thanks to Gabi Davar.
src/common/tuklib_integer.h | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
liblzma: Set LZMA_MEMCMPLEN_EXTRA depending on the compare method.
src/liblzma/common/memcmplen.h | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
liblzma: Silence harmless Valgrind errors.
Thanks to Torsten Rupp for reporting this. I had
forgotten to run Valgrind before the 5.2.0 release.
src/liblzma/lz/lz_encoder.c | 6 ++++++
1 file changed, 6 insertions(+)
xz: Fix comments.
src/xz/file_io.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
xz: Don't fail if stdout doesn't support O_NONBLOCK.
This is similar to the case with stdin.
Thanks to Brad Smith for the bug report and testing
on OpenBSD.
src/xz/file_io.c | 36 +++++++++++++++---------------------
1 file changed, 15 insertions(+), 21 deletions(-)
xz: Fix a memory leak in DOS-specific code.
src/xz/file_io.c | 2 ++
1 file changed, 2 insertions(+)
xz: Don't fail if stdin doesn't support O_NONBLOCK.
It's a problem at least on OpenBSD which doesn't support
O_NONBLOCK on e.g. /dev/null. I'm not surprised if it's
a problem on other OSes too since this behavior is allowed
in POSIX-1.2008.
The code relying on this behavior was committed in June 2013
and included in 5.1.3alpha released on 2013-10-26. Clearly
the development releases only get limited testing.
src/xz/file_io.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
Tests: Don't hide unexpected error messages in test_files.sh.
Hiding them makes no sense since normally there's no error
when testing the "good" files. With "bad" files errors are
expected and then it makes sense to keep the messages hidden.
tests/test_files.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Update Solaris notes in INSTALL.
Mention the possible "make check" failure on Solaris in the
Solaris-specific section of INSTALL. It was already in
section 4.5 but it is better mention it in the OS-specific
section too.
INSTALL | 4 ++++
1 file changed, 4 insertions(+)
Build: POSIX shell isn't required if scripts are disabled.
INSTALL | 3 ++-
configure.ac | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
DOS: Update Makefile.
dos/Makefile | 1 +
1 file changed, 1 insertion(+)
Windows: Fix bin_i486 to bin_i686 in build.bash.
windows/build.bash | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Docs: Use lzma_cputhreads() in 04_compress_easy_mt.c.
doc/examples/04_compress_easy_mt.c | 30 ++++++++++++++++++++++++++----
1 file changed, 26 insertions(+), 4 deletions(-)
Docs: Update docs/examples/00_README.txt.
doc/examples/00_README.txt | 4 ++++
1 file changed, 4 insertions(+)
Bump version and soname for 5.2.0.
I know that soname != app version, but I skip AGE=1
in -version-info to make the soname match the liblzma
version anyway. It doesn't hurt anything as long as
it doesn't conflict with library versioning rules.
src/liblzma/Makefile.am | 2 +-
src/liblzma/api/lzma/version.h | 6 +++---
src/liblzma/liblzma.map | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
Avoid variable-length arrays in the debug programs.
debug/full_flush.c | 3 ++-
debug/sync_flush.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
Build: Include 04_compress_easy_mt.c in the tarball.
Makefile.am | 1 +
1 file changed, 1 insertion(+)
Fix build when --disable-threads is used.
src/common/mythread.h | 2 ++
1 file changed, 2 insertions(+)
po/fr: improve wording for help for --lzma1/--lzma2.
po/fr.po | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
po/fr: missing line in translation of --extreme.
po/fr.po | 1 +
1 file changed, 1 insertion(+)
Update NEWS for 5.2.0.
NEWS | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
Update NEWS for 5.0.8.
NEWS | 12 ++++++++++++
1 file changed, 12 insertions(+)
xz: Fix a comment.
src/xz/options.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Update INSTALL about the dependencies of the scripts.
INSTALL | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
Windows: Update build instructions.
INSTALL | 15 +++++++++------
windows/INSTALL-Windows.txt | 44 +++++++++++++++++++++-----------------------
2 files changed, 30 insertions(+), 29 deletions(-)
Windows: Update the build script and README-Windows.txt.
The 32-bit build is now for i686 or newer because the
prebuilt MinGW-w64 toolchains include i686 code in the
executables even if one uses -march=i486.
The build script builds 32-bit SSE2 enabled version too.
Run-time detection of SSE2 support would be nice (on any OS)
but it's not implemented in XZ Utils yet.
windows/README-Windows.txt | 30 ++++++++++++++++--------------
windows/build.bash | 23 ++++++++++++++---------
2 files changed, 30 insertions(+), 23 deletions(-)
Windows: Define TUKLIB_SYMBOL_PREFIX in config.h.
It is to keep all symbols in the lzma_ namespace.
windows/config.h | 3 +++
1 file changed, 3 insertions(+)
xz: Update the man page about --threads.
src/xz/xz.1 | 5 -----
1 file changed, 5 deletions(-)
xz: Update the man page about --block-size.
src/xz/xz.1 | 41 +++++++++++++++++++++++++++++++++--------
1 file changed, 33 insertions(+), 8 deletions(-)
po/fr: several more translation updates: reword and handle --ignore-check.
po/fr.po | 50 ++++++++++++++++++++++++++------------------------
1 file changed, 26 insertions(+), 24 deletions(-)
po/fr: yet another place where my email address had to be updated.
po/fr.po | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
po/fr: fix several typos that have been around since the beginning.
po/fr.po | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
po/fr: last batch of new translations for now.
Four new error messages.
po/fr.po | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
po/fr: translations for --threads, --block-size and --block-list.
po/fr.po | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
po/fr: remove fuzzy marker for error messages that will be kept in English.
The following is a copy of a comment inside fr.po:
Note from translator on "file status flags".
The following entry is kept un-translated on purpose. It is difficult to
translate and should only happen in exceptional circumstances which means
that translating would:
- lose some of the meaning
- make it more difficult to look up in search engines; it might happen one
in
a million times, if we dilute the error message in 20 languages, it will be
almost impossible to find an explanation and support for the error.
po/fr.po | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
po/fr: several minor updates and better wording.
Meaning doesn't change at all: it's only for better wording and/or
formatting of a few strings.
po/fr.po | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
po/fr: update my email address and copyright years.
po/fr.po | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
fr.po: commit file after only "update-po" so actual is readable.
po/fr.po | 311 ++++++++++++++++++++++++++++++++++++++++-----------------------
1 file changed, 199 insertions(+), 112 deletions(-)
liblzma: Document how lzma_mt.block_size affects memory usage.
src/liblzma/api/lzma/container.h | 4 ++++
1 file changed, 4 insertions(+)
Update INSTALL about a "make check" failure in test_scripts.sh.
INSTALL | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
Remove LZMA_UNSTABLE macro.
src/liblzma/api/lzma/container.h | 4 ----
src/liblzma/common/common.h | 2 --
src/xz/private.h | 1 -
3 files changed, 7 deletions(-)
liblzma: Update lzma_stream_encoder_mt() API docs.
src/liblzma/api/lzma/container.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
liblzma: Verify the filter chain in threaded encoder initialization.
This way an invalid filter chain is detected at the Stream
encoder initialization instead of delaying it to the first
call to lzma_code() which triggers the initialization of
the actual filter encoder(s).
src/liblzma/common/stream_encoder_mt.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
Build: Update m4/ax_pthread.m4 from Autoconf Archive.
m4/ax_pthread.m4 | 71 +++++++++++++++++++++++++++++++++++++-------------------
1 file changed, 47 insertions(+), 24 deletions(-)
Build: Replace obsolete AC_HELP_STRING with AS_HELP_STRING.
configure.ac | 36 ++++++++++++++++++------------------
m4/tuklib_integer.m4 | 2 +-
2 files changed, 19 insertions(+), 19 deletions(-)
Build: Fix Autoconf warnings about escaped backquotes.
Thanks to Daniel Richard G. for pointing out that it's
good to sometimes run autoreconf -fi with -Wall.
configure.ac | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
xzdiff: Use mkdir if mktemp isn't available.
src/scripts/xzdiff.in | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
xzdiff: Create a temporary directory to hold a temporary file.
This avoids the possibility of "File name too long" when
creating a temp file when the input file name is very long.
This also means that other users on the system can no longer
see the input file names in /tmp (or whatever $TMPDIR is)
since the temporary directory will have a generic name. This
usually doesn't matter since on many systems one can see
the arguments given to all processes anyway.
The number X chars to mktemp where increased from 6 to 10.
Note that with some shells temp files or dirs won't be used at all.
src/scripts/xzdiff.in | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
liblzma: Fix lzma_mt.preset in lzma_stream_encoder_mt_memusage().
It read the filter chain from a wrong variable. This is a similar
bug that was fixed in 9494fb6d0ff41c585326f00aa8f7fe58f8106a5e.
src/liblzma/common/stream_encoder_mt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Update .gitignore files.
.gitignore | 2 ++
m4/.gitignore | 3 +++
2 files changed, 5 insertions(+)
Build: Prepare to support Automake's subdir-objects.
Due to a bug in Automake, subdir-objects won't be enabled
for now.
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17354
Thanks to Daniel Richard G. for the original patches.
configure.ac | 7 ++++++-
src/Makefile.am | 22 +++++++++++++++++++++-
src/liblzma/Makefile.am | 4 ++--
src/lzmainfo/Makefile.am | 4 ++--
src/xz/Makefile.am | 10 +++++-----
src/xzdec/Makefile.am | 8 ++++----
6 files changed, 40 insertions(+), 15 deletions(-)
Translations: Update the Italian translation.
Thanks to Milo Casagrande.
po/it.po | 452 ++++++++++++++++++++++++++++++++++++++-------------------------
1 file changed, 275 insertions(+), 177 deletions(-)
Translations: Update the Polish translation.
Thanks to Jakub Bogusz.
po/pl.po | 332 ++++++++++++++++++++++++++++++++++++++++-----------------------
1 file changed, 214 insertions(+), 118 deletions(-)
l10n: de.po: Change translator email address.
Although the old address is still working, the new one should
be preferred. So this commit changes all three places in de.po
accordingly.
Signed-off-by: Andre Noll <maan@tuebingen.mpg.de>
po/de.po | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
l10n: de.po: Update German translation
Signed-off-by: Andre Noll <maan@systemlinux.org>
po/de.po | 531 +++++++++++++++++++++++++++++++++------------------------------
1 file changed, 281 insertions(+), 250 deletions(-)
l10n: de.po: Fix typo: Schießen -> Schließen.
That's a funny one since "schießen" means to shoot :)
Signed-off-by: Andre Noll <maan@systemlinux.org>
po/de.po | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Add support for AmigaOS/AROS to tuklib_physmem().
Thanks to Fredrik Wikstrom.
m4/tuklib_physmem.m4 | 3 ++-
src/common/tuklib_physmem.c | 7 +++++++
2 files changed, 9 insertions(+), 1 deletion(-)
xzgrep: Avoid passing both -q and -l to grep.
The behavior of grep -ql varies:
- GNU grep behaves like grep -q.
- OpenBSD grep behaves like grep -l.
POSIX doesn't make it 100 % clear what behavior is expected.
Anyway, using both -q and -l at the same time makes no sense
so both options simply should never be used at the same time.
Thanks to Christian Weisgerber.
src/scripts/xzgrep.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
l10n: vi.po: Update Vietnamese translation
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
po/vi.po | 136 +++++++++++++++++++++++++++++++++++++++------------------------
1 file changed, 84 insertions(+), 52 deletions(-)
Build: Detect supported compiler warning flags better.
Clang and nowadays also GCC accept any -Wfoobar option
but then may give a warning that an unknown warning option
was specified. To avoid adding unsupported warning options,
the options are now tested with -Werror.
Thanks to Charles Diza.
configure.ac | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Update NEWS for 5.0.7.
NEWS | 11 +++++++++++
1 file changed, 11 insertions(+)
liblzma: Fix a portability problem in Makefile.am.
POSIX supports $< only in inference rules (suffix rules).
Using it elsewhere is a GNU make extension and doesn't
work e.g. with OpenBSD make.
Thanks to Christian Weisgerber for the patch.
src/liblzma/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Bump the version number to 5.1.4beta.
src/liblzma/api/lzma/version.h | 4 ++--
src/liblzma/liblzma.map | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
Update NEWS for 5.0.6 and 5.1.4beta.
NEWS | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
Update TODO.
TODO | 38 ++++++++++++++++++++++++++++++++++----
1 file changed, 34 insertions(+), 4 deletions(-)
xz: Add --ignore-check.
src/xz/args.c | 7 +++++++
src/xz/args.h | 1 +
src/xz/coder.c | 10 +++++++++-
src/xz/message.c | 2 ++
src/xz/xz.1 | 19 +++++++++++++++++++
5 files changed, 38 insertions(+), 1 deletion(-)
liblzma: Add support for LZMA_IGNORE_CHECK.
src/liblzma/api/lzma/container.h | 24 ++++++++++++++++++++++++
src/liblzma/common/common.h | 1 +
src/liblzma/common/stream_decoder.c | 14 ++++++++++++--
3 files changed, 37 insertions(+), 2 deletions(-)
liblzma: Add support for lzma_block.ignore_check.
Note that this slightly changes how lzma_block_header_decode()
has been documented. Earlier it said that the .version is set
to the lowest required value, but now it says that the .version
field is kept unchanged if possible. In practice this doesn't
affect any old code, because before this commit the only
possible .version was 0.
src/liblzma/api/lzma/block.h | 50 ++++++++++++++++++++++++-------
src/liblzma/common/block_buffer_encoder.c | 2 +-
src/liblzma/common/block_decoder.c | 18 ++++++++---
src/liblzma/common/block_encoder.c | 2 +-
src/liblzma/common/block_header_decoder.c | 12 ++++++--
src/liblzma/common/block_header_encoder.c | 2 +-
src/liblzma/common/block_util.c | 2 +-
7 files changed, 68 insertions(+), 20 deletions(-)
liblzma: Use lzma_memcmplen() in the BT3 match finder.
I had missed this when writing the commit
5db75054e900fa06ef5ade5f2c21dffdd5d16141.
Thanks to Jun I Jin.
src/liblzma/lz/lz_encoder_mf.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
liblzma: SHA-256: Optimize the Maj macro slightly.
The Maj macro is used where multiple things are added
together, so making Maj a sum of two expressions allows
some extra freedom for the compiler to schedule the
instructions.
I learned this trick from
<http://www.hackersdelight.org/corres.txt>.
src/liblzma/check/sha256.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
liblzma: SHA-256: Optimize the way rotations are done.
This looks weird because the rotations become sequential,
but it helps quite a bit on both 32-bit and 64-bit x86:
- It requires fewer instructions on two-operand
instruction sets like x86.
- It requires one register less which matters especially
on 32-bit x86.
I hope this doesn't hurt other archs.
I didn't invent this idea myself, but I don't remember where
I saw it first.
src/liblzma/check/sha256.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
liblzma: SHA-256: Remove the GCC #pragma that became unneeded.
The unrolling in the previous commit should avoid the
situation where a compiler may think that an uninitialized
variable might be accessed.
src/liblzma/check/sha256.c | 5 -----
1 file changed, 5 deletions(-)
liblzma: SHA-256: Unroll a little more.
This way a branch isn't needed for each operation
to choose between blk0 and blk2, and still the code
doesn't grow as much as it would with full unrolling.
src/liblzma/check/sha256.c | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
liblzma: SHA-256: Do the byteswapping without a temporary buffer.
src/liblzma/check/sha256.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
liblzma: Use lzma_memcmplen() in normal mode of LZMA.
Two locations were not changed yet because the simplest change
assumes that the initial "len" may be greater than "limit".
src/liblzma/lzma/lzma_encoder_optimum_normal.c | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
liblzma: Simplify LZMA fast mode code by using memcmp().
src/liblzma/lzma/lzma_encoder_optimum_fast.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
liblzma: Use lzma_memcmplen() in fast mode of LZMA.
src/liblzma/lzma/lzma_encoder_optimum_fast.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
liblzma: Use lzma_memcmplen() in the match finders.
This doesn't change the match finder output.
src/liblzma/lz/lz_encoder.c | 13 ++++++++++++-
src/liblzma/lz/lz_encoder_mf.c | 33 +++++++++++----------------------
2 files changed, 23 insertions(+), 23 deletions(-)
liblzma: Add lzma_memcmplen() for fast memory comparison.
This commit just adds the function. Its uses will be in
separate commits.
This hasn't been tested much yet and it's perhaps a bit early
to commit it but if there are bugs they should get found quite
quickly.
Thanks to Jun I Jin from Intel for help and for pointing out
that string comparison needs to be optimized in liblzma.
configure.ac | 13 +++
src/liblzma/common/Makefile.inc | 1 +
src/liblzma/common/memcmplen.h | 170 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 184 insertions(+)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Translations: Add Vietnamese translation.
Thanks to Trần Ngọc Quân.
po/LINGUAS | 1 +
po/vi.po | 1007 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 1008 insertions(+)
xz: Update the help message of a few options.
Updated: --threads, --block-size, and --block-list
Added: --flush-timeout
src/xz/message.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
xz: Use lzma_cputhreads() instead of own copy of tuklib_cpucores().
src/xz/Makefile.am | 1 -
src/xz/hardware.c | 12 +++++++++---
2 files changed, 9 insertions(+), 4 deletions(-)
liblzma: Add lzma_cputhreads().
src/liblzma/Makefile.am | 8 +++++++-
src/liblzma/api/lzma/hardware.h | 14 ++++++++++++++
src/liblzma/common/Makefile.inc | 1 +
src/liblzma/common/hardware_cputhreads.c | 22 ++++++++++++++++++++++
src/liblzma/liblzma.map | 1 +
5 files changed, 45 insertions(+), 1 deletion(-)
xz: Check for filter chain compatibility for --flush-timeout.
This avoids LZMA_PROG_ERROR from lzma_code() with filter chains
that don't support LZMA_SYNC_FLUSH.
src/xz/coder.c | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
xzgrep: List xzgrep_expected_output in tests/Makefile.am.
tests/Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
xzgrep: Improve the test script.
Now it should be close to the functionality of the original
version by Pavel Raiskup.
tests/Makefile.am | 3 ++-
tests/test_scripts.sh | 24 ++++++++++++++----------
tests/xzgrep_expected_output | 39 +++++++++++++++++++++++++++++++++++++++
3 files changed, 55 insertions(+), 11 deletions(-)
xzgrep: Add a test for the previous fix.
This is a simplified version of Pavel Raiskup's
original patch.
tests/test_scripts.sh | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
xzgrep: exit 0 when at least one file matches.
Mimic the original grep behavior and return exit_success when
at least one xz compressed file matches given pattern.
Original bugreport:
https://bugzilla.redhat.com/show_bug.cgi?id=1108085
Thanks to Pavel Raiskup for the patch.
src/scripts/xzgrep.in | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
xz: Force single-threaded mode when --flush-timeout is used.
src/xz/coder.c | 11 +++++++++++
1 file changed, 11 insertions(+)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
liblzma: Use lzma_alloc_zero() in LZ encoder initialization.
This avoids a memzero() call for a newly-allocated memory,
which can be expensive when encoding small streams with
an over-sized dictionary.
To avoid using lzma_alloc_zero() for memory that doesn't
need to be zeroed, lzma_mf.son is now allocated separately,
which requires handling it separately in normalize() too.
Thanks to Vincenzo Innocente for reporting the problem.
src/liblzma/lz/lz_encoder.c | 84 ++++++++++++++++++++++--------------------
src/liblzma/lz/lz_encoder.h | 2 +-
src/liblzma/lz/lz_encoder_mf.c | 31 +++++++++-------
3 files changed, 62 insertions(+), 55 deletions(-)
liblzma: Add the internal function lzma_alloc_zero().
src/liblzma/common/common.c | 21 +++++++++++++++++++++
src/liblzma/common/common.h | 6 ++++++
2 files changed, 27 insertions(+)
xz: Fix uint64_t vs. size_t which broke 32-bit build.
Thanks to Christian Hesse.
src/xz/coder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Docs: Update comments to refer to lzma/lzma12.h in example programs.
doc/examples/03_compress_custom.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
liblzma: Rename the private API header lzma/lzma.h to lzma/lzma12.h.
It can be confusing that two header files have the same name.
The public API file is still lzma.h.
src/liblzma/api/Makefile.am | 2 +-
src/liblzma/api/lzma.h | 2 +-
src/liblzma/api/lzma/{lzma.h => lzma12.h} | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
Build: Fix the combination of --disable-xzdec --enable-lzmadec.
In this case "make install" could fail if the man page directory
didn't already exist at the destination. If it did exist, a
dangling symlink was created there. Now the link is omitted
instead. This isn't the best fix but it's better than the old
behavior.
src/xzdec/Makefile.am | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
Build: Add --disable-doc to configure.
INSTALL | 6 ++++++
Makefile.am | 2 ++
configure.ac | 6 ++++++
3 files changed, 14 insertions(+)
Update INSTALL.
Add a note about failing "make check". The source of
the problem should be fixed in libtool (if it really is
a libtool bug and not mine) but I'm unable to spend time
on that for now. Thanks to Nelson H. F. Beebe for reporting
the issue.
Add a note about a possible need to run "ldconfig" after
"make install".
INSTALL | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
xz: Rename a variable to avoid a namespace collision on Solaris.
I don't know the details but I have an impression that there's
no problem in practice if using GCC since people have built xz
with GCC (without patching xz), but renaming the variable cannot
hurt either.
Thanks to Mark Ashley.
src/xz/signals.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
Docs: Add example program for threaded encoding.
I didn't add -DLZMA_UNSTABLE to Makefile so one has to
specify it manually as long as LZMA_UNSTABLE is needed.
doc/examples/04_compress_easy_mt.c | 184 +++++++++++++++++++++++++++++++++++++
doc/examples/Makefile | 3 +-
2 files changed, 186 insertions(+), 1 deletion(-)
liblzma: Fix lzma_mt.preset not working with lzma_stream_encoder_mt().
It read the filter chain from a wrong variable.
src/liblzma/common/stream_encoder_mt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
liblzma: Fix typo in a comment.
src/liblzma/api/lzma/block.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Windows: Add config.h for building liblzma with MSVC 2013.
This is for building liblzma. Building xz tool too requires
a little more work. Maybe it will be supported, but for most
MSVC users it's enough to be able to build liblzma.
C99 support in MSVC 2013 is almost usable which is a big
improvement over earlier versions. It's "almost" because
there's a dumb bug that breaks mixed declarations after
an "if" statements unless the "if" statement uses braces:
https://connect.microsoft.com/VisualStudio/feedback/details/808650/visual-studio-2013-c99-compiler-bug
https://connect.microsoft.com/VisualStudio/feedback/details/808472/c99-support-of-mixed-declarations-and-statements-fails-with-certain-types-and-constructs
Hopefully it will get fixed. Then liblzma should be
compilable with MSVC 2013 without patching.
windows/config.h | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 139 insertions(+)
xz: Fix a comment.
src/xz/coder.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Windows: Add MSVC defines for inline and restrict keywords.
src/common/sysdefs.h | 10 ++++++++++
1 file changed, 10 insertions(+)
liblzma: Avoid C99 compound literal arrays.
MSVC 2013 doesn't like them. Maybe they aren't so good
for readability either since many aren't used to them.
src/liblzma/lzma/lzma_encoder_presets.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
liblzma: Remove a useless C99ism from sha256.c.
Unsurprisingly it makes no difference in compiled output.
src/liblzma/check/sha256.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
xz: Fix use of wrong variable.
Since the only call to suffix_set() uses optarg
as the argument, fixing this bug doesn't change
the behavior of the program.
src/xz/suffix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fix typos in comments.
src/common/mythread.h | 2 +-
src/liblzma/check/crc32_fast.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
liblzma: Document the need for block->check for lzma_block_header_decode().
Thanks to Tomer Chachamu.
src/liblzma/api/lzma/block.h | 3 +++
1 file changed, 3 insertions(+)
xz: Update the man page about --block-size and --block-list.
src/xz/xz.1 | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
xz: Make --block-list and --block-size work together in single-threaded.
Previously, --block-list and --block-size only worked together
in threaded mode. Boundaries are specified by --block-list, but
--block-size specifies the maximum size for a Block. Now this
works in single-threaded mode too.
Thanks to James M Leddy for the original patch.
src/xz/coder.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 75 insertions(+), 15 deletions(-)
Bump the version number to 5.1.3alpha.
src/liblzma/api/lzma/version.h | 2 +-
src/liblzma/liblzma.map | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Update NEWS for 5.1.3alpha.
NEWS | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
Update TODO.
TODO | 4 ----
1 file changed, 4 deletions(-)
xz: Document behavior of --block-list with threads.
This needs to be updated before 5.2.0.
src/xz/xz.1 | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
xz: Document --flush-timeout=TIMEOUT on the man page.
src/xz/xz.1 | 37 ++++++++++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
xz: Take advantage of LZMA_FULL_BARRIER with --block-list.
Now if --block-list is used in threaded mode, the encoder
won't need to flush at each Block boundary specified via
--block-list. This improves performance a lot, making
threading helpful with --block-list.
The flush timer was reset after LZMA_FULL_FLUSH but since
LZMA_FULL_BARRIER doesn't flush, resetting the timer is
no longer done.
src/xz/coder.c | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)
liblzma: Support LZMA_FULL_FLUSH and _BARRIER in threaded encoder.
Now --block-list=SIZES works with in the threaded mode too,
although the performance is still bad due to the use of
LZMA_FULL_FLUSH instead of the new LZMA_FULL_BARRIER.
src/liblzma/common/stream_encoder_mt.c | 55 ++++++++++++++++++++++++----------
1 file changed, 39 insertions(+), 16 deletions(-)
liblzma: Add LZMA_FULL_BARRIER support to single-threaded encoder.
In the single-threaded encoder LZMA_FULL_BARRIER is simply
an alias for LZMA_FULL_FLUSH.
src/liblzma/api/lzma/base.h | 37 ++++++++++++++++++++++++++++++-------
src/liblzma/common/common.c | 17 +++++++++++++++--
src/liblzma/common/common.h | 7 ++++++-
src/liblzma/common/stream_encoder.c | 4 +++-
4 files changed, 54 insertions(+), 11 deletions(-)
liblzma: Add block_buffer_encoder.h into Makefile.inc.
This should have been in b465da5988dd59ad98fda10c2e4ea13d0b9c73bc.
src/liblzma/common/Makefile.inc | 1 +
1 file changed, 1 insertion(+)
xz: Add a missing test for TUKLIB_DOSLIKE.
src/xz/file_io.c | 2 ++
1 file changed, 2 insertions(+)
Add native threading support on Windows.
Now liblzma only uses "mythread" functions and types
which are defined in mythread.h matching the desired
threading method.
Before Windows Vista, there is no direct equivalent to
pthread condition variables. Since this package doesn't
use pthread_cond_broadcast(), pre-Vista threading can
still be kept quite simple. The pre-Vista code doesn't
use anything that wasn't already available in Windows 95,
so the binaries should run even on Windows 95 if someone
happens to care.
INSTALL | 41 ++-
configure.ac | 118 ++++++--
src/common/mythread.h | 513 ++++++++++++++++++++++++++-------
src/liblzma/common/stream_encoder_mt.c | 83 +++---
src/xz/coder.c | 8 +-
windows/README-Windows.txt | 2 +-
windows/build.bash | 23 +-
7 files changed, 573 insertions(+), 215 deletions(-)
Build: Remove a comment about Automake 1.10 from configure.ac.
The previous commit supports silent rules and that requires
Automake 1.11.
configure.ac | 2 --
1 file changed, 2 deletions(-)
Build: Create liblzma.pc in a src/liblzma/Makefile.am.
Previously it was done in configure, but doing that goes
against the Autoconf manual. Autoconf requires that it is
possible to override e.g. prefix after running configure
and that doesn't work correctly if liblzma.pc is created
by configure.
A potential downside of this change is that now e.g.
libdir in liblzma.pc is a standalone string instead of
being defined via ${prefix}, so if one overrides prefix
when running pkg-config the libdir won't get the new value.
I don't know if this matters in practice.
Thanks to Vincent Torri.
configure.ac | 1 -
src/liblzma/Makefile.am | 20 ++++++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
Fix the previous commit which broke the build.
Apparently I didn't even compile-test the previous commit.
Thanks to Christian Hesse.
src/common/tuklib_cpucores.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Windows: Add Windows support to tuklib_cpucores().
It is used for Cygwin too. I'm not sure if that is
a good or bad idea.
Thanks to Vincent Torri.
m4/tuklib_cpucores.m4 | 19 +++++++++++++++++--
src/common/tuklib_cpucores.c | 13 ++++++++++++-
2 files changed, 29 insertions(+), 3 deletions(-)
macosx: separate liblzma package
macosx/build.sh | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
macosx: set minimum to leopard
macosx/build.sh | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
move configurables into variables
macosx/build.sh | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Build: Fix the detection of missing CRC32.
Thanks to Vincent Torri.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
xz: Add preliminary support for --flush-timeout=TIMEOUT.
When --flush-timeout=TIMEOUT is used, xz will use
LZMA_SYNC_FLUSH if read() would block and at least
TIMEOUT milliseconds has elapsed since the previous flush.
This can be useful in realtime-like use cases where the
data is simultanously decompressed by another process
(possibly on a different computer). If new uncompressed
input data is produced slowly, without this option xz could
buffer the data for a long time until it would become
decompressible from the output.
If TIMEOUT is 0, the feature is disabled. This is the default.
This commit affects the compression side. Using xz for
the decompression side for the above purpose doesn't work
yet so well because there is quite a bit of input and
output buffering when decompressing.
The --long-help or man page were not updated yet.
The details of this feature may change.
src/xz/args.c | 7 +++++++
src/xz/coder.c | 46 +++++++++++++++++++++++++++++++++++-----------
src/xz/file_io.c | 46 ++++++++++++++++++++++++++++++++++++----------
3 files changed, 78 insertions(+), 21 deletions(-)
xz: Don't set src_eof=true after an I/O error because it's useless.
src/xz/file_io.c | 3 ---
1 file changed, 3 deletions(-)
xz: Fix the test when to read more input.
Testing for end of file was no longer correct after full flushing
became possible with --block-size=SIZE and --block-list=SIZES.
There was no bug in practice though because xz just made a few
unneeded zero-byte reads.
src/xz/coder.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
xz: Move some of the timing code into mytime.[hc].
This switches units from microseconds to milliseconds.
New clock_gettime(CLOCK_MONOTONIC) will be used if available.
There is still a fallback to gettimeofday().
src/xz/Makefile.am | 2 ++
src/xz/coder.c | 5 +++
src/xz/message.c | 54 +++++++++------------------------
src/xz/mytime.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/xz/mytime.h | 47 ++++++++++++++++++++++++++++
src/xz/private.h | 1 +
6 files changed, 158 insertions(+), 40 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
xz: Silence a warning seen with _FORTIFY_SOURCE=2.
Thanks to Christian Hesse.
src/xz/file_io.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
Update NEWS for 5.0.5.
NEWS | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
Man pages: Use similar syntax for synopsis as in xz.
The man pages of lzmainfo, xzmore, and xzdec had similar
constructs as the man page of xz had before the commit
eb6ca9854b8eb9fbf72497c1cf608d6b19d2d494. Eric S. Raymond
didn't mention these man pages in his bug report, but
it's nice to be consistent.
src/lzmainfo/lzmainfo.1 | 4 ++--
src/scripts/xzmore.1 | 6 +++---
src/xzdec/xzdec.1 | 10 +++++-----
3 files changed, 10 insertions(+), 10 deletions(-)
xz: Use non-blocking I/O for the output file.
Now both reading and writing should be without
race conditions with signals.
They might still be signal handling issues left.
Signals are blocked during many operations to avoid
EINTR but it may cause problems e.g. if writing to
stderr blocks when trying to display an error message.
src/xz/file_io.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 49 insertions(+), 8 deletions(-)
xz: Fix return value type in io_write_buf().
It didn't affect the behavior of the code since -1
becomes true anyway.
src/xz/file_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
xz: Use the self-pipe trick to avoid a race condition with signals.
It is possible that a signal to set user_abort arrives right
before a blocking system call is made. In this case the call
may block until another signal arrives, while the wanted
behavior is to make xz clean up and exit as soon as possible.
After this commit, the race condition is avoided with the
input side which already uses non-blocking I/O. The output
side still uses blocking I/O and thus has the race condition.
src/xz/file_io.c | 56 ++++++++++++++++++++++++++++++++++++++++++++------------
src/xz/file_io.h | 8 ++++++++
src/xz/signals.c | 5 +++++
3 files changed, 57 insertions(+), 12 deletions(-)
xz: Use non-blocking I/O for the input file.
src/xz/file_io.c | 156 +++++++++++++++++++++++++++++++++++++++----------------
1 file changed, 111 insertions(+), 45 deletions(-)
xz: Remove an outdated NetBSD-specific comment.
Nowadays errno == EFTYPE is documented in open(2).
src/xz/file_io.c | 4 ----
1 file changed, 4 deletions(-)
xz: Fix error detection of fcntl(fd, F_SETFL, flags) calls.
POSIX says that fcntl(fd, F_SETFL, flags) returns -1 on
error and "other than -1" on success. This is how it is
documented e.g. on OpenBSD too. On Linux, success with
F_SETFL is always 0 (at least accorinding to fcntl(2)
from man-pages 3.51).
src/xz/file_io.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
xz: Fix use of wrong variable in a fcntl() call.
Due to a wrong variable name, when writing a sparse file
to standard output, *all* file status flags were cleared
(to the extent the operating system allowed it) instead of
only clearing the O_APPEND flag. In practice this worked
fine in the common situations on GNU/Linux, but I didn't
check how it behaved elsewhere.
The original flags were still restored correctly. I still
changed the code to use a separate boolean variable to
indicate when the flags should be restored instead of
relying on a special value in stdout_flags.
src/xz/file_io.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
xz: Fix assertion related to posix_fadvise().
Input file can be a FIFO or something else that doesn't
support posix_fadvise() so don't check the return value
even with an assertion. Nothing bad happens if the call
to posix_fadvise() fails.
src/xz/file_io.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
xz: Check the value of lzma_stream_flags.version in --list.
It is a no-op for now, but if an old xz version is used
together with a newer liblzma that supports something new,
then this check becomes important and will stop the old xz
from trying to parse files that it won't understand.
src/xz/list.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Build: Require Automake 1.12 and use serial-tests option.
It should actually still work with Automake 1.10 if
the serial-tests option is removed. Automake 1.13 started
using parallel tests by default and the option to get
the old behavior isn't supported before 1.12.
At least for now, parallel tests don't improve anything
in XZ Utils but they hide the progress output from
test_compress.sh.
configure.ac | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
liblzma: Avoid a warning about a shadowed variable.
On Mac OS X wait() is declared in <sys/wait.h> that
we include one way or other so don't use "wait" as
a variable name.
Thanks to Christian Kujau.
src/liblzma/common/stream_encoder_mt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
xz: Validate Uncompressed Size from Block Header in list.c.
This affects only "xz -lvv". Normal decompression with xz
already detected if Block Header and Index had mismatched
Uncompressed Size fields. So this just makes "xz -lvv"
show such files as corrupt instead of showing the
Uncompressed Size from Index.
src/xz/list.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
Update THANKS.
THANKS | 2 ++
1 file changed, 2 insertions(+)
xz: Make the man page more friendly to doclifter.
Thanks to Eric S. Raymond.
src/xz/xz.1 | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
xz: A couple of man page fixes.
Now the interaction of presets and custom filter chains
is described correctly. Earlier it contradicted itself.
Thanks to DevHC who reported these issues on IRC to me
on 2012-12-14.
src/xz/xz.1 | 35 +++++++++++++++++++++++------------
1 file changed, 23 insertions(+), 12 deletions(-)
xz: Fix interaction between preset and custom filter chains.
There was somewhat illogical behavior when --extreme was
specified and mixed with custom filter chains.
Before this commit, "xz -9 --lzma2 -e" was equivalent
to "xz --lzma2". After it is equivalent to "xz -6e"
(all earlier preset options get forgotten when a custom
filter chain is specified and the default preset is 6
to which -e is applied). I find this less illogical.
This also affects the meaning of "xz -9e --lzma2 -7".
Earlier it was equivalent to "xz -7e" (the -e specified
before a custom filter chain wasn't forgotten). Now it
is "xz -7". Note that "xz -7e" still is the same as "xz -e7".
Hopefully very few cared about this in the first place,
so pretty much no one should even notice this change.
Thanks to Conley Moorhous.
src/xz/coder.c | 35 +++++++++++++++++++++--------------
1 file changed, 21 insertions(+), 14 deletions(-)
Build: Use -Wvla with GCC if supported.
Variable-length arrays are mandatory in C99 but optional in C11.
The code doesn't currently use any VLAs and it shouldn't in the
future either to stay compatible with C11 without requiring any
optional C11 features.
configure.ac | 1 +
1 file changed, 1 insertion(+)
xzdec: Improve the --help message.
The options are now ordered in the same order as in xz's help
message.
Descriptions were added to the options that are ignored.
I left them in parenthesis even if it looks a bit weird
because I find it easier to spot the ignored vs. non-ignored
options from the list that way.
src/xzdec/xzdec.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Update THANKS.
THANKS | 2 ++
1 file changed, 2 insertions(+)
xzgrep: make the '-h' option to be --no-filename equivalent
* src/scripts/xzgrep.in: Accept the '-h' option in argument parsing.
src/scripts/xzgrep.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
liblzma: Be less picky in lzma_alone_decoder().
To avoid false positives when detecting .lzma files,
rare values in dictionary size and uncompressed size fields
were rejected. They will still be rejected if .lzma files
are decoded with lzma_auto_decoder(), but when using
lzma_alone_decoder() directly, such files will now be accepted.
Hopefully this is an OK compromise.
This doesn't affect xz because xz still has its own file
format detection code. This does affect lzmadec though.
So after this commit lzmadec will accept files that xz or
xz-emulating-lzma doesn't.
NOTE: lzma_alone_decoder() still won't decode all .lzma files
because liblzma's LZMA decoder doesn't support lc + lp > 4.
Reported here:
http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/7068827
src/liblzma/common/alone_decoder.c | 22 ++++++++++++++--------
src/liblzma/common/alone_decoder.h | 5 +++--
src/liblzma/common/auto_decoder.c | 2 +-
3 files changed, 18 insertions(+), 11 deletions(-)
liblzma: Use lzma_block_buffer_bound64() in threaded encoder.
Now it uses lzma_block_uncomp_encode() if the data doesn't
fit into the space calculated by lzma_block_buffer_bound64().
src/liblzma/common/stream_encoder_mt.c | 66 +++++++++++++++++++++++++---------
1 file changed, 50 insertions(+), 16 deletions(-)
liblzma: Fix another deadlock in the threaded encoder.
This race condition could cause a deadlock if lzma_end() was
called before finishing the encoding. This can happen with
xz with debugging enabled (non-debugging version doesn't
call lzma_end() before exiting).
src/liblzma/common/stream_encoder_mt.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
liblzma: Add lzma_block_uncomp_encode().
This also adds a new internal function
lzma_block_buffer_bound64() which is similar to
lzma_block_buffer_bound() but uses uint64_t instead
of size_t.
src/liblzma/api/lzma/block.h | 18 ++++++
src/liblzma/common/block_buffer_encoder.c | 94 +++++++++++++++++++++----------
src/liblzma/common/block_buffer_encoder.h | 24 ++++++++
src/liblzma/liblzma.map | 1 +
4 files changed, 106 insertions(+), 31 deletions(-)
Avoid unneeded use of awk in xzless.
Use "read" instead of "awk" in xzless to get the version
number of "less". The need for awk was introduced in
the commit db5c1817fabf7cbb9e4087b1576eb26f0747338e.
Thanks to Ariel P for the patch.
src/scripts/xzless.in | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Make the progress indicator smooth in threaded mode.
This adds lzma_get_progress() to liblzma and takes advantage
of it in xz.
lzma_get_progress() collects progress information from
the thread-specific structures so that fairly accurate
progress information is available to applications. Adding
a new function seemed to be a better way than making the
information directly available in lzma_stream (like total_in
and total_out are) because collecting the information requires
locking mutexes. It's waste of time to do it more often than
the up to date information is actually needed by an application.
src/liblzma/api/lzma/base.h | 22 +++++++++-
src/liblzma/common/common.c | 16 +++++++
src/liblzma/common/common.h | 6 +++
src/liblzma/common/stream_encoder_mt.c | 77 +++++++++++++++++++++++++++++++---
src/liblzma/liblzma.map | 1 +
src/xz/message.c | 20 +++++----
6 files changed, 129 insertions(+), 13 deletions(-)
liblzma: Fix mythread_sync for nested locking.
src/common/mythread.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
xz: Mention --threads in --help.
Thanks to Olivier Delhomme for pointing out that this
was still missing.
src/xz/message.c | 4 ++++
1 file changed, 4 insertions(+)
xzless: Make "less -V" parsing more robust
In v4.999.9beta~30 (xzless: Support compressed standard input,
2009-08-09), xzless learned to parse ‘less -V’ output to figure out
whether less is new enough to handle $LESSOPEN settings starting
with “|-”. That worked well for a while, but the version string from
‘less’ versions 448 (June, 2012) is misparsed, producing a warning:
$ xzless /tmp/test.xz; echo $?
/usr/bin/xzless: line 49: test: 456 (GNU regular expressions): \
integer expression expected
0
More precisely, modern ‘less’ lists the regexp implementation along
with its version number, and xzless passes the entire version number
with attached parenthetical phrase as a number to "test $a -gt $b",
producing the above confusing message.
$ less-444 -V | head -1
less 444
$ less -V | head -1
less 456 (no regular expressions)
So relax the pattern matched --- instead of expecting "less <number>",
look for a line of the form "less <number>[ (extra parenthetical)]".
While at it, improve the behavior when no matching line is found ---
instead of producing a cryptic message, we can fall back on a LESSPIPE
setting that is supported by all versions of ‘less’.
The implementation uses "awk" for simplicity. Hopefully that’s
portable enough.
Reported-by: Jörg-Volker Peetz <jvpeetz@web.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
src/scripts/xzless.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
xz: Fix the note about --rsyncable on the man page.
src/xz/xz.1 | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
xz: Improve handling of failed realloc in xrealloc.
Thanks to Jim Meyering.
src/xz/util.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
A few typo fixes to comments and the xz man page.
Thanks to Jim Meyering.
configure.ac | 2 +-
src/liblzma/check/sha256.c | 1 -
src/xz/xz.1 | 4 ++--
3 files changed, 3 insertions(+), 4 deletions(-)
xz: Add a warning to --help about alpha and beta versions.
src/xz/message.c | 5 +++++
1 file changed, 5 insertions(+)
Build: Bump gettext version requirement to 0.18.
Otherwise too old version of m4/lib-link.m4 gets included
when autoreconf -fi is run.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
liblzma: Make the use of lzma_allocator const-correct.
There is a tiny risk of causing breakage: If an application
assigns lzma_stream.allocator to a non-const pointer, such
code won't compile anymore. I don't know why anyone would do
such a thing though, so in practice this shouldn't cause trouble.
Thanks to Jan Kratochvil for the patch.
src/liblzma/api/lzma/base.h | 4 +++-
src/liblzma/api/lzma/block.h | 6 ++---
src/liblzma/api/lzma/container.h | 9 +++++---
src/liblzma/api/lzma/filter.h | 13 ++++++-----
src/liblzma/api/lzma/index.h | 16 ++++++-------
src/liblzma/api/lzma/index_hash.h | 4 ++--
src/liblzma/common/alone_decoder.c | 6 ++---
src/liblzma/common/alone_decoder.h | 2 +-
src/liblzma/common/alone_encoder.c | 8 +++----
src/liblzma/common/auto_decoder.c | 6 ++---
src/liblzma/common/block_buffer_decoder.c | 2 +-
src/liblzma/common/block_buffer_encoder.c | 4 ++--
src/liblzma/common/block_decoder.c | 6 ++---
src/liblzma/common/block_decoder.h | 2 +-
src/liblzma/common/block_encoder.c | 8 +++----
src/liblzma/common/block_encoder.h | 2 +-
src/liblzma/common/block_header_decoder.c | 4 ++--
src/liblzma/common/common.c | 10 ++++-----
src/liblzma/common/common.h | 20 +++++++++--------
src/liblzma/common/easy_buffer_encoder.c | 4 ++--
src/liblzma/common/filter_buffer_decoder.c | 3 ++-
src/liblzma/common/filter_buffer_encoder.c | 7 +++---
src/liblzma/common/filter_common.c | 4 ++--
src/liblzma/common/filter_common.h | 2 +-
src/liblzma/common/filter_decoder.c | 7 +++---
src/liblzma/common/filter_decoder.h | 2 +-
src/liblzma/common/filter_encoder.c | 2 +-
src/liblzma/common/filter_encoder.h | 2 +-
src/liblzma/common/filter_flags_decoder.c | 2 +-
src/liblzma/common/index.c | 26 ++++++++++-----------
src/liblzma/common/index_decoder.c | 12 +++++-----
src/liblzma/common/index_encoder.c | 6 ++---
src/liblzma/common/index_encoder.h | 2 +-
src/liblzma/common/index_hash.c | 6 +++--
src/liblzma/common/outqueue.c | 4 ++--
src/liblzma/common/outqueue.h | 5 +++--
src/liblzma/common/stream_buffer_decoder.c | 2 +-
src/liblzma/common/stream_buffer_encoder.c | 3 ++-
src/liblzma/common/stream_decoder.c | 9 ++++----
src/liblzma/common/stream_decoder.h | 5 +++--
src/liblzma/common/stream_encoder.c | 10 ++++-----
src/liblzma/common/stream_encoder_mt.c | 16 ++++++-------
src/liblzma/delta/delta_common.c | 4 ++--
src/liblzma/delta/delta_decoder.c | 6 ++---
src/liblzma/delta/delta_decoder.h | 5 +++--
src/liblzma/delta/delta_encoder.c | 6 ++---
src/liblzma/delta/delta_encoder.h | 3 ++-
src/liblzma/delta/delta_private.h | 2 +-
src/liblzma/lz/lz_decoder.c | 8 +++----
src/liblzma/lz/lz_decoder.h | 7 +++---
src/liblzma/lz/lz_encoder.c | 19 ++++++++--------
src/liblzma/lz/lz_encoder.h | 6 ++---
src/liblzma/lzma/lzma2_decoder.c | 8 +++----
src/liblzma/lzma/lzma2_decoder.h | 5 +++--
src/liblzma/lzma/lzma2_encoder.c | 6 ++---
src/liblzma/lzma/lzma2_encoder.h | 2 +-
src/liblzma/lzma/lzma_decoder.c | 8 +++----
src/liblzma/lzma/lzma_decoder.h | 7 +++---
src/liblzma/lzma/lzma_encoder.c | 7 +++---
src/liblzma/lzma/lzma_encoder.h | 5 +++--
src/liblzma/simple/arm.c | 8 ++++---
src/liblzma/simple/armthumb.c | 8 ++++---
src/liblzma/simple/ia64.c | 8 ++++---
src/liblzma/simple/powerpc.c | 8 ++++---
src/liblzma/simple/simple_coder.c | 10 ++++-----
src/liblzma/simple/simple_coder.h | 36 ++++++++++++++++++++----------
src/liblzma/simple/simple_decoder.c | 2 +-
src/liblzma/simple/simple_decoder.h | 2 +-
src/liblzma/simple/simple_private.h | 3 ++-
src/liblzma/simple/sparc.c | 8 ++++---
src/liblzma/simple/x86.c | 8 ++++---
71 files changed, 269 insertions(+), 219 deletions(-)
Tests: Remove tests/test_block.c that had gotten committed accidentally.
tests/test_block.c | 52 ----------------------------------------------------
1 file changed, 52 deletions(-)
Build: Include macosx/build.sh in the distribution.
It has been in the Git repository since 2010 but probably
few people have seen it since it hasn't been included in
the release tarballs. :-(
Makefile.am | 1 +
1 file changed, 1 insertion(+)
Build: Include validate_map.sh in the distribution.
It's required by "make mydist".
Fix also the location of EXTRA_DIST+= so that those files
get distributed also if symbol versioning isn't enabled.
src/liblzma/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Docs: Fix the name LZMA Utils -> XZ Utils in debug/README.
debug/README | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Include debug/translation.bash in the distribution.
Also fix the script name mentioned in README.
README | 4 ++--
debug/Makefile.am | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
xz: Document --block-list better.
Thanks to Jonathan Nieder.
src/xz/xz.1 | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
Bump the version number to 5.1.2alpha.
src/liblzma/api/lzma/version.h | 2 +-
src/liblzma/liblzma.map | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Update NEWS for 5.1.2alpha.
NEWS | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
xz: Fix the version number printed by xz -lvv.
The decoder bug was fixed in 5.0.2 instead of 5.0.3.
src/xz/list.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Build: Add a comment to configure.ac about symbol versioning.
configure.ac | 4 ++++
1 file changed, 4 insertions(+)
Update TODO.
TODO | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
Document --enable-symbol-versions in INSTALL.
INSTALL | 5 +++++
1 file changed, 5 insertions(+)
xz: Add incomplete support for --block-list.
It's broken with threads and when also --block-size is used.
src/xz/args.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/xz/args.h | 1 +
src/xz/coder.c | 48 ++++++++++++++++++++++++++++------
src/xz/coder.h | 4 +++
src/xz/main.c | 1 +
src/xz/message.c | 6 +++++
src/xz/xz.1 | 23 +++++++++++++++--
7 files changed, 151 insertions(+), 10 deletions(-)
xz: Update the man page about the new field in --robot -lvv.
src/xz/xz.1 | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
liblzma: Check that the first byte of range encoded data is 0x00.
It is just to be more pedantic and thus perhaps catch broken
files slightly earlier.
src/liblzma/lzma/lzma_decoder.c | 8 ++++++--
src/liblzma/rangecoder/range_decoder.h | 12 +++++++++---
2 files changed, 15 insertions(+), 5 deletions(-)
Update NEWS from 5.0.4.
NEWS | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
xz: Update man page date to match the latest update.
src/xz/xz.1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Docs: Language fix to 01_compress_easy.c.
Thanks to Jonathan Nieder.
doc/examples/01_compress_easy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fix the top-level Makefile.am for the new example programs.
Makefile.am | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
Docs: Add new example programs.
These have more comments than the old examples and
human-readable error messages. More tutorial-like examples
are needed but these are a start.
doc/examples/00_README.txt | 27 ++++
doc/examples/01_compress_easy.c | 297 ++++++++++++++++++++++++++++++++++++++
doc/examples/02_decompress.c | 287 ++++++++++++++++++++++++++++++++++++
doc/examples/03_compress_custom.c | 193 +++++++++++++++++++++++++
doc/examples/Makefile | 23 +++
5 files changed, 827 insertions(+)
Docs: Move xz_pipe_comp.c and xz_pipe_decomp.c to doc/examples_old.
It is good to keep these around to so that if someone has
copied the decompressor bug from xz_pipe_decomp.c he has
an example how to easily fix it.
doc/{examples => examples_old}/xz_pipe_comp.c | 0
doc/{examples => examples_old}/xz_pipe_decomp.c | 0
2 files changed, 0 insertions(+), 0 deletions(-)
Docs: Fix a bug in xz_pipe_decomp.c example program.
doc/examples/xz_pipe_decomp.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
Translations: Update the French translation.
Thanks to Adrien Nader.
po/fr.po | 148 ++++++++++++++++++++++++++++++++++-----------------------------
1 file changed, 79 insertions(+), 69 deletions(-)
Translations: Update the German translation.
The previous only included the new strings in v5.0.
po/de.po | 229 +++++++++++++++++++++++++++++++++++++--------------------------
1 file changed, 133 insertions(+), 96 deletions(-)
Translations: Update the German translation.
po/de.po | 169 ++++++++++++++++++++++++++++++++++-----------------------------
1 file changed, 91 insertions(+), 78 deletions(-)
Translations: Update Polish translation.
po/pl.po | 283 +++++++++++++++++++++++++++++++++++++--------------------------
1 file changed, 165 insertions(+), 118 deletions(-)
liblzma: Fix possibility of incorrect LZMA_BUF_ERROR.
lzma_code() could incorrectly return LZMA_BUF_ERROR if
all of the following was true:
- The caller knows how many bytes of output to expect
and only provides that much output space.
- When the last output bytes are decoded, the
caller-provided input buffer ends right before
the LZMA2 end of payload marker. So LZMA2 won't
provide more output anymore, but it won't know it
yet and thus won't return LZMA_STREAM_END yet.
- A BCJ filter is in use and it hasn't left any
unfiltered bytes in the temp buffer. This can happen
with any BCJ filter, but in practice it's more likely
with filters other than the x86 BCJ.
Another situation where the bug can be triggered happens
if the uncompressed size is zero bytes and no output space
is provided. In this case the decompression can fail even
if the whole input file is given to lzma_code().
A similar bug was fixed in XZ Embedded on 2011-09-19.
src/liblzma/simple/simple_coder.c | 2 +-
tests/Makefile.am | 4 +-
tests/test_bcj_exact_size.c | 112 ++++++++++++++++++++++++++++++++++++++
3 files changed, 116 insertions(+), 2 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
xz: Don't show a huge number in -vv when memory limit is disabled.
src/xz/message.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
xz: Document the "summary" lines of --robot -lvv.
This documents only the columns that are in v5.0.
The new columns added in the master branch aren't
necessarily stable yet.
src/xz/xz.1 | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
xz: Fix output of verbose --robot --list modes.
It printed the filename in "filename (x/y)" format
which it obviously shouldn't do in robot mode.
src/xz/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Build: Upgrade m4/acx_pthread.m4 to the latest version.
m4/ax_pthread.m4 | 98 +++++++++++++++++++++++++++++++++++---------------------
1 file changed, 62 insertions(+), 36 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Docs: Cleanup line wrapping a bit.
README | 12 ++++++------
doc/history.txt | 49 +++++++++++++++++++++++++------------------------
2 files changed, 31 insertions(+), 30 deletions(-)
Fix a few typos and add some missing articles in some documents.
Also hyphenate several compound adjectives.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
AUTHORS | 6 +++---
README | 42 ++++++++++++++++++++---------------------
doc/faq.txt | 24 ++++++++++++------------
doc/history.txt | 58 ++++++++++++++++++++++++++++-----------------------------
4 files changed, 65 insertions(+), 65 deletions(-)
Windows: Update notes about static linking with MSVC.
windows/README-Windows.txt | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
liblzma: Remove outdated comments.
src/liblzma/simple/simple_coder.c | 3 ---
src/liblzma/simple/simple_private.h | 3 +--
2 files changed, 1 insertion(+), 5 deletions(-)
DOS: Link against DJGPP's libemu to support FPU emulation.
This way xz should work on 386SX and 486SX. Floating point
only is needed for verbose output in xz.
dos/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
liblzma: Fix Libs.private in liblzma.pc to include -lrt when needed.
src/liblzma/liblzma.pc.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Docs: Update MINIX 3 information in INSTALL.
INSTALL | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Fix exit status of xzgrep when grepping binary files.
When grepping binary files, grep may exit before it has
read all the input. In this case, gzip -q returns 2 (eating
SIGPIPE), but xz and bzip2 show SIGPIPE as the exit status
(e.g. 141). This causes wrong exit status when grepping
xz- or bzip2-compressed binary files.
The fix checks for the special exit status that indicates SIGPIPE.
It uses kill -l which should be supported everywhere since it
is in both SUSv2 (1997) and POSIX.1-2008.
Thanks to James Buren for the bug report.
src/scripts/xzgrep.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Fix compiling with IBM XL C on AIX.
INSTALL | 36 ++++++++++++++++++++++--------------
configure.ac | 6 +++++-
2 files changed, 27 insertions(+), 15 deletions(-)
Tests: Fix a compiler warning with _FORTIFY_SOURCE.
Reported here:
http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/4927385
tests/create_compress_files.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Docs: Explain the stable releases better in README.
README | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
xz: Show minimum required XZ Utils version in xz -lvv.
Man page wasn't updated yet.
src/xz/list.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 57 insertions(+), 6 deletions(-)
xz: Fix a typo in a comment.
Thanks to Bela Lubkin.
src/xz/args.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
xz: Fix xz on EBCDIC systems.
Thanks to Chris Donawa.
src/xz/coder.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
liblzma: Fix invalid free() in the threaded encoder.
It was triggered if initialization failed e.g. due to
running out of memory.
Thanks to Arkadiusz Miskiewicz.
src/liblzma/common/outqueue.c | 4 ++++
1 file changed, 4 insertions(+)
liblzma: Fix a deadlock in the threaded encoder.
It was triggered when reinitializing the encoder,
e.g. when encoding two files.
src/liblzma/common/stream_encoder_mt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Build: Fix "make check" on Windows.
tests/Makefile.am | 7 +++++--
windows/build.bash | 2 ++
2 files changed, 7 insertions(+), 2 deletions(-)
Update THANKS.
THANKS | 2 ++
1 file changed, 2 insertions(+)
Workaround unusual SIZE_MAX on SCO OpenServer.
src/common/sysdefs.h | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
Run the scripts with the correct shell in test_scripts.sh.
The scripts are now made executable in the build tree.
This way the scripts can be run like programs in
test_scripts.sh. Previously test_scripts.sh always
used sh but it's not correct if @POSIX_SHELL@ is set
to something else by configure.
Thanks to Jonathan Nieder for the patch.
configure.ac | 8 ++++----
tests/test_scripts.sh | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
Fix exit status of "xzdiff foo.xz bar.xz".
xzdiff was clobbering the exit status from diff in a case
statement used to analyze the exit statuses from "xz" when
its operands were two compressed files. Save and restore
diff's exit status to fix this.
The bug is inherited from zdiff in GNU gzip and was fixed
there on 2009-10-09.
Thanks to Jonathan Nieder for the patch and
to Peter Pallinger for reporting the bug.
src/scripts/xzdiff.in | 2 ++
tests/Makefile.am | 4 +++-
tests/test_scripts.sh | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 59 insertions(+), 1 deletion(-)
liblzma: Remove unneeded semicolon.
src/liblzma/lz/lz_encoder_hash.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Build: Make configure print if symbol versioning is enabled or not.
configure.ac | 2 ++
1 file changed, 2 insertions(+)
Don't call close(-1) in tuklib_open_stdxxx() on error.
Thanks to Jim Meyering.
src/common/tuklib_open_stdxxx.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
liblzma: Use symbol versioning.
Symbol versioning is enabled by default on GNU/Linux,
other GNU-based systems, and FreeBSD.
I'm not sure how stable this is, so it may need
backward-incompatible changes before the next release.
The idea is that alpha and beta symbols are considered
unstable and require recompiling the applications that
use those symbols. Once a symbol is stable, it may get
extended with new features in ways that don't break
compatibility with older ABI & API.
The mydist target runs validate_map.sh which should
catch some probable problems in liblzma.map. Otherwise
I would forget to update the map file for new releases.
Makefile.am | 1 +
configure.ac | 21 +++++++++
src/liblzma/Makefile.am | 6 +++
src/liblzma/liblzma.map | 105 ++++++++++++++++++++++++++++++++++++++++++++
src/liblzma/validate_map.sh | 68 ++++++++++++++++++++++++++++
5 files changed, 201 insertions(+)
Translations: Update the Italian translation.
Thanks to Milo Casagrande.
po/it.po | 365 +++++++++++++++++++++++++++++++++++++--------------------------
1 file changed, 216 insertions(+), 149 deletions(-)
Tests: Add a test file for the bug in the previous commit.
tests/files/README | 4 ++++
tests/files/bad-1-block_header-6.xz | Bin 0 -> 72 bytes
2 files changed, 4 insertions(+)
xz: Fix error handling in xz -lvv.
It could do an invalid free() and read past the end
of the uninitialized filters array.
src/xz/list.c | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
liblzma: Handle allocation failures correctly in lzma_index_init().
Thanks to Jim Meyering.
src/liblzma/common/index.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Build: Fix checking for system-provided SHA-256.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Build: Set GZIP_ENV=-9n in top-level Makefile.am.
Makefile.am | 3 +++
1 file changed, 3 insertions(+)
Update NEWS for 5.0.3.
NEWS | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
Add French translation.
It is known that the BCJ filter --help text is only
partially translated.
po/LINGUAS | 1 +
po/fr.po | 864 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 865 insertions(+)
xz: Translate also the string used to print the program name.
French needs a space before a colon, e.g. "xz : foo error".
src/xz/message.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
liblzma: Try to use SHA-256 from the operating system.
If the operating system libc or other base libraries
provide SHA-256, use that instead of our own copy.
Note that this doesn't use OpenSSL or libgcrypt or
such libraries to avoid creating dependencies to
other packages.
This supports at least FreeBSD, NetBSD, OpenBSD, Solaris,
MINIX, and Darwin. They all provide similar but not
identical SHA-256 APIs; everyone is a little different.
Thanks to Wim Lewis for the original patch, improvements,
and testing.
configure.ac | 54 +++++++++++++++++++++++++++
src/liblzma/check/Makefile.inc | 2 +
src/liblzma/check/check.h | 83 ++++++++++++++++++++++++++++++++++++++----
3 files changed, 131 insertions(+), 8 deletions(-)
Don't use clockid_t in mythread.h when clock_gettime() isn't available.
Thanks to Wim Lewis for the patch.
src/common/mythread.h | 2 ++
1 file changed, 2 insertions(+)
Update THANKS.
THANKS | 3 +++
1 file changed, 3 insertions(+)
Update INSTALL with a note about linker problem on OpenSolaris x86.
INSTALL | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
Build: Fix initialization of enable_check_* variables in configure.ac.
This doesn't matter much in practice since it is unlikely
that anyone would have such environment variable names.
Thanks to Wim Lewis.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Add underscores to attributes (__attribute((__foo__))).
src/liblzma/common/alone_decoder.c | 2 +-
src/liblzma/common/alone_encoder.c | 2 +-
src/liblzma/common/block_encoder.c | 2 +-
src/liblzma/common/common.c | 2 +-
src/liblzma/common/common.h | 2 +-
src/liblzma/common/index_decoder.c | 9 +++++----
src/liblzma/common/index_encoder.c | 11 ++++++-----
src/liblzma/delta/delta_encoder.c | 2 +-
src/liblzma/lz/lz_decoder.c | 2 +-
src/liblzma/lz/lz_encoder.c | 2 +-
src/liblzma/simple/arm.c | 2 +-
src/liblzma/simple/armthumb.c | 2 +-
src/liblzma/simple/ia64.c | 2 +-
src/liblzma/simple/powerpc.c | 2 +-
src/liblzma/simple/simple_coder.c | 2 +-
src/liblzma/simple/sparc.c | 2 +-
src/lzmainfo/lzmainfo.c | 4 ++--
src/xz/coder.c | 2 +-
src/xz/hardware.h | 2 +-
src/xz/message.c | 2 +-
src/xz/message.h | 18 +++++++++---------
src/xz/options.c | 6 +++---
src/xz/signals.c | 2 +-
src/xz/util.h | 6 +++---
src/xzdec/xzdec.c | 6 +++---
25 files changed, 49 insertions(+), 47 deletions(-)
xz: Fix input file position when --single-stream is used.
Now the following works as you would expect:
echo foo | xz > foo.xz
echo bar | xz >> foo.xz
( xz -dc --single-stream ; xz -dc --single-stream ) < foo.xz
Note that it doesn't work if the input is not seekable
or if there is Stream Padding between the concatenated
.xz Streams.
src/xz/coder.c | 1 +
src/xz/file_io.c | 15 +++++++++++++++
src/xz/file_io.h | 13 +++++++++++++
3 files changed, 29 insertions(+)
xz: Print the maximum number of worker threads in xz -vv.
src/xz/coder.c | 4 ++++
1 file changed, 4 insertions(+)
Build: Warn if no supported method to detect the number of CPU cores.
configure.ac | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Fix portability problems in mythread.h.
Use gettimeofday() if clock_gettime() isn't available
(e.g. Darwin).
The test for availability of pthread_condattr_setclock()
and CLOCK_MONOTONIC was incorrect. Instead of fixing the
#ifdefs, use an Autoconf test. That way if there exists a
system that supports them but doesn't specify the matching
POSIX #defines, the features will still get detected.
Don't try to use pthread_sigmask() on OpenVMS. It doesn't
have that function.
Guard mythread.h against being #included multiple times.
configure.ac | 7 +++++++
src/common/mythread.h | 31 +++++++++++++++++++++++++++----
2 files changed, 34 insertions(+), 4 deletions(-)
Update THANKS.
THANKS | 2 ++
1 file changed, 2 insertions(+)
xzgrep: fix typo in $0 parsing
Reported-by: Diego Elio Pettenò <flameeyes@gentoo.org>
Signed-off-by: Martin Väth <vaeth@mathematik.uni-wuerzburg.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
src/scripts/xzgrep.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Bump the version number to 5.1.1alpha and liblzma soname to 5.0.99.
src/liblzma/Makefile.am | 2 +-
src/liblzma/api/lzma/version.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Put the unstable APIs behind #ifdef LZMA_UNSTABLE.
This way people hopefully won't complain if these APIs
change and break code that used an older API.
src/liblzma/api/lzma/container.h | 4 ++++
src/liblzma/common/common.h | 2 ++
src/xz/private.h | 2 ++
3 files changed, 8 insertions(+)
Remove doubled words from documentation and comments.
Spot candidates by running these commands:
git ls-files |xargs perl -0777 -n \
-e 'while (/\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims)' \
-e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g; print "$ARGV:$n:$v\n"}'
Thanks to Jim Meyering for the original patch.
doc/lzma-file-format.txt | 4 ++--
src/liblzma/common/alone_encoder.c | 2 +-
src/liblzma/lzma/lzma2_encoder.c | 2 +-
src/xz/file_io.c | 2 +-
src/xz/xz.1 | 2 +-
windows/INSTALL-Windows.txt | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
Update NEWS.
NEWS | 47 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 45 insertions(+), 2 deletions(-)
Update TODO.
TODO | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
xz: Update the man page about threading.
src/xz/xz.1 | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)
xz: Add support for threaded compression.
src/xz/args.c | 3 +-
src/xz/coder.c | 202 +++++++++++++++++++++++++++++++++++----------------------
2 files changed, 125 insertions(+), 80 deletions(-)
liblzma: Add lzma_stream_encoder_mt() for threaded compression.
This is the simplest method to do threading, which splits
the uncompressed data into blocks and compresses them
independently from each other. There's room for improvement
especially to reduce the memory usage, but nevertheless,
this is a good start.
configure.ac | 1 +
src/liblzma/api/lzma/container.h | 163 +++++
src/liblzma/common/Makefile.inc | 7 +
src/liblzma/common/common.c | 9 +-
src/liblzma/common/common.h | 14 +
src/liblzma/common/outqueue.c | 180 ++++++
src/liblzma/common/outqueue.h | 155 +++++
src/liblzma/common/stream_encoder_mt.c | 1011 ++++++++++++++++++++++++++++++++
8 files changed, 1539 insertions(+), 1 deletion(-)
liblzma: Add the forgotten lzma_lzma2_block_size().
This should have been in 5eefc0086d24a65e136352f8c1d19cefb0cbac7a.
src/liblzma/lzma/lzma2_encoder.c | 10 ++++++++++
src/liblzma/lzma/lzma2_encoder.h | 2 ++
2 files changed, 12 insertions(+)
liblzma: Document lzma_easy_(enc|dec)oder_memusage() better too.
src/liblzma/api/lzma/container.h | 9 +++++++++
1 file changed, 9 insertions(+)
liblzma: Document lzma_raw_(enc|dec)oder_memusage() better.
It didn't mention the return value that is used if
an error occurs.
src/liblzma/api/lzma/filter.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
liblzma: Use memzero() to initialize supported_actions[].
This is cleaner and makes it simpler to add new members
to lzma_action enumeration.
src/liblzma/common/common.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
liblzma: API comment about lzma_allocator with threaded coding.
src/liblzma/api/lzma/base.h | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
liblzma: Add an internal function lzma_mt_block_size().
This is based lzma_chunk_size() that was included in some
development version of liblzma.
src/liblzma/common/filter_encoder.c | 46 ++++++++++++++++++-------------------
src/liblzma/common/filter_encoder.h | 4 ++--
2 files changed, 24 insertions(+), 26 deletions(-)
liblzma: Don't create an empty Block in lzma_stream_buffer_encode().
Empty Block was created if the input buffer was empty.
Empty Block wastes a few bytes of space, but more importantly
it triggers a bug in XZ Utils 5.0.1 and older when trying
to decompress such a file. 5.0.1 and older consider such
files to be corrupt. I thought that no encoder creates empty
Blocks when releasing 5.0.2 but I was wrong.
src/liblzma/common/stream_buffer_encoder.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
liblzma: Fix API docs to mention LZMA_UNSUPPORTED_CHECK.
This return value was missing from the API comments of
four functions.
src/liblzma/api/lzma/block.h | 1 +
src/liblzma/api/lzma/container.h | 3 +++
2 files changed, 4 insertions(+)
liblzma: Validate encoder arguments better.
The biggest problem was that the integrity check type
wasn't validated, and e.g. lzma_easy_buffer_encode()
would create a corrupt .xz Stream if given an unsupported
Check ID. Luckily applications don't usually try to use
an unsupport Check ID, so this bug is unlikely to cause
many real-world problems.
src/liblzma/common/block_buffer_encoder.c | 18 ++++++++++++------
src/liblzma/common/block_encoder.c | 5 +++++
src/liblzma/common/stream_buffer_encoder.c | 3 +++
3 files changed, 20 insertions(+), 6 deletions(-)
xz: Move the description of --block-size in --long-help.
src/xz/message.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Docs: Document --single-stream and --block-size.
src/xz/xz.1 | 38 ++++++++++++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
liblzma: Make lzma_stream_encoder_init() static (second try).
It's an internal function and it's not needed by
anything outside stream_encoder.c.
src/liblzma/common/Makefile.inc | 1 -
src/liblzma/common/easy_encoder.c | 1 -
src/liblzma/common/stream_encoder.c | 13 ++++++-------
src/liblzma/common/stream_encoder.h | 23 -----------------------
4 files changed, 6 insertions(+), 32 deletions(-)
Revert "liblzma: Make lzma_stream_encoder_init() static."
This reverts commit 352ac82db5d3f64585c07b39e4759388dec0e4d7.
I don't know what I was thinking.
src/liblzma/common/Makefile.inc | 1 +
src/liblzma/common/stream_encoder.c | 9 +++++----
src/liblzma/common/stream_encoder.h | 23 +++++++++++++++++++++++
3 files changed, 29 insertions(+), 4 deletions(-)
Revise mythread.h.
This adds:
- mythread_sync() macro to create synchronized blocks
- mythread_cond structure and related functions
and macros for condition variables with timed
waiting using a relative timeout
- mythread_create() to create a thread with all
signals blocked
Some of these wouldn't need to be inline functions,
but I'll keep them this way for now for simplicity.
For timed waiting on a condition variable, librt is
now required on some systems to use clock_gettime().
configure.ac was updated to handle this.
configure.ac | 1 +
src/common/mythread.h | 200 +++++++++++++++++++++++++++++++++++++++++++++-----
2 files changed, 181 insertions(+), 20 deletions(-)
liblzma: Make lzma_stream_encoder_init() static.
It's an internal function and it's not needed by
anything outside stream_encoder.c.
src/liblzma/common/Makefile.inc | 1 -
src/liblzma/common/stream_encoder.c | 9 ++++-----
src/liblzma/common/stream_encoder.h | 23 -----------------------
3 files changed, 4 insertions(+), 29 deletions(-)
DOS: Update the docs and include notes about 8.3 filenames.
dos/{README => INSTALL.txt} | 13 +----
dos/README.txt | 123 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 125 insertions(+), 11 deletions(-)
xz/DOS: Add experimental 8.3 filename support.
This is incompatible with the 8.3 support patch made by
Juan Manuel Guerrero. I think this one is nicer, but
I need to get feedback from DOS users before saying
that this is the final version of 8.3 filename support.
src/xz/suffix.c | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 167 insertions(+), 9 deletions(-)
xz/DOS: Be more careful with the destination file.
Try to avoid overwriting the source file if --force is
used and the generated destination filename refers to
the source file. This can happen with 8.3 filenames where
extra characters are ignored.
If the generated output file refers to a special file
like "con" or "prn", refuse to write to it even if --force
is used.
src/xz/file_io.c | 35 +++++++++++++++++++++++++++++++++--
1 file changed, 33 insertions(+), 2 deletions(-)
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
liblzma: Add missing #ifdefs to filter_common.c.
Passing --disable-decoders to configure broke a few
encoders due to missing #ifdefs in filter_common.c.
Thanks to Jason Gorski for the patch.
src/liblzma/common/filter_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
xz: Avoid unneeded fstat() on DOS-like systems.
src/xz/file_io.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
xz: Minor internal changes to handling of --threads.
Now it always defaults to one thread. Maybe this
will change again if a threading method is added
that doesn't affect memory usage.
src/xz/args.c | 4 ++--
src/xz/hardware.c | 24 ++++++++++++------------
src/xz/hardware.h | 9 ++++-----
3 files changed, 18 insertions(+), 19 deletions(-)
xz: Change size_t to uint32_t in a few places.
src/xz/coder.c | 6 +++---
src/xz/coder.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
xz: Fix a typo in a comment.
src/xz/coder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
liblzma: Use TUKLIB_GNUC_REQ to check GCC version in sha256.c.
src/liblzma/check/sha256.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Build: Upgrade m4/acx_pthread.m4 to the latest version.
It was renamed to ax_pthread.m4 in Autoconf Archive.
configure.ac | 2 +-
m4/{acx_pthread.m4 => ax_pthread.m4} | 170 ++++++++++++++++++-----------------
2 files changed, 88 insertions(+), 84 deletions(-)
xz: Use posix_fadvise() if it is available.
configure.ac | 3 +++
src/xz/file_io.c | 15 +++++++++++++++
2 files changed, 18 insertions(+)
xz: Call lzma_end(&strm) before exiting if debugging is enabled.
src/xz/coder.c | 10 ++++++++++
src/xz/coder.h | 5 +++++
src/xz/main.c | 4 ++++
3 files changed, 19 insertions(+)
liblzma: Fix a memory leak in stream_encoder.c.
It leaks old filter options structures (hundred bytes or so)
every time the lzma_stream is reinitialized. With the xz tool,
this happens when compressing multiple files.
src/liblzma/common/stream_encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Updated NEWS for 5.0.2.
NEWS | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
Update INSTALL with another note about IRIX.
INSTALL | 4 ++++
1 file changed, 4 insertions(+)
Tests: Add a new file to test empty LZMA2 streams.
tests/files/README | 4 ++++
tests/files/good-1-lzma2-5.xz | Bin 0 -> 52 bytes
2 files changed, 4 insertions(+)
liblzma: Fix decoding of LZMA2 streams having no uncompressed data.
The decoder considered empty LZMA2 streams to be corrupt.
This shouldn't matter much with .xz files, because no encoder
creates empty LZMA2 streams in .xz. This bug is more likely
to cause problems in applications that use raw LZMA2 streams.
src/liblzma/lzma/lzma2_decoder.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Scripts: Better fix for xzgrep.
Now it uses "grep -q".
Thanks to Gregory Margo.
src/scripts/xzgrep.in | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Scripts: Fix xzgrep -l.
It didn't work at all. It tried to use the -q option
for grep, but it appended it after "--". This works
around it by redirecting to /dev/null. The downside
is that this can be slower with big files compared
to proper use of "grep -q".
Thanks to Gregory Margo.
src/scripts/xzgrep.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Scripts: Add lzop (.lzo) support to xzdiff and xzgrep.
src/scripts/xzdiff.1 | 6 ++++--
src/scripts/xzdiff.in | 22 ++++++++++++++--------
src/scripts/xzgrep.1 | 11 +++++++----
src/scripts/xzgrep.in | 5 +++--
4 files changed, 28 insertions(+), 16 deletions(-)
xz: Add --block-size=SIZE.
This uses LZMA_FULL_FLUSH every SIZE bytes of input.
Man page wasn't updated yet.
src/xz/args.c | 7 +++++++
src/xz/coder.c | 50 ++++++++++++++++++++++++++++++++++++++++----------
src/xz/coder.h | 3 +++
src/xz/message.c | 4 ++++
4 files changed, 54 insertions(+), 10 deletions(-)
xz: Add --single-stream.
This can be useful when there is garbage after the
compressed stream (.xz, .lzma, or raw stream).
Man page wasn't updated yet.
src/xz/args.c | 6 ++++++
src/xz/coder.c | 11 +++++++++--
src/xz/coder.h | 3 +++
src/xz/message.c | 6 +++++-
4 files changed, 23 insertions(+), 3 deletions(-)
xz: Clean up suffix.c.
struct suffix_pair isn't needed in compresed_name()
so get rid of it there.
src/xz/suffix.c | 44 ++++++++++++++++++++------------------------
1 file changed, 20 insertions(+), 24 deletions(-)
xz: Check if the file already has custom suffix when compressing.
Now "xz -S .test foo.test" refuses to compress the
file because it already has the suffix .test. The man
page had it documented this way already.
src/xz/suffix.c | 9 +++++++++
1 file changed, 9 insertions(+)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Translations: Add Polish translation.
Thanks to Jakub Bogusz.
po/LINGUAS | 1 +
po/pl.po | 825 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 826 insertions(+)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Merge commit '5fbce0b8d96dc96775aa0215e3581addc830e23d'
Update NEWS for 5.0.1.
NEWS | 14 ++++++++++++++
1 file changed, 14 insertions(+)
xz: Fix --force on setuid/setgid/sticky and multi-hardlink files.
xz didn't compress setuid/setgid/sticky files and files
with multiple hard links even with --force. This bug was
introduced in 23ac2c44c3ac76994825adb7f9a8f719f78b5ee4.
Thanks to Charles Wilson.
src/xz/file_io.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
Merge branch 'v5.0'
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Add alloc_size and malloc attributes to a few functions.
Thanks to Cristian Rodríguez for the original patch.
src/common/sysdefs.h | 6 ++++++
src/liblzma/common/common.h | 2 +-
src/xz/util.h | 5 +++--
3 files changed, 10 insertions(+), 3 deletions(-)
Scripts: Fix gzip and bzip2 support in xzdiff.
src/scripts/xzdiff.in | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Merge branch 'v5.0'
Build: Enable ASM on DJGPP by default.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Add missing PRIx32 and PRIx64 compatibility definitions.
This fixes portability to systems that lack C99 inttypes.h.
Thanks to Juan Manuel Guerrero.
src/common/sysdefs.h | 9 +++++++++
1 file changed, 9 insertions(+)
DOS-like: Treat \ and : as directory separators in addition to /.
Juan Manuel Guerrero had fixed this in his XZ Utils port
to DOS/DJGPP. The bug affects also Windows and OS/2.
src/xz/suffix.c | 33 +++++++++++++++++++++++++++++----
1 file changed, 29 insertions(+), 4 deletions(-)
Merge branch 'v5.0'
Translations: Fix Czech translation of "sparse file".
Thanks to Petr Hubený and Marek Černocký.
po/cs.po | 88 ++++++++++++++++++++++++++++++++--------------------------------
1 file changed, 44 insertions(+), 44 deletions(-)
Merge branch 'v5.0'
liblzma: Document the return value of lzma_lzma_preset().
src/liblzma/api/lzma/lzma.h | 3 +++
1 file changed, 3 insertions(+)
Simplify paths in generated API docs
Currently the file list generated by Doxygen has src/ at the
beginning of each path. Paths like common/sysdefs.h and
liblzma/api/lzma.h are easier to read without such a prefix.
Builds from a separate build directory with
mkdir build
cd build
../configure
doxygen Doxyfile
include an even longer prefix /home/someone/src/xz/src; this
patch has the nice side-effect of eliminating that prefix, too.
Fixes: http://bugs.debian.org/572273
Doxyfile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
add build script for macosx universal
macosx/build.sh | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 92 insertions(+)
Update the copies of GPLv2 and LGPLv2.1 from gnu.org.
There are only a few white space changes.
COPYING.GPLv2 | 14 +++++++-------
COPYING.LGPLv2.1 | 16 +++++++---------
2 files changed, 14 insertions(+), 16 deletions(-)
Merge branch 'v5.0'
Build: Copy the example programs to $docdir/examples.
The example programs by Daniel Mealha Cabrita were included
in the git repository, but I had forgot to add them to
Makefile.am. Thus, they didn't get included in the source
package at all by "make dist".
Makefile.am | 5 +++++
windows/build.bash | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
liblzma: Rename a few variables and constants.
This has no semantic changes. I find the new names slightly
more logical and they match the names that are already used
in XZ Embedded.
The name fastpos wasn't changed (not worth the hassle).
src/liblzma/lzma/fastpos.h | 55 +++++------
src/liblzma/lzma/lzma2_encoder.c | 2 +-
src/liblzma/lzma/lzma_common.h | 45 ++++-----
src/liblzma/lzma/lzma_decoder.c | 58 +++++------
src/liblzma/lzma/lzma_encoder.c | 56 +++++------
src/liblzma/lzma/lzma_encoder_optimum_fast.c | 9 +-
src/liblzma/lzma/lzma_encoder_optimum_normal.c | 128 ++++++++++++-------------
src/liblzma/lzma/lzma_encoder_private.h | 16 ++--
8 files changed, 183 insertions(+), 186 deletions(-)
Bump version 5.1.0alpha.
src/liblzma/api/lzma/version.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Build: Fix mydist rule when .git doesn't exist.
Makefile.am | 1 +
1 file changed, 1 insertion(+)
Add NEWS for 5.0.0.
NEWS | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
Bump version to 5.0.0 and liblzma version-info to 5:0:0.
src/liblzma/Makefile.am | 2 +-
src/liblzma/api/lzma/version.h | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
liblzma: Make lzma_code() check the reserved members in lzma_stream.
If any of the reserved members in lzma_stream are non-zero
or non-NULL, LZMA_OPTIONS_ERROR is returned. It is possible
that a new feature in the future is indicated by just setting
a reserved member to some other value, so the old liblzma
version need to catch it as an unsupported feature.
src/liblzma/common/common.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Windows: Use MinGW's stdio functions.
The non-standard ones from msvcrt.dll appear to work
most of the time with XZ Utils, but there are some
corner cases where things may go very wrong. So it's
good to use the better replacements provided by
MinGW(-w64) runtime.
src/common/sysdefs.h | 5 +++++
1 file changed, 5 insertions(+)
liblzma: Use 512 as INDEX_GROUP_SIZE.
This lets compiler use shifting instead of 64-bit division.
src/liblzma/common/index.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
liblzma: A few ABI tweaks to reserve space in structures.
src/liblzma/api/lzma/base.h | 7 ++++++-
src/liblzma/api/lzma/lzma.h | 4 ++--
src/liblzma/api/lzma/stream_flags.h | 4 ----
3 files changed, 8 insertions(+), 7 deletions(-)
xz: Make sure that message_strm() can never return NULL.
src/xz/message.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
liblzma: Update the comments in the API headers.
Adding support for LZMA_FINISH for Index encoding and
decoding needed tiny additions to the relevant .c files too.
src/liblzma/api/lzma.h | 4 +--
src/liblzma/api/lzma/base.h | 38 +++++++++++++--------------
src/liblzma/api/lzma/bcj.h | 4 +--
src/liblzma/api/lzma/block.h | 4 +--
src/liblzma/api/lzma/container.h | 26 ++++++++++++-------
src/liblzma/api/lzma/filter.h | 51 ++++++++++++++++++-------------------
src/liblzma/api/lzma/hardware.h | 3 +--
src/liblzma/api/lzma/index.h | 28 ++++++++++++--------
src/liblzma/api/lzma/index_hash.h | 2 +-
src/liblzma/api/lzma/lzma.h | 46 ++++++++++++++++++++++-----------
src/liblzma/api/lzma/stream_flags.h | 4 +--
src/liblzma/api/lzma/vli.h | 31 +++++++++++-----------
src/liblzma/common/index_decoder.c | 1 +
src/liblzma/common/index_encoder.c | 1 +
14 files changed, 136 insertions(+), 107 deletions(-)
Update INSTALL.generic.
INSTALL.generic | 99 ++++++++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 81 insertions(+), 18 deletions(-)
Clean up a few FIXMEs and TODOs.
lzma_chunk_size() was commented out because it is
currently useless.
src/liblzma/common/filter_encoder.c | 2 ++
src/liblzma/common/filter_encoder.h | 4 ++--
src/liblzma/lzma/lzma2_decoder.c | 1 -
src/liblzma/lzma/lzma_decoder.c | 4 ++--
src/liblzma/lzma/lzma_encoder.c | 2 +-
src/xz/message.h | 2 +-
6 files changed, 8 insertions(+), 7 deletions(-)
Update docs.
INSTALL | 192 +++++++++++++++++++++++++++++++++++++++++--------------------
PACKAGERS | 104 +++++++++------------------------
TODO | 17 ++++--
dos/README | 2 +-
4 files changed, 172 insertions(+), 143 deletions(-)
xz: Avoid raise() also on OpenVMS.
This is similar to DOS/DJGPP that killing the program
with a signal will print a backtrace or a similar message.
src/xz/signals.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
xz: Avoid SA_RESTART for portability reasons.
SA_RESTART is not as portable as I had hoped. It's missing
at least from OpenVMS, QNX, and DJGPP). Luckily we can do
fine without SA_RESTART.
src/xz/message.c | 38 +++++++++++++++-----------------------
src/xz/message.h | 4 ++++
src/xz/signals.c | 6 ++++++
3 files changed, 25 insertions(+), 23 deletions(-)
xz: Use "%"PRIu32 instead of "%d" in a format string.
src/xz/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
test_files.sh: Fix the first line.
For some reason this prevented running the test only
on OS/2 and even on that it broke only recently.
Thanks to Elbert Pol.
tests/test_files.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
lzmainfo: Use "%"PRIu32 instead of "%u" for uint32_t.
src/lzmainfo/lzmainfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
lzmainfo: Use fileno(stdin) instead of STDIN_FILENO.
src/lzmainfo/lzmainfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
lzmainfo: Use setmode() on DOS-like systems.
src/lzmainfo/lzmainfo.c | 9 +++++++++
1 file changed, 9 insertions(+)
OS/2 and DOS: Be less verbose on signals.
Calling raise() to kill xz when user has pressed C-c
is a bit verbose on OS/2 and DOS/DJGPP. Instead of
calling raise(), set only the exit status to 1.
src/xz/signals.c | 7 +++++++
1 file changed, 7 insertions(+)
DOS: Update the Makefile, config.h and README.
This is now simpler and builds only xz.exe.
dos/Makefile | 211 +++++++++++++++--------------------------------------------
dos/README | 73 +++++++--------------
dos/config.h | 45 ++++---------
3 files changed, 86 insertions(+), 243 deletions(-)
Windows: Put some license info into README-Windows.txt.
windows/README-Windows.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Windows: Fix a diagnostics bug in build.bash.
windows/build.bash | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
lzmainfo: Add Windows resource file.
src/lzmainfo/Makefile.am | 9 +++++++++
src/lzmainfo/lzmainfo_w32res.rc | 12 ++++++++++++
2 files changed, 21 insertions(+)
Add missing public domain notice to lzmadec_w32res.rc.
src/xzdec/lzmadec_w32res.rc | 7 +++++++
1 file changed, 7 insertions(+)
Windows: Update common_w32res.rc.
src/common/common_w32res.rc | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
Windows: Make build.bash prefer MinGW-w32 over MinGW.
This is simply for licensing reasons. The 64-bit version
will be built with MinGW-w64 anyway (at least for now),
so using it also for 32-bit build allows using the same
copyright notice about the MinGW-w64/w32 runtime.
Note that using MinGW would require a copyright notice too,
because its runtime is not in the public domain either even
though MinGW's home page claims that it is public domain.
See <http://marc.info/?l=mingw-users&m=126489506214078>.
windows/build.bash | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
Windows: Copy COPYING-Windows.txt (if it exists) to the package.
Also, put README-Windows.txt to the doc directory like
the other documentation files.
windows/build.bash | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
Windows: Fix build.bash again.
630a8beda34af0ac153c8051b1bf01230558e422 wasn't good.
windows/build.bash | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Use LZMA_VERSION_STRING instead of PACKAGE_VERSION.
Those are the same thing, and the former makes it a bit
easier to build the code with other build systems, because
one doesn't need to update the version number into custom
config.h.
This change affects only lzmainfo. Other tools were already
using LZMA_VERSION_STRING.
src/lzmainfo/lzmainfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac: Remove two unused defines.
configure.ac | 4 ----
1 file changed, 4 deletions(-)
Make tests accommodate missing xz or xzdec.
tests/test_compress.sh | 47 ++++++++++++++++++++++++++++++-----------------
tests/test_files.sh | 28 ++++++++++++++++++++++++++--
2 files changed, 56 insertions(+), 19 deletions(-)
Build: Add options to disable individual command line tools.
configure.ac | 38 ++++++++++++++++++++++++++++++
src/Makefile.am | 15 +++++++++++-
src/scripts/Makefile.am | 62 +++++++++++++++++++++----------------------------
src/xz/Makefile.am | 6 ++++-
src/xzdec/Makefile.am | 12 ++++++++--
5 files changed, 93 insertions(+), 40 deletions(-)
Windows: Make build.bash work without --enable-dynamic=no.
windows/build.bash | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Build: Remove the static/dynamic tricks.
Most distros want xz linked against shared liblzma, so
it doesn't help much to require --enable-dynamic for that.
Those who want to avoid PIC on x86-32 to get better
performance, can still do it e.g. by using --disable-shared
to compile xz and then another pass to compile shared liblzma.
Part of these static/dynamic tricks were needed for Windows
in the past. Nowadays we rely on GCC and binutils to do the
right thing with auto-import. If the Autotooled build system
needs to support some other toolchain on Windows in the future,
this may need some rethinking.
configure.ac | 74 ------------------------------------------------
debug/Makefile.am | 5 +---
src/lzmainfo/Makefile.am | 4 +--
src/xz/Makefile.am | 4 +--
src/xzdec/Makefile.am | 4 +--
tests/Makefile.am | 5 +---
6 files changed, 5 insertions(+), 91 deletions(-)
configure.ac: Silence a warning from Autoconf 2.68.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
A few more languages files to the xz man page.
Thanks to Jonathan Nieder.
src/xz/xz.1 | 45 ++++++++++++++++++++++++---------------------
1 file changed, 24 insertions(+), 21 deletions(-)
Update the FAQ.
doc/faq.txt | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 100 insertions(+), 4 deletions(-)
liblzma: Small fixes to comments in the API headers.
src/liblzma/api/lzma/lzma.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
Create the PDF versions of the man pages better.
Makefile.am | 14 +++++++------
build-aux/manconv.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 66 insertions(+), 6 deletions(-)
Move version.sh to build-aux.
Makefile.am | 4 ++--
version.sh => build-aux/version.sh | 0
configure.ac | 2 +-
windows/build.bash | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
Update .gitignore.
.gitignore | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
Fix accomodate -> accommodate on the xz man page.
src/xz/xz.1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Major man page updates.
Lots of content was updated on the xz man page.
Technical improvements:
- Start a new sentence on a new line.
- Use fairly short lines.
- Use constant-width font for examples (where supported).
- Some minor cleanups.
Thanks to Jonathan Nieder for some language fixes.
src/lzmainfo/lzmainfo.1 | 25 +-
src/scripts/xzdiff.1 | 15 +-
src/scripts/xzgrep.1 | 11 +-
src/scripts/xzless.1 | 13 +-
src/scripts/xzmore.1 | 9 +-
src/xz/xz.1 | 1964 ++++++++++++++++++++++++++++++++---------------
src/xzdec/xzdec.1 | 39 +-
7 files changed, 1435 insertions(+), 641 deletions(-)
Fix the preset -3e.
depth=0 was missing.
src/liblzma/lzma/lzma_encoder_presets.c | 1 +
1 file changed, 1 insertion(+)
Add translations.bash and translation notes to README.
translations.bash prints some messages from xz, which
hopefully makes it a bit easier to test translations.
README | 96 +++++++++++++++++++++++++++++++++++++++++++++--
debug/translation.bash | 100 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 192 insertions(+), 4 deletions(-)
xz: Update the Czech translation.
Thanks to Marek Černocký.
po/cs.po | 202 +++++++++++++++++++++++++++++++++++++++++----------------------
1 file changed, 131 insertions(+), 71 deletions(-)
xz: Add Italian translation.
Thanks to Milo Casagrande and Lorenzo De Liso.
THANKS | 2 +
po/LINGUAS | 1 +
po/it.po | 902 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 905 insertions(+)
xz: Edit a translators comment.
src/xz/list.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
xz: Add German translation.
Thanks to Andre Noll.
THANKS | 1 +
po/LINGUAS | 1 +
po/de.po | 903 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 905 insertions(+)
Updated README.
README | 2 --
1 file changed, 2 deletions(-)
Updated INSTALL.
INSTALL | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Updated the git repository address in ChangeLog.
ChangeLog | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
xz: Add a comment to translators about "literal context bits".
src/xz/message.c | 4 ++++
1 file changed, 4 insertions(+)
xz: Multiple fixes.
The code assumed that printing numbers with thousand separators
and decimal points would always produce only US-ASCII characters.
This was used for buffer sizes (with snprintf(), no overflows)
and aligning columns of the progress indicator and --list. That
assumption was wrong (e.g. LC_ALL=fi_FI.UTF-8 with glibc), so
multibyte character support was added in this commit. The old
way is used if the operating system doesn't have enough multibyte
support (e.g. lacks wcwidth()).
The sizes of buffers were increased to accomodate multibyte
characters. I don't know how big they should be exactly, but
they aren't used for anything critical, so it's not too bad.
If they still aren't big enough, I hopefully get a bug report.
snprintf() takes care of avoiding buffer overflows.
Some static buffers were replaced with buffers allocated on
stack. double_to_str() was removed. uint64_to_str() and
uint64_to_nicestr() now share the static buffer and test
for thousand separator support.
Integrity check names "None" and "Unknown-N" (2 <= N <= 15)
were marked to be translated. I had forgot these, plus they
wouldn't have worked correctly anyway before this commit,
because printing tables with multibyte strings didn't work.
Thanks to Marek Černocký for reporting the bug about
misaligned table columns in --list output.
configure.ac | 1 +
m4/tuklib_mbstr.m4 | 30 ++++++
src/common/tuklib_mbstr.h | 66 +++++++++++++
src/common/tuklib_mbstr_fw.c | 31 ++++++
src/common/tuklib_mbstr_width.c | 64 +++++++++++++
src/xz/Makefile.am | 4 +-
src/xz/list.c | 205 +++++++++++++++++++++++++++-------------
src/xz/message.c | 56 +++++++----
src/xz/message.h | 10 +-
src/xz/private.h | 1 +
src/xz/util.c | 136 +++++++++-----------------
src/xz/util.h | 7 --
12 files changed, 424 insertions(+), 187 deletions(-)
Update the Czech translation.
Thanks to Marek Černocký.
po/cs.po | 655 +++++++++++++++++++++++++++++++++++++++++++--------------------
1 file changed, 454 insertions(+), 201 deletions(-)
xz: Add a note to translators.
src/xz/hardware.c | 2 ++
1 file changed, 2 insertions(+)
Fix use of N_() and ngettext().
I had somehow thought that N_() is usually used
as shorthand for ngettext().
This also fixes a missing \n from a call to ngettext().
src/common/tuklib_gettext.h | 4 ++--
src/xz/list.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
Add missing files to POTFILES.in.
po/POTFILES.in | 3 +++
1 file changed, 3 insertions(+)
xz: Improve a comment.
src/xz/file_io.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
xz: Update the comment about NetBSD in file_io.c.
Thanks to Joerg Sonnenberger.
src/xz/file_io.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
xz: Use an array instead of pointer for stdin_filename.
Thanks Joerg Sonnenberger.
src/xz/args.c | 2 +-
src/xz/args.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
xz: Hopefully ease translating the messages in list.c.
src/xz/list.c | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
xz: Fix grammar.
src/xz/options.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
xz: Use lzma_lzma_preset() to initialize the options structure.
src/xz/options.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
Don't set lc=4 with --extreme.
This should reduce the cases where --extreme makes
compression worse. On the other hand, some other
files may now benefit slightly less from --extreme.
src/liblzma/lzma/lzma_encoder_presets.c | 1 -
1 file changed, 1 deletion(-)
xz: Minor improvements to --help and --long-help.
src/xz/message.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
Adjust memory limits in test_compress.sh
Testing compression at level -4 now requires 48 MiB of free store at
compression time and 5 MiB at decompression time.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
tests/test_compress.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
xz: Make -vv show also decompressor memory usage.
src/xz/coder.c | 7 +++++++
1 file changed, 7 insertions(+)
Tweak the compression presets -0 .. -5.
"Extreme" mode might need some further tweaking still.
Docs were not updated yet.
src/liblzma/lzma/lzma_encoder_presets.c | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
liblzma: Adjust default depth calculation for HC3 and HC4.
It was 8 + nice_len / 4, now it is 4 + nice_len / 4.
This allows faster settings at lower nice_len values,
even though it seems that I won't use automatic depth
calcuation with HC3 and HC4 in the presets.
src/liblzma/lz/lz_encoder.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
xz: Make --help two lines shorter.
At least for now, the --help option doesn't list any
options that take arguments, so "Mandatory arguments to..."
can be omitted.
src/xz/message.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
xz: Make setting a preset override a custom filter chain.
This is more logical behavior than ignoring preset level
options once a custom filter chain has been specified.
src/xz/coder.c | 9 +++++++++
1 file changed, 9 insertions(+)
xz: Always warn if adjusting dictionary size due to memlimit.
src/xz/coder.c | 28 +++++++++-------------------
1 file changed, 9 insertions(+), 19 deletions(-)
Fix test_compress.sh.
It broke when --memory option was removed from xzdec.
Thanks to Jonathan Nieder.
tests/test_compress.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Disable the memory usage limiter by default.
For several people, the limiter causes bigger problems that
it solves, so it is better to have it disabled by default.
Those who want to have a limiter by default need to enable
it via the environment variable XZ_DEFAULTS.
Support for environment variable XZ_DEFAULTS was added. It is
parsed before XZ_OPT and technically identical with it. The
intended uses differ quite a bit though; see the man page.
The memory usage limit can now be set separately for
compression and decompression using --memlimit-compress and
--memlimit-decompress. To set both at once, -M or --memlimit
can be used. --memory was retained as a legacy alias for
--memlimit for backwards compatibility.
The semantics of --info-memory were changed in backwards
incompatible way. Compatibility wasn't meaningful due to
changes in the memory usage limiter functionality.
The memory usage limiter info is no longer shown at the
bottom of xz --long -help.
The memory usage limiter support for removed completely from xzdec.
xz's man page was updated to match the above changes. Various
unrelated fixes were also made to the man page.
src/xz/args.c | 87 +++++++++-----
src/xz/coder.c | 8 +-
src/xz/hardware.c | 96 +++++++++------
src/xz/hardware.h | 23 ++--
src/xz/list.c | 2 +-
src/xz/message.c | 39 ++-----
src/xz/message.h | 4 -
src/xz/xz.1 | 341 ++++++++++++++++++++++++++++++++++--------------------
src/xzdec/xzdec.1 | 45 +------
src/xzdec/xzdec.c | 176 +---------------------------
10 files changed, 373 insertions(+), 448 deletions(-)
Add missing const to a global constant in xz.
src/xz/args.c | 2 +-
src/xz/args.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Language fixes for man pages.
Thanks to A. Costa and Jonathan Nieder.
src/lzmainfo/lzmainfo.1 | 4 ++--
src/xz/xz.1 | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
Windows: Add a note about building a Git repository snapshot
windows/INSTALL-Windows.txt | 9 +++++++++
1 file changed, 9 insertions(+)
Windows: build.sh is a bash script so name it correctly.
INSTALL | 2 +-
windows/INSTALL-Windows.txt | 6 +++---
windows/{build.sh => build.bash} | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
Windows: Don't strip liblzma.a too much.
windows/build.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Add two simple example programs.
Hopefully these help a bit when learning the basics
of liblzma API. I plan to write detailed examples about
both basic and advanced features with lots of comments,
but these two examples are good have right now.
The examples were written by Daniel Mealha Cabrita. Thanks.
doc/examples/xz_pipe_comp.c | 127 ++++++++++++++++++++++++++++++++++++++++++
doc/examples/xz_pipe_decomp.c | 115 ++++++++++++++++++++++++++++++++++++++
2 files changed, 242 insertions(+)
Add --no-adjust.
src/xz/args.c | 6 ++++++
src/xz/coder.c | 8 ++------
src/xz/coder.h | 4 ++++
src/xz/message.c | 6 +++++-
src/xz/xz.1 | 13 +++++++++++--
5 files changed, 28 insertions(+), 9 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Clarify the description of the default memlimit in the man page.
Thanks to Denis Excoffier.
src/xz/xz.1 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Fix string to uint64_t conversion.
Thanks to Denis Excoffier for the bug report.
src/xz/util.c | 10 ++++++++--
src/xzdec/xzdec.c | 13 +++++++++++--
2 files changed, 19 insertions(+), 4 deletions(-)
Put the git commit to the filename in mydist rule.
Makefile.am | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Fix compiling with -Werror.
src/xz/message.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Silence a bogus Valgrind warning.
When using -O2 with GCC, it liked to swap two comparisons
in one "if" statement. It's otherwise fine except that
the latter part, which is seemingly never executed, got
executed (nothing wrong with that) and then triggered
warning in Valgrind about conditional jump depending on
uninitialized variable. A few people find this annoying
so do things a bit differently to avoid the warning.
src/liblzma/lz/lz_encoder.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Fix a Windows-specific FIXME in signal handling code.
src/xz/main.c | 40 +++++++++++++++++++++++++++++++++++-----
src/xz/private.h | 5 +++++
src/xz/signals.c | 16 ++++++++--------
3 files changed, 48 insertions(+), 13 deletions(-)
Adjust SA_RESTART workaround.
I want to get a bug report if something else than
DJGPP lacks SA_RESTART.
src/xz/message.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
xz man page updates.
- Concatenating .xz files and padding
- List mode
- Robot mode
- A few examples (but many more are needed)
src/xz/xz.1 | 385 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 366 insertions(+), 19 deletions(-)
Major update to xz --list.
src/xz/list.c | 652 ++++++++++++++++++++++++++++++++++++++++++----------------
1 file changed, 471 insertions(+), 181 deletions(-)
Rename message_filters_get() to message_filters_to_str().
src/xz/message.c | 4 ++--
src/xz/message.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
Fix a comment.
src/liblzma/api/lzma/index.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fix lzma_block_compressed_size().
src/liblzma/common/block_util.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Take Cygwin into account in some #if lines.
This change is no-op, but good to have just in case
for the future.
src/xz/signals.c | 2 +-
src/xz/signals.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
Remove references to the Subblock filter in xz and tests.
Thanks to Jonathan Nieder.
src/xz/message.c | 9 ---------
tests/test_filter_flags.c | 23 -----------------------
2 files changed, 32 deletions(-)
Remove unused chunk_size.c.
Thanks to Jonathan Nieder for the reminder.
src/liblzma/common/chunk_size.c | 67 -----------------------------------------
1 file changed, 67 deletions(-)
Use my_min() instead of MIN() in src/xz/list.c
This should have been done in
920a69a8d8e4203c5edddd829d932130eac188ea.
src/xz/list.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Rename MIN() and MAX() to my_min() and my_max().
This should avoid some minor portability issues.
debug/full_flush.c | 2 +-
debug/sync_flush.c | 2 +-
src/common/sysdefs.h | 12 +++++-------
src/liblzma/common/block_buffer_encoder.c | 2 +-
src/liblzma/common/common.c | 2 +-
src/liblzma/common/stream_buffer_encoder.c | 2 +-
src/liblzma/delta/delta_encoder.c | 2 +-
src/liblzma/lz/lz_decoder.c | 7 ++++---
src/liblzma/lz/lz_decoder.h | 2 +-
src/liblzma/lz/lz_encoder.c | 2 +-
src/liblzma/lz/lz_encoder.h | 2 +-
src/liblzma/lz/lz_encoder_mf.c | 4 ++--
src/liblzma/lzma/lzma2_encoder.c | 2 +-
src/liblzma/lzma/lzma_encoder_optimum_fast.c | 2 +-
src/liblzma/lzma/lzma_encoder_optimum_normal.c | 14 +++++++-------
src/xz/args.c | 3 ++-
16 files changed, 31 insertions(+), 31 deletions(-)
Fix compilation of debug/known_sizes.c.
debug/known_sizes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Remove references to Subblock filter in debug/sync_flush.c.
debug/sync_flush.c | 13 -------------
1 file changed, 13 deletions(-)
Better #error message.
src/common/sysdefs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Remove the Subblock filter code for now.
The spec isn't finished and the code didn't compile anymore.
It won't be included in XZ Utils 5.0.0. It's easy to get it
back once the spec is done.
configure.ac | 6 +-
src/liblzma/Makefile.am | 5 -
src/liblzma/api/Makefile.am | 1 -
src/liblzma/api/lzma.h | 1 -
src/liblzma/api/lzma/subblock.h | 200 -----
src/liblzma/common/common.h | 6 -
src/liblzma/common/filter_common.c | 9 -
src/liblzma/common/filter_decoder.c | 16 -
src/liblzma/common/filter_encoder.c | 12 -
src/liblzma/subblock/Makefile.inc | 20 -
src/liblzma/subblock/subblock_decoder.c | 630 ----------------
src/liblzma/subblock/subblock_decoder.h | 22 -
src/liblzma/subblock/subblock_decoder_helper.c | 70 --
src/liblzma/subblock/subblock_decoder_helper.h | 29 -
src/liblzma/subblock/subblock_encoder.c | 984 -------------------------
src/liblzma/subblock/subblock_encoder.h | 21 -
src/xz/args.c | 9 +-
src/xz/options.c | 61 --
src/xz/options.h | 7 -
19 files changed, 4 insertions(+), 2105 deletions(-)
Split message_filters().
message_filters_to_str() converts the filter chain to
a string. message_filters_show() replaces the original
message_filters().
uint32_to_optstr() was also added to show the dictionary
size in nicer format when possible.
src/xz/coder.c | 2 +-
src/xz/message.c | 187 +++++++++++++++++++++++++++++++++++--------------------
src/xz/message.h | 14 ++++-
3 files changed, 134 insertions(+), 69 deletions(-)
Omit lzma_restrict from the API headers.
It isn't really useful so omitting it makes things
shorter and slightly more readable.
src/liblzma/api/lzma.h | 12 ------------
src/liblzma/api/lzma/index.h | 5 ++---
src/liblzma/api/lzma/vli.h | 11 +++++------
3 files changed, 7 insertions(+), 21 deletions(-)
Updated INSTALL.
INSTALL | 5 -----
1 file changed, 5 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Updates to tuklib_physmem and tuklib_cpucores.
Don't use #error to generate compile error, because some
compilers actually don't take it as an error. This fixes
tuklib_physmem on IRIX.
Fix incorrect error check for sysconf() return values.
Add AIX, HP-UX, and Tru64 specific code to detect the
amount RAM.
Add HP-UX specific code to detect the number of CPU cores.
Thanks a lot to Peter O'Gorman for initial patches,
testing, and debugging these fixes.
m4/tuklib_cpucores.m4 | 33 ++++++++++++++++----
m4/tuklib_physmem.m4 | 72 ++++++++++++++++++++++++++++++++++++++++++--
src/common/tuklib_cpucores.c | 14 +++++++--
src/common/tuklib_physmem.c | 33 +++++++++++++++++++-
4 files changed, 141 insertions(+), 11 deletions(-)
Show both elapsed time and estimated remaining time in xz -v.
The extra space for showing both has been taken from the
sizes field. If the sizes grow big, bigger units than MiB
will be used. It makes it slightly difficult to see that
progress is still happening with huge files, but it should
be OK in practice.
Thanks to Trent W. Buck for <http://bugs.debian.org/574583>
and Jonathan Nieder for suggestions how to fix it.
THANKS | 1 +
src/xz/message.c | 86 +++++++++++++++++++++++++-------------------------------
2 files changed, 39 insertions(+), 48 deletions(-)
Add a simple tip to faq.txt about tar and xz.
Thanks to Gilles Espinasse.
THANKS | 1 +
doc/faq.txt | 6 ++++++
2 files changed, 7 insertions(+)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Fix xzgrep to not break if filenames have spaces or quotes.
Thanks to someone who reported the bug on IRC.
src/scripts/xzgrep.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Treat all integer multiplier suffixes as base-2.
Originally both base-2 and base-10 were supported, but since
there seems to be little need for base-10 in XZ Utils, treat
everything as base-2 and also be more relaxed about the case
of the first letter of the suffix. Now xz will accept e.g.
KiB, Ki, k, K, kB, and KB, and interpret them all as 1024. The
recommended spelling of the suffixes are still KiB, MiB, and GiB.
src/xz/util.c | 53 +++++++++++++++++++++++------------------------------
src/xz/xz.1 | 48 ++++++++++++++++++++++++++++--------------------
src/xzdec/xzdec.c | 42 ++++++++++++++++--------------------------
3 files changed, 67 insertions(+), 76 deletions(-)
Consistently round up the memory usage limit in messages.
It still feels a bit wrong to round 1 byte to 1 MiB but
at least it is now done consistently so that the same
byte value is always rounded the same way to MiB.
src/xz/message.c | 5 +++--
src/xzdec/xzdec.c | 7 +++++--
2 files changed, 8 insertions(+), 4 deletions(-)
Change the default of --enable-assume-ram from 32 to 128 MiB.
This is to allow files created with "xz -9" to be decompressed
if the amount of RAM cannot be determined.
INSTALL | 5 ++---
configure.ac | 11 ++++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
Increase the default memory usage limit on "low-memory" systems.
Previously the default limit was always 40 % of RAM. The
new limit is a little bit more complex:
- If 40 % of RAM is at least 80 MiB, 40 % of RAM is used
as the limit.
- If 80 % of RAM is over 80 MiB, 80 MiB is used as the limit.
- Otherwise 80 % of RAM is used as the limit.
This should make it possible to decompress files created with
"xz -9" on more systems. Swapping is generally more expected
on systems with less RAM, so higher default limit on them
shouldn't cause too bad surprises in terms of heavy swapping.
Instead, the higher default limit should reduce the number of
bad surprises when it used to prevent decompression of files
created with "xz -9". The DoS prevention system shouldn't be
a DoS itself.
Note that even with the new default limit, a system with 64 MiB
RAM cannot decompress files created with "xz -9" without user
overriding the limit. This should be OK, because if xz is going
to need more memory than the system has RAM, it will run very
very slowly and thus it's good that user has to override the limit
in that case.
src/xz/hardware.c | 43 +++++++++++++++++++++++++++++++------------
src/xz/xz.1 | 21 +++++++++++++++------
src/xzdec/xzdec.1 | 8 ++++----
src/xzdec/xzdec.c | 42 ++++++++++++++++++++++++++++++------------
4 files changed, 80 insertions(+), 34 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Fix missing initialization in lzma_strm_init().
With bad luck, lzma_code() could return LZMA_BUF_ERROR
when it shouldn't.
This has been here since the early days of liblzma.
It got triggered by the modifications made to the xz
tool in commit 18c10c30d2833f394cd7bce0e6a821044b15832f
but only when decompressing .lzma files. Somehow I managed
to miss testing that with Valgrind earlier.
This fixes <http://bugs.gentoo.org/show_bug.cgi?id=305591>.
Thanks to Rafał Mużyło for helping to debug it on IRC.
src/liblzma/common/common.c | 1 +
1 file changed, 1 insertion(+)
Collection of language fixes to comments and docs.
Thanks to Jonathan Nieder.
README | 2 +-
configure.ac | 2 +-
doc/faq.txt | 2 +-
extra/7z2lzma/7z2lzma.bash | 2 +-
src/common/tuklib_progname.c | 2 +-
src/common/tuklib_progname.h | 2 +-
src/liblzma/api/lzma/base.h | 8 ++++----
src/liblzma/api/lzma/bcj.h | 2 +-
src/liblzma/api/lzma/block.h | 2 +-
src/liblzma/api/lzma/check.h | 2 +-
src/liblzma/api/lzma/filter.h | 4 ++--
src/liblzma/api/lzma/index.h | 6 +++---
src/liblzma/api/lzma/lzma.h | 2 +-
src/liblzma/api/lzma/version.h | 2 +-
src/liblzma/api/lzma/vli.h | 2 +-
src/liblzma/common/block_header_encoder.c | 2 +-
src/liblzma/common/chunk_size.c | 4 ++--
src/liblzma/common/common.h | 4 ++--
src/liblzma/common/filter_buffer_decoder.c | 2 +-
src/liblzma/common/filter_encoder.c | 4 ++--
src/liblzma/common/index.c | 6 +++---
src/liblzma/common/index_encoder.c | 2 +-
src/liblzma/common/stream_encoder.c | 2 +-
src/liblzma/common/vli_decoder.c | 2 +-
src/liblzma/lz/lz_encoder.c | 2 +-
src/liblzma/lz/lz_encoder.h | 2 +-
src/liblzma/lzma/lzma2_encoder.c | 2 +-
src/liblzma/lzma/lzma_decoder.c | 4 ++--
src/liblzma/lzma/lzma_decoder.h | 2 +-
src/liblzma/lzma/lzma_encoder_optimum_fast.c | 2 +-
src/liblzma/lzma/lzma_encoder_optimum_normal.c | 2 +-
src/liblzma/lzma/lzma_encoder_private.h | 2 +-
src/liblzma/simple/simple_coder.c | 2 +-
src/liblzma/subblock/subblock_encoder.c | 2 +-
src/scripts/xzdiff.1 | 2 +-
src/scripts/xzless.1 | 10 +++++-----
src/xz/coder.c | 2 +-
src/xz/file_io.c | 2 +-
src/xz/main.c | 6 +++---
src/xz/main.h | 2 +-
src/xz/message.c | 10 +++++-----
src/xz/message.h | 2 +-
src/xz/xz.1 | 16 ++++++++--------
src/xzdec/lzmadec_w32res.rc | 2 +-
src/xzdec/xzdec_w32res.rc | 2 +-
tests/test_index.c | 2 +-
windows/build.sh | 4 ++--
47 files changed, 77 insertions(+), 77 deletions(-)
Fix jl -> jb in ASM files.
src/liblzma/check/crc32_x86.S | 2 +-
src/liblzma/check/crc64_x86.S | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
Use __APPLE__ instead of __MACH__ in ASM files.
This allows the files to work on HURD.
Thanks to Jonathan Nieder.
src/liblzma/check/crc32_x86.S | 8 ++++----
src/liblzma/check/crc64_x86.S | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
Subtle change to liblzma Block handling API.
lzma_block.version has to be initialized even for
lzma_block_header_decode(). This way a future version
of liblzma won't allocate memory in a way that an old
application doesn't know how to free it.
The subtlety of this change is that all current apps
using lzma_block_header_decode() will keep working for
now, because the only possible version value is zero,
and lzma_block_header_decode() unconditionally sets the
version to zero even now. Unless fixed, these apps will
break in the future if a new version of the Block options
is ever needed.
src/liblzma/api/lzma/block.h | 39 ++++++++++++++++---------------------
src/liblzma/common/stream_decoder.c | 3 +++
2 files changed, 20 insertions(+), 22 deletions(-)
Fix wrong assertion.
This was added in 455e68c030fde8a8c2f5e254c3b3ab9489bf3735.
src/xz/main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Updated TODO.
TODO | 4 ----
1 file changed, 4 deletions(-)
Fix typos in comments.
src/xz/list.c | 2 +-
windows/build.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Fix signal handling for --list.
src/xz/main.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
Fix compression of symlinks with --force.
xz --force accepted symlinks, but didn't remove
them after successful compression. Instead, an error
message was displayed.
src/xz/file_io.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
Fix a comment.
windows/build.sh | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Updated TODO.
TODO | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
Mention TODO in README.
README | 1 +
1 file changed, 1 insertion(+)
Updated INSTALL.
INSTALL | 52 ++++++++++++++++++++++++++--------------------------
1 file changed, 26 insertions(+), 26 deletions(-)
Revise the Windows build files.
The old Makefile + config.h was deleted, because it
becomes outdated too easily and building with the
Autotools based build system works fine even on Windows.
windows/build.sh hasn't got much testing, but it should
work to build 32-bit x86 and x86-64 versions of XZ Utils
using MSYS, MinGW or MinGW-w32, and MinGW-w64.
windows/INSTALL-Windows.txt describes what packages are
needed and how to install them.
windows/README-Windows.txt is a readme file for the binary
package that build.sh hopefully builds.
There are no instructions about using Autotools for now,
so those using a git snapshot may want to run
"autoreconf -fi && ./configure && make mydist" on a UN*X
box and then copy the resulting .tar.gz to a Windows.
windows/INSTALL-Windows.txt | 131 ++++++++++++++++++
windows/Makefile | 320 --------------------------------------------
windows/README | 155 ---------------------
windows/README-Windows.txt | 115 ++++++++++++++++
windows/build.sh | 189 ++++++++++++++++++++++++++
windows/config.h | 170 -----------------------
6 files changed, 435 insertions(+), 645 deletions(-)
Select the default integrity check type at runtime.
Previously it was set statically to CRC64 or CRC32
depending on options passed to the configure script.
src/xz/coder.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
Improve displaying of the memory usage limit.
src/xz/coder.c | 8 +++-----
src/xz/message.c | 37 +++++++++++++++++++++++++++++--------
src/xz/util.c | 7 +++++++
src/xz/util.h | 6 ++++++
4 files changed, 45 insertions(+), 13 deletions(-)
Don't use uninitialized sigset_t.
If signal handlers haven't been established, then it's
useless to try to block them, especially since the sigset_t
used for blocking hasn't been initialized yet.
src/xz/signals.c | 34 ++++++++++++++++++++++++----------
1 file changed, 24 insertions(+), 10 deletions(-)
Delay opening the destionation file and other fixes.
The opening of the destination file is now delayed a little.
The coder is initialized, and if decompressing, the memory
usage of the first Block compared against the memory
usage limit before the destination file is opened. This
means that if --force was used, the old "target" file won't
be deleted so easily when something goes wrong very early.
Thanks to Mark K for the bug report.
The above fix required some changes to progress message
handling. Now there is a separate function for setting and
printing the filename. It is used also in list.c.
list_file() now handles stdin correctly (gives an error).
A useless check for user_abort was removed from file_io.c.
src/xz/coder.c | 64 ++++++++++++++++++++++-----------
src/xz/file_io.c | 107 +++++++++++++++++++++++++++----------------------------
src/xz/file_io.h | 8 +++--
src/xz/list.c | 28 +++++----------
src/xz/message.c | 46 +++++++++++++-----------
src/xz/message.h | 29 ++++++++++-----
6 files changed, 157 insertions(+), 125 deletions(-)
Add list.h to src/xz/Makefile.am.
This should have been already in
0bc9eab243dee3be764b3530433a7fcdc3f7c6a1.
src/xz/Makefile.am | 1 +
1 file changed, 1 insertion(+)
Add lzmainfo.1 to manfiles list to convert to .txt and .pdf.
Makefile.am | 1 +
1 file changed, 1 insertion(+)
Silence two compiler warnings on DOS-like systems.
src/common/tuklib_open_stdxxx.c | 6 +++++-
src/xz/file_io.c | 3 +++
2 files changed, 8 insertions(+), 1 deletion(-)
Use PACKAGE_URL instead of custom PACKAGE_HOMEPAGE.
configure.ac | 9 ++-------
src/liblzma/liblzma.pc.in | 2 +-
src/lzmainfo/lzmainfo.c | 2 +-
src/xz/message.c | 2 +-
src/xzdec/xzdec.c | 2 +-
5 files changed, 6 insertions(+), 11 deletions(-)
Add a missing space to an error message.
Thanks to Robert Readman.
src/xz/args.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Use past tense in error message in io_unlink().
Added a note to translators too.
Thanks to Robert Readman.
THANKS | 1 +
src/xz/file_io.c | 14 ++++++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
Fix too small static buffer in util.c.
This was introduced in
0dd6d007669b946543ca939a44243833c79e08f4 two days ago.
src/xz/util.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
Minor comment fix.
src/xz/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Add initial version of xz --list.
This is a bit rough but should be useful for basic things.
Ideas (with detailed examples) about the output format are
welcome.
The output of --robot --list is not necessarily stable yet,
although I don't currently have any plans about changing it.
The man page hasn't been updated yet.
src/xz/Makefile.am | 1 +
src/xz/list.c | 988 ++++++++++++++++++++++++++++++++++-------------------
src/xz/list.h | 18 +
src/xz/main.c | 19 +-
src/xz/private.h | 1 +
5 files changed, 668 insertions(+), 359 deletions(-)
Add io_pread().
It will be used by --list.
src/xz/file_io.c | 25 +++++++++++++++++++++++++
src/xz/file_io.h | 17 +++++++++++++++++
2 files changed, 42 insertions(+)
Set LC_NUMERIC=C when --robot is used.
It is to ensure that floating point numbers
will always have a dot as the decimal separator.
src/xz/args.c | 4 ++++
1 file changed, 4 insertions(+)
Some improvements to printing sizes in xz.
src/xz/coder.c | 56 +++++++++++++++------------------------
src/xz/message.c | 80 ++++++++++++++++++--------------------------------------
src/xz/message.h | 4 +++
src/xz/util.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++
src/xz/util.h | 44 +++++++++++++++++++++++++++++++
5 files changed, 166 insertions(+), 90 deletions(-)
Fix a typo in README.
Thanks to R. Bijker.
README | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Updated windows/Makefile.
Thanks to Dan Shechter for the patch.
It is likely that windows/Makefile will be removed
completely, because Autotols based build nowadays
works well with both 32-bit and 64-bit MinGW (I
just need to update the docs).
windows/Makefile | 38 +++++++++++++++++++++++++-------------
windows/config.h | 2 ++
2 files changed, 27 insertions(+), 13 deletions(-)
Update the xz man page to match the previous two commits.
src/xz/xz.1 | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
Don't read compressed data from a terminal or write it
to a terminal even if --force is specified.
It just seems more reasonable this way.
The new behavior matches bzip2. The old one matched gzip.
src/xz/main.c | 20 +++++++++-----------
src/xz/util.c | 8 ++++----
2 files changed, 13 insertions(+), 15 deletions(-)
Don't compress or decompress special files unless writing
to stdout even if --force is used.
--force will still enable compression of symlinks, but only
in case they point to a regular file.
The new way simply seems more reasonable. It matches gzip's
behavior while the old one matched bzip2's behavior.
src/xz/file_io.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Add IRIX-specific code to tuklib_physmem and tuklib_cpucores.
This is untested but it will get tested soon and, if needed,
fixed before 5.0.0.
Thanks to Stuart Shelton.
m4/tuklib_cpucores.m4 | 11 +++++++++--
m4/tuklib_physmem.m4 | 22 +++++++++++++++++++++-
src/common/tuklib_cpucores.c | 6 ++++++
src/common/tuklib_physmem.c | 19 +++++++++++++++++++
4 files changed, 55 insertions(+), 3 deletions(-)
Fix _memconfig() functions.
This affects lzma_memusage() and lzma_memlimit_get().
src/liblzma/api/lzma/index.h | 7 -------
src/liblzma/common/alone_decoder.c | 11 +++++++----
src/liblzma/common/index_decoder.c | 10 ++++++----
src/liblzma/common/stream_decoder.c | 11 +++++++----
4 files changed, 20 insertions(+), 19 deletions(-)
Revised the Index handling code.
This breaks API and ABI but most apps are not affected
since most apps don't use this part of the API. You will
get a compile error if you are using anything that got
broken.
Summary of changes:
- Ability to store Stream Flags, which are needed
for random-access reading in multi-Stream files.
- Separate function to set size of Stream Padding.
- Iterator structure makes it possible to read the same
lzma_index from multiple threads at the same time.
- A lot faster code to locate Blocks.
- Removed lzma_index_equal() without adding anything
to replace it. I don't know what it should do exactly
with the new features and what actually needs this
function in the first place other than test_index.c,
which now has its own code to compare lzma_indexes.
src/liblzma/api/lzma/index.h | 572 +++++++---
src/liblzma/common/index.c | 1553 ++++++++++++++++++----------
src/liblzma/common/index.h | 6 +
src/liblzma/common/index_decoder.c | 12 +-
src/liblzma/common/index_encoder.c | 36 +-
src/liblzma/common/index_encoder.h | 2 +-
src/liblzma/common/stream_buffer_encoder.c | 6 +-
src/liblzma/common/stream_encoder.c | 3 +-
tests/test_index.c | 371 ++++---
9 files changed, 1703 insertions(+), 858 deletions(-)
Remove c-format tag in cs.po.
It was fixed in the C code earlier.
po/cs.po | 1 -
1 file changed, 1 deletion(-)
Add missing lzma_nothrow in filter.h.
src/liblzma/api/lzma/filter.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Remove redefinition of _(msgid) macro from lzmainfo.c.
src/lzmainfo/lzmainfo.c | 7 -------
1 file changed, 7 deletions(-)
update po/.gitignore
Since the *.gmo files are deleted by the maintainer-clean target,
I assume they are not meant to be tracked.
Also add the other files listed in the Makefile’s clean targets
(stamp-poT, xz.po, xz.[12].po, *.new.po, xz.mo) to make sure they
are not accidentally tracked. Most of these are intermediate
files that would not appear unless a build is interrupted or
fails.
Split the list of untracked files by origin to make it easier to
tell if files are missing in the future.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
po/.gitignore | 28 ++++++++++++++++++++++------
1 file changed, 22 insertions(+), 6 deletions(-)
Always rely on GCC's auto-import on Windows.
I understood that this is nicer, because then people
don't need to worry about the LZMA_API_STATIC macro.
Thanks to Charles Wilson and Keith Marshall.
src/liblzma/api/lzma.h | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
Fix file_io.c on DOS-like systems.
The problem was introduced when adding sparse file
support in 465d1b0d6518c5d980f2db4c2d769f9905bdd902.
Thanks to Charles Wilson.
src/xz/file_io.c | 4 ++++
1 file changed, 4 insertions(+)
Add Czech translation.
Thanks to Marek Černocký.
Other people planning to translate xz: Note that the
messages are a little bit in flux still. Translations
are still welcome, just be prepared to some extra work
in case there are changes.
THANKS | 1 +
po/LINGUAS | 1 +
po/cs.po | 637 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 639 insertions(+)
Add a note for translators to add a bug reporting address
for translation bugs.
src/xz/message.c | 4 ++++
1 file changed, 4 insertions(+)
Prevent xgettext from taking one regular string as a C format string.
Thanks to Marek Černocký.
src/xz/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Remove duplicate code in io_open_dest().
Fix a missing _() in the error message too.
src/xz/file_io.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
Typo fix to sysdefs.h.
Thanks to Jonathan Nieder.
src/common/sysdefs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fix a memory leak in test_index.c.
This was introduced in
bd13b04e202b6f495a68eb0766f97085b7c50a06.
Thanks to Jim Meyering for noticing it.
tests/test_index.c | 2 ++
1 file changed, 2 insertions(+)
Add missing error check to coder.c.
With bad luck this could cause a segfault due to
reading (but not writing) past the end of the buffer.
src/xz/coder.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
Fix bugs in lzma_index_read() and lzma_index_cat().
lzma_index_read() didn't skip over Stream Padding
if it was the first record in the Index.
lzma_index_cat() didn't combine small Indexes correctly.
The test suite was updated to check for these bugs.
These bugs didn't affect the xz command line tool or
most users of liblzma in any way.
src/liblzma/common/index.c | 30 +++++++++++++++++++-----------
tests/test_index.c | 28 +++++++++++++++++++++++++---
2 files changed, 44 insertions(+), 14 deletions(-)
Index decoder fixes.
The Index decoder code didn't perfectly match the API docs,
which said that *i will be set to point to the decoded Index
only after decoding has succeeded. The docs were a bit unclear
too.
Now the decoder will initially set *i to NULL. *i will be set
to point to the decoded Index once decoding has succeeded.
This simplifies applications too, since it avoids dangling
pointers.
src/liblzma/api/lzma/index.h | 23 ++++++++++++-----------
src/liblzma/common/index_decoder.c | 26 ++++++++++++++++++++------
2 files changed, 32 insertions(+), 17 deletions(-)
Create sparse files by default when decompressing into
a regular file.
Sparse file creation can be disabled with --no-sparse.
I don't promise yet that the name of this option won't
change before 5.0.0. It's possible that the code, that
checks when it is safe to use sparse output on stdout,
is not good enough, and a more flexible command line
option is needed to configure sparse file handling.
src/xz/args.c | 6 ++
src/xz/coder.c | 33 ++++----
src/xz/file_io.c | 243 +++++++++++++++++++++++++++++++++++++++++++++++--------
src/xz/file_io.h | 34 ++++++--
src/xz/message.c | 1 +
src/xz/xz.1 | 11 +++
6 files changed, 272 insertions(+), 56 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Add missing consts to pointer casts.
src/liblzma/check/crc32_fast.c | 4 ++--
src/liblzma/check/crc64_fast.c | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
Enable assembler code only if it is known to work
on that operating system.
I'm too lazy to think how to make a good Autoconf test
for this and it's not that important anyway.
No longer define HAVE_ASM_X86 or HAVE_ASM_X86_64.
Inline assembler (if any) is used if a macro like
__i386__ or __x86_64__ is defined.
configure.ac | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
Make fastpos.h use tuklib_integer.h instead of bsr.h
when --enable-small has been specified.
src/liblzma/common/Makefile.inc | 1 -
src/liblzma/common/bsr.h | 60 -----------------------------------------
src/liblzma/lzma/fastpos.h | 5 +---
3 files changed, 1 insertion(+), 65 deletions(-)
Update tuklib_integer.h with bit scan functions.
Thanks to Joachim Henke for the original patch.
src/common/tuklib_integer.h | 189 ++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 181 insertions(+), 8 deletions(-)
Update tuklib_cpucores.m4 and tuklib_physmem.m4 from tuklib,
which now use AC_CACHE_CHECK. Using the cache variable,
configure now warns if there is no method to detect the amount
of RAM and recommends using --enable-assume-ram.
configure.ac | 16 ++++++++++++++++
m4/tuklib_cpucores.m4 | 31 ++++++++++++++++++-------------
m4/tuklib_physmem.m4 | 50 +++++++++++++++++++++++++++-----------------------
3 files changed, 61 insertions(+), 36 deletions(-)
Add support for --info-memory and --robot to xz.
Currently --robot works only with --info-memory and
--version. --help and --long-help work too, but --robot
has no effect on them.
Thanks to Jonathan Nieder for the original patches.
src/xz/args.c | 85 +++++++++++++++++++++++++++++++++-----------------------
src/xz/args.h | 1 +
src/xz/main.c | 11 +++++---
src/xz/message.c | 47 +++++++++++++++++++++++--------
src/xz/message.h | 4 +++
src/xz/xz.1 | 40 +++++++++++++++++++++++---
6 files changed, 133 insertions(+), 55 deletions(-)
Fix wrong indentation caused by incorrect settings
in the text editor.
src/liblzma/lz/lz_decoder.c | 18 +++++++++---------
src/liblzma/lzma/lzma2_encoder.c | 6 +++---
src/liblzma/lzma/lzma_encoder_optimum_normal.c | 2 +-
3 files changed, 13 insertions(+), 13 deletions(-)
Add lzma_physmem().
I had hoped to keep liblzma as purely a compression
library as possible (e.g. file I/O will go into
a different library), but it seems that applications
linking agaisnt liblzma need some way to determine
the memory usage limit, and knowing the amount of RAM
is one reasonable way to help making such decisions.
Thanks to Jonathan Nieder for the original patch.
src/liblzma/Makefile.am | 5 ++--
src/liblzma/api/Makefile.am | 1 +
src/liblzma/api/lzma.h | 3 +++
src/liblzma/api/lzma/hardware.h | 51 +++++++++++++++++++++++++++++++++++
src/liblzma/common/Makefile.inc | 1 +
src/liblzma/common/hardware_physmem.c | 25 +++++++++++++++++
src/xz/Makefile.am | 1 -
src/xz/hardware.c | 3 +--
src/xzdec/Makefile.am | 6 ++---
src/xzdec/xzdec.c | 3 +--
10 files changed, 88 insertions(+), 11 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Some updates to xz man page.
src/xz/xz.1 | 54 +++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 49 insertions(+), 5 deletions(-)
Fix description of --memory in --long-help.
src/xz/message.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Update the debug programs so that they compile again.
debug/crc32.c | 1 +
debug/memusage.c | 6 ++++--
debug/sync_flush.c | 14 +++++++++-----
3 files changed, 14 insertions(+), 7 deletions(-)
Fix a design error in liblzma API.
Originally the idea was that using LZMA_FULL_FLUSH
with Stream encoder would read the filter chain
from the same array that was used to intialize the
Stream encoder. Since most apps wouldn't use
LZMA_FULL_FLUSH, most apps wouldn't need to keep
the filter chain available after initializing the
Stream encoder. However, due to my mistake, it
actually required keeping the array always available.
Since setting the new filter chain via the array
used at initialization time is not a nice way to do
it for a couple of reasons, this commit ditches it
and introduces lzma_filters_update(). This new function
replaces also the "persistent" flag used by LZMA2
(and to-be-designed Subblock filter), which was also
an ugly thing to do.
Thanks to Alexey Tourbin for reminding me about the problem
that Stream encoder used to require keeping the filter
chain allocated.
src/liblzma/api/lzma/filter.h | 30 +++++++++++++
src/liblzma/api/lzma/lzma.h | 13 ------
src/liblzma/common/block_encoder.c | 14 ++++++
src/liblzma/common/common.c | 20 ++++++++-
src/liblzma/common/common.h | 22 ++++++++++
src/liblzma/common/easy_encoder.c | 63 ++-------------------------
src/liblzma/common/filter_common.c | 3 ++
src/liblzma/common/filter_encoder.c | 27 ++++++++++++
src/liblzma/common/filter_encoder.h | 2 +-
src/liblzma/common/stream_encoder.c | 76 ++++++++++++++++++++++++++++-----
src/liblzma/delta/delta_common.c | 5 +--
src/liblzma/delta/delta_decoder.c | 3 +-
src/liblzma/delta/delta_encoder.c | 17 +++++++-
src/liblzma/delta/delta_private.h | 2 +-
src/liblzma/lz/lz_encoder.c | 17 ++++++++
src/liblzma/lz/lz_encoder.h | 4 ++
src/liblzma/lzma/lzma2_encoder.c | 59 ++++++++++++++-----------
src/liblzma/lzma/lzma_encoder_presets.c | 1 -
src/liblzma/simple/simple_coder.c | 12 ++++++
src/xz/options.c | 1 -
20 files changed, 273 insertions(+), 118 deletions(-)
Fix wrong function name in the previous commit.
It was meant to be lzma_filters_copy(), not lzma_filters_dup().
src/liblzma/api/lzma/filter.h | 2 +-
src/liblzma/common/filter_common.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Add lzma_filters_copy().
This will be needed internally by liblzma once I fix
a design mistake in the encoder API. This function may
be useful to applications too so it's good to export it.
src/liblzma/api/lzma/filter.h | 31 ++++++++++++++
src/liblzma/common/filter_common.c | 82 ++++++++++++++++++++++++++++++++++++++
2 files changed, 113 insertions(+)
Escape dashes in xzmore.1
A minus sign is larger, easier to see in a printout, and more
likely to use the same glyph as ASCII hyphen-minus in a terminal
than a hyphen. Since broken manual pagers do not find hyphens
when the user searches for a hyphen-minus, minus signs are also
easier to search for. So use minus signs instead of hyphens to
render sample terminal output.
src/scripts/xzmore.1 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Mention --check=none in --long-help. It was already in
the man page though.
Thanks to Jim Meyering for noticing this.
src/xz/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Use a tuklib module for integer handling.
This replaces bswap.h and integer.h.
The tuklib module uses <byteswap.h> on GNU,
<sys/endian.h> on *BSDs and <sys/byteorder.h>
on Solaris, which may contain optimized code
like inline assembly.
configure.ac | 54 +----
m4/tuklib_integer.m4 | 74 +++++++
src/common/bswap.h | 52 -----
src/common/integer.h | 170 ---------------
src/common/tuklib_config.h | 8 +-
src/common/tuklib_integer.h | 350 ++++++++++++++++++++++++++++++
src/liblzma/check/check.c | 4 +-
src/liblzma/check/crc32_fast.c | 4 +-
src/liblzma/check/crc32_tablegen.c | 8 +-
src/liblzma/check/crc64_fast.c | 4 +-
src/liblzma/check/crc64_tablegen.c | 8 +-
src/liblzma/check/crc_macros.h | 2 -
src/liblzma/check/sha256.c | 18 +-
src/liblzma/common/alone_encoder.c | 2 +-
src/liblzma/common/block_header_decoder.c | 2 +-
src/liblzma/common/block_header_encoder.c | 2 +-
src/liblzma/common/common.h | 2 +-
src/liblzma/common/stream_flags_decoder.c | 6 +-
src/liblzma/common/stream_flags_encoder.c | 6 +-
src/liblzma/lz/lz_encoder_hash.h | 2 +-
src/liblzma/lzma/lzma_decoder.c | 2 +-
src/liblzma/lzma/lzma_encoder.c | 2 +-
src/liblzma/lzma/lzma_encoder_private.h | 2 +-
src/liblzma/simple/simple_decoder.c | 2 +-
src/liblzma/simple/simple_encoder.c | 2 +-
tests/test_block_header.c | 4 +-
tests/test_stream_flags.c | 6 +-
tests/tests.h | 2 +-
28 files changed, 467 insertions(+), 333 deletions(-)
Add support for --enable-assume-ram=SIZE.
INSTALL | 16 ++++++++++++++++
configure.ac | 24 ++++++++++++++++++++++++
src/xz/hardware.c | 7 +++----
src/xzdec/xzdec.c | 5 +++--
4 files changed, 46 insertions(+), 6 deletions(-)
Use unaligned access (if possible) on both endiannesses
in lz_encoder_hash.h.
src/liblzma/lz/lz_encoder_hash.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Make liblzma produce the same output on both endiannesses.
Seems that it is a problem in some cases if the same
version of XZ Utils produces different output on different
endiannesses, so this commit fixes that problem. The output
will still vary between different XZ Utils versions, but I
cannot avoid that for now.
This commit bloatens the code on big endian systems by 1 KiB,
which should be OK since liblzma is bloated already. ;-)
src/liblzma/check/crc32_tablegen.c | 30 +++++++++++++++
src/liblzma/lz/Makefile.inc | 1 +
src/liblzma/lz/lz_encoder.c | 7 +++-
src/liblzma/lz/lz_encoder_hash.h | 35 +++++++++++------
src/liblzma/lz/lz_encoder_hash_table.h | 68 ++++++++++++++++++++++++++++++++++
src/liblzma/lz/lz_encoder_mf.c | 1 -
6 files changed, 128 insertions(+), 14 deletions(-)
add lzmainfo to gitignore
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
.gitignore | 2 ++
1 file changed, 2 insertions(+)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Work around a bug in Interix header files.
Thanks to Markus Duft for the patch.
src/common/sysdefs.h | 6 ++++++
1 file changed, 6 insertions(+)
Fix an error in OpenVMS-specific code.
Thanks to Jouk Jansen.
src/xz/file_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Added OpenVMS-specific information to INSTALL.
INSTALL | 11 +++++++++++
1 file changed, 11 insertions(+)
Better fixes for OpenVMS support.
Thanks to Jouk Jansen.
src/xz/file_io.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
Avoid non-standard preprocessor construct.
Thanks to Jouk Jansen.
src/common/tuklib_common.h | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
Make sure that TUKLIB_DOSLIKE doesn't get defined on Cygwin.
Thanks to Charles Wilson.
src/common/tuklib_common.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Various changes.
Separate a few reusable components from XZ Utils specific
code. The reusable code is now in "tuklib" modules. A few
more could be separated still, e.g. bswap.h.
Fix some bugs in lzmainfo.
Fix physmem and cpucores code on OS/2. Thanks to Elbert Pol
for help.
Add OpenVMS support into physmem. Add a few #ifdefs to ease
building XZ Utils on OpenVMS. Thanks to Jouk Jansen for the
original patch.
THANKS | 1 +
configure.ac | 12 +--
m4/lc_physmem.m4 | 84 ---------------
m4/tuklib_common.m4 | 22 ++++
m4/{lc_cpucores.m4 => tuklib_cpucores.m4} | 83 ++++++++------
m4/tuklib_physmem.m4 | 119 +++++++++++++++++++++
m4/tuklib_progname.m4 | 25 +++++
src/common/sysdefs.h | 4 -
src/common/tuklib_common.h | 67 ++++++++++++
src/common/tuklib_config.h | 1 +
src/common/{cpucores.h => tuklib_cpucores.c} | 39 +++----
src/common/tuklib_cpucores.h | 23 ++++
src/common/tuklib_exit.c | 57 ++++++++++
src/common/tuklib_exit.h | 25 +++++
src/common/tuklib_gettext.h | 44 ++++++++
src/common/{open_stdxxx.h => tuklib_open_stdxxx.c} | 24 +++--
src/common/tuklib_open_stdxxx.h | 23 ++++
src/common/{physmem.h => tuklib_physmem.c} | 58 +++++-----
src/common/tuklib_physmem.h | 28 +++++
src/common/tuklib_progname.c | 50 +++++++++
src/common/tuklib_progname.h | 32 ++++++
src/lzmainfo/Makefile.am | 5 +-
src/lzmainfo/lzmainfo.c | 65 ++++-------
src/xz/Makefile.am | 7 +-
src/xz/args.c | 8 +-
src/xz/file_io.c | 43 ++++----
src/xz/hardware.c | 8 +-
src/xz/main.c | 100 ++++-------------
src/xz/main.h | 7 --
src/xz/message.c | 30 +++---
src/xz/message.h | 8 +-
src/xz/private.h | 11 +-
src/xz/signals.c | 2 +
src/xz/signals.h | 17 ++-
src/xz/suffix.c | 2 +-
src/xzdec/Makefile.am | 13 ++-
src/xzdec/xzdec.c | 55 +++-------
37 files changed, 768 insertions(+), 434 deletions(-)
Fix incorrect use of "restrict".
src/liblzma/api/lzma/vli.h | 4 ++--
src/liblzma/common/vli_decoder.c | 2 +-
src/liblzma/common/vli_encoder.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
Fix GCC version check for nothrow attribute.
src/liblzma/api/lzma.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
A few grammar fixes.
Thanks to Christian Weisgerber for pointing out some of these.
src/liblzma/api/lzma.h | 4 ++--
src/liblzma/api/lzma/vli.h | 4 ++--
src/liblzma/common/block_header_encoder.c | 2 +-
src/liblzma/common/filter_common.c | 2 +-
src/liblzma/lz/lz_encoder.h | 10 +++++-----
src/xz/message.c | 22 +++++++++++-----------
src/xzdec/xzdec.c | 2 +-
7 files changed, 23 insertions(+), 23 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Add PACKAGE_HOMEPAGE to {windows,dos}/config.h to fix build errors.
dos/config.h | 3 +++
windows/config.h | 3 +++
2 files changed, 6 insertions(+)
Use $(LN_EXEEXT) in symlinks to executables.
This fixes "make install" on operating systems using
a suffix for executables.
Cygwin is treated specially. The symlink names won't have
.exe suffix even though the executables themselves have.
Thanks to Charles Wilson.
configure.ac | 9 +++++++++
src/xz/Makefile.am | 4 ++--
2 files changed, 11 insertions(+), 2 deletions(-)
Fix a couple of warnings.
src/liblzma/common/stream_decoder.c | 2 +-
src/liblzma/lz/lz_encoder.c | 5 +----
src/liblzma/lzma/lzma_encoder.c | 2 +-
src/liblzma/lzma/lzma_encoder_optimum_normal.c | 8 ++++----
tests/tests.h | 2 +-
5 files changed, 8 insertions(+), 11 deletions(-)
Add OS/2-specific code to physmem.h.
Also move DJGPP-specific code near the code meant
for other DOS-like systems.
src/common/physmem.h | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)
Updated THANKS.
THANKS | 2 ++
1 file changed, 2 insertions(+)
Use sysctl() != -1 instead of !sysctl() to check if
the function call succeeded.
NetBSD 4.0 returns positive values on success, but
NetBSD Current and FreeBSD return zero. OpenBSD's
man page doesn't tell what sysctl() returns on
success. All these BSDs return -1 on error.
Thanks to Robert Elz and Thomas Klausner.
src/common/cpucores.h | 2 +-
src/common/physmem.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Mention in INSTALL that --enable-small doesn't modify CFLAGS.
INSTALL | 4 ++++
1 file changed, 4 insertions(+)
Refactored option parsing.
src/xz/options.c | 70 ++++++++++++++++++++++++++++----------------------------
1 file changed, 35 insertions(+), 35 deletions(-)
Fix options parsing bug in xz.
xz used to reject "xz --lzma2=pb=2," while
"xz --lzma2=pb=2,," worked. Now both work.
src/xz/options.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Updated TODO.
TODO | 3 +++
1 file changed, 3 insertions(+)
Revert 43f44160b1ddcbf7e5205c37db09b3bebe7226f9
and use a fix that works on all systems using
GNU assembler.
Maybe the assembler code is used e.g. on Solaris x86
but let's worry about it if this doesn't work on it.
src/liblzma/check/crc32_x86.S | 7 ++-----
src/liblzma/check/crc64_x86.S | 7 ++-----
2 files changed, 4 insertions(+), 10 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Add more OS/2 specific info to INSTALL.
INSTALL | 5 +++++
1 file changed, 5 insertions(+)
Use even more hackish way to support thousand separators.
Seems that in addition on Windows and DOS, also OpenBSD
lacks support for %'d style printf() format strings.
So far that is the only modern POSIX-like system I know
with this problem, but after this hack, the thousand
separator shouldn't be a problem on any system.
Maybe testing if a format string like %'d produces
reasonable output is invoking undefined behavior on some
systems, but so far all the problematic systems I've tried
just print the raw format string (e.g. %'d prints 'd).
Maybe Autoconf test would have been better, but this
hack works also for cross-compilation, and avoids
recompilation in case the system libc starts to support
the thousand separator.
src/xz/util.c | 36 +++++++++++++++++++++++++-----------
1 file changed, 25 insertions(+), 11 deletions(-)
Updated THANKS.
THANKS | 3 +++
1 file changed, 3 insertions(+)
Fix sysctl() usage.
This fixes build on *BSDs and Darwin.
Thanks to Jukka Salmi for the patches.
Richard Koch reported the problem too.
m4/lc_cpucores.m4 | 2 +-
m4/lc_physmem.m4 | 2 +-
src/common/cpucores.h | 2 +-
src/common/physmem.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
Fix x86 assembler on GCC 3.
Thanks to Karl Berry.
src/liblzma/check/crc32_x86.S | 7 +++++--
src/liblzma/check/crc64_x86.S | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
"make dist" fixes
Makefile.am | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
Update xz man page date.
src/xz/xz.1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fix the debug directory.
6a2eb54092fc625d59921a607ff68cd1a90aa898 and
71f18e8a066a01dda0c8e5508b135ef104e43e4c required
some changes that weren't applied in debug.
debug/Makefile.am | 5 +++--
debug/full_flush.c | 1 +
debug/known_sizes.c | 1 +
debug/memusage.c | 1 +
debug/sync_flush.c | 1 +
5 files changed, 7 insertions(+), 2 deletions(-)
Add missing files to EXTRA_DIST.
Makefile.am | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
Bumped version to 4.999.9beta.
src/liblzma/api/lzma/version.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Updated THANKS.
THANKS | 2 ++
1 file changed, 2 insertions(+)
.xz file format specification 1.0.4 (probably).
Thanks to Christian von Roques, Peter Lawler,
and Jim Meyering for the fixes.
doc/xz-file-format.txt | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
Require GNU libtool 2.2.
configure.ac | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
Add "dos" to EXTRA_DIST.
Makefile.am | 1 +
1 file changed, 1 insertion(+)
Updated TODO.
TODO | 6 ++++++
1 file changed, 6 insertions(+)
Some xz man page improvements.
src/xz/xz.1 | 78 ++++++++++++++++++++++++++++++++++++++++++++++++-------------
1 file changed, 62 insertions(+), 16 deletions(-)
Removed doc/bugs.txt.
doc/bugs.txt | 46 ----------------------------------------------
1 file changed, 46 deletions(-)
Updated README.
It now includes bug reporting instructions/tips.
README | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 55 insertions(+), 10 deletions(-)
Fix a typo in FAQ.
Thanks to Jim Meyering.
(From now on, I try to always remember to put
the relevant thanks to commit messages.)
doc/faq.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Updates to liblzma API headers.
Added lzma_nothrow for every function. It adds
throw() when the header is used in C++ code.
Some lzma_attrs were added or removed.
Lots of comments were improved.
src/liblzma/api/lzma.h | 20 ++++++++
src/liblzma/api/lzma/base.h | 48 +++++++++---------
src/liblzma/api/lzma/block.h | 38 ++++++++-------
src/liblzma/api/lzma/check.h | 22 +++++----
src/liblzma/api/lzma/container.h | 36 ++++++++------
src/liblzma/api/lzma/filter.h | 81 +++++++++++++++++++------------
src/liblzma/api/lzma/index.h | 97 ++++++++++++++++++++++---------------
src/liblzma/api/lzma/index_hash.h | 14 ++++--
src/liblzma/api/lzma/lzma.h | 87 +++++++++++++++++----------------
src/liblzma/api/lzma/stream_flags.h | 12 ++---
src/liblzma/api/lzma/version.h | 10 ++--
src/liblzma/api/lzma/vli.h | 7 +--
12 files changed, 275 insertions(+), 197 deletions(-)
Install faq.txt.
Makefile.am | 1 +
1 file changed, 1 insertion(+)
Updated faq.txt.
Some questions worth answering were removed, because I
currently don't have good up to date answers to them.
doc/faq.txt | 239 +++++++++++++++++++-----------------------------------------
1 file changed, 73 insertions(+), 166 deletions(-)
Some xz man changes.
src/xz/xz.1 | 88 ++++++++++++++++++++++++++++++-------------------------------
1 file changed, 43 insertions(+), 45 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Fix data corruption in LZ/LZMA2 encoder.
Thanks to Jonathan Stott for the bug report.
src/liblzma/lz/lz_encoder.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Updated INSTALL and PACKAGERS to match the changes
made in --enable-dynamic.
INSTALL | 20 ++++++++++++++++----
PACKAGERS | 11 ++++++-----
2 files changed, 22 insertions(+), 9 deletions(-)
Link lzmainfo against shared liblzma by default.
src/lzmainfo/Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Make --enable-dynamic a tristate option.
Some programs will by default be linked against static
liblzma and some against shared liblzma. --enable-dynamic
now allows overriding the default to both directions
(all dynamic or all static) even when building both
shared and static liblzma.
This is quite messy compared to how simple thing it is supposed
to be. The complexity is mostly due to Windows support.
configure.ac | 77 ++++++++++++++++++++++++++++++++++++++++++++----------------
1 file changed, 57 insertions(+), 20 deletions(-)
Fix xz Makefile.am for the man page.
install-exec-hook -> install-data-hook
src/xz/Makefile.am | 2 ++
1 file changed, 2 insertions(+)
Add lzmainfo for backward compatibility with LZMA Utils.
lzmainfo now links against static liblzma. In contrast
to other command line tools in XZ Utils, linking lzmainfo
against static liblzma by default is dumb. This will be
fixed once I have fixed some related issues in configure.ac.
configure.ac | 1 +
src/Makefile.am | 2 +-
src/lzmainfo/Makefile.am | 29 ++++++
src/lzmainfo/lzmainfo.1 | 55 +++++++++++
src/lzmainfo/lzmainfo.c | 242 +++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 328 insertions(+), 1 deletion(-)
Sync some error messages from xz to xzdec.
Make xz error message translation usable outside
xz (at least in upcoming lzmainfo).
src/xz/main.c | 4 ++--
src/xzdec/xzdec.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
Add xz man page to manfiles in toplevel Makefile.am.
Makefile.am | 1 +
1 file changed, 1 insertion(+)
Fix first line of xz man page.
src/xz/xz.1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Added a rough version of the xz man page.
src/xz/Makefile.am | 15 +
src/xz/xz.1 | 1206 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 1221 insertions(+)
“xzdiff a.xz b.xz” always fails
Attempts to compare two compressed files result in no output and
exit status 2.
Instead of going to standard output, ‘diff’ output is being
captured in the xz_status variable along with the exit status from
the decompression commands. Later, when this variable is examined
for nonzero status codes, numerals from dates in the ‘diff’ output
make it appear as though decompression failed.
So let the ‘diff’ output leak to standard output with another file
descriptor. (This trick is used in all similar contexts elsewhere
in xzdiff and in the analogous context in gzip’s zdiff script.)
src/scripts/xzdiff.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
xzless: Support compressed standard input
It can be somewhat confusing that
less < some_file.txt
works fine, whereas
xzless < some_file.txt.xz
does not. Since version 429, ‘less’ allows a filter specified in
the LESSOPEN environment variable to preprocess its input even if
it comes from standard input, if $LESSOPEN begins with ‘|-’. So
set $LESSOPEN to take advantage of this feature.
Check less’s version at runtime so xzless can continue to work
with older versions.
src/scripts/xzless.in | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
GPLv2+ not GPLv2 for Doxyfile.in is probably OK.
Doxyfile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Added a copyright notice to Doxyfile.in since it contains
lots of comments from Doxygen.
It seems that the Doxygen authors' intent is to not apply
their copyright on generated files, but since it doesn't
matter for XZ Utils at all, better safe than sorry.
Doxyfile.in | 3 +++
1 file changed, 3 insertions(+)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Updated TODO.
TODO | 4 ++++
1 file changed, 4 insertions(+)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
xzdiff: add missing ;; to case statement
src/scripts/xzdiff.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Added history.txt to doc_DATA.
Makefile.am | 1 +
1 file changed, 1 insertion(+)
Updated .gitignore files.
.gitignore | 36 +++++++++++++++++++-----------------
po/.gitignore | 3 +++
2 files changed, 22 insertions(+), 17 deletions(-)
Minor improvements to COPYING.
COPYING | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
Fix incorrect usage of getopt_long(), which caused
invalid memory access if XZ_OPT was defined.
src/xz/args.c | 1 -
1 file changed, 1 deletion(-)
Avoid internal error with --format=xz --lzma1.
src/xz/coder.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
Major documentation update.
Installation and packaging instructions were added.
README and other generic docs were revised.
Some of the documentation files are now installed to $docdir.
AUTHORS | 35 +++---
ChangeLog | 7 +-
INSTALL | 327 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INSTALL.generic | 302 +++++++++++++++++++++++++++++++++++++++++++++++++++
Makefile.am | 11 ++
PACKAGERS | 278 +++++++++++++++++++++++++++++++++++++++++++++++
README | 263 ++++++++++++++++++++-------------------------
THANKS | 17 +--
8 files changed, 1070 insertions(+), 170 deletions(-)
Added missing author notice to xzless.in.
src/scripts/xzless.in | 1 +
1 file changed, 1 insertion(+)
Use AC_CONFIG_AUX_DIR to clean up the toplevel directory
a little.
Fixed a related bug in the toplevel Makefile.am.
Added the build-aux directory to .gitignore.
.gitignore | 1 +
Makefile.am | 1 -
configure.ac | 3 ++-
3 files changed, 3 insertions(+), 2 deletions(-)
Updated the totally outdated TODO file.
TODO | 117 ++++++++++++++++---------------------------------------------------
1 file changed, 27 insertions(+), 90 deletions(-)
Added public domain notice into a few files.
src/common/common_w32res.rc | 9 ++++++++-
src/liblzma/liblzma.pc.in | 7 +++++++
src/liblzma/liblzma_w32res.rc | 7 +++++++
src/xz/xz_w32res.rc | 7 +++++++
src/xzdec/xzdec_w32res.rc | 7 +++++++
5 files changed, 36 insertions(+), 1 deletion(-)
Allow extra commas in filter-specific options on xz command line.
This may slightly ease writing scripts that construct
filter-specific option strings dynamically.
src/xz/options.c | 7 +++++++
1 file changed, 7 insertions(+)
Accept --lzma2=preset=6e where "e" is equivalent to --extreme
when no custom chain is in use.
src/xz/options.c | 80 +++++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 59 insertions(+), 21 deletions(-)
Add dist-hook to create ChangeLog from the commit log,
and to conver the man pages to PDF and plain text, which
may be convenient to those who cannot render man pages.
Makefile.am | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
BCJ filters: Reject invalid start offsets with LZMA_OPTIONS_ERROR.
This is a quick and slightly dirty fix to make the code
conform to the latest file format specification. Without
this patch, it's possible to make corrupt files by
specifying start offset that is not a multiple of the
filter's alignment. Custom start offset is almost never
used, so this was only a minor bug.
The xz command line tool doesn't validate the start offset,
so one will get a bit unclear error message if trying to use
an invalid start offset.
src/liblzma/simple/arm.c | 2 +-
src/liblzma/simple/armthumb.c | 2 +-
src/liblzma/simple/ia64.c | 2 +-
src/liblzma/simple/powerpc.c | 2 +-
src/liblzma/simple/simple_coder.c | 5 ++++-
src/liblzma/simple/simple_private.h | 3 ++-
src/liblzma/simple/sparc.c | 2 +-
src/liblzma/simple/x86.c | 2 +-
8 files changed, 12 insertions(+), 8 deletions(-)
Look for full command names instead of substrings
like "un", "cat", and "lz" when determining if
xz is run as unxz, xzcat, lzma, unlzma, or lzcat.
This is to ensure that if xz is renamed (e.g. via
--program-transform-name), it doesn't so easily
work in wrong mode.
src/xz/args.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
Updated THANKS.
THANKS | 2 ++
1 file changed, 2 insertions(+)
Portability improvement to version.sh.
version.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Remove --force from xzdec.
It was ignored for compatibility with xz, but now that
--decompress --stdout --force copies unrecognized files
as is to stdout, simply ignoring --force in xzdec would
be wrong. xzdec will not support copying unrecognized
data as is to stdout, so it cannot support --force.
src/xzdec/xzdec.1 | 5 -----
src/xzdec/xzdec.c | 5 +----
2 files changed, 1 insertion(+), 9 deletions(-)
Use sed instead of $(SED) so that we don't need to
use AC_PROG_SED. We don't do anything fancy with sed,
so this should work OK. libtool 2.2 sets SED but 1.5
doesn't, so $(SED) happened to work when using libtool 2.2.
src/liblzma/Makefile.am | 2 +-
src/scripts/Makefile.am | 28 ++++++++++++++--------------
src/xz/Makefile.am | 6 +++---
src/xzdec/Makefile.am | 6 +++---
4 files changed, 21 insertions(+), 21 deletions(-)
Major update to the xzgrep and other scripts based on
the latest versions found from gzip CVS repository.
configure will try to find a POSIX shell to be used by
the scripts. This should ease portability on systems
which have pre-POSIX /bin/sh.
xzgrep and xzdiff support .xz, .lzma, .gz, and .bz2 files.
xzmore and xzless support only .xz and .lzma files.
The name of the xz executable used in these scripts is
now correct even if --program-transform-name has been used.
configure.ac | 14 ++++
m4/posix-shell.m4 | 63 ++++++++++++++++
src/scripts/Makefile.am | 24 +++---
src/scripts/xzdiff | 67 -----------------
src/scripts/xzdiff.1 | 58 ++++++++------
src/scripts/xzdiff.in | 172 ++++++++++++++++++++++++++++++++++++++++++
src/scripts/xzgrep | 123 ------------------------------
src/scripts/xzgrep.1 | 85 ++++++++++++---------
src/scripts/xzgrep.in | 196 ++++++++++++++++++++++++++++++++++++++++++++++++
src/scripts/xzless.1 | 66 ++++++++++++++++
src/scripts/xzless.in | 51 +++++++++++++
src/scripts/xzmore | 74 ------------------
src/scripts/xzmore.1 | 64 +++++++---------
src/scripts/xzmore.in | 78 +++++++++++++++++++
14 files changed, 766 insertions(+), 369 deletions(-)
Use @PACKAGE_HOMEPAGE@ in liblzma.pc.in.
src/liblzma/liblzma.pc.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Make "xz --decompress --stdout --force" copy unrecognized
files as is to standard output.
This feature is needed to be more compatible with gzip's
behavior. This was more complicated to implement than it
sounds, because the way liblzma is able to return errors with
files of only a few bytes in size. xz now has its own file
type detection code and no longer uses lzma_auto_decoder().
src/xz/coder.c | 213 +++++++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 178 insertions(+), 35 deletions(-)
Define PACKAGE_HOMEPAGE in configure.ac and use it in
xz and xzdec.
Use also PACKAGE_NAME instead of hardcoding "XZ Utils".
configure.ac | 5 +++++
src/xz/message.c | 4 ++--
src/xzdec/xzdec.c | 4 ++--
3 files changed, 9 insertions(+), 4 deletions(-)
Avoid visibility related compiler warnings on Windows.
configure.ac | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
Use static liblzma by default also for tests.
tests/Makefile.am | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Build system fixes
Don't use libtool convenience libraries to avoid recently
discovered long-standing subtle but somewhat severe bugs
in libtool (at least 1.5.22 and 2.2.6 are affected). It
was found when porting XZ Utils to Windows
<http://lists.gnu.org/archive/html/libtool/2009-06/msg00070.html>
but the problem is significant also e.g. on GNU/Linux.
Unless --disable-shared is passed to configure, static
library built from a set of convenience libraries will
contain PIC objects. That is, while libtool builds non-PIC
objects too, only PIC objects will be used from the
convenience libraries. On 32-bit x86 (tested on mobile XP2400+),
using PIC instead of non-PIC makes the decompressor 10 % slower
with the default CFLAGS.
So while xz was linked against static liblzma by default,
it got the slower PIC objects unless --disable-shared was
used. I tend develop and benchmark with --disable-shared
due to faster build time, so I hadn't noticed the problem
in benchmarks earlier.
This commit also adds support for building Windows resources
into liblzma and executables.
configure.ac | 34 ++++++++++------
src/liblzma/Makefile.am | 79 +++++++++++++++++++++++++++++--------
src/liblzma/check/Makefile.am | 47 ----------------------
src/liblzma/check/Makefile.inc | 51 ++++++++++++++++++++++++
src/liblzma/common/Makefile.am | 78 ------------------------------------
src/liblzma/common/Makefile.inc | 67 +++++++++++++++++++++++++++++++
src/liblzma/common/common.h | 16 +++++---
src/liblzma/delta/Makefile.am | 28 -------------
src/liblzma/delta/Makefile.inc | 23 +++++++++++
src/liblzma/lz/Makefile.am | 29 --------------
src/liblzma/lz/Makefile.inc | 21 ++++++++++
src/liblzma/lzma/Makefile.am | 51 ------------------------
src/liblzma/lzma/Makefile.inc | 43 ++++++++++++++++++++
src/liblzma/rangecoder/Makefile.am | 26 ------------
src/liblzma/rangecoder/Makefile.inc | 21 ++++++++++
src/liblzma/simple/Makefile.am | 51 ------------------------
src/liblzma/simple/Makefile.inc | 47 ++++++++++++++++++++++
src/liblzma/subblock/Makefile.am | 26 ------------
src/liblzma/subblock/Makefile.inc | 20 ++++++++++
src/xz/Makefile.am | 11 +++++-
src/xzdec/Makefile.am | 20 +++++++++-
21 files changed, 417 insertions(+), 372 deletions(-)
Added a comment about "autoconf -fi" to autogen.sh.
autogen.sh | 3 +++
1 file changed, 3 insertions(+)
Add -no-undefined to get shared liblzma on Windows.
src/liblzma/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Make physmem() work on Cygwin 1.5 and older.
src/common/physmem.h | 77 +++++++++++++++++++++++++++-------------------------
1 file changed, 40 insertions(+), 37 deletions(-)
Moved the Windows resource files outside the windows directory
to prepare for building them with Autotools.
windows/common.rc => src/common/common_w32res.rc | 0
.../liblzma.rc => src/liblzma/liblzma_w32res.rc | 2 +-
windows/xz.rc => src/xz/xz_w32res.rc | 2 +-
windows/lzmadec.rc => src/xzdec/lzmadec_w32res.rc | 2 +-
windows/xzdec.rc => src/xzdec/xzdec_w32res.rc | 2 +-
windows/Makefile | 35 ++++++++++++----------
6 files changed, 23 insertions(+), 20 deletions(-)
Added missing $(EXEEXT).
src/xz/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Create correct symlinks even when
--program-{prefix,suffix,transform} is passed to configure.
src/scripts/Makefile.am | 80 ++++++++++++++++++++++++++++---------------------
src/xz/Makefile.am | 21 ++++++++-----
src/xzdec/Makefile.am | 9 ++++--
3 files changed, 65 insertions(+), 45 deletions(-)
Silence a compiler warning on DOS-like systems.
src/xz/file_io.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Updated the filenames in POTFILES.in too.
po/POTFILES.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Hopefully improved portability of the assembler code in
Autotools based builds on Windows.
src/liblzma/check/crc32_x86.S | 8 +++++++-
src/liblzma/check/crc64_x86.S | 8 +++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
Updated THANKS (most of today's commits are based on
Charles Wilson's patches).
THANKS | 1 +
1 file changed, 1 insertion(+)
Updated comments to match renamed files.
src/xz/coder.c | 2 +-
src/xz/coder.h | 2 +-
src/xz/file_io.c | 2 +-
src/xz/file_io.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
Rename process.[hc] to coder.[hc] and io.[hc] to file_io.[hc]
to avoid problems on systems with system headers with those
names.
dos/Makefile | 4 ++--
src/xz/Makefile.am | 8 ++++----
src/xz/{process.c => coder.c} | 0
src/xz/{process.h => coder.h} | 0
src/xz/{io.c => file_io.c} | 0
src/xz/{io.h => file_io.h} | 0
src/xz/private.h | 4 ++--
windows/Makefile | 4 ++--
8 files changed, 10 insertions(+), 10 deletions(-)
Rename process_file() to coder_run().
src/xz/main.c | 6 +++---
src/xz/process.c | 6 +++---
src/xz/process.h | 5 ++---
3 files changed, 8 insertions(+), 9 deletions(-)
Ugly hack to make it possible to use the thousand separator
format character with snprintf() on POSIX systems but not
on non-POSIX systems and still keep xgettext working.
dos/Makefile | 16 +++-------------
src/xz/message.c | 17 +++++++++--------
src/xz/process.c | 30 +++++++++++++++---------------
src/xz/util.c | 34 ++++++++++++++++++++++++++++++++++
src/xz/util.h | 20 ++++++++++++++++++++
windows/Makefile | 13 +++----------
6 files changed, 84 insertions(+), 46 deletions(-)
Added missing source files to windows/Makefile.
windows/Makefile | 2 ++
1 file changed, 2 insertions(+)
Basic support for building with Cygwin and MinGW using
the Autotools based build system. It's not good yet, more
fixes will follow.
configure.ac | 7 +++++++
src/liblzma/api/lzma.h | 7 +++++--
src/liblzma/check/crc32_x86.S | 7 ++++---
src/liblzma/check/crc64_x86.S | 7 ++++---
src/liblzma/common/common.h | 2 +-
windows/Makefile | 16 +++++++---------
6 files changed, 28 insertions(+), 18 deletions(-)
Fix @variables@ to $(variables) in Makefile.am files.
Fix the ordering of libgnu.a and LTLIBINTL on the linker
command line and added missing LTLIBINTL to tests/Makefile.am.
debug/Makefile.am | 12 ++++++------
src/liblzma/check/Makefile.am | 4 ++--
src/liblzma/common/Makefile.am | 16 ++++++++--------
src/liblzma/delta/Makefile.am | 4 ++--
src/liblzma/lz/Makefile.am | 6 +++---
src/liblzma/lzma/Makefile.am | 8 ++++----
src/liblzma/rangecoder/Makefile.am | 4 ++--
src/liblzma/simple/Makefile.am | 4 ++--
src/liblzma/subblock/Makefile.am | 4 ++--
src/xz/Makefile.am | 21 +++++++++++----------
src/xzdec/Makefile.am | 19 ++++++++++---------
tests/Makefile.am | 12 +++++++-----
12 files changed, 59 insertions(+), 55 deletions(-)
Allow to explicitly specify autotool versions in autogen.sh.
autogen.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Add version.sh to EXTRA_DIST.
Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Support HW_PHYSMEM64
src/common/physmem.h | 30 +++++++++++++++++++-----------
1 file changed, 19 insertions(+), 11 deletions(-)
Cast a char argument to isspace() to unsigned char.
src/xz/args.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
A few more spelling fixes. Released the .xz spec 1.0.3.
doc/xz-file-format.txt | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
Added xzdec man page.
src/xzdec/Makefile.am | 11 ++++
src/xzdec/xzdec.1 | 173 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 184 insertions(+)
Harmonized xzdec --memory with xz --memory and made
minor cleanups.
src/xzdec/xzdec.c | 74 +++++++++++++++++++++++++++++++++++++++----------------
1 file changed, 53 insertions(+), 21 deletions(-)
Fix purporse -> purpose. Thanks to Andrew Dudman.
Released .xz spec 1.0.2 due to this fix too.
THANKS | 1 +
doc/xz-file-format.txt | 8 +++++---
src/liblzma/liblzma.pc.in | 2 +-
windows/Makefile | 2 +-
4 files changed, 8 insertions(+), 5 deletions(-)
The .xz file format version 1.0.1
doc/xz-file-format.txt | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
Make the raw value of the Check field available to applications
via lzma_block structure.
This changes ABI but not doesn't break API.
src/liblzma/api/lzma/block.h | 17 ++++++++++++++++
src/liblzma/common/block_buffer_encoder.c | 1 +
src/liblzma/common/block_decoder.c | 34 ++++++++++++++-----------------
src/liblzma/common/block_encoder.c | 21 ++++++++-----------
4 files changed, 42 insertions(+), 31 deletions(-)
Remove undocumented alternative option names --bcj, --ppc,
and --itanium.
src/xz/args.c | 3 ---
1 file changed, 3 deletions(-)
Add support for specifying the BCJ filter start offset
in the xz command line tool.
src/xz/args.c | 36 +++++++++++++++++++++---------------
src/xz/message.c | 14 ++++++++------
src/xz/options.c | 40 ++++++++++++++++++++++++++++++++++++++++
src/xz/options.h | 7 +++++++
4 files changed, 76 insertions(+), 21 deletions(-)
Updated THANKS.
THANKS | 2 ++
1 file changed, 2 insertions(+)
Added support for --quiet and --no-warn to xzdec.
Cleaned up the --help message a little.
src/xzdec/xzdec.c | 76 +++++++++++++++++++++++++++++++++++--------------------
1 file changed, 49 insertions(+), 27 deletions(-)
Use the 40 % of RAM memory usage limit in xzdec too.
Update the memory usage info text in --help to match
the text in xz --long-help.
src/xzdec/xzdec.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Add --no-warn.
src/xz/args.c | 8 +++++++-
src/xz/main.c | 17 +++++++++++++++++
src/xz/main.h | 6 ++++++
src/xz/message.c | 4 ++++
4 files changed, 34 insertions(+), 1 deletion(-)
Fix a comment.
src/xz/main.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Remove the --info option, which was an alias for --list.
src/xz/args.c | 1 -
1 file changed, 1 deletion(-)
If xz is run as lzma, unlzma, or lzcat, simply imply
--format=lzma. This means that xz emulating lzma
doesn't decompress .xz files, while before this
commit it did. The new way is slightly simpler in
code and especially in upcoming documentation.
src/xz/args.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
Make the default memory usage limit 40 % of RAM for both
compressing and decompressing. This should be OK now that
xz automatically scales down the compression settings if
they would exceed the memory usage limit (earlier, the limit
for compression was increased to 90 % because low limit broke
scripts that used "xz -9" on systems with low RAM).
Support spcifying the memory usage limit as a percentage
of RAM (e.g. --memory=50%).
Support --threads=0 to reset the thread limit to the default
value (number of available CPU cores). Use UINT32_MAX instead
of SIZE_MAX as the maximum in args.c. hardware.c was already
expecting uint32_t value.
Cleaned up the output of --help and --long-help.
src/xz/args.c | 28 +++++++++++++-----
src/xz/hardware.c | 86 +++++++++++++++++++++++--------------------------------
src/xz/hardware.h | 10 +++----
src/xz/message.c | 28 +++++++++---------
src/xz/process.c | 18 +++++-------
5 files changed, 82 insertions(+), 88 deletions(-)
Support special value "max" where xz and xzdec accept an integer.
Don't round the memory usage limit in xzdec --help to avoid
an integer overflow and to not give wrong impression that
the limit is high enough when it may not actually be.
src/xz/util.c | 4 ++++
src/xzdec/xzdec.c | 6 +++++-
2 files changed, 9 insertions(+), 1 deletion(-)
Install lzdiff, lzgrep, and lzmore as symlinks
This adds lzdiff, lzgrep, and lzmore to the list of symlinks to install.
It also installs symlinks for the manual pages and removes the new
symlinks on uninstall.
src/scripts/Makefile.am | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
Use a GCC-specific #pragma instead of GCC-specific
-Wno-uninitialized to silence a bogus warning.
configure.ac | 13 -------------
src/liblzma/check/Makefile.am | 5 -----
src/liblzma/check/sha256.c | 5 +++++
3 files changed, 5 insertions(+), 18 deletions(-)
Removed --disable-encoder and --disable-decoder. Use the values
given to --enable-encoders and --enable-decoders to determine
if any encoder or decoder support is wanted.
configure.ac | 48 ++++++++----------------------------------------
1 file changed, 8 insertions(+), 40 deletions(-)
Remove docs that are too outdated to be updated
(rewrite will be better).
doc/liblzma-advanced.txt | 324 -----------------------------------------------
doc/liblzma-hacking.txt | 112 ----------------
doc/liblzma-intro.txt | 194 ----------------------------
doc/liblzma-security.txt | 219 --------------------------------
doc/lzma-intro.txt | 107 ----------------
5 files changed, 956 deletions(-)
Added documentation about the legacy .lzma file format.
doc/lzma-file-format.txt | 166 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 166 insertions(+)
Renamed the file format specification to xz-file-format.txt
which is the filename used on the WWW.
doc/{file-format.txt => xz-file-format.txt} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
Fixed a crash in liblzma.
liblzma tries to avoid useless free()/malloc() pairs in
initialization when multiple files are handled using the
same lzma_stream. This didn't work with filter chains
due to comparison of wrong pointers in lzma_next_coder_init(),
making liblzma think that no memory reallocation is needed
even when it actually is.
Easy way to trigger this bug is to decompress two files with
a single xz command. The first file should have e.g. x86+LZMA2
as the filter chain, and the second file just LZMA2.
src/liblzma/common/alone_decoder.c | 2 +-
src/liblzma/common/alone_encoder.c | 4 ++--
src/liblzma/common/auto_decoder.c | 2 +-
src/liblzma/common/block_decoder.c | 2 +-
src/liblzma/common/block_encoder.c | 2 +-
src/liblzma/common/common.h | 4 ++--
src/liblzma/common/easy_encoder.c | 2 +-
src/liblzma/common/index_decoder.c | 2 +-
src/liblzma/common/index_encoder.c | 2 +-
src/liblzma/common/stream_decoder.c | 2 +-
src/liblzma/common/stream_encoder.c | 2 +-
11 files changed, 13 insertions(+), 13 deletions(-)
Fix uint32_t -> size_t in ARM and ARM-Thumb filters.
On 64-bit system it would have gone into infinite
loop if a single input buffer was over 4 GiB (unlikely).
src/liblzma/simple/arm.c | 2 +-
src/liblzma/simple/armthumb.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Minor fixes to test files' README.
tests/files/README | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
Updated history.txt.
doc/history.txt | 123 ++++++++++++++++++++++++++++++--------------------------
1 file changed, 66 insertions(+), 57 deletions(-)
Quick & dirty update to support xz in diff/grep/more scripts.
src/scripts/Makefile.am | 38 +++++++++++++++++++-----------
src/scripts/{lzdiff => xzdiff} | 24 +++++++++----------
src/scripts/{lzdiff.1 => xzdiff.1} | 29 ++++++++++++++---------
src/scripts/{lzgrep => xzgrep} | 10 ++++----
src/scripts/{lzgrep.1 => xzgrep.1} | 48 +++++++++++++++++++++++++-------------
src/scripts/{lzmore => xzmore} | 12 +++++-----
src/scripts/{lzmore.1 => xzmore.1} | 33 +++++++++++++++++---------
7 files changed, 119 insertions(+), 75 deletions(-)
Put the interesting parts of XZ Utils into the public domain.
Some minor documentation cleanups were made at the same time.
COPYING | 67 ++++++++++++++++++++------
ChangeLog | 2 +-
Doxyfile.in | 8 +--
Makefile.am | 13 ++---
autogen.sh | 9 ++++
configure.ac | 13 ++---
debug/Makefile.am | 13 ++---
debug/crc32.c | 13 ++---
debug/full_flush.c | 13 ++---
debug/hex2bin.c | 7 ++-
debug/known_sizes.c | 13 ++---
debug/memusage.c | 13 ++---
debug/repeat.c | 13 ++---
debug/sync_flush.c | 13 ++---
doc/faq.txt | 38 ++-------------
lib/Makefile.am | 18 +++----
src/Makefile.am | 13 ++---
src/common/bswap.h | 7 ++-
src/common/cpucores.h | 7 ++-
src/common/integer.h | 7 ++-
src/common/mythread.h | 4 +-
src/common/open_stdxxx.h | 7 ++-
src/common/physmem.h | 7 ++-
src/common/sysdefs.h | 13 ++---
src/liblzma/Makefile.am | 13 ++---
src/liblzma/api/Makefile.am | 13 ++---
src/liblzma/api/lzma.h | 38 +++++++++------
src/liblzma/api/lzma/base.h | 20 +++-----
src/liblzma/api/lzma/bcj.h | 18 +++----
src/liblzma/api/lzma/block.h | 18 +++----
src/liblzma/api/lzma/check.h | 18 +++----
src/liblzma/api/lzma/container.h | 18 +++----
src/liblzma/api/lzma/delta.h | 18 +++----
src/liblzma/api/lzma/filter.h | 18 +++----
src/liblzma/api/lzma/index.h | 18 +++----
src/liblzma/api/lzma/index_hash.h | 22 +++------
src/liblzma/api/lzma/lzma.h | 18 +++----
src/liblzma/api/lzma/stream_flags.h | 18 +++----
src/liblzma/api/lzma/subblock.h | 18 +++----
src/liblzma/api/lzma/version.h | 18 +++----
src/liblzma/api/lzma/vli.h | 46 ++++++++----------
src/liblzma/check/Makefile.am | 8 ++-
src/liblzma/check/check.c | 7 ++-
src/liblzma/check/check.h | 7 ++-
src/liblzma/check/crc32_fast.c | 30 +++++-------
src/liblzma/check/crc32_small.c | 7 ++-
src/liblzma/check/crc32_table.c | 7 ++-
src/liblzma/check/crc32_tablegen.c | 7 ++-
src/liblzma/check/crc32_x86.S | 21 +++++---
src/liblzma/check/crc64_fast.c | 20 +++-----
src/liblzma/check/crc64_small.c | 7 ++-
src/liblzma/check/crc64_table.c | 7 ++-
src/liblzma/check/crc64_tablegen.c | 7 ++-
src/liblzma/check/crc64_x86.S | 14 ++++--
src/liblzma/check/crc_macros.h | 9 ++--
src/liblzma/check/sha256.c | 23 +++++----
src/liblzma/common/Makefile.am | 13 ++---
src/liblzma/common/alone_decoder.c | 13 ++---
src/liblzma/common/alone_decoder.h | 13 ++---
src/liblzma/common/alone_encoder.c | 13 ++---
src/liblzma/common/auto_decoder.c | 13 ++---
src/liblzma/common/block_buffer_decoder.c | 13 ++---
src/liblzma/common/block_buffer_encoder.c | 13 ++---
src/liblzma/common/block_decoder.c | 13 ++---
src/liblzma/common/block_decoder.h | 13 ++---
src/liblzma/common/block_encoder.c | 13 ++---
src/liblzma/common/block_encoder.h | 13 ++---
src/liblzma/common/block_header_decoder.c | 13 ++---
src/liblzma/common/block_header_encoder.c | 13 ++---
src/liblzma/common/block_util.c | 13 ++---
src/liblzma/common/bsr.h | 7 ++-
src/liblzma/common/chunk_size.c | 13 ++---
src/liblzma/common/common.c | 13 ++---
src/liblzma/common/common.h | 13 ++---
src/liblzma/common/easy_buffer_encoder.c | 13 ++---
src/liblzma/common/easy_decoder_memusage.c | 13 ++---
src/liblzma/common/easy_encoder.c | 13 ++---
src/liblzma/common/easy_encoder_memusage.c | 13 ++---
src/liblzma/common/easy_preset.c | 13 ++---
src/liblzma/common/easy_preset.h | 13 ++---
src/liblzma/common/filter_buffer_decoder.c | 13 ++---
src/liblzma/common/filter_buffer_encoder.c | 13 ++---
src/liblzma/common/filter_common.c | 13 ++---
src/liblzma/common/filter_common.h | 13 ++---
src/liblzma/common/filter_decoder.c | 13 ++---
src/liblzma/common/filter_decoder.h | 13 ++---
src/liblzma/common/filter_encoder.c | 13 ++---
src/liblzma/common/filter_encoder.h | 13 ++---
src/liblzma/common/filter_flags_decoder.c | 13 ++---
src/liblzma/common/filter_flags_encoder.c | 13 ++---
src/liblzma/common/index.c | 13 ++---
src/liblzma/common/index.h | 13 ++---
src/liblzma/common/index_decoder.c | 13 ++---
src/liblzma/common/index_encoder.c | 13 ++---
src/liblzma/common/index_encoder.h | 13 ++---
src/liblzma/common/index_hash.c | 13 ++---
src/liblzma/common/stream_buffer_decoder.c | 13 ++---
src/liblzma/common/stream_buffer_encoder.c | 13 ++---
src/liblzma/common/stream_decoder.c | 13 ++---
src/liblzma/common/stream_decoder.h | 13 ++---
src/liblzma/common/stream_encoder.c | 13 ++---
src/liblzma/common/stream_encoder.h | 13 ++---
src/liblzma/common/stream_flags_common.c | 13 ++---
src/liblzma/common/stream_flags_common.h | 13 ++---
src/liblzma/common/stream_flags_decoder.c | 13 ++---
src/liblzma/common/stream_flags_encoder.c | 13 ++---
src/liblzma/common/vli_decoder.c | 13 ++---
src/liblzma/common/vli_encoder.c | 13 ++---
src/liblzma/common/vli_size.c | 13 ++---
src/liblzma/delta/Makefile.am | 13 ++---
src/liblzma/delta/delta_common.c | 13 ++---
src/liblzma/delta/delta_common.h | 13 ++---
src/liblzma/delta/delta_decoder.c | 13 ++---
src/liblzma/delta/delta_decoder.h | 13 ++---
src/liblzma/delta/delta_encoder.c | 13 ++---
src/liblzma/delta/delta_encoder.h | 13 ++---
src/liblzma/delta/delta_private.h | 13 ++---
src/liblzma/lz/Makefile.am | 13 ++---
src/liblzma/lz/lz_decoder.c | 17 ++-----
src/liblzma/lz/lz_decoder.h | 17 ++-----
src/liblzma/lz/lz_encoder.c | 17 ++-----
src/liblzma/lz/lz_encoder.h | 17 ++-----
src/liblzma/lz/lz_encoder_hash.h | 13 ++---
src/liblzma/lz/lz_encoder_mf.c | 17 ++-----
src/liblzma/lzma/Makefile.am | 13 ++---
src/liblzma/lzma/fastpos.h | 17 ++-----
src/liblzma/lzma/fastpos_tablegen.c | 17 ++-----
src/liblzma/lzma/lzma2_decoder.c | 17 ++-----
src/liblzma/lzma/lzma2_decoder.h | 17 ++-----
src/liblzma/lzma/lzma2_encoder.c | 17 ++-----
src/liblzma/lzma/lzma2_encoder.h | 17 ++-----
src/liblzma/lzma/lzma_common.h | 17 ++-----
src/liblzma/lzma/lzma_decoder.c | 17 ++-----
src/liblzma/lzma/lzma_decoder.h | 17 ++-----
src/liblzma/lzma/lzma_encoder.c | 17 ++-----
src/liblzma/lzma/lzma_encoder.h | 17 ++-----
src/liblzma/lzma/lzma_encoder_optimum_fast.c | 13 ++---
src/liblzma/lzma/lzma_encoder_optimum_normal.c | 13 ++---
src/liblzma/lzma/lzma_encoder_presets.c | 13 ++---
src/liblzma/lzma/lzma_encoder_private.h | 17 ++-----
src/liblzma/rangecoder/Makefile.am | 13 ++---
src/liblzma/rangecoder/price.h | 13 ++---
src/liblzma/rangecoder/price_tablegen.c | 16 ++----
src/liblzma/rangecoder/range_common.h | 17 ++-----
src/liblzma/rangecoder/range_decoder.h | 17 ++-----
src/liblzma/rangecoder/range_encoder.h | 17 ++-----
src/liblzma/simple/Makefile.am | 13 ++---
src/liblzma/simple/arm.c | 17 ++-----
src/liblzma/simple/armthumb.c | 17 ++-----
src/liblzma/simple/ia64.c | 17 ++-----
src/liblzma/simple/powerpc.c | 17 ++-----
src/liblzma/simple/simple_coder.c | 13 ++---
src/liblzma/simple/simple_coder.h | 14 ++----
src/liblzma/simple/simple_decoder.c | 13 ++---
src/liblzma/simple/simple_decoder.h | 13 ++---
src/liblzma/simple/simple_encoder.c | 13 ++---
src/liblzma/simple/simple_encoder.h | 13 ++---
src/liblzma/simple/simple_private.h | 13 ++---
src/liblzma/simple/sparc.c | 17 ++-----
src/liblzma/simple/x86.c | 17 ++-----
src/liblzma/subblock/Makefile.am | 13 ++---
src/liblzma/subblock/subblock_decoder.c | 13 ++---
src/liblzma/subblock/subblock_decoder.h | 13 ++---
src/liblzma/subblock/subblock_decoder_helper.c | 13 ++---
src/liblzma/subblock/subblock_decoder_helper.h | 13 ++---
src/liblzma/subblock/subblock_encoder.c | 13 ++---
src/liblzma/subblock/subblock_encoder.h | 13 ++---
src/scripts/Makefile.am | 7 +++
src/xz/Makefile.am | 13 ++---
src/xz/args.c | 13 ++---
src/xz/args.h | 13 ++---
src/xz/hardware.c | 13 ++---
src/xz/hardware.h | 13 ++---
src/xz/io.c | 13 ++---
src/xz/io.h | 13 ++---
src/xz/list.c | 13 ++---
src/xz/main.c | 13 ++---
src/xz/main.h | 13 ++---
src/xz/message.c | 13 ++---
src/xz/message.h | 13 ++---
src/xz/options.c | 13 ++---
src/xz/options.h | 13 ++---
src/xz/private.h | 13 ++---
src/xz/process.c | 13 ++---
src/xz/process.h | 13 ++---
src/xz/signals.c | 13 ++---
src/xz/signals.h | 13 ++---
src/xz/suffix.c | 13 ++---
src/xz/suffix.h | 13 ++---
src/xz/util.c | 13 ++---
src/xz/util.h | 13 ++---
src/xzdec/Makefile.am | 13 ++---
src/xzdec/xzdec.c | 13 ++---
tests/Makefile.am | 13 ++---
tests/bcj_test.c | 7 ++-
tests/create_compress_files.c | 13 ++---
tests/test_block.c | 13 ++---
tests/test_block_header.c | 13 ++---
tests/test_check.c | 13 ++---
tests/test_compress.sh | 13 ++---
tests/test_files.sh | 13 ++---
tests/test_filter_flags.c | 13 ++---
tests/test_index.c | 13 ++---
tests/test_stream_flags.c | 13 ++---
tests/tests.h | 13 ++---
windows/common.rc | 2 +-
206 files changed, 868 insertions(+), 2023 deletions(-)
Fix off-by-one in LZ decoder.
Fortunately, this bug had no security risk other than accepting
some corrupt files as valid.
src/liblzma/lz/lz_decoder.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fix minor typos in README
README | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Add a note and work-around instructions to README about
problems detecting a C99 compiler when some standard
headers are missing.
README | 11 +++++++++++
1 file changed, 11 insertions(+)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Fix wrong macro names in lc_cpucores.m4 and cpucores.h.
Thanks to Bert Wesarg.
m4/lc_cpucores.m4 | 4 ++--
src/common/cpucores.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
Test for Linux-specific sysinfo() only on Linux systems.
Some other systems have sysinfo() with different semantics.
m4/lc_physmem.m4 | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
Added AC_CONFIG_MACRO_DIR to configure.ac.
configure.ac | 1 +
1 file changed, 1 insertion(+)
Fix the Autoconf test for getopt_long replacement.
It was broken by e114502b2bc371e4a45449832cb69be036360722.
m4/getopt.m4 | 4 ++++
1 file changed, 4 insertions(+)
Add a rough explanation of --extreme to output of --help.
src/xz/message.c | 4 ++++
1 file changed, 4 insertions(+)
Fixes to progress message handling in xz:
- Don't use Windows-specific code on Windows. The old code
required at least Windows 2000. Now it should work on
Windows 98 and later, and maybe on Windows 95 too.
- Use less precision when showing estimated remaining time.
- Fix some small design issues.
src/xz/message.c | 483 +++++++++++++++++++++++++++++++++++--------------------
src/xz/message.h | 28 ++--
src/xz/process.c | 53 +++---
3 files changed, 351 insertions(+), 213 deletions(-)
Added files missing from the previous commit.
src/liblzma/api/lzma/container.h | 33 +++++++++++++++++++++++++++++++++
src/liblzma/common/Makefile.am | 7 ++++++-
2 files changed, 39 insertions(+), 1 deletion(-)
Added lzma_easy_buffer_encode(). Splitted easy.c into small
pieces to avoid unneeded dependencies making statically
linked applications bigger than needed.
dos/Makefile | 6 ++-
src/liblzma/common/easy_buffer_encoder.c | 34 +++++++++++++++++
src/liblzma/common/easy_decoder_memusage.c | 31 ++++++++++++++++
src/liblzma/common/{easy.c => easy_encoder.c} | 53 +++------------------------
src/liblzma/common/easy_encoder_memusage.c | 31 ++++++++++++++++
src/liblzma/common/easy_preset.c | 34 +++++++++++++++++
src/liblzma/common/easy_preset.h | 39 ++++++++++++++++++++
windows/Makefile | 6 ++-
8 files changed, 185 insertions(+), 49 deletions(-)
Make physmem.h work on old Windows versions.
Thanks to Hongbo Ni for the original patch.
src/common/physmem.h | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
Fix microsecond vs. nanosecond confusion in my_time().
src/xz/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Cleanups to the code that detects the amount of RAM and
the number of CPU cores. Added support for using sysinfo()
on Linux systems whose libc lacks appropriate sysconf()
support (at least dietlibc). The Autoconf macros were
split into separate files, and CPU core count detection
was moved from hardware.c to cpucores.h. The core count
isn't used for anything real for now, so a problematic
part in process.c was commented out.
configure.ac | 89 ++-------------------------------------------------
m4/lc_cpucores.m4 | 57 +++++++++++++++++++++++++++++++++
m4/lc_physmem.m4 | 74 ++++++++++++++++++++++++++++++++++++++++++
src/common/cpucores.h | 52 ++++++++++++++++++++++++++++++
src/common/physmem.h | 21 +++++++-----
src/xz/args.c | 4 +--
src/xz/hardware.c | 50 +++++++++++++----------------
src/xz/hardware.h | 11 +++++--
src/xz/message.c | 5 +--
src/xz/process.c | 2 ++
10 files changed, 235 insertions(+), 130 deletions(-)
Initial port to DOS using DJGPP.
dos/Makefile | 261 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
dos/README | 113 ++++++++++++++++++++++++++
dos/config.h | 150 ++++++++++++++++++++++++++++++++++
3 files changed, 524 insertions(+)
Windows port: Take advantage of the version number macros.
Now the version number is not duplicated in the
Windows-specific files anymore.
windows/Makefile | 2 +-
windows/common.rc | 16 ++++++++--------
windows/config.h | 15 ---------------
3 files changed, 9 insertions(+), 24 deletions(-)
Changed how the version number is specified in various places.
Now configure.ac will get the version number directly from
src/liblzma/api/lzma/version.h. The intent is to reduce the
number of places where the version number is duplicated. In
future, support for displaying Git commit ID may be added too.
configure.ac | 3 +-
src/liblzma/api/lzma/version.h | 70 ++++++++++++++++++++++++++++++++++++++++--
src/liblzma/common/common.c | 2 +-
src/xz/message.c | 2 +-
src/xzdec/xzdec.c | 2 +-
version.sh | 23 ++++++++++++++
6 files changed, 95 insertions(+), 7 deletions(-)
Fix handling of integrity check type in the xz command line tool.
src/xz/args.c | 9 ++++++++-
src/xz/process.c | 4 ++++
2 files changed, 12 insertions(+), 1 deletion(-)
Improve support for DOS-like systems.
Here DOS-like means DOS, Windows, and OS/2.
src/common/physmem.h | 12 ++++++++++++
src/common/sysdefs.h | 4 ++++
src/liblzma/check/crc32_x86.S | 6 +++---
src/liblzma/check/crc64_x86.S | 6 +++---
src/xz/args.c | 13 +++++--------
src/xz/io.c | 39 +++++++++++++++++++++++++--------------
src/xz/main.c | 23 +++++++++++++++++++++++
src/xz/message.c | 3 +++
src/xz/suffix.c | 5 +++++
src/xzdec/xzdec.c | 5 +++--
10 files changed, 86 insertions(+), 30 deletions(-)
Remove dead directories from .gitignore.
.gitignore | 2 --
1 file changed, 2 deletions(-)
.gitignore vs. Makefiles
How about this for those of us who do srcdir builds?
.gitignore | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
Removed Makefile from .gitignore since not all Makefiles
in the repository are generated by Autotools. People
should do test builds in a separate build directory anyway.
.gitignore | 1 -
1 file changed, 1 deletion(-)
Added resource files for the Windows build.
windows/Makefile | 37 ++++++++++++++++++++++---------------
windows/common.rc | 46 ++++++++++++++++++++++++++++++++++++++++++++++
windows/liblzma.rc | 5 +++++
windows/lzmadec.rc | 5 +++++
windows/xz.rc | 5 +++++
windows/xzdec.rc | 5 +++++
6 files changed, 88 insertions(+), 15 deletions(-)
Let the user specify custom CFLAGS on the make command
line. Previously custom CFLAGS worked only when they were
passed to configure.
configure.ac | 58 ++++++++++++++++++++++---------------------
src/liblzma/check/Makefile.am | 2 +-
2 files changed, 31 insertions(+), 29 deletions(-)
Fix aliasing issue in physmem.h.
src/common/physmem.h | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
Add a separate internal function to initialize the CRC32
table, which is used also by LZ encoder. This was needed
because calling lzma_crc32() and ignoring the result is
a no-op due to lzma_attr_pure.
src/liblzma/check/check.h | 1 +
src/liblzma/check/crc32_small.c | 10 +++++++++-
src/liblzma/lz/lz_encoder.c | 4 ++--
3 files changed, 12 insertions(+), 3 deletions(-)
Make "xz --force" to write to terminal as the error
message suggests.
src/xz/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Support both slash and backslash as path component
separator on Windows when parsing argv[0].
src/xz/args.c | 9 +++++++++
1 file changed, 9 insertions(+)
Omit the wrong and (even if corrected) nowadays useless rm
from autogen.sh.
autogen.sh | 28 ----------------------------
1 file changed, 28 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Make it easy to choose if command line tools should be
linked statically or dynamically against liblzma. The
default is still to use static liblzma, but it can now
be changed by passing --enable-dynamic to configure.
Thanks to Mike Frysinger for the original patch.
Fixed a few minor bugs in configure.ac.
configure.ac | 39 +++++++++++++++++++++++++++++++++++++++
src/xz/Makefile.am | 8 +++-----
src/xzdec/Makefile.am | 5 +++--
3 files changed, 45 insertions(+), 7 deletions(-)
add gitignore files
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
.gitignore | 32 ++++++++++++++++++++++++++++++++
m4/.gitignore | 35 +++++++++++++++++++++++++++++++++++
po/.gitignore | 12 ++++++++++++
3 files changed, 79 insertions(+)
Assume 32 MiB of RAM on unsupported operating systems like
the comment in hardware.c already said.
src/xz/hardware.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
MinGW support: Don't build fastpos_tablegen.c as part of
liblzma. Build both static and dynamic liblzma, and also
static and dynamic versions of the command line tools.
windows/Makefile | 92 ++++++++++++++++++++++++++++++++++++++++++--------------
windows/README | 10 ------
2 files changed, 69 insertions(+), 33 deletions(-)
Support LZMA_API_STATIC in assembler files to
avoid __declspec(dllexport) equivalent.
src/liblzma/check/crc32_x86.S | 4 ++++
src/liblzma/check/crc64_x86.S | 2 ++
2 files changed, 6 insertions(+)
Introduced LZMA_API_STATIC macro, which the applications
need to #define when linking against static liblzma on
platforms like Windows. Most developers don't need to
care about LZMA_API_STATIC at all.
src/liblzma/api/lzma.h | 31 ++++++++++++++++++++++++-------
src/liblzma/common/common.h | 2 +-
2 files changed, 25 insertions(+), 8 deletions(-)
Another grammar fix
README | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Grammar fix in README.
README | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Some MSYS installations (e.g. MsysGit) don't include
install.exe, so don't rely on it.
windows/Makefile | 12 +++++++-----
windows/README | 11 ++++++-----
2 files changed, 13 insertions(+), 10 deletions(-)
Recreated the BCJ test files for x86 and SPARC. The old files
were linked with crt*.o, which are copyrighted, and thus the
old test files were not in the public domain as a whole. They
are freely distributable though, but it is better to be careful
and avoid including any copyrighted pieces in the test files.
The new files are just compiled and assembled object files,
and thus don't contain any copyrighted code.
tests/bcj_test.c | 2 +-
tests/compress_prepared_bcj_sparc | Bin 6804 -> 1240 bytes
tests/compress_prepared_bcj_x86 | Bin 4649 -> 1388 bytes
tests/files/good-1-sparc-lzma2.xz | Bin 2296 -> 612 bytes
tests/files/good-1-x86-lzma2.xz | Bin 1936 -> 716 bytes
5 files changed, 1 insertion(+), 1 deletion(-)
Add the "windows" directory to EXTRA_DIST.
Makefile.am | 1 +
1 file changed, 1 insertion(+)
Added initial experimental makefile for use with MinGW.
windows/Makefile | 253 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
windows/README | 164 ++++++++++++++++++++++++++++++++++++
windows/config.h | 180 +++++++++++++++++++++++++++++++++++++++
3 files changed, 597 insertions(+)
Various code cleanups the the xz command line tool.
It now builds with MinGW.
src/common/physmem.h | 13 ++++
src/xz/Makefile.am | 2 +
src/xz/args.h | 8 ---
src/xz/hardware.h | 10 +--
src/xz/io.c | 93 +++++++++++++++++++-------
src/xz/io.h | 12 ++--
src/xz/main.c | 132 ++-----------------------------------
src/xz/main.h | 22 -------
src/xz/message.c | 65 ++++++++++++++++---
src/xz/message.h | 6 --
src/xz/options.h | 8 ---
src/xz/private.h | 18 ++++--
src/xz/process.h | 10 +--
src/xz/signals.c | 180 +++++++++++++++++++++++++++++++++++++++++++++++++++
src/xz/signals.h | 51 +++++++++++++++
src/xz/suffix.h | 5 --
src/xz/util.c | 5 +-
src/xz/util.h | 5 --
18 files changed, 399 insertions(+), 246 deletions(-)
Another utime() fix.
src/xz/io.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
Fix wrong filename argument for utime() and utimes().
This doesn't affect most systems, since most systems
have better functions available.
src/xz/io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Updated the x86 assembler code:
- Use call/ret pair to get instruction pointer for PIC.
- Use PIC only if PIC or __PIC__ is #defined.
- The code should work on MinGW and Darwin in addition
to GNU/Linux and Solaris.
configure.ac | 6 ----
src/liblzma/check/crc32_x86.S | 84 ++++++++++++++++++++++++++++++++++++-------
src/liblzma/check/crc64_x86.S | 82 ++++++++++++++++++++++++++++++++++++------
3 files changed, 144 insertions(+), 28 deletions(-)
Modify LZMA_API macro so that it works on Windows with
other compilers than MinGW. This may hurt readability
of the API headers slightly, but I don't know any
better way to do this.
src/liblzma/api/lzma.h | 6 ++---
src/liblzma/api/lzma/base.h | 11 ++++----
src/liblzma/api/lzma/block.h | 22 ++++++++--------
src/liblzma/api/lzma/check.h | 10 ++++----
src/liblzma/api/lzma/container.h | 22 ++++++++--------
src/liblzma/api/lzma/filter.h | 28 ++++++++++-----------
src/liblzma/api/lzma/index.h | 40 +++++++++++++++---------------
src/liblzma/api/lzma/index_hash.h | 10 ++++----
src/liblzma/api/lzma/lzma.h | 6 ++---
src/liblzma/api/lzma/stream_flags.h | 10 ++++----
src/liblzma/api/lzma/version.h | 4 +--
src/liblzma/api/lzma/vli.h | 6 ++---
src/liblzma/check/check.c | 4 +--
src/liblzma/check/crc32_fast.c | 2 +-
src/liblzma/check/crc32_small.c | 2 +-
src/liblzma/check/crc64_fast.c | 2 +-
src/liblzma/check/crc64_small.c | 2 +-
src/liblzma/common/alone_decoder.c | 2 +-
src/liblzma/common/alone_encoder.c | 2 +-
src/liblzma/common/auto_decoder.c | 2 +-
src/liblzma/common/block_buffer_decoder.c | 2 +-
src/liblzma/common/block_buffer_encoder.c | 4 +--
src/liblzma/common/block_decoder.c | 2 +-
src/liblzma/common/block_encoder.c | 2 +-
src/liblzma/common/block_header_decoder.c | 2 +-
src/liblzma/common/block_header_encoder.c | 4 +--
src/liblzma/common/block_util.c | 6 ++---
src/liblzma/common/chunk_size.c | 2 +-
src/liblzma/common/common.c | 16 ++++++------
src/liblzma/common/common.h | 2 +-
src/liblzma/common/easy.c | 6 ++---
src/liblzma/common/filter_buffer_decoder.c | 2 +-
src/liblzma/common/filter_buffer_encoder.c | 2 +-
src/liblzma/common/filter_decoder.c | 8 +++---
src/liblzma/common/filter_encoder.c | 12 ++++-----
src/liblzma/common/filter_flags_decoder.c | 2 +-
src/liblzma/common/filter_flags_encoder.c | 4 +--
src/liblzma/common/index.c | 32 ++++++++++++------------
src/liblzma/common/index_decoder.c | 4 +--
src/liblzma/common/index_encoder.c | 4 +--
src/liblzma/common/index_hash.c | 10 ++++----
src/liblzma/common/stream_buffer_decoder.c | 2 +-
src/liblzma/common/stream_buffer_encoder.c | 4 +--
src/liblzma/common/stream_decoder.c | 2 +-
src/liblzma/common/stream_encoder.c | 2 +-
src/liblzma/common/stream_flags_common.c | 2 +-
src/liblzma/common/stream_flags_decoder.c | 4 +--
src/liblzma/common/stream_flags_encoder.c | 4 +--
src/liblzma/common/vli_decoder.c | 2 +-
src/liblzma/common/vli_encoder.c | 2 +-
src/liblzma/common/vli_size.c | 2 +-
src/liblzma/lz/lz_encoder.c | 2 +-
src/liblzma/lzma/lzma_encoder.c | 2 +-
src/liblzma/lzma/lzma_encoder_presets.c | 2 +-
54 files changed, 177 insertions(+), 176 deletions(-)
Fix a bug in lzma_block_buffer_decode(), although this
function should be rewritten anyway.
src/liblzma/common/block_buffer_decoder.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Added initial version of raw buffer-to-buffer coding
functions, and cleaned up filter.h API header a little.
May be very buggy, not tested yet.
src/liblzma/api/lzma/filter.h | 84 +++++++++++++++++++-------
src/liblzma/common/Makefile.am | 2 +
src/liblzma/common/filter_buffer_decoder.c | 94 ++++++++++++++++++++++++++++++
src/liblzma/common/filter_buffer_encoder.c | 61 +++++++++++++++++++
4 files changed, 221 insertions(+), 20 deletions(-)
Fix missing newlines in xzdec.c.
src/xzdec/xzdec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Use __cdecl also for function pointers in liblzma API when
on Windows.
src/liblzma/api/lzma.h | 18 +++++++++++-------
src/liblzma/api/lzma/base.h | 4 ++--
src/liblzma/common/common.h | 18 +++++++-----------
3 files changed, 20 insertions(+), 20 deletions(-)
Add LZMA_API to liblzma API headers. It's useful at least
on Windows. sysdefs.h no longer #includes lzma.h, so lzma.h
has to be #included separately where needed.
src/common/sysdefs.h | 2 --
src/liblzma/api/lzma.h | 17 ++++++++++++++
src/liblzma/api/lzma/base.h | 10 ++++----
src/liblzma/api/lzma/block.h | 25 +++++++++++---------
src/liblzma/api/lzma/check.h | 12 ++++++----
src/liblzma/api/lzma/container.h | 23 +++++++++---------
src/liblzma/api/lzma/filter.h | 24 +++++++++----------
src/liblzma/api/lzma/index.h | 47 +++++++++++++++++++++----------------
src/liblzma/api/lzma/index_hash.h | 11 +++++----
src/liblzma/api/lzma/lzma.h | 8 ++++---
src/liblzma/api/lzma/stream_flags.h | 10 ++++----
src/liblzma/api/lzma/version.h | 4 ++--
src/liblzma/api/lzma/vli.h | 10 ++++----
src/liblzma/common/common.h | 13 ++++++++--
src/xz/private.h | 1 +
src/xzdec/xzdec.c | 1 +
tests/tests.h | 1 +
17 files changed, 131 insertions(+), 88 deletions(-)
Use _WIN32 instead of WIN32 in xzdec.c to test if compiling on Windows.
src/xzdec/xzdec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Fix two lines in lzma.h on which the # wasn't at the
beginning of the line.
src/liblzma/api/lzma.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Add support for using liblzma headers in MSVC, which has no
stdint.h or inttypes.h.
src/liblzma/api/lzma.h | 70 +++++++++++++++++++++++++++++++++-----------------
1 file changed, 46 insertions(+), 24 deletions(-)
Fix # -> ## in a macro in lzma.h.
src/liblzma/api/lzma.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Updated README.
README | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)
Remove dangling crc64_init.c.
src/liblzma/check/crc64_init.c | 55 ------------------------------------------
1 file changed, 55 deletions(-)
The .xz file format specification version 1.0.0 is now
officially released. The format has been technically the same
since 2008-11-19, but now that it is frozen, people can start
using it without a fear that the format will break.
doc/file-format.txt | 84 +++++++++++++++++++++++++++++++----------------------
1 file changed, 49 insertions(+), 35 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Fix uninitialized variables in alone_decoder.c. This bug was
triggered by the previous commit, since these variables were
not used by anything before support for a preset dictionary.
src/liblzma/common/alone_decoder.c | 2 ++
1 file changed, 2 insertions(+)
Added initial support for preset dictionary for raw LZMA1
and LZMA2. It is not supported by the .xz format or the xz
command line tool yet.
src/liblzma/lz/lz_decoder.c | 35 +++++++++++++++++++++++++----------
src/liblzma/lz/lz_decoder.h | 9 ++++++++-
src/liblzma/lz/lz_encoder.c | 18 ++++++++++++++++--
src/liblzma/lzma/lzma2_decoder.c | 9 ++++++---
src/liblzma/lzma/lzma2_encoder.c | 12 +++++++-----
src/liblzma/lzma/lzma_decoder.c | 10 ++++++----
src/liblzma/lzma/lzma_decoder.h | 2 +-
src/liblzma/lzma/lzma_encoder.c | 9 ++++++++-
8 files changed, 77 insertions(+), 27 deletions(-)
Regenerate the CRC tables without trailing blanks.
src/liblzma/check/crc32_table_be.h | 1008 +++++++++++++++++------------------
src/liblzma/check/crc32_table_le.h | 1008 +++++++++++++++++------------------
src/liblzma/check/crc64_table_be.h | 1016 ++++++++++++++++++------------------
src/liblzma/check/crc64_table_le.h | 1016 ++++++++++++++++++------------------
4 files changed, 2024 insertions(+), 2024 deletions(-)
remove trailing blanks from all but .xz files
debug/known_sizes.c | 2 +-
extra/scanlzma/scanlzma.c | 5 ++---
src/liblzma/check/crc32_tablegen.c | 2 +-
src/liblzma/check/crc64_tablegen.c | 2 +-
src/scripts/lzdiff.1 | 4 ++--
src/scripts/lzmore.1 | 6 +++---
tests/test_compress.sh | 4 ++--
7 files changed, 12 insertions(+), 13 deletions(-)
Add lzma_block_buffer_decode().
src/liblzma/api/lzma/block.h | 41 +++++++++++++++
src/liblzma/common/Makefile.am | 1 +
src/liblzma/common/block_buffer_decoder.c | 87 +++++++++++++++++++++++++++++++
3 files changed, 129 insertions(+)
Add more sanity checks to lzma_stream_buffer_decode().
src/liblzma/common/stream_buffer_decoder.c | 7 +++++++
1 file changed, 7 insertions(+)
Avoid hardcoded constant in easy.c.
src/liblzma/common/easy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Tiny bit better sanity check in block_util.c
src/liblzma/common/block_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fix a dumb bug in Block decoder, which made it return
LZMA_DATA_ERROR with valid data. The bug was added in
e114502b2bc371e4a45449832cb69be036360722.
src/liblzma/common/block_decoder.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Added lzma_stream_buffer_decode() and made minor cleanups.
src/liblzma/api/lzma/block.h | 3 +-
src/liblzma/api/lzma/container.h | 51 ++++++++++++++++-
src/liblzma/common/Makefile.am | 1 +
src/liblzma/common/stream_buffer_decoder.c | 91 ++++++++++++++++++++++++++++++
4 files changed, 144 insertions(+), 2 deletions(-)
Fix a comment.
src/liblzma/common/common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Add some single-call buffer-to-buffer coding functions.
src/liblzma/api/lzma/block.h | 57 ++++++
src/liblzma/api/lzma/container.h | 56 ++++++
src/liblzma/api/lzma/index.h | 70 ++++++-
src/liblzma/common/Makefile.am | 2 +
src/liblzma/common/block_buffer_encoder.c | 305 +++++++++++++++++++++++++++++
src/liblzma/common/index_decoder.c | 83 ++++++--
src/liblzma/common/index_encoder.c | 59 +++++-
src/liblzma/common/stream_buffer_encoder.c | 138 +++++++++++++
tests/test_index.c | 24 +++
9 files changed, 768 insertions(+), 26 deletions(-)
Block encoder cleanups
src/liblzma/common/block_encoder.c | 28 +++++++---------------------
src/liblzma/common/block_encoder.h | 25 +++++++++++++++++++++++++
2 files changed, 32 insertions(+), 21 deletions(-)
Use LZMA_PROG_ERROR in lzma_code() as documented in base.h.
src/liblzma/common/common.c | 24 ++++++++----------------
1 file changed, 8 insertions(+), 16 deletions(-)
Fix handling of non-fatal errors in lzma_code().
src/liblzma/common/common.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
Move some LZMA2 constants to lzma2_encoder.h so that they
can be used outside lzma2_encoder.c.
src/liblzma/lzma/lzma2_encoder.c | 13 -------------
src/liblzma/lzma/lzma2_encoder.h | 14 ++++++++++++++
src/liblzma/lzma/lzma_encoder.c | 3 ++-
3 files changed, 16 insertions(+), 14 deletions(-)
Remove dead code.
src/liblzma/lzma/lzma_encoder.h | 8 --------
1 file changed, 8 deletions(-)
Beta was supposed to be API stable but I had forgot to rename
lzma_memlimit_encoder and lzma_memlimit_decoder to
lzma_raw_encoder_memlimit and lzma_raw_decoder_memlimit. :-(
Now it is fixed. Hopefully it doesn't cause too much trouble
to those who already thought API is stable.
src/liblzma/api/lzma/filter.h | 4 ++--
src/liblzma/common/easy.c | 4 ++--
src/liblzma/common/filter_common.c | 2 +-
src/liblzma/common/filter_common.h | 2 +-
src/liblzma/common/filter_decoder.c | 4 ++--
src/liblzma/common/filter_encoder.c | 4 ++--
src/liblzma/common/stream_decoder.c | 2 +-
src/xz/process.c | 6 +++---
8 files changed, 14 insertions(+), 14 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Fixed a bug in 7z2lzma.bash to make it work with .7z files
that use something else than 2^n as the dictionary size.
Thanks to Dan Shechter for the bug report.
extra/7z2lzma/7z2lzma.bash | 47 +++++++++++++++++++++++-----------------------
1 file changed, 24 insertions(+), 23 deletions(-)
Use pthread_sigmask() instead of sigprocmask() when pthreads
are enabled.
src/common/mythread.h | 6 ++++++
src/xz/main.c | 4 ++--
src/xz/private.h | 1 +
3 files changed, 9 insertions(+), 2 deletions(-)
Bumped version to 4.999.8beta right after the release
of 4.999.7beta.
configure.ac | 2 +-
src/liblzma/api/lzma/version.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Disable Subblock filter from test_compress.sh since it is
disabled by default in configure.ac.
tests/test_compress.sh | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
Disable both Subblock encoder and decoder my default,
since they are not finished and may have security issues too.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Update some files in debug directory.
debug/full_flush.c | 2 --
debug/memusage.c | 2 --
debug/sync_flush.c | 2 --
3 files changed, 6 deletions(-)
Prepare for 4.999.7beta release.
AUTHORS | 4 ++--
README | 34 +++++++++++++++++-----------------
configure.ac | 4 ++--
src/liblzma/api/lzma/version.h | 2 +-
4 files changed, 22 insertions(+), 22 deletions(-)
Cleaned up some comments in the API headers.
src/liblzma/api/lzma/check.h | 23 +++++++++++------------
src/liblzma/api/lzma/container.h | 2 +-
src/liblzma/api/lzma/version.h | 4 +++-
3 files changed, 15 insertions(+), 14 deletions(-)
Renamed lzma_options_simple to lzma_options_bcj in the API.
The internal implementation is still using the name "simple".
It may need some cleanups, so I look at it later.
src/liblzma/api/Makefile.am | 2 +-
src/liblzma/api/lzma.h | 2 +-
src/liblzma/api/lzma/{simple.h => bcj.h} | 22 +++++++++++-----------
src/liblzma/simple/simple_coder.c | 2 +-
src/liblzma/simple/simple_decoder.c | 4 ++--
src/liblzma/simple/simple_encoder.c | 4 ++--
tests/test_filter_flags.c | 8 ++++----
7 files changed, 22 insertions(+), 22 deletions(-)
Fixed missing quoting in configure.ac.
configure.ac | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
Updated src/liblzma/Makefile.am to use liblzma.pc.in, which
should have been in the previous commit.
src/liblzma/Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Remove lzma_init() and other init functions from liblzma API.
Half of developers were already forgetting to use these
functions, which could have caused total breakage in some future
liblzma version or even now if --enable-small was used. Now
liblzma uses pthread_once() to do the initializations unless
it has been built with --disable-threads which make these
initializations thread-unsafe.
When --enable-small isn't used, liblzma currently gets needlessly
linked against libpthread (on systems that have it). While it is
stupid for now, liblzma will need threads in future anyway, so
this stupidity will be temporary only.
When --enable-small is used, different code CRC32 and CRC64 is
now used than without --enable-small. This made the resulting
binary slightly smaller, but the main reason was to clean it up
and to handle the lack of lzma_init_check().
The pkg-config file lzma.pc was renamed to liblzma.pc. I'm not
sure if it works correctly and portably for static linking
(Libs.private includes -pthread or other operating system
specific flags). Hopefully someone complains if it is bad.
lzma_rc_prices[] is now included as a precomputed array even
with --enable-small. It's just 128 bytes now that it uses uint8_t
instead of uint32_t. Smaller array seemed to be at least as fast
as the more bloated uint32_t array on x86; hopefully it's not bad
on other architectures.
configure.ac | 29 ++++++++--
src/common/mythread.h | 34 ++++++++++++
src/liblzma/api/Makefile.am | 1 -
src/liblzma/api/lzma.h | 1 -
src/liblzma/api/lzma/init.h | 85 -----------------------------
src/liblzma/check/Makefile.am | 29 ++++------
src/liblzma/check/check.c | 10 ++--
src/liblzma/check/check.h | 25 +++------
src/liblzma/check/check_init.c | 37 -------------
src/liblzma/check/{crc32.c => crc32_fast.c} | 0
src/liblzma/check/crc32_init.c | 55 -------------------
src/liblzma/check/crc32_small.c | 54 ++++++++++++++++++
src/liblzma/check/crc32_tablegen.c | 55 ++++++++++++++++---
src/liblzma/check/{crc64.c => crc64_fast.c} | 0
src/liblzma/check/crc64_small.c | 54 ++++++++++++++++++
src/liblzma/check/crc64_tablegen.c | 55 ++++++++++++++++---
src/liblzma/common/Makefile.am | 3 -
src/liblzma/common/common.h | 1 +
src/liblzma/common/init.c | 39 -------------
src/liblzma/common/init_decoder.c | 31 -----------
src/liblzma/common/init_encoder.c | 40 --------------
src/liblzma/{lzma.pc.in => liblzma.pc.in} | 5 +-
src/liblzma/lz/lz_encoder.c | 6 ++
src/liblzma/rangecoder/Makefile.am | 8 +--
src/liblzma/rangecoder/price.h | 16 +-----
src/liblzma/rangecoder/price_table.c | 2 +-
src/liblzma/rangecoder/price_table_init.c | 55 -------------------
src/liblzma/rangecoder/price_tablegen.c | 51 ++++++++++++++---
src/xz/Makefile.am | 5 +-
src/xz/main.c | 3 -
src/xzdec/xzdec.c | 3 -
tests/test_block_header.c | 1 -
tests/test_check.c | 2 -
tests/test_filter_flags.c | 2 -
tests/test_index.c | 2 -
tests/test_stream_flags.c | 2 -
tests/tests.h | 2 +-
37 files changed, 347 insertions(+), 456 deletions(-)
Use 28 MiB as memory usage limit for encoding in test_compress.sh.
tests/test_compress.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Revert a change made in 3b34851de1eaf358cf9268922fa0eeed8278d680
that was related to LZMA_MODE_FAST. The original code is slightly
faster although it compresses slightly worse. But since it is fast
mode, it is better to select the faster version.
src/liblzma/lzma/lzma_encoder_optimum_fast.c | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
Some xz command line tool improvements.
src/xz/args.c | 23 +++++-----
src/xz/message.c | 4 +-
src/xz/options.c | 2 +-
src/xz/process.c | 133 +++++++++++++++++++++++++++++++++++++++++++------------
src/xz/process.h | 3 ++
5 files changed, 121 insertions(+), 44 deletions(-)
Bunch of liblzma tweaks, including some API changes.
The API and ABI should now be very close to stable,
although the code behind it isn't yet.
src/liblzma/api/lzma.h | 8 ++--
src/liblzma/api/lzma/block.h | 63 ++++++++++++++++++++++++-
src/liblzma/api/lzma/container.h | 76 +++++++++++++++----------------
src/liblzma/api/lzma/lzma.h | 41 +++++++++--------
src/liblzma/common/alone_decoder.c | 36 +++++++--------
src/liblzma/common/alone_encoder.c | 22 ++++-----
src/liblzma/common/auto_decoder.c | 2 +-
src/liblzma/common/block_decoder.c | 54 +++++++++++-----------
src/liblzma/common/block_decoder.h | 4 +-
src/liblzma/common/block_encoder.c | 37 ++++++++-------
src/liblzma/common/block_encoder.h | 4 +-
src/liblzma/common/block_header_decoder.c | 41 +++++++++--------
src/liblzma/common/block_header_encoder.c | 51 ++++++++++-----------
src/liblzma/common/block_util.c | 3 +-
src/liblzma/common/easy.c | 45 ++++++------------
src/liblzma/common/stream_decoder.c | 3 +-
src/liblzma/common/stream_decoder.h | 2 +-
src/liblzma/common/stream_encoder.c | 3 +-
src/liblzma/common/stream_encoder.h | 2 +-
src/liblzma/common/stream_flags_decoder.c | 2 +-
src/liblzma/common/stream_flags_encoder.c | 2 +-
src/liblzma/lzma/lzma_encoder.c | 2 +-
src/liblzma/lzma/lzma_encoder_presets.c | 53 +++++++--------------
23 files changed, 294 insertions(+), 262 deletions(-)
Updated Makefile.am that was missing from the previous commit.
src/liblzma/common/Makefile.am | 1 -
1 file changed, 1 deletion(-)
Remove the alignment functions for now. Maybe they will
be added back in some form later, but the current version
wasn't modular, so it would need fixing anyway.
src/liblzma/api/Makefile.am | 1 -
src/liblzma/api/lzma.h | 1 -
src/liblzma/api/lzma/alignment.h | 60 ---------------------
src/liblzma/common/alignment.c | 114 ---------------------------------------
4 files changed, 176 deletions(-)
xz message handling improvements
src/xz/message.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
src/xz/message.h | 7 +++-
src/xz/process.c | 28 ++++++++++++-
3 files changed, 146 insertions(+), 14 deletions(-)
Fix a dumb bug in .lzma decoder which was introduced in
the previous commit. (Probably the previous commit has
other bugs too, it wasn't tested.)
src/liblzma/common/alone_decoder.c | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
Bunch of liblzma API cleanups and fixes.
src/liblzma/api/lzma.h | 122 +++++++++++----------
src/liblzma/api/lzma/base.h | 174 ++++++++++++++++++-----------
src/liblzma/api/lzma/block.h | 211 +++++++++++++++++++++++-------------
src/liblzma/api/lzma/check.h | 28 ++---
src/liblzma/api/lzma/container.h | 155 +++++++++++++-------------
src/liblzma/api/lzma/delta.h | 12 +-
src/liblzma/api/lzma/filter.h | 27 +++--
src/liblzma/api/lzma/index.h | 97 ++++++++++++++---
src/liblzma/api/lzma/index_hash.h | 26 +++--
src/liblzma/api/lzma/init.h | 2 +-
src/liblzma/api/lzma/lzma.h | 12 +-
src/liblzma/api/lzma/simple.h | 4 +-
src/liblzma/api/lzma/stream_flags.h | 46 +++++---
src/liblzma/api/lzma/version.h | 6 +-
src/liblzma/api/lzma/vli.h | 17 ++-
src/liblzma/common/alone_decoder.c | 47 +++++---
src/liblzma/common/auto_decoder.c | 29 +++++
src/liblzma/common/block_util.c | 52 +++++----
src/liblzma/common/common.c | 58 ++++++++++
src/liblzma/common/common.h | 9 +-
src/liblzma/common/easy.c | 33 ++++--
src/liblzma/common/filter_common.c | 2 +-
src/liblzma/common/index.c | 11 ++
src/liblzma/common/index_decoder.c | 46 ++++++--
src/liblzma/common/stream_decoder.c | 47 ++++++--
src/liblzma/lzma/lzma2_encoder.c | 6 +-
tests/test_index.c | 10 +-
27 files changed, 863 insertions(+), 426 deletions(-)
The LZMA2 decoder fix introduced a bug to LZ decoder,
which made LZ decoder return too early after dictionary
reset. This fixes it.
src/liblzma/lz/lz_decoder.c | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
Added two new test files.
tests/files/README | 7 +++++++
tests/files/bad-1-lzma2-8.xz | Bin 0 -> 464 bytes
tests/files/good-1-lzma2-4.xz | Bin 0 -> 464 bytes
3 files changed, 7 insertions(+)
Fix data corruption in LZMA2 decoder.
src/liblzma/lz/lz_decoder.c | 17 ++++++++++++++++-
src/liblzma/lz/lz_decoder.h | 8 +++++---
src/liblzma/lzma/lzma2_decoder.c | 15 +++++++++++----
3 files changed, 32 insertions(+), 8 deletions(-)
Name the package "xz" in configure.ac.
configure.ac | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
Some adjustments to GCC warning flags. The important change
is the removal of -pedantic. It messes up -Werror (which I
really want to keep so that I don't miss any warnings) with
printf format strings that are in POSIX but not in C99.
configure.ac | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Remove obsolete comment.
src/xz/message.c | 1 -
1 file changed, 1 deletion(-)
Use "decompression" consistently in --long-help.
src/xz/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Added preset=NUM to --lzma1 and --lzma2. This makes it easy
to take a preset as a template and modify it a little.
src/xz/message.c | 1 +
src/xz/options.c | 8 ++++++++
2 files changed, 9 insertions(+)
Put the file format specification into the public domain.
Same will be done to the actual code later.
doc/file-format.txt | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
Make the memusage functions of LZMA1 and LZMA2 encoders
to validate the filter options. Add missing validation
to LZMA2 encoder when options are changed in the middle
of encoding.
src/liblzma/lzma/lzma2_encoder.c | 5 ++++-
src/liblzma/lzma/lzma_encoder.c | 44 +++++++++++++++++++++++++++-------------
src/liblzma/lzma/lzma_encoder.h | 2 +-
3 files changed, 35 insertions(+), 16 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
In command line tool, take advantage of memusage calculation's
ability to also validate the filter chain and options (not
implemented yet for all filters).
src/xz/process.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Validate the filter chain before checking filter-specific
memory usage.
src/liblzma/common/filter_common.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
Make the memusage functions of LZMA1 and LZMA2 decoders
to validate the filter options.
src/liblzma/lzma/lzma2_decoder.c | 7 ++-----
src/liblzma/lzma/lzma_decoder.c | 14 ++++++++++----
src/liblzma/lzma/lzma_decoder.h | 5 +++++
3 files changed, 17 insertions(+), 9 deletions(-)
Added the changes for Delta filter that should have been
part of 656ec87882ee74b192c4ea4a233a235eca7b04d4.
src/liblzma/common/filter_decoder.c | 2 +-
src/liblzma/common/filter_encoder.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
LZMA2 decoder cleanups. Make it require new LZMA properties
also in the first LZMA chunk after a dictionary reset in
uncompressed chunk.
src/liblzma/lzma/lzma2_decoder.c | 95 +++++++++++++++++-----------------------
1 file changed, 41 insertions(+), 54 deletions(-)
Added lzma_delta_coder_memusage() which also validates
the options.
src/liblzma/delta/Makefile.am | 3 ++-
src/liblzma/delta/delta_common.c | 28 ++++++++++++++++++-------
src/liblzma/delta/delta_common.h | 19 +----------------
src/liblzma/delta/delta_decoder.c | 2 +-
src/liblzma/delta/delta_decoder.h | 2 +-
src/liblzma/delta/delta_encoder.c | 14 ++++---------
src/liblzma/delta/delta_encoder.h | 2 +-
src/liblzma/delta/delta_private.h | 44 +++++++++++++++++++++++++++++++++++++++
8 files changed, 75 insertions(+), 39 deletions(-)
Automake includes the m4 directory, so don't add it in
Makefile.am separately.
Updated THANKS.
Makefile.am | 1 -
THANKS | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
Tested using COLUMNS environment variable to avoid broken
progress indicator but since COLUMNS isn't usually available,
the code was left commented out.
src/xz/message.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
Cleanups to message.c.
src/xz/message.c | 47 ++++++++++++++++++-----------------------------
1 file changed, 18 insertions(+), 29 deletions(-)
Remove the nowadays unneeded memory limitting malloc() wrapper.
src/liblzma/api/Makefile.am | 1 -
src/liblzma/api/lzma.h | 1 -
src/liblzma/api/lzma/memlimit.h | 207 --------------------------
src/liblzma/common/Makefile.am | 1 -
src/liblzma/common/memory_limiter.c | 288 ------------------------------------
tests/Makefile.am | 2 -
tests/test_memlimit.c | 114 --------------
7 files changed, 614 deletions(-)
VLI encoder and decoder cleanups. Made encoder return
LZMA_PROG_ERROR in single-call mode if there's no output
space.
src/liblzma/common/vli_decoder.c | 15 +++++++++------
src/liblzma/common/vli_encoder.c | 31 ++++++++++++++++++++++++-------
2 files changed, 33 insertions(+), 13 deletions(-)
Typo fix
src/xz/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Support NetBSD's errno for O_NOFOLLOW.
src/xz/io.c | 8 ++++++++
1 file changed, 8 insertions(+)
Build xzdec and lzmadec from xzdec.c. xzdec supports only .xz
files and lzmadec only .lzma files.
src/xzdec/Makefile.am | 7 +-
src/xzdec/xzdec.c | 311 ++++++++++++++++++++++----------------------------
2 files changed, 140 insertions(+), 178 deletions(-)
Minor cleanups to xzdec.
src/xzdec/xzdec.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
Added missing check for uint16_t.
configure.ac | 1 +
1 file changed, 1 insertion(+)
Renamed lzma to xz and lzmadec to xzdec. We create symlinks
lzma, unlzma, and lzcat in "make install" for backwards
compatibility with LZMA Utils 4.32.x; I'm not sure if this
should be the default though.
configure.ac | 4 ++--
po/POTFILES.in | 21 +++++++++------------
src/Makefile.am | 2 +-
src/{lzma => xz}/Makefile.am | 32 +++++++++++++++++---------------
src/{lzma => xz}/args.c | 0
src/{lzma => xz}/args.h | 0
src/{lzma => xz}/hardware.c | 0
src/{lzma => xz}/hardware.h | 0
src/{lzma => xz}/io.c | 0
src/{lzma => xz}/io.h | 0
src/{lzma => xz}/list.c | 0
src/{lzma => xz}/main.c | 0
src/{lzma => xz}/main.h | 0
src/{lzma => xz}/message.c | 0
src/{lzma => xz}/message.h | 0
src/{lzma => xz}/options.c | 0
src/{lzma => xz}/options.h | 0
src/{lzma => xz}/private.h | 0
src/{lzma => xz}/process.c | 0
src/{lzma => xz}/process.h | 0
src/{lzma => xz}/suffix.c | 0
src/{lzma => xz}/suffix.h | 0
src/{lzma => xz}/util.c | 0
src/{lzma => xz}/util.h | 0
src/{lzmadec => xzdec}/Makefile.am | 12 ++++++------
src/{lzmadec/lzmadec.c => xzdec/xzdec.c} | 4 ++--
tests/test_compress.sh | 29 ++++++++++++++---------------
tests/test_files.sh | 4 ++--
28 files changed, 53 insertions(+), 55 deletions(-)
Oh well, big messy commit again. Some highlights:
- Updated to the latest, probably final file format version.
- Command line tool reworked to not use threads anymore.
Threading will probably go into liblzma anyway.
- Memory usage limit is now about 30 % for uncompression
and about 90 % for compression.
- Progress indicator with --verbose
- Simplified --help and full --long-help
- Upgraded to the last LGPLv2.1+ getopt_long from gnulib.
- Some bug fixes
THANKS | 1 +
configure.ac | 48 +-
debug/full_flush.c | 6 +-
debug/known_sizes.c | 2 +-
debug/memusage.c | 2 +-
debug/sync_flush.c | 10 +-
doc/file-format.txt | 260 ++++----
lib/Makefile.am | 10 +-
lib/getopt.c | 14 +-
lib/{getopt_.h => getopt.in.h} | 8 +-
lib/getopt1.c | 8 +-
lib/gettext.h | 240 -------
m4/getopt.m4 | 64 +-
src/common/bswap.h | 15 +-
src/common/physmem.h | 4 +
src/common/sysdefs.h | 12 +-
src/liblzma/api/lzma/block.h | 47 +-
src/liblzma/api/lzma/filter.h | 8 +
src/liblzma/api/lzma/index.h | 20 +-
src/liblzma/api/lzma/index_hash.h | 4 +-
src/liblzma/common/block_decoder.c | 59 +-
src/liblzma/common/block_encoder.c | 41 +-
src/liblzma/common/block_header_decoder.c | 31 +-
src/liblzma/common/block_header_encoder.c | 69 +--
src/liblzma/common/block_util.c | 45 +-
src/liblzma/common/common.h | 8 -
src/liblzma/common/filter_common.c | 4 +-
src/liblzma/common/index.c | 259 ++++----
src/liblzma/common/index.h | 33 +-
src/liblzma/common/index_decoder.c | 31 +-
src/liblzma/common/index_encoder.c | 16 +-
src/liblzma/common/index_hash.c | 68 +-
src/liblzma/common/stream_decoder.c | 9 +-
src/liblzma/common/stream_encoder.c | 6 +-
src/liblzma/lz/lz_decoder.h | 4 +-
src/liblzma/subblock/subblock_decoder.c | 3 +-
src/lzma/Makefile.am | 9 +-
src/lzma/alloc.c | 106 ----
src/lzma/alloc.h | 42 --
src/lzma/args.c | 531 +++++++---------
src/lzma/args.h | 42 +-
src/lzma/error.c | 162 -----
src/lzma/error.h | 67 --
src/lzma/hardware.c | 75 ++-
src/lzma/hardware.h | 16 +-
src/lzma/help.c | 170 -----
src/lzma/help.h | 32 -
src/lzma/io.c | 757 +++++++++++------------
src/lzma/io.h | 51 +-
src/lzma/main.c | 392 ++++++++----
src/lzma/main.h | 60 ++
src/lzma/message.c | 892 +++++++++++++++++++++++++++
src/lzma/message.h | 132 ++++
src/lzma/options.c | 42 +-
src/lzma/options.h | 6 +-
src/lzma/private.h | 28 +-
src/lzma/process.c | 525 ++++++++--------
src/lzma/process.h | 40 ++
src/lzma/suffix.c | 52 +-
src/lzma/suffix.h | 17 +-
src/lzma/util.c | 100 +--
src/lzma/util.h | 43 +-
src/lzmadec/lzmadec.c | 36 +-
tests/files/README | 12 +-
tests/files/bad-1-block_header-1.xz | Bin 64 -> 64 bytes
tests/files/bad-1-block_header-2.xz | Bin 64 -> 64 bytes
tests/files/bad-1-block_header-3.xz | Bin 68 -> 68 bytes
tests/files/bad-1-block_header-4.xz | Bin 72 -> 76 bytes
tests/files/bad-1-block_header-5.xz | Bin 0 -> 72 bytes
tests/files/bad-1-check-crc32.xz | Bin 68 -> 68 bytes
tests/files/bad-1-check-crc64.xz | Bin 72 -> 72 bytes
tests/files/bad-1-check-sha256.xz | Bin 96 -> 96 bytes
tests/files/bad-1-lzma2-1.xz | Bin 64 -> 64 bytes
tests/files/bad-1-lzma2-2.xz | Bin 424 -> 424 bytes
tests/files/bad-1-lzma2-3.xz | Bin 424 -> 424 bytes
tests/files/bad-1-lzma2-4.xz | Bin 408 -> 408 bytes
tests/files/bad-1-lzma2-5.xz | Bin 408 -> 408 bytes
tests/files/bad-1-lzma2-6.xz | Bin 68 -> 68 bytes
tests/files/bad-1-lzma2-7.xz | Bin 408 -> 408 bytes
tests/files/bad-1-stream_flags-1.xz | Bin 68 -> 68 bytes
tests/files/bad-1-stream_flags-2.xz | Bin 68 -> 68 bytes
tests/files/bad-1-stream_flags-3.xz | Bin 68 -> 68 bytes
tests/files/bad-1-vli-1.xz | Bin 72 -> 72 bytes
tests/files/bad-1-vli-2.xz | Bin 72 -> 76 bytes
tests/files/bad-2-compressed_data_padding.xz | Bin 92 -> 92 bytes
tests/files/bad-2-index-1.xz | Bin 92 -> 92 bytes
tests/files/bad-2-index-2.xz | Bin 92 -> 92 bytes
tests/files/bad-2-index-3.xz | Bin 92 -> 92 bytes
tests/files/bad-2-index-4.xz | Bin 92 -> 92 bytes
tests/files/bad-2-index-5.xz | Bin 0 -> 92 bytes
tests/files/good-1-3delta-lzma2.xz | Bin 528 -> 528 bytes
tests/files/good-1-block_header-1.xz | Bin 72 -> 72 bytes
tests/files/good-1-block_header-2.xz | Bin 68 -> 68 bytes
tests/files/good-1-block_header-3.xz | Bin 68 -> 68 bytes
tests/files/good-1-check-crc32.xz | Bin 68 -> 68 bytes
tests/files/good-1-check-crc64.xz | Bin 72 -> 72 bytes
tests/files/good-1-check-none.xz | Bin 64 -> 64 bytes
tests/files/good-1-check-sha256.xz | Bin 96 -> 96 bytes
tests/files/good-1-delta-lzma2.tiff.xz | Bin 51312 -> 51316 bytes
tests/files/good-1-lzma2-1.xz | Bin 424 -> 424 bytes
tests/files/good-1-lzma2-2.xz | Bin 424 -> 424 bytes
tests/files/good-1-lzma2-3.xz | Bin 408 -> 408 bytes
tests/files/good-1-sparc-lzma2.xz | Bin 2292 -> 2296 bytes
tests/files/good-1-x86-lzma2.xz | Bin 1936 -> 1936 bytes
tests/files/good-2-lzma2.xz | Bin 92 -> 92 bytes
tests/files/unsupported-block_header.xz | Bin 68 -> 68 bytes
tests/files/unsupported-check.xz | Bin 68 -> 68 bytes
tests/files/unsupported-filter_flags-1.xz | Bin 68 -> 68 bytes
tests/files/unsupported-filter_flags-2.xz | Bin 68 -> 68 bytes
tests/files/unsupported-filter_flags-3.xz | Bin 68 -> 68 bytes
tests/test_block_header.c | 16 +-
tests/test_index.c | 42 +-
112 files changed, 3240 insertions(+), 2724 deletions(-)
Fixed the test that should have been fixed as part
of 1e8e4fd1f3e50129b4541406ad765d2aa1233943.
tests/test_block_header.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fixed some help messages.
src/lzma/help.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Made the preset numbering more logical in liblzma API.
src/liblzma/api/lzma/container.h | 20 ++++++++++----------
src/liblzma/api/lzma/lzma.h | 2 +-
src/liblzma/lzma/lzma_encoder_presets.c | 3 ++-
src/lzma/args.c | 8 ++++----
src/lzma/args.h | 2 +-
5 files changed, 18 insertions(+), 17 deletions(-)
Removed fi from po/LINGUAS.
po/LINGUAS | 1 -
1 file changed, 1 deletion(-)
Fixed suffix handling with --format=raw.
src/lzma/suffix.c | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
Initial changes to change the suffix of the new format to .xz.
This also fixes a bug related to --suffix option. Some issues
with suffixes with --format=raw were not fixed.
src/lzma/args.c | 67 +++++++++++++++++++++++++++++++--------------
src/lzma/args.h | 13 +++++----
src/lzma/help.c | 4 +--
src/lzma/process.c | 24 +++++++++-------
src/lzma/suffix.c | 74 +++++++++++++++++++++++++++++++++++++++++---------
tests/test_compress.sh | 3 +-
6 files changed, 133 insertions(+), 52 deletions(-)
Renamed the test files from .lzma suffix to .xz suffix.
tests/files/README | 128 ++++++++++-----------
...0-backward_size.lzma => bad-0-backward_size.xz} | Bin
...pty-truncated.lzma => bad-0-empty-truncated.xz} | Bin
...d-0-footer_magic.lzma => bad-0-footer_magic.xz} | Bin
...d-0-header_magic.lzma => bad-0-header_magic.xz} | Bin
...nonempty_index.lzma => bad-0-nonempty_index.xz} | Bin
.../{bad-0cat-alone.lzma => bad-0cat-alone.xz} | Bin
...-header_magic.lzma => bad-0cat-header_magic.xz} | Bin
...bad-0catpad-empty.lzma => bad-0catpad-empty.xz} | Bin
.../{bad-0pad-empty.lzma => bad-0pad-empty.xz} | Bin
...block_header-1.lzma => bad-1-block_header-1.xz} | Bin
...block_header-2.lzma => bad-1-block_header-2.xz} | Bin
...block_header-3.lzma => bad-1-block_header-3.xz} | Bin
...block_header-4.lzma => bad-1-block_header-4.xz} | Bin
...bad-1-check-crc32.lzma => bad-1-check-crc32.xz} | Bin
...bad-1-check-crc64.lzma => bad-1-check-crc64.xz} | Bin
...d-1-check-sha256.lzma => bad-1-check-sha256.xz} | Bin
.../files/{bad-1-lzma2-1.lzma => bad-1-lzma2-1.xz} | Bin
.../files/{bad-1-lzma2-2.lzma => bad-1-lzma2-2.xz} | Bin
.../files/{bad-1-lzma2-3.lzma => bad-1-lzma2-3.xz} | Bin
.../files/{bad-1-lzma2-4.lzma => bad-1-lzma2-4.xz} | Bin
.../files/{bad-1-lzma2-5.lzma => bad-1-lzma2-5.xz} | Bin
.../files/{bad-1-lzma2-6.lzma => bad-1-lzma2-6.xz} | Bin
.../files/{bad-1-lzma2-7.lzma => bad-1-lzma2-7.xz} | Bin
...stream_flags-1.lzma => bad-1-stream_flags-1.xz} | Bin
...stream_flags-2.lzma => bad-1-stream_flags-2.xz} | Bin
...stream_flags-3.lzma => bad-1-stream_flags-3.xz} | Bin
tests/files/{bad-1-vli-1.lzma => bad-1-vli-1.xz} | Bin
tests/files/{bad-1-vli-2.lzma => bad-1-vli-2.xz} | Bin
...dding.lzma => bad-2-compressed_data_padding.xz} | Bin
.../files/{bad-2-index-1.lzma => bad-2-index-1.xz} | Bin
.../files/{bad-2-index-2.lzma => bad-2-index-2.xz} | Bin
.../files/{bad-2-index-3.lzma => bad-2-index-3.xz} | Bin
.../files/{bad-2-index-4.lzma => bad-2-index-4.xz} | Bin
tests/files/{good-0-empty.lzma => good-0-empty.xz} | Bin
.../{good-0cat-empty.lzma => good-0cat-empty.xz} | Bin
...od-0catpad-empty.lzma => good-0catpad-empty.xz} | Bin
.../{good-0pad-empty.lzma => good-0pad-empty.xz} | Bin
...-1-3delta-lzma2.lzma => good-1-3delta-lzma2.xz} | Bin
...lock_header-1.lzma => good-1-block_header-1.xz} | Bin
...lock_header-2.lzma => good-1-block_header-2.xz} | Bin
...lock_header-3.lzma => good-1-block_header-3.xz} | Bin
...od-1-check-crc32.lzma => good-1-check-crc32.xz} | Bin
...od-1-check-crc64.lzma => good-1-check-crc64.xz} | Bin
...good-1-check-none.lzma => good-1-check-none.xz} | Bin
...-1-check-sha256.lzma => good-1-check-sha256.xz} | Bin
...-lzma2.tiff.lzma => good-1-delta-lzma2.tiff.xz} | Bin
.../{good-1-lzma2-1.lzma => good-1-lzma2-1.xz} | Bin
.../{good-1-lzma2-2.lzma => good-1-lzma2-2.xz} | Bin
.../{good-1-lzma2-3.lzma => good-1-lzma2-3.xz} | Bin
...od-1-sparc-lzma2.lzma => good-1-sparc-lzma2.xz} | Bin
.../{good-1-x86-lzma2.lzma => good-1-x86-lzma2.xz} | Bin
tests/files/{good-2-lzma2.lzma => good-2-lzma2.xz} | Bin
...ock_header.lzma => unsupported-block_header.xz} | Bin
...unsupported-check.lzma => unsupported-check.xz} | Bin
..._flags-1.lzma => unsupported-filter_flags-1.xz} | Bin
..._flags-2.lzma => unsupported-filter_flags-2.xz} | Bin
..._flags-3.lzma => unsupported-filter_flags-3.xz} | Bin
tests/test_files.sh | 6 +-
59 files changed, 66 insertions(+), 68 deletions(-)
Fixed Stream decoder to actually use the first_stream variable.
src/liblzma/common/stream_decoder.c | 5 +++++
1 file changed, 5 insertions(+)
Added one more test file.
tests/files/README | 15 +++++++++++----
tests/files/bad-0cat-header_magic.lzma | Bin 0 -> 64 bytes
2 files changed, 11 insertions(+), 4 deletions(-)
Fixed uninitialized variable in Stream decoder.
src/liblzma/common/stream_decoder.c | 1 +
1 file changed, 1 insertion(+)
Added two test files.
tests/files/README | 6 ++++++
tests/files/bad-0-footer_magic.lzma | Bin 0 -> 32 bytes
tests/files/bad-0-header_magic.lzma | Bin 0 -> 32 bytes
3 files changed, 6 insertions(+)
Fix conflicting Subblock helper filter's ID.
src/liblzma/common/common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Changed magic bytes to match the updated spec. Filename
suffix wasn't changed yet.
src/liblzma/common/auto_decoder.c | 4 ++--
src/liblzma/common/stream_flags_common.c | 2 +-
tests/files/bad-0-backward_size.lzma | Bin 32 -> 32 bytes
tests/files/bad-0-empty-truncated.lzma | Bin 31 -> 31 bytes
tests/files/bad-0-nonempty_index.lzma | Bin 32 -> 32 bytes
tests/files/bad-0cat-alone.lzma | Bin 55 -> 55 bytes
tests/files/bad-0catpad-empty.lzma | Bin 69 -> 69 bytes
tests/files/bad-0pad-empty.lzma | Bin 37 -> 37 bytes
tests/files/bad-1-block_header-1.lzma | Bin 64 -> 64 bytes
tests/files/bad-1-block_header-2.lzma | Bin 64 -> 64 bytes
tests/files/bad-1-block_header-3.lzma | Bin 68 -> 68 bytes
tests/files/bad-1-block_header-4.lzma | Bin 72 -> 72 bytes
tests/files/bad-1-check-crc32.lzma | Bin 68 -> 68 bytes
tests/files/bad-1-check-crc64.lzma | Bin 72 -> 72 bytes
tests/files/bad-1-check-sha256.lzma | Bin 96 -> 96 bytes
tests/files/bad-1-lzma2-1.lzma | Bin 64 -> 64 bytes
tests/files/bad-1-lzma2-2.lzma | Bin 424 -> 424 bytes
tests/files/bad-1-lzma2-3.lzma | Bin 424 -> 424 bytes
tests/files/bad-1-lzma2-4.lzma | Bin 408 -> 408 bytes
tests/files/bad-1-lzma2-5.lzma | Bin 408 -> 408 bytes
tests/files/bad-1-lzma2-6.lzma | Bin 68 -> 68 bytes
tests/files/bad-1-lzma2-7.lzma | Bin 408 -> 408 bytes
tests/files/bad-1-stream_flags-1.lzma | Bin 68 -> 68 bytes
tests/files/bad-1-stream_flags-2.lzma | Bin 68 -> 68 bytes
tests/files/bad-1-stream_flags-3.lzma | Bin 68 -> 68 bytes
tests/files/bad-1-vli-1.lzma | Bin 72 -> 72 bytes
tests/files/bad-1-vli-2.lzma | Bin 72 -> 72 bytes
tests/files/bad-2-compressed_data_padding.lzma | Bin 92 -> 92 bytes
tests/files/bad-2-index-1.lzma | Bin 92 -> 92 bytes
tests/files/bad-2-index-2.lzma | Bin 92 -> 92 bytes
tests/files/bad-2-index-3.lzma | Bin 92 -> 92 bytes
tests/files/bad-2-index-4.lzma | Bin 92 -> 92 bytes
tests/files/good-0-empty.lzma | Bin 32 -> 32 bytes
tests/files/good-0cat-empty.lzma | Bin 64 -> 64 bytes
tests/files/good-0catpad-empty.lzma | Bin 68 -> 68 bytes
tests/files/good-0pad-empty.lzma | Bin 36 -> 36 bytes
tests/files/good-1-3delta-lzma2.lzma | Bin 528 -> 528 bytes
tests/files/good-1-block_header-1.lzma | Bin 72 -> 72 bytes
tests/files/good-1-block_header-2.lzma | Bin 68 -> 68 bytes
tests/files/good-1-block_header-3.lzma | Bin 68 -> 68 bytes
tests/files/good-1-check-crc32.lzma | Bin 68 -> 68 bytes
tests/files/good-1-check-crc64.lzma | Bin 72 -> 72 bytes
tests/files/good-1-check-none.lzma | Bin 64 -> 64 bytes
tests/files/good-1-check-sha256.lzma | Bin 96 -> 96 bytes
tests/files/good-1-delta-lzma2.tiff.lzma | Bin 51312 -> 51312 bytes
tests/files/good-1-lzma2-1.lzma | Bin 424 -> 424 bytes
tests/files/good-1-lzma2-2.lzma | Bin 424 -> 424 bytes
tests/files/good-1-lzma2-3.lzma | Bin 408 -> 408 bytes
tests/files/good-1-sparc-lzma2.lzma | Bin 2292 -> 2292 bytes
tests/files/good-1-x86-lzma2.lzma | Bin 1936 -> 1936 bytes
tests/files/good-2-lzma2.lzma | Bin 92 -> 92 bytes
tests/files/unsupported-block_header.lzma | Bin 68 -> 68 bytes
tests/files/unsupported-check.lzma | Bin 68 -> 68 bytes
tests/files/unsupported-filter_flags-1.lzma | Bin 68 -> 68 bytes
tests/files/unsupported-filter_flags-2.lzma | Bin 68 -> 68 bytes
tests/files/unsupported-filter_flags-3.lzma | Bin 68 -> 68 bytes
56 files changed, 3 insertions(+), 3 deletions(-)
Remove po/fi.po since I'm not keeping it updated for now.
po/fi.po | 446 ---------------------------------------------------------------
1 file changed, 446 deletions(-)
Fix also test_compress.sh.
tests/test_compress.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Fixed compilation of test_filter_flags.c, which was broken by
1dcecfb09b55157b8653d747963069c8bed74f04.
tests/test_filter_flags.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
Updated file format specification. It changes the suffix
of the new format to .xz and removes the recently added
LZMA filter.
doc/file-format.txt | 125 ++++++++++++++--------------------------------------
1 file changed, 32 insertions(+), 93 deletions(-)
Some API changes, bug fixes, cleanups etc.
configure.ac | 18 +-
debug/full_flush.c | 7 +-
debug/known_sizes.c | 6 +-
debug/memusage.c | 22 +--
debug/sync_flush.c | 18 +-
src/liblzma/Makefile.am | 2 +-
src/liblzma/api/lzma/delta.h | 8 +-
src/liblzma/api/lzma/lzma.h | 230 ++++++++++++++++---------
src/liblzma/common/alignment.c | 7 +-
src/liblzma/common/alone_decoder.c | 11 +-
src/liblzma/common/alone_encoder.c | 9 +-
src/liblzma/common/chunk_size.c | 2 +-
src/liblzma/common/easy.c | 20 ++-
src/liblzma/common/filter_common.c | 4 +-
src/liblzma/common/filter_decoder.c | 4 +-
src/liblzma/common/filter_encoder.c | 4 +-
src/liblzma/common/init_encoder.c | 2 +-
src/liblzma/delta/delta_common.c | 12 +-
src/liblzma/delta/delta_common.h | 2 +-
src/liblzma/delta/delta_decoder.c | 2 +-
src/liblzma/delta/delta_encoder.c | 6 +-
src/liblzma/lz/lz_encoder.c | 30 ++--
src/liblzma/lz/lz_encoder.h | 26 +--
src/liblzma/lz/lz_encoder_mf.c | 30 ++--
src/liblzma/lzma/Makefile.am | 4 +-
src/liblzma/lzma/lzma2_decoder.c | 10 +-
src/liblzma/lzma/lzma2_encoder.c | 27 ++-
src/liblzma/lzma/lzma_common.h | 26 ++-
src/liblzma/lzma/lzma_decoder.c | 37 ++--
src/liblzma/lzma/lzma_encoder.c | 51 +++---
src/liblzma/lzma/lzma_encoder_optimum_fast.c | 10 +-
src/liblzma/lzma/lzma_encoder_optimum_normal.c | 20 +--
src/liblzma/lzma/lzma_encoder_presets.c | 50 ++++--
src/liblzma/rangecoder/Makefile.am | 4 +-
src/liblzma/subblock/subblock_decoder.c | 2 +-
src/lzma/args.c | 33 ++--
src/lzma/help.c | 17 +-
src/lzma/options.c | 92 +++++-----
tests/test_block_header.c | 9 +-
tests/test_compress.sh | 4 +-
tests/test_filter_flags.c | 2 +-
41 files changed, 482 insertions(+), 398 deletions(-)
Added 7z2lzma.bash.
extra/7z2lzma/7z2lzma.bash | 114 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 114 insertions(+)
Miscellaneous LZ and LZMA encoder cleanups
src/liblzma/api/lzma/lzma.h | 14 -------
src/liblzma/lz/lz_encoder.c | 8 +++-
src/liblzma/lzma/Makefile.am | 1 -
src/liblzma/lzma/lzma_encoder.c | 64 ++++++++++++--------------------
src/liblzma/lzma/lzma_encoder_features.c | 59 -----------------------------
5 files changed, 29 insertions(+), 117 deletions(-)
LZ decoder cleanup
src/liblzma/lz/lz_decoder.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Renamed constants:
- LZMA_VLI_VALUE_MAX -> LZMA_VLI_MAX
- LZMA_VLI_VALUE_UNKNOWN -> LZMA_VLI_UNKNOWN
- LZMA_HEADER_ERRRO -> LZMA_OPTIONS_ERROR
debug/full_flush.c | 2 +-
debug/known_sizes.c | 2 +-
debug/sync_flush.c | 2 +-
src/liblzma/api/lzma/alignment.h | 2 +-
src/liblzma/api/lzma/base.h | 4 ++--
src/liblzma/api/lzma/block.h | 28 ++++++++++++++--------------
src/liblzma/api/lzma/container.h | 12 ++++++------
src/liblzma/api/lzma/filter.h | 28 ++++++++++++++--------------
src/liblzma/api/lzma/index.h | 2 +-
src/liblzma/api/lzma/lzma.h | 4 ++--
src/liblzma/api/lzma/simple.h | 2 +-
src/liblzma/api/lzma/stream_flags.h | 20 ++++++++++----------
src/liblzma/api/lzma/vli.h | 16 ++++++++--------
src/liblzma/common/alignment.c | 6 +++---
src/liblzma/common/alone_decoder.c | 2 +-
src/liblzma/common/auto_decoder.c | 2 +-
src/liblzma/common/block_decoder.c | 12 ++++++------
src/liblzma/common/block_encoder.c | 6 +++---
src/liblzma/common/block_header_decoder.c | 16 ++++++++--------
src/liblzma/common/block_header_encoder.c | 24 ++++++++++++------------
src/liblzma/common/block_util.c | 8 ++++----
src/liblzma/common/chunk_size.c | 2 +-
src/liblzma/common/easy.c | 4 ++--
src/liblzma/common/filter_common.c | 22 +++++++++++-----------
src/liblzma/common/filter_decoder.c | 6 +++---
src/liblzma/common/filter_encoder.c | 14 +++++++-------
src/liblzma/common/index.c | 24 +++++++++++-------------
src/liblzma/common/index.h | 2 +-
src/liblzma/common/index_hash.c | 13 ++++++-------
src/liblzma/common/stream_decoder.c | 4 ++--
src/liblzma/common/stream_encoder.c | 4 ++--
src/liblzma/common/stream_flags_common.c | 6 +++---
src/liblzma/common/stream_flags_decoder.c | 6 +++---
src/liblzma/common/stream_flags_encoder.c | 4 ++--
src/liblzma/common/vli_encoder.c | 2 +-
src/liblzma/common/vli_size.c | 2 +-
src/liblzma/delta/delta_common.c | 2 +-
src/liblzma/delta/delta_decoder.c | 2 +-
src/liblzma/delta/delta_encoder.c | 2 +-
src/liblzma/lz/lz_decoder.c | 2 +-
src/liblzma/lz/lz_encoder.c | 2 +-
src/liblzma/lzma/lzma2_decoder.c | 6 +++---
src/liblzma/lzma/lzma_decoder.c | 14 +++++++-------
src/liblzma/lzma/lzma_encoder.c | 8 ++++----
src/liblzma/simple/simple_coder.c | 2 +-
src/liblzma/simple/simple_decoder.c | 2 +-
src/liblzma/subblock/subblock_decoder.c | 6 +++---
src/liblzma/subblock/subblock_encoder.c | 17 ++++++++---------
src/lzma/args.c | 2 +-
src/lzma/error.c | 2 +-
src/lzma/list.c | 6 +++---
src/lzmadec/lzmadec.c | 2 +-
tests/test_block.c | 8 ++++----
tests/test_block_header.c | 30 +++++++++++++++---------------
tests/test_filter_flags.c | 2 +-
tests/test_index.c | 2 +-
tests/test_stream_flags.c | 8 ++++----
tests/tests.h | 2 +-
58 files changed, 220 insertions(+), 224 deletions(-)
Improved the Stream Flags handling API.
src/liblzma/api/lzma/stream_flags.h | 84 +++++++++++++++++++++++++++++--
src/liblzma/common/stream_decoder.c | 5 +-
src/liblzma/common/stream_encoder.c | 2 +
src/liblzma/common/stream_flags_common.c | 28 ++++++++---
src/liblzma/common/stream_flags_common.h | 9 ++++
src/liblzma/common/stream_flags_decoder.c | 3 +-
src/liblzma/common/stream_flags_encoder.c | 10 ++--
tests/test_stream_flags.c | 8 ++-
8 files changed, 129 insertions(+), 20 deletions(-)
Simplified debug/known_sizes.c to match the relaxed
requirements of Block encoder.
debug/known_sizes.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
Remove a check from Block encoder that should have already
been removed in 2ba01bfa755e47ff6af84a978e3c8d63d7d2775e.
src/liblzma/common/block_encoder.c | 5 -----
1 file changed, 5 deletions(-)
Remove bogus #includes.
src/liblzma/common/Makefile.am | 1 -
src/liblzma/common/stream_decoder.c | 3 ---
src/liblzma/common/stream_encoder.c | 1 -
src/liblzma/common/stream_flags_decoder.h | 31 -------------------------------
4 files changed, 36 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Fix a compiler error on big endian systems that don't
support unaligned memory access.
src/common/integer.h | 32 ++++++++++++++++++--------------
1 file changed, 18 insertions(+), 14 deletions(-)
Silence a compiler warning.
src/lzma/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Bumped version to 4.999.6alpha.
configure.ac | 2 +-
src/liblzma/api/lzma/version.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Check for LZMA_FILTER_RESERVED_START in filter_flags_encoder.c.
Use LZMA_PROG_ERROR instead of LZMA_HEADER_ERROR if the Filter ID
is in the reserved range. This allows Block Header encoder to
detect unallowed Filter IDs, which is good for Stream encoder.
src/liblzma/common/filter_flags_encoder.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Filter handling cleanups
src/liblzma/api/lzma/filter.h | 133 +++++++++++++++++++++++++++---------
src/liblzma/common/filter_common.h | 3 +
src/liblzma/common/filter_decoder.c | 80 +++++++---------------
src/liblzma/common/filter_decoder.h | 5 --
src/liblzma/common/filter_encoder.c | 82 +++++++---------------
src/liblzma/common/filter_encoder.h | 4 --
6 files changed, 156 insertions(+), 151 deletions(-)
Comments
src/liblzma/common/stream_encoder.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Cleaned up Block encoder and moved the no longer shared
code from block_private.h to block_decoder.c. Now the Block
encoder doesn't need compressed_size and uncompressed_size
from lzma_block structure to be initialized.
src/liblzma/api/lzma/block.h | 3 --
src/liblzma/common/Makefile.am | 1 -
src/liblzma/common/block_decoder.c | 23 +++++++++-
src/liblzma/common/block_encoder.c | 92 ++++++++++++++++++--------------------
src/liblzma/common/block_private.h | 47 -------------------
5 files changed, 66 insertions(+), 100 deletions(-)
Changed Filter ID of LZMA to 0x20.
doc/file-format.txt | 4 ++--
src/liblzma/api/lzma/lzma.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
Comments
src/liblzma/api/lzma/base.h | 81 ++++++++++++++++++++++++++--------------
src/liblzma/api/lzma/container.h | 6 ++-
src/liblzma/lz/lz_encoder.c | 3 +-
src/liblzma/lz/lz_encoder.h | 12 +++---
src/liblzma/lz/lz_encoder_mf.c | 2 +-
5 files changed, 65 insertions(+), 39 deletions(-)
Some API cleanups
src/liblzma/api/lzma/base.h | 314 +++++++++++++++++++++++-------------
src/liblzma/api/lzma/check.h | 10 ++
src/liblzma/api/lzma/container.h | 40 +++--
src/liblzma/common/auto_decoder.c | 18 +--
src/liblzma/common/common.c | 7 +
src/liblzma/common/common.h | 18 ++-
src/liblzma/common/easy.c | 2 +-
src/liblzma/common/stream_decoder.c | 31 ++--
src/lzma/process.c | 2 +-
src/lzmadec/lzmadec.c | 6 +-
tests/tests.h | 72 +++------
11 files changed, 301 insertions(+), 219 deletions(-)
Added support for raw encoding and decoding to the command
line tool, and made various cleanups. --lzma was renamed to
--lzma1 to prevent people from accidentally using LZMA when
they want LZMA2.
src/lzma/args.c | 17 +++++++++--------
src/lzma/args.h | 1 +
src/lzma/help.c | 24 ++++++------------------
src/lzma/process.c | 42 ++++++++++++++++++++++++++++++++++--------
4 files changed, 50 insertions(+), 34 deletions(-)
Don't allow LZMA_SYNC_FLUSH with decoders anymore. There's
simply nothing that would use it. Allow LZMA_FINISH to the
decoders, which will usually ignore it (auto decoder and
Stream decoder being exceptions).
src/liblzma/common/alone_decoder.c | 1 -
src/liblzma/common/block_decoder.c | 2 +-
src/liblzma/common/filter_decoder.c | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
Minor updates to the file format specification.
doc/file-format.txt | 105 ++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 85 insertions(+), 20 deletions(-)
Command line tool fixes
src/lzma/process.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
Auto decoder cleanup
src/liblzma/common/auto_decoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Updated auto decoder to handle LZMA_CONCATENATED when decoding
LZMA_Alone files. Decoding of concatenated LZMA_Alone files is
intentionally not supported, so it is better to put this in
auto decoder than LZMA_Alone decoder.
src/liblzma/common/auto_decoder.c | 87 ++++++++++++++++++++++++++++++++-------
1 file changed, 71 insertions(+), 16 deletions(-)
Stream decoder cleanups
src/liblzma/common/stream_decoder.c | 57 +++++++++++++++++++++----------------
1 file changed, 32 insertions(+), 25 deletions(-)
Some fixes to LZ encoder.
src/liblzma/lz/lz_encoder.c | 56 ++++++++++++++++++++-----
src/liblzma/lz/lz_encoder.h | 18 ++++----
src/liblzma/lz/lz_encoder_mf.c | 95 +++++++++++++++++-------------------------
3 files changed, 94 insertions(+), 75 deletions(-)
Fix wrong pointer calculation in LZMA encoder.
src/liblzma/lzma/lzma_encoder.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Sort of garbage collection commit. :-| Many things are still
broken. API has changed a lot and it will still change a
little more here and there. The command line tool doesn't
have all the required changes to reflect the API changes, so
it's easy to get "internal error" or trigger assertions.
configure.ac | 356 +++---
debug/Makefile.am | 5 +-
.../lz/lz_encoder_private.h => debug/crc32.c | 41 +-
debug/full_flush.c | 14 +-
debug/hex2bin.c | 54 +
debug/known_sizes.c | 135 ++
debug/memusage.c | 8 +-
debug/sync_flush.c | 20 +-
src/common/integer.h | 26 +-
src/common/sysdefs.h | 42 +-
src/liblzma/Makefile.am | 17 +-
src/liblzma/api/Makefile.am | 6 +-
src/liblzma/api/lzma.h | 161 ++-
src/liblzma/api/lzma/alignment.h | 6 +-
src/liblzma/api/lzma/alone.h | 52 -
src/liblzma/api/lzma/auto.h | 36 -
src/liblzma/api/lzma/base.h | 61 +-
src/liblzma/api/lzma/block.h | 38 +-
src/liblzma/api/lzma/check.h | 41 +-
src/liblzma/api/lzma/container.h | 252 ++++
src/liblzma/api/lzma/delta.h | 36 +-
src/liblzma/api/lzma/easy.h | 121 --
src/liblzma/api/lzma/filter.h | 74 +-
src/liblzma/api/lzma/index.h | 40 +-
src/liblzma/api/lzma/index_hash.h | 12 +-
src/liblzma/api/lzma/lzma.h | 222 ++--
src/liblzma/api/lzma/memlimit.h | 15 +-
src/liblzma/api/lzma/raw.h | 60 -
src/liblzma/api/lzma/simple.h | 2 +-
src/liblzma/api/lzma/stream.h | 53 -
src/liblzma/api/lzma/stream_flags.h | 17 +-
src/liblzma/api/lzma/subblock.h | 4 +-
src/liblzma/api/lzma/version.h | 10 +-
src/liblzma/api/lzma/vli.h | 131 +-
src/liblzma/check/check.c | 128 +-
src/liblzma/check/check.h | 67 +-
src/liblzma/check/sha256.c | 29 +-
src/liblzma/common/Makefile.am | 51 +-
src/liblzma/common/alignment.c | 4 +-
src/liblzma/common/allocator.c | 58 -
src/liblzma/common/alone_decoder.c | 49 +-
src/liblzma/common/alone_decoder.h | 9 +-
src/liblzma/common/alone_encoder.c | 13 +-
src/liblzma/common/auto_decoder.c | 38 +-
src/liblzma/common/block_decoder.c | 67 +-
src/liblzma/common/block_decoder.h | 2 +-
src/liblzma/common/block_encoder.c | 42 +-
src/liblzma/common/block_encoder.h | 2 +-
src/liblzma/common/block_header_decoder.c | 6 +-
src/liblzma/common/block_header_encoder.c | 9 +-
src/liblzma/common/block_util.c | 10 +-
src/liblzma/common/{code.c => common.c} | 129 +-
src/liblzma/common/common.h | 237 ++--
src/liblzma/common/easy.c | 18 +-
src/liblzma/common/features.c | 66 -
src/liblzma/common/filter_common.c | 262 ++++
src/liblzma/common/filter_common.h | 52 +
src/liblzma/common/filter_decoder.c | 236 ++++
src/liblzma/common/filter_decoder.h | 35 +
src/liblzma/common/filter_encoder.c | 308 +++++
src/liblzma/common/filter_encoder.h | 38 +
src/liblzma/common/filter_flags_decoder.c | 185 +--
src/liblzma/common/filter_flags_encoder.c | 261 +---
src/liblzma/common/index_decoder.c | 14 +-
src/liblzma/common/index_encoder.c | 16 +-
src/liblzma/common/index_hash.c | 8 +-
src/liblzma/common/init_encoder.c | 2 +-
src/liblzma/common/memory_usage.c | 112 --
src/liblzma/common/next_coder.c | 65 -
src/liblzma/common/raw_common.c | 127 --
src/liblzma/common/raw_decoder.c | 116 --
src/liblzma/common/raw_encoder.c | 111 --
src/liblzma/common/stream_common.c | 23 -
src/liblzma/common/stream_decoder.c | 238 +++-
src/liblzma/common/stream_decoder.h | 4 +-
src/liblzma/common/stream_encoder.c | 35 +-
src/liblzma/common/stream_encoder.h | 2 +-
...{stream_flags_equal.c => stream_flags_common.c} | 14 +-
.../{stream_common.h => stream_flags_common.h} | 8 +-
src/liblzma/common/stream_flags_decoder.c | 2 +-
src/liblzma/common/stream_flags_encoder.c | 2 +-
src/liblzma/common/vli_decoder.c | 29 +-
src/liblzma/common/vli_encoder.c | 23 +-
src/liblzma/common/{version.c => vli_size.c} | 22 +-
src/liblzma/delta/Makefile.am | 34 +
src/liblzma/{common => delta}/delta_common.c | 2 +-
src/liblzma/{common => delta}/delta_common.h | 0
src/liblzma/{common => delta}/delta_decoder.c | 21 +
src/liblzma/{common => delta}/delta_decoder.h | 4 +
src/liblzma/{common => delta}/delta_encoder.c | 21 +
src/liblzma/{common => delta}/delta_encoder.h | 2 +
src/liblzma/lz/Makefile.am | 35 +-
src/liblzma/lz/bt2.c | 27 -
src/liblzma/lz/bt2.h | 31 -
src/liblzma/lz/bt3.c | 29 -
src/liblzma/lz/bt3.h | 31 -
src/liblzma/lz/bt4.c | 30 -
src/liblzma/lz/bt4.h | 31 -
src/liblzma/lz/hc3.c | 30 -
src/liblzma/lz/hc3.h | 31 -
src/liblzma/lz/hc4.c | 31 -
src/liblzma/lz/hc4.h | 31 -
src/liblzma/lz/lz_decoder.c | 547 +++-----
src/liblzma/lz/lz_decoder.h | 308 ++---
src/liblzma/lz/lz_encoder.c | 780 ++++++------
src/liblzma/lz/lz_encoder.h | 334 +++--
src/liblzma/lz/lz_encoder_hash.h | 104 ++
src/liblzma/lz/lz_encoder_mf.c | 780 ++++++++++++
src/liblzma/lz/match_c.h | 412 ------
src/liblzma/lz/match_h.h | 69 --
src/liblzma/lzma/Makefile.am | 37 +-
src/liblzma/lzma/fastpos.h | 8 +-
src/liblzma/lzma/lzma2_decoder.c | 318 +++++
src/liblzma/lzma/lzma2_decoder.h | 35 +
src/liblzma/lzma/lzma2_encoder.c | 406 ++++++
.../{common/raw_common.h => lzma/lzma2_encoder.h} | 22 +-
src/liblzma/lzma/lzma_common.h | 208 +++-
src/liblzma/lzma/lzma_decoder.c | 1306 ++++++++++++--------
src/liblzma/lzma/lzma_decoder.h | 21 +-
src/liblzma/lzma/lzma_encoder.c | 576 +++++++--
src/liblzma/lzma/lzma_encoder.h | 38 +-
src/liblzma/lzma/lzma_encoder_features.c | 2 +-
src/liblzma/lzma/lzma_encoder_getoptimum.c | 925 --------------
src/liblzma/lzma/lzma_encoder_getoptimumfast.c | 201 ---
src/liblzma/lzma/lzma_encoder_init.c | 228 ----
src/liblzma/lzma/lzma_encoder_optimum_fast.c | 193 +++
src/liblzma/lzma/lzma_encoder_optimum_normal.c | 875 +++++++++++++
src/liblzma/lzma/lzma_encoder_presets.c | 52 +-
src/liblzma/lzma/lzma_encoder_private.h | 174 +--
src/liblzma/lzma/lzma_literal.c | 51 -
src/liblzma/lzma/lzma_literal.h | 71 --
src/liblzma/rangecoder/Makefile.am | 10 +-
src/liblzma/rangecoder/price.h | 111 ++
src/liblzma/rangecoder/price_table.c | 84 +-
src/liblzma/rangecoder/price_table_init.c | 33 +-
.../{price_table_gen.c => price_tablegen.c} | 19 +-
src/liblzma/rangecoder/range_common.h | 17 +-
src/liblzma/rangecoder/range_decoder.h | 209 ++--
src/liblzma/rangecoder/range_encoder.h | 92 +-
src/liblzma/simple/Makefile.am | 12 +
src/liblzma/simple/simple_coder.c | 8 +-
src/liblzma/simple/simple_decoder.c | 47 +
.../raw_decoder.h => simple/simple_decoder.h} | 18 +-
src/liblzma/simple/simple_encoder.c | 45 +
.../raw_encoder.h => simple/simple_encoder.h} | 17 +-
src/liblzma/subblock/Makefile.am | 4 +-
src/liblzma/subblock/subblock_decoder.c | 20 +-
src/liblzma/subblock/subblock_decoder_helper.c | 2 +-
src/liblzma/subblock/subblock_encoder.c | 28 +-
src/lzma/args.c | 35 +-
src/lzma/args.h | 4 +-
src/lzma/options.c | 14 +-
src/lzma/process.c | 88 +-
src/lzmadec/lzmadec.c | 157 +--
tests/Makefile.am | 1 +
tests/files/README | 303 ++---
tests/files/bad-0-backward_size.lzma | Bin 0 -> 32 bytes
tests/files/bad-0-empty-truncated.lzma | Bin 0 -> 31 bytes
tests/files/bad-0-nonempty_index.lzma | Bin 0 -> 32 bytes
tests/files/bad-0cat-alone.lzma | Bin 0 -> 55 bytes
tests/files/bad-0catpad-empty.lzma | Bin 0 -> 69 bytes
tests/files/bad-0pad-empty.lzma | Bin 0 -> 37 bytes
tests/files/bad-1-block_header-1.lzma | Bin 0 -> 64 bytes
tests/files/bad-1-block_header-2.lzma | Bin 0 -> 64 bytes
tests/files/bad-1-block_header-3.lzma | Bin 0 -> 68 bytes
tests/files/bad-1-block_header-4.lzma | Bin 0 -> 72 bytes
tests/files/bad-1-check-crc32.lzma | Bin 0 -> 68 bytes
tests/files/bad-1-check-crc64.lzma | Bin 0 -> 72 bytes
tests/files/bad-1-check-sha256.lzma | Bin 0 -> 96 bytes
tests/files/bad-1-lzma2-1.lzma | Bin 0 -> 64 bytes
tests/files/bad-1-lzma2-2.lzma | Bin 0 -> 424 bytes
tests/files/bad-1-lzma2-3.lzma | Bin 0 -> 424 bytes
tests/files/bad-1-lzma2-4.lzma | Bin 0 -> 408 bytes
tests/files/bad-1-lzma2-5.lzma | Bin 0 -> 408 bytes
tests/files/bad-1-lzma2-6.lzma | Bin 0 -> 68 bytes
tests/files/bad-1-lzma2-7.lzma | Bin 0 -> 408 bytes
tests/files/bad-1-stream_flags-1.lzma | Bin 0 -> 68 bytes
tests/files/bad-1-stream_flags-2.lzma | Bin 0 -> 68 bytes
tests/files/bad-1-stream_flags-3.lzma | Bin 0 -> 68 bytes
tests/files/bad-1-vli-1.lzma | Bin 0 -> 72 bytes
tests/files/bad-1-vli-2.lzma | Bin 0 -> 72 bytes
tests/files/bad-2-compressed_data_padding.lzma | Bin 0 -> 92 bytes
tests/files/bad-2-index-1.lzma | Bin 0 -> 92 bytes
tests/files/bad-2-index-2.lzma | Bin 0 -> 92 bytes
tests/files/bad-2-index-3.lzma | Bin 0 -> 92 bytes
tests/files/bad-2-index-4.lzma | Bin 0 -> 92 bytes
tests/files/bad-cat-single-none-pad_garbage_1.lzma | Bin 65 -> 0 bytes
tests/files/bad-cat-single-none-pad_garbage_2.lzma | Bin 65 -> 0 bytes
tests/files/bad-cat-single-none-pad_garbage_3.lzma | Bin 65 -> 0 bytes
tests/files/bad-multi-none-1.lzma | Bin 54 -> 0 bytes
tests/files/bad-multi-none-2.lzma | Bin 53 -> 0 bytes
tests/files/bad-multi-none-3.lzma | Bin 53 -> 0 bytes
tests/files/bad-multi-none-block_1.lzma | Bin 66 -> 0 bytes
tests/files/bad-multi-none-block_2.lzma | Bin 66 -> 0 bytes
tests/files/bad-multi-none-block_3.lzma | Bin 58 -> 0 bytes
tests/files/bad-multi-none-extra_1.lzma | Bin 54 -> 0 bytes
tests/files/bad-multi-none-extra_2.lzma | Bin 54 -> 0 bytes
tests/files/bad-multi-none-extra_3.lzma | Bin 55 -> 0 bytes
tests/files/bad-multi-none-header_1.lzma | Bin 57 -> 0 bytes
tests/files/bad-multi-none-header_2.lzma | Bin 61 -> 0 bytes
tests/files/bad-multi-none-header_3.lzma | Bin 59 -> 0 bytes
tests/files/bad-multi-none-header_4.lzma | Bin 59 -> 0 bytes
tests/files/bad-multi-none-header_5.lzma | Bin 58 -> 0 bytes
tests/files/bad-multi-none-header_6.lzma | Bin 59 -> 0 bytes
tests/files/bad-multi-none-header_7.lzma | Bin 59 -> 0 bytes
tests/files/bad-multi-none-index_1.lzma | Bin 51 -> 0 bytes
tests/files/bad-multi-none-index_2.lzma | Bin 49 -> 0 bytes
tests/files/bad-multi-none-index_3.lzma | Bin 51 -> 0 bytes
tests/files/bad-multi-none-index_4.lzma | Bin 51 -> 0 bytes
tests/files/bad-single-data_after_eopm_1.lzma | Bin 55 -> 0 bytes
tests/files/bad-single-data_after_eopm_2.lzma | Bin 56 -> 0 bytes
tests/files/bad-single-lzma-flush_beginning.lzma | Bin 53 -> 0 bytes
tests/files/bad-single-lzma-flush_twice.lzma | Bin 63 -> 0 bytes
tests/files/bad-single-none-empty.lzma | Bin 19 -> 0 bytes
.../files/bad-single-none-footer_filter_flags.lzma | Bin 30 -> 0 bytes
tests/files/bad-single-none-too_long_vli.lzma | Bin 39 -> 0 bytes
tests/files/bad-single-none-truncated.lzma | Bin 29 -> 0 bytes
tests/files/bad-single-subblock-padding_loop.lzma | Bin 43 -> 0 bytes
tests/files/bad-single-subblock1023-slow.lzma | Bin 7886 -> 0 bytes
tests/files/bad-single-subblock_subblock.lzma | Bin 26 -> 0 bytes
tests/files/good-0-empty.lzma | Bin 0 -> 32 bytes
tests/files/good-0cat-empty.lzma | Bin 0 -> 64 bytes
tests/files/good-0catpad-empty.lzma | Bin 0 -> 68 bytes
tests/files/good-0pad-empty.lzma | Bin 0 -> 36 bytes
tests/files/good-1-3delta-lzma2.lzma | Bin 0 -> 528 bytes
tests/files/good-1-block_header-1.lzma | Bin 0 -> 72 bytes
tests/files/good-1-block_header-2.lzma | Bin 0 -> 68 bytes
tests/files/good-1-block_header-3.lzma | Bin 0 -> 68 bytes
tests/files/good-1-check-crc32.lzma | Bin 0 -> 68 bytes
tests/files/good-1-check-crc64.lzma | Bin 0 -> 72 bytes
tests/files/good-1-check-none.lzma | Bin 0 -> 64 bytes
tests/files/good-1-check-sha256.lzma | Bin 0 -> 96 bytes
tests/files/good-1-delta-lzma2.tiff.lzma | Bin 0 -> 51312 bytes
tests/files/good-1-lzma2-1.lzma | Bin 0 -> 424 bytes
tests/files/good-1-lzma2-2.lzma | Bin 0 -> 424 bytes
tests/files/good-1-lzma2-3.lzma | Bin 0 -> 408 bytes
...gle-sparc-lzma.lzma => good-1-sparc-lzma2.lzma} | Bin 2263 -> 2292 bytes
...-single-x86-lzma.lzma => good-1-x86-lzma2.lzma} | Bin 1909 -> 1936 bytes
tests/files/good-2-lzma2.lzma | Bin 0 -> 92 bytes
tests/files/good-cat-single-none-pad.lzma | Bin 64 -> 0 bytes
tests/files/good-multi-none-1.lzma | Bin 75 -> 0 bytes
tests/files/good-multi-none-2.lzma | Bin 53 -> 0 bytes
tests/files/good-multi-none-block_1.lzma | Bin 66 -> 0 bytes
tests/files/good-multi-none-block_2.lzma | Bin 58 -> 0 bytes
tests/files/good-multi-none-extra_1.lzma | Bin 51 -> 0 bytes
tests/files/good-multi-none-extra_2.lzma | Bin 79 -> 0 bytes
tests/files/good-multi-none-extra_3.lzma | Bin 55 -> 0 bytes
tests/files/good-multi-none-header_1.lzma | Bin 58 -> 0 bytes
tests/files/good-multi-none-header_2.lzma | Bin 66 -> 0 bytes
tests/files/good-multi-none-header_3.lzma | Bin 59 -> 0 bytes
tests/files/good-single-delta-lzma.tiff.lzma | Bin 51409 -> 0 bytes
tests/files/good-single-lzma-empty.lzma | Bin 21 -> 0 bytes
tests/files/good-single-lzma-flush_1.lzma | Bin 48 -> 0 bytes
tests/files/good-single-lzma-flush_2.lzma | Bin 63 -> 0 bytes
tests/files/good-single-lzma.lzma | Bin 44 -> 0 bytes
tests/files/good-single-none-empty_1.lzma | Bin 18 -> 0 bytes
tests/files/good-single-none-empty_2.lzma | Bin 26 -> 0 bytes
tests/files/good-single-none-empty_3.lzma | Bin 19 -> 0 bytes
tests/files/good-single-none-pad.lzma | Bin 32 -> 0 bytes
tests/files/good-single-none.lzma | Bin 30 -> 0 bytes
tests/files/good-single-subblock-lzma.lzma | Bin 50 -> 0 bytes
tests/files/good-single-subblock_implicit.lzma | Bin 35 -> 0 bytes
tests/files/good-single-subblock_rle.lzma | Bin 118 -> 0 bytes
tests/files/malicious-multi-metadata-64PiB.lzma | Bin 51 -> 0 bytes
tests/files/malicious-single-subblock-256MiB.lzma | Bin 30 -> 0 bytes
tests/files/malicious-single-subblock-64PiB.lzma | Bin 45 -> 0 bytes
tests/files/malicious-single-subblock31-slow.lzma | Bin 1233 -> 0 bytes
tests/files/unsupported-block_header.lzma | Bin 0 -> 68 bytes
tests/files/unsupported-check.lzma | Bin 0 -> 68 bytes
tests/files/unsupported-filter_flags-1.lzma | Bin 0 -> 68 bytes
tests/files/unsupported-filter_flags-2.lzma | Bin 0 -> 68 bytes
tests/files/unsupported-filter_flags-3.lzma | Bin 0 -> 68 bytes
tests/test_block_header.c | 28 +-
tests/test_compress.sh | 4 +-
tests/test_filter_flags.c | 51 +-
tests/test_stream_flags.c | 4 +-
tests/tests.h | 8 +
277 files changed, 9050 insertions(+), 7477 deletions(-)
Fix test_filter_flags to match the new restriction of lc+lp.
tests/test_filter_flags.c | 3 +++
1 file changed, 3 insertions(+)
Remove some redundant code from LZMA encoder.
src/liblzma/lzma/lzma_encoder.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
Add limit of lc + lp <= 4. Now we can allocate the
literal coder as part of the main LZMA encoder or
decoder structure.
Make the LZMA decoder to rely on the current internal API
to free the allocated memory in case an error occurs.
src/liblzma/api/lzma/lzma.h | 10 +++++-
src/liblzma/lzma/lzma_decoder.c | 57 ++++++++-------------------------
src/liblzma/lzma/lzma_encoder_init.c | 13 ++++----
src/liblzma/lzma/lzma_encoder_private.h | 2 +-
src/liblzma/lzma/lzma_literal.c | 39 +++++-----------------
src/liblzma/lzma/lzma_literal.h | 13 +++-----
6 files changed, 43 insertions(+), 91 deletions(-)
Comments
src/liblzma/lzma/lzma_encoder.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Delete old code that was supposed to be already deleted
from test_block_header.c.
tests/test_block_header.c | 30 ------------------------------
1 file changed, 30 deletions(-)
Update the code to mostly match the new simpler file format
specification. Simplify things by removing most of the
support for known uncompressed size in most places.
There are some miscellaneous changes here and there too.
The API of liblzma has got many changes and still some
more will be done soon. While most of the code has been
updated, some things are not fixed (the command line tool
will choke with invalid filter chain, if nothing else).
Subblock filter is somewhat broken for now. It will be
updated once the encoded format of the Subblock filter
has been decided.
configure.ac | 41 +-
debug/full_flush.c | 16 +-
debug/sync_flush.c | 15 +-
.../check/check_byteswap.h => common/bswap.h} | 15 +-
src/common/integer.h | 167 +++++
src/liblzma/api/Makefile.am | 5 +-
src/liblzma/api/lzma.h | 9 +-
src/liblzma/api/lzma/alone.h | 32 +-
src/liblzma/api/lzma/auto.h | 7 +-
src/liblzma/api/lzma/base.h | 15 +
src/liblzma/api/lzma/block.h | 306 +++-----
src/liblzma/api/lzma/check.h | 18 +-
src/liblzma/api/lzma/copy.h | 29 -
src/liblzma/api/lzma/easy.h | 61 +-
src/liblzma/api/lzma/extra.h | 114 ---
src/liblzma/api/lzma/filter.h | 5 +-
src/liblzma/api/lzma/index.h | 204 +++++-
src/liblzma/api/lzma/index_hash.h | 94 +++
src/liblzma/api/lzma/info.h | 315 --------
src/liblzma/api/lzma/lzma.h | 2 +-
src/liblzma/api/lzma/metadata.h | 100 ---
src/liblzma/api/lzma/raw.h | 20 +-
src/liblzma/api/lzma/stream.h | 157 +---
src/liblzma/api/lzma/stream_flags.h | 146 ++--
src/liblzma/api/lzma/version.h | 2 +-
src/liblzma/api/lzma/vli.h | 83 +--
src/liblzma/check/Makefile.am | 1 -
src/liblzma/check/check.c | 55 +-
src/liblzma/check/check.h | 47 +-
src/liblzma/check/crc32_init.c | 2 +-
src/liblzma/check/crc64_init.c | 2 +-
src/liblzma/check/crc_macros.h | 2 +-
src/liblzma/check/sha256.c | 53 +-
src/liblzma/common/Makefile.am | 31 +-
src/liblzma/common/alignment.c | 5 +-
src/liblzma/common/alone_decoder.c | 77 +-
src/liblzma/common/alone_encoder.c | 99 ++-
src/liblzma/common/auto_decoder.c | 18 +-
src/liblzma/common/block_decoder.c | 298 ++------
src/liblzma/common/block_encoder.c | 228 ++----
src/liblzma/common/block_header_decoder.c | 400 ++--------
src/liblzma/common/block_header_encoder.c | 207 ++----
src/liblzma/common/block_private.h | 51 +-
src/liblzma/common/block_util.c | 73 ++
src/liblzma/common/common.h | 44 +-
src/liblzma/common/copy_coder.c | 144 ----
src/liblzma/common/copy_coder.h | 31 -
src/liblzma/common/delta_common.c | 4 -
src/liblzma/common/delta_common.h | 4 -
src/liblzma/common/delta_decoder.c | 55 +-
src/liblzma/common/delta_encoder.c | 7 +-
src/liblzma/common/{easy_multi.c => easy.c} | 87 ++-
src/liblzma/common/easy_common.c | 54 --
src/liblzma/common/extra.c | 34 -
src/liblzma/common/features.c | 4 -
src/liblzma/common/filter_flags_decoder.c | 384 +++-------
src/liblzma/common/filter_flags_encoder.c | 120 +--
src/liblzma/common/index.c | 773 ++++++++++++++++---
src/liblzma/common/index.h | 67 ++
src/liblzma/common/index_decoder.c | 252 +++++++
src/liblzma/common/index_encoder.c | 222 ++++++
.../{stream_encoder_multi.h => index_encoder.h} | 18 +-
src/liblzma/common/index_hash.c | 340 +++++++++
src/liblzma/common/info.c | 814 ---------------------
src/liblzma/common/memory_usage.c | 1 -
src/liblzma/common/metadata_decoder.c | 578 ---------------
src/liblzma/common/metadata_decoder.h | 31 -
src/liblzma/common/metadata_encoder.c | 435 -----------
src/liblzma/common/raw_common.c | 178 ++---
src/liblzma/common/raw_common.h | 5 +-
src/liblzma/common/raw_decoder.c | 19 +-
src/liblzma/common/raw_decoder.h | 3 +-
src/liblzma/common/raw_encoder.c | 101 +--
src/liblzma/common/raw_encoder.h | 3 +-
src/liblzma/common/stream_common.h | 3 +
src/liblzma/common/stream_decoder.c | 458 ++++--------
.../common/{easy_common.h => stream_decoder.h} | 14 +-
src/liblzma/common/stream_encoder.c | 282 +++++++
.../{metadata_encoder.h => stream_encoder.h} | 14 +-
src/liblzma/common/stream_encoder_multi.c | 445 -----------
src/liblzma/common/stream_encoder_single.c | 219 ------
src/liblzma/common/stream_flags_decoder.c | 260 ++-----
src/liblzma/common/stream_flags_encoder.c | 56 +-
.../common/{easy_single.c => stream_flags_equal.c} | 27 +-
src/liblzma/common/vli_decoder.c | 68 +-
src/liblzma/common/vli_encoder.c | 59 +-
src/liblzma/common/vli_reverse_decoder.c | 55 --
src/liblzma/lz/lz_decoder.c | 6 +-
src/liblzma/lz/lz_decoder.h | 10 +-
src/liblzma/lzma/lzma_decoder.c | 13 +-
src/liblzma/lzma/lzma_decoder.h | 10 +-
src/liblzma/simple/simple_coder.c | 29 +-
src/liblzma/simple/simple_private.h | 4 -
src/liblzma/subblock/subblock_decoder.c | 106 +--
src/liblzma/subblock/subblock_decoder_helper.c | 5 +-
src/liblzma/subblock/subblock_encoder.c | 8 +-
src/lzma/args.c | 22 +-
src/lzma/args.h | 2 -
src/lzma/error.c | 6 +
src/lzma/process.c | 26 +-
src/lzmadec/lzmadec.c | 8 +-
tests/Makefile.am | 5 +-
tests/test_block_header.c | 411 ++++-------
tests/test_compress.sh | 65 +-
tests/test_filter_flags.c | 116 ++-
tests/test_index.c | 504 ++++++++++++-
tests/test_info.c | 717 ------------------
tests/test_stream_flags.c | 134 ++--
tests/tests.h | 14 +-
109 files changed, 4655 insertions(+), 7965 deletions(-)
Update the file format specification draft. The new one is
a lot simpler than the previous versions, but it also means
that the existing code will change a lot.
doc/file-format.txt | 1794 +++++++++++++++------------------------------------
1 file changed, 508 insertions(+), 1286 deletions(-)
Fix uninitialized variable in LZMA encoder. This was
introduced in 369f72fd656f537a9a8e06f13e6d0d4c242be22f.
src/liblzma/lzma/lzma_encoder_init.c | 2 ++
1 file changed, 2 insertions(+)
Improve command line integer parsing a little in lzma and
lzmadec to make them accept also KiB in addition Ki etc.
Fix also memory usage information in lzmadec --help.
src/lzma/util.c | 23 ++++++++++++++---------
src/lzmadec/lzmadec.c | 31 ++++++++++++++++++-------------
2 files changed, 32 insertions(+), 22 deletions(-)
s/decompressed/compressed/ in the command line tool's
error message.
src/lzma/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fix a buffer overflow in the LZMA encoder. It was due to my
misunderstanding of the code. There's no tiny fix for this
problem, so I also cleaned up the code in general.
This reduces the speed of the encoder 2-5 % in the fastest
compression mode ("lzma -1"). High compression modes should
have no noticeable performance difference.
This commit breaks things (especially LZMA_SYNC_FLUSH) but I
will fix them once the new format and LZMA2 has been roughly
implemented. Plain LZMA won't support LZMA_SYNC_FLUSH at all
and won't be supported in the new .lzma format. This may
change still but this is what it looks like now.
Support for known uncompressed size (that is, LZMA or LZMA2
without EOPM) is likely to go away. This means there will
be API changes.
src/liblzma/lz/lz_encoder.c | 113 +----
src/liblzma/lz/lz_encoder.h | 18 +-
src/liblzma/lzma/lzma_encoder.c | 551 ++++++++++++-------------
src/liblzma/lzma/lzma_encoder_getoptimum.c | 59 ++-
src/liblzma/lzma/lzma_encoder_getoptimumfast.c | 4 +-
src/liblzma/lzma/lzma_encoder_init.c | 9 +-
src/liblzma/lzma/lzma_encoder_private.h | 15 +-
src/liblzma/rangecoder/range_encoder.h | 383 +++++++++--------
8 files changed, 532 insertions(+), 620 deletions(-)
Typo fixes from meyering.
doc/faq.txt | 4 ++--
doc/liblzma-advanced.txt | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
Remove support for pre-C89 libc versions that lack memcpy,
memmove, and memset.
configure.ac | 2 +-
src/common/sysdefs.h | 15 ++-------------
src/liblzma/common/allocator.c | 2 +-
3 files changed, 4 insertions(+), 15 deletions(-)
Improved C99 compiler detection in configure.ac. It will
pass -std=gnu99 instead of -std=c99 to GCC now, but -pedantic
should still give warnings about GNU extensions like before
except with some special keywords like asm().
configure.ac | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
Bunch of grammar fixes from meyering.
doc/liblzma-security.txt | 8 ++++----
src/liblzma/api/lzma/memlimit.h | 6 +++---
src/lzma/help.c | 2 +-
tests/files/README | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
Typo fix
src/liblzma/api/lzma/init.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Don't print an error message on broken pipe unless --verbose
is used.
src/lzma/io.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
Fix a crash with --format=alone if other filters than LZMA
are specified on the command line.
src/lzma/args.c | 9 +++++++++
1 file changed, 9 insertions(+)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Fixed wrong spelling "limitter" to "limiter". This affects
liblzma's API.
doc/liblzma-security.txt | 14 +++++++-------
src/liblzma/api/lzma/base.h | 4 ++--
src/liblzma/api/lzma/memlimit.h | 10 +++++-----
src/liblzma/api/lzma/stream.h | 4 ++--
src/liblzma/common/Makefile.am | 2 +-
src/liblzma/common/{memory_limitter.c => memory_limiter.c} | 2 +-
src/lzma/list.c | 6 +++---
src/lzmadec/lzmadec.c | 12 ++++++------
tests/test_memlimit.c | 4 ++--
9 files changed, 29 insertions(+), 29 deletions(-)
Prevent LZ encoder from hanging with known uncompressed
size. The "fix" breaks LZMA_SYNC_FLUSH at end of stream
with known uncompressed size, but since it currently seems
likely that support for encoding with known uncompressed
size will go away anyway, I'm not fixing this problem now.
src/liblzma/lz/lz_encoder.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
Removed src/liblzma/common/sysdefs.h symlink, which was
annoying, because "make dist" put two copies of sysdefs.h
into the tarball instead of the symlink.
src/liblzma/check/crc32_table.c | 2 +-
src/liblzma/check/crc64_table.c | 2 +-
src/liblzma/common/Makefile.am | 1 -
src/liblzma/common/common.h | 2 +-
src/liblzma/common/sysdefs.h | 1 -
5 files changed, 3 insertions(+), 5 deletions(-)
Added memusage.c to debug directory.
debug/Makefile.am | 3 ++-
debug/memusage.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 1 deletion(-)
Bumped version number to 4.999.3alpha. It will become 5.0.0
once we have a stable release (won't be very soon). The
version number is no longer related to version of LZMA SDK.
Made some small Automake-related changes to toplevel
Makefile.am and configure.ac.
Makefile.am | 7 +++++--
README | 29 +++++++++++++++++++++++++++++
configure.ac | 4 ++--
src/liblzma/api/lzma/version.h | 22 ++++++++++------------
4 files changed, 46 insertions(+), 16 deletions(-)
Fix a memory leak by calling free(extra->data) in
lzma_extra_free().
src/liblzma/common/extra.c | 1 +
1 file changed, 1 insertion(+)
Make unlzma and lzcat symlinks.
src/lzma/Makefile.am | 12 ++++++++++++
1 file changed, 12 insertions(+)
Fixed a bug in command line option parsing.
src/lzma/options.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Added two assert()s.
src/liblzma/lzma/lzma_encoder.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Switch to uint16_t as the type of range coder probabilities.
src/liblzma/rangecoder/range_common.h | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
Fix wrong return type (uint32_t -> bool).
src/liblzma/lz/lz_encoder.c | 2 +-
src/liblzma/lz/lz_encoder.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Fix data corruption in LZ encoder with LZMA_SYNC_FLUSH.
src/liblzma/lz/lz_encoder.c | 16 ++++++++++++++++
src/liblzma/lz/lz_encoder.h | 4 ++++
src/liblzma/lz/match_c.h | 23 ++++++++++++++++++-----
3 files changed, 38 insertions(+), 5 deletions(-)
Fix fastpos problem in Makefile.am when built with --enable-small.
src/liblzma/lzma/Makefile.am | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Use 64-bit integer as range encoder's cache size. This fixes a
theoretical data corruption, which should be very hard to trigger
even intentionally.
src/liblzma/rangecoder/range_encoder.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Replaced the range decoder optimization that used arithmetic
right shift with as fast version that doesn't need
arithmetic right shift. Removed the related check from
configure.ac.
configure.ac | 1 -
m4/ax_c_arithmetic_rshift.m4 | 36 -----------------------
src/liblzma/rangecoder/range_decoder.h | 53 ++++++++++------------------------
3 files changed, 16 insertions(+), 74 deletions(-)
Take advantage of arithmetic right shift in range decoder.
src/liblzma/rangecoder/range_decoder.h | 52 ++++++++++++++++++++++++----------
1 file changed, 37 insertions(+), 15 deletions(-)
Added autoconf check to detect if we can use arithmetic
right shift for optimizations.
configure.ac | 1 +
m4/ax_c_arithmetic_rshift.m4 | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+)
Update a comment to use the variable name rep_len_decoder.
(And BTW, the previous commit actually did change the
program logic slightly.)
src/liblzma/lzma/lzma_decoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Demystified the "state" variable in LZMA code. Use the
word literal instead of char for better consistency.
There are still some names with _char instead of _literal
in lzma_optimum, these may be changed later.
Renamed length coder variables.
This commit doesn't change the program logic.
src/liblzma/lzma/lzma_common.h | 69 ++++++++++++++++++++++--------
src/liblzma/lzma/lzma_decoder.c | 47 ++++++++++----------
src/liblzma/lzma/lzma_encoder.c | 14 +++---
src/liblzma/lzma/lzma_encoder_getoptimum.c | 34 +++++++--------
src/liblzma/lzma/lzma_encoder_init.c | 5 ++-
src/liblzma/lzma/lzma_encoder_private.h | 8 ++--
6 files changed, 107 insertions(+), 70 deletions(-)
Fix data corruption in LZMA encoder. Note that this bug was
specific to liblzma and was *not* present in LZMA SDK.
src/liblzma/lzma/lzma_encoder.c | 4 ++++
1 file changed, 4 insertions(+)
Fix a comment API header.
src/liblzma/api/lzma/lzma.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Make lzma_stream.next_in const. Let's see if anyone complains.
src/liblzma/api/lzma/base.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Apply a minor speed optimization to LZMA decoder.
src/liblzma/lzma/lzma_decoder.c | 85 +++++++++++++++++++++--------------------
1 file changed, 43 insertions(+), 42 deletions(-)
Initialize the last byte of the dictionary to zero so that
lz_get_byte(lz, 0) returns zero. This was broken by
1a3b21859818e4d8e89a1da99699233c1bfd197d.
src/liblzma/lz/lz_decoder.c | 1 +
1 file changed, 1 insertion(+)
Really fix the price count initialization.
src/liblzma/lzma/lzma_encoder_init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Initialize align_price_count and match_price_count in
lzma_encoder_init.c. While we don't call
fill_distances_prices() and fill_align_prices() in
lzma_lzma_encoder_init(), we still need to initialize
these two variables so that the fill functions get
called in lzma_encoder_getoptimum.c in the beginning
of a stream.
src/liblzma/lzma/lzma_encoder_init.c | 2 ++
1 file changed, 2 insertions(+)
Always initialize lz->temp_size in lz_decoder.c. temp_size did
get initialized as a side-effect after allocating a new decoder,
but not when the decoder was reused.
src/liblzma/lz/lz_decoder.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
Don't fill allocated memory with 0xFD when debugging is
enabled. It hides errors from Valgrind.
src/liblzma/common/allocator.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Remove two redundant validity checks from the LZMA decoder.
These are already checked elsewhere, so omitting these
gives (very) tiny speed up.
src/liblzma/lzma/lzma_decoder.c | 23 ++++-------------------
1 file changed, 4 insertions(+), 19 deletions(-)
Tiny clean up to file-format.txt.
doc/file-format.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Don't memzero() the history buffer when initializing LZ
decoder. There's no danger of information leak here, so
it isn't required. Doing memzero() takes a lot of time
with large dictionaries, which could make it easier to
construct DoS attack to consume too much CPU time.
src/liblzma/lz/lz_decoder.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
Do uncompressed size validation in raw encoder. This way
it gets done for not only raw encoder, but also Block
and LZMA_Alone encoders.
src/liblzma/common/raw_encoder.c | 90 ++++++++++++++++++++++++++++++++--------
1 file changed, 73 insertions(+), 17 deletions(-)
Avoid unneeded function call in raw_common.c.
src/liblzma/common/raw_common.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Added note.GNU-stack to x86 assembler files. It is needed
when using non-executable stack.
src/liblzma/check/crc32_x86.S | 9 +++++++++
src/liblzma/check/crc64_x86.S | 9 +++++++++
2 files changed, 18 insertions(+)
Added api/lzma/easy.h. I had forgot to add this to the
git repo. Thanks to Stephan Kulow.
src/liblzma/api/lzma/easy.h | 174 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 174 insertions(+)
Added more test files.
tests/files/README | 11 +++++++++++
tests/files/bad-multi-none-header_7.lzma | Bin 0 -> 59 bytes
tests/files/good-single-sparc-lzma.lzma | Bin 0 -> 2263 bytes
tests/files/good-single-x86-lzma.lzma | Bin 0 -> 1909 bytes
4 files changed, 11 insertions(+)
Added more test files.
tests/files/README | 6 ++++++
tests/files/bad-multi-none-block_3.lzma | Bin 0 -> 58 bytes
tests/files/good-multi-none-block_2.lzma | Bin 0 -> 58 bytes
3 files changed, 6 insertions(+)
Return LZMA_HEADER_ERROR if LZMA_SYNC_FLUSH is used with any
of the so called simple filters. If there is demand, limited
support for LZMA_SYNC_FLUSH may be added in future.
After this commit, using LZMA_SYNC_FLUSH shouldn't cause
undefined behavior in any situation.
src/liblzma/api/lzma/simple.h | 9 +++++++++
src/liblzma/simple/simple_coder.c | 8 ++++++++
2 files changed, 17 insertions(+)
Added more Multi-Block test files. Improved some
descriptions in the test files' README.
tests/files/README | 34 +++++++++++++++++++++++++------
tests/files/bad-multi-none-block_1.lzma | Bin 0 -> 66 bytes
tests/files/bad-multi-none-block_2.lzma | Bin 0 -> 66 bytes
tests/files/good-multi-none-block_1.lzma | Bin 0 -> 66 bytes
4 files changed, 28 insertions(+), 6 deletions(-)
Combine lzma_options_block validation needed by both Block
encoder and decoder, and put the shared things to
block_private.h. Improved the checks a little so that
they may detect too big Compressed Size at initialization
time if lzma_options_block.total_size or .total_limit is
known.
Allow encoding and decoding Blocks with combinations of
fields that are not allowed by the file format specification.
Doing this requires that the application passes such a
combination in lzma_options_lzma; liblzma doesn't do that,
but it's not impossible that someone could find them useful
in some custom file format.
src/liblzma/common/block_decoder.c | 37 ++++++++++++----------------
src/liblzma/common/block_encoder.c | 32 +++++-------------------
src/liblzma/common/block_private.h | 50 ++++++++++++++++++++++++++++++++++++++
3 files changed, 71 insertions(+), 48 deletions(-)
Added test_memlimit.c.
tests/Makefile.am | 2 +
tests/test_memlimit.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 116 insertions(+)
Improved the memory limitter:
- Added lzma_memlimit_max() and lzma_memlimit_reached()
API functions.
- Added simple estimation of malloc()'s memory usage
overhead.
- Fixed integer overflow detection in lzma_memlimit_alloc().
- Made some white space cleanups and added more comments.
The description of lzma_memlimit_max() in memlimit.h is bad
and should be improved.
src/liblzma/api/lzma/memlimit.h | 35 +++++++++++++
src/liblzma/common/memory_limitter.c | 97 ++++++++++++++++++++++++++++++------
2 files changed, 118 insertions(+), 14 deletions(-)
Use more parenthesis in succeed() macro in tests/tests.h.
tests/tests.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Added more Multi-Block Stream test files.
tests/files/README | 23 +++++++++++++++++++++++
tests/files/bad-multi-none-header_2.lzma | Bin 0 -> 61 bytes
tests/files/bad-multi-none-header_3.lzma | Bin 0 -> 59 bytes
tests/files/bad-multi-none-header_4.lzma | Bin 0 -> 59 bytes
tests/files/bad-multi-none-header_5.lzma | Bin 0 -> 58 bytes
tests/files/bad-multi-none-header_6.lzma | Bin 0 -> 59 bytes
tests/files/good-multi-none-header_3.lzma | Bin 0 -> 59 bytes
7 files changed, 23 insertions(+)
Added bunch of test files containing Multi-Block Streams.
tests/files/README | 53 ++++++++++++++++++++++++++++++
tests/files/bad-multi-none-1.lzma | Bin 0 -> 54 bytes
tests/files/bad-multi-none-2.lzma | Bin 0 -> 53 bytes
tests/files/bad-multi-none-3.lzma | Bin 0 -> 53 bytes
tests/files/bad-multi-none-extra_1.lzma | Bin 0 -> 54 bytes
tests/files/bad-multi-none-extra_2.lzma | Bin 0 -> 54 bytes
tests/files/bad-multi-none-extra_3.lzma | Bin 0 -> 55 bytes
tests/files/bad-multi-none-header_1.lzma | Bin 0 -> 57 bytes
tests/files/bad-multi-none-index_1.lzma | Bin 0 -> 51 bytes
tests/files/bad-multi-none-index_2.lzma | Bin 0 -> 49 bytes
tests/files/bad-multi-none-index_3.lzma | Bin 0 -> 51 bytes
tests/files/bad-multi-none-index_4.lzma | Bin 0 -> 51 bytes
tests/files/good-multi-none-1.lzma | Bin 0 -> 75 bytes
tests/files/good-multi-none-2.lzma | Bin 0 -> 53 bytes
tests/files/good-multi-none-extra_1.lzma | Bin 0 -> 51 bytes
tests/files/good-multi-none-extra_2.lzma | Bin 0 -> 79 bytes
tests/files/good-multi-none-extra_3.lzma | Bin 0 -> 55 bytes
tests/files/good-multi-none-header_1.lzma | Bin 0 -> 58 bytes
tests/files/good-multi-none-header_2.lzma | Bin 0 -> 66 bytes
19 files changed, 53 insertions(+)
Fix decoding of empty Metadata Blocks, that don't have
even the Metadata Flags field. Earlier the code allowed
such files; now they are prohibited as the file format
specification requires.
src/liblzma/common/metadata_decoder.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Fix a bug related to 99e12af4e2b866c011fe0106cd1e0bfdcc8fe9c6.
lzma_metadata.header_metadata_size was not properly set to
zero if the Metadata had only the Metadata Flags field.
src/liblzma/common/metadata_decoder.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
Fix decoding of Extra Records that have empty Data.
src/liblzma/common/metadata_decoder.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
Add the trailing '\0' to lzma_extra.data as the API header
already documents.
src/liblzma/common/metadata_decoder.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Added debug/full_flush.c.
debug/Makefile.am | 3 +-
debug/full_flush.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 107 insertions(+), 1 deletion(-)
Return LZMA_STREAM_END instead of LZMA_OK if
LZMA_SYNC_FLUSH or LZMA_FULL_FLUSH is used when
there's no unfinished Block open.
src/liblzma/common/stream_encoder_multi.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Added bad-single-none-footer_filter_flags.lzma and
bad-single-none-too_long_vli.lzma.
tests/files/README | 5 +++++
tests/files/bad-single-none-footer_filter_flags.lzma | Bin 0 -> 30 bytes
tests/files/bad-single-none-too_long_vli.lzma | Bin 0 -> 39 bytes
3 files changed, 5 insertions(+)
Fixed a typo.
src/liblzma/subblock/subblock_decoder_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fix a memory leak in the Subblock encoder.
src/liblzma/subblock/subblock_encoder.c | 1 +
1 file changed, 1 insertion(+)
Fix Size of Header Metadata Block handling. Now
lzma_metadata.header_metadata_size == LZMA_VLI_VALUE_UNKNOWN
is not allowed at all. To indicate missing Header Metadata
Block, header_metadata_size must be set to zero. This is
what Metadata decoder does after this patch too.
Note that other missing fields in lzma_metadata are still
indicated with LZMA_VLI_VALUE_UNKNOWN. This isn't as
illogical as it sounds at first, because missing Size of
Header Metadata Block means that Header Metadata Block is
not present in the Stream. With other Metadata fields,
a missing field means only that the value is unknown.
src/liblzma/common/info.c | 13 ++++---------
src/liblzma/common/metadata_decoder.c | 6 ++++++
src/liblzma/common/metadata_encoder.c | 11 +++++------
tests/test_info.c | 4 ++--
4 files changed, 17 insertions(+), 17 deletions(-)
Fix a memory leak in metadata_decoder.c.
src/liblzma/common/metadata_decoder.c | 1 +
1 file changed, 1 insertion(+)
Fix the fix 863028cb7ad6d8d0455fa69348f56b376d7b908f which
just moved to problem. Now it's really fixed.
src/liblzma/common/info.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Take advantage of return_if_error() macro in
lzma_info_metadata_set() in info.c.
src/liblzma/common/info.c | 24 ++++++++----------------
1 file changed, 8 insertions(+), 16 deletions(-)
Fixed a dangling pointer that caused invalid free().
src/liblzma/common/info.c | 1 +
1 file changed, 1 insertion(+)
Added lzma_easy_* functions. These should make using
liblzma as easy as using zlib, because the easy API
don't require developers to know any fancy LZMA options.
Note that Multi-Block Stream encoding is currently broken.
The easy API should be OK, the bug(s) are elsewhere.
src/liblzma/api/Makefile.am | 1 +
src/liblzma/api/lzma.h | 1 +
src/liblzma/common/Makefile.am | 5 ++
src/liblzma/common/easy_common.c | 54 ++++++++++++++++
src/liblzma/common/easy_common.h | 28 ++++++++
src/liblzma/common/easy_multi.c | 103 ++++++++++++++++++++++++++++++
src/liblzma/common/easy_single.c | 37 +++++++++++
src/liblzma/common/stream_encoder_multi.c | 3 +-
src/liblzma/common/stream_encoder_multi.h | 26 ++++++++
9 files changed, 256 insertions(+), 2 deletions(-)
Fix Multi-Block Stream encoder's EOPM usage.
src/liblzma/common/stream_encoder_multi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Made lzma_extra pointers const in lzma_options_stream.
src/liblzma/api/lzma/stream.h | 4 ++--
src/liblzma/common/stream_encoder_multi.c | 8 ++++++--
2 files changed, 8 insertions(+), 4 deletions(-)
Updated debug/sync_flush.c.
debug/sync_flush.c | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
Added debug/repeat.c.
debug/Makefile.am | 1 +
debug/repeat.c | 43 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+)
Fix alignment handling bugs in Subblock encoder.
This leaves one known alignment bug unfixed: If repeat count
doesn't fit into 28-bit integer, the encoder has to split
this to multiple Subblocks with Subblock Type `Repeating Data'.
The extra Subblocks may have wrong alignment. Correct alignment
is restored after the split Repeating Data has been completely
written out.
Since the encoder doesn't even try to fix the alignment unless
the size of Data is at least 4 bytes, to trigger this bug you
need at least 4 GiB of repeating data with sequence length of
4 or more bytes. Since the worst thing done by this bug is
misaligned data (no data corruption), this bug simply isn't
worth fixing, because a proper fix isn't simple.
src/liblzma/subblock/subblock_encoder.c | 170 ++++++++++++++++++++++----------
1 file changed, 119 insertions(+), 51 deletions(-)
Implemented LZMA_SYNC_FLUSH support to the Subblock encoder.
The API for handing Subfilters was changed to make it
consistent with LZMA_SYNC_FLUSH.
A few sanity checks were added for Subfilter handling. Some
small bugs were fixed. More comments were added.
src/liblzma/api/lzma/subblock.h | 29 ++--
src/liblzma/subblock/subblock_encoder.c | 263 ++++++++++++++++++++++++--------
2 files changed, 214 insertions(+), 78 deletions(-)
Revised the Delta filter implementation. The initialization
function is still shared between encoder and decoder, but the
actual coding is in separate files for encoder and decoder.
There are now separate functions for the actual delta
calculation depending on if Delta is the last filter in the
chain or not. If it is the last, the new code copies the
data from input to output buffer and does the delta
calculation at the same time. The old code first copied the
data, then did the delta in the target buffer, which required
reading through the data twice.
Support for LZMA_SYNC_FLUSH was added to the Delta encoder.
This doesn't change anything in the file format.
src/liblzma/common/Makefile.am | 14 +-
src/liblzma/common/delta_coder.c | 189 ---------------------
src/liblzma/common/delta_common.c | 70 ++++++++
src/liblzma/common/delta_common.h | 48 ++++++
src/liblzma/common/delta_decoder.c | 102 +++++++++++
.../common/{delta_coder.h => delta_decoder.h} | 11 +-
src/liblzma/common/delta_encoder.c | 97 +++++++++++
src/liblzma/common/delta_encoder.h | 28 +++
src/liblzma/common/raw_decoder.c | 2 +-
src/liblzma/common/raw_encoder.c | 2 +-
10 files changed, 363 insertions(+), 200 deletions(-)
Added the debug directory and the first debug tool
(sync_flush). These tools are not built unless the
user runs "make" in the debug directory.
Makefile.am | 1 +
configure.ac | 1 +
debug/Makefile.am | 30 ++++++++++++++
debug/README | 17 ++++++++
debug/sync_flush.c | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 165 insertions(+)
Added test files to test usage of flush marker in LZMA.
tests/files/README | 12 ++++++++++++
tests/files/bad-single-lzma-flush_beginning.lzma | Bin 0 -> 53 bytes
tests/files/bad-single-lzma-flush_twice.lzma | Bin 0 -> 63 bytes
tests/files/good-single-lzma-flush_1.lzma | Bin 0 -> 48 bytes
tests/files/good-single-lzma-flush_2.lzma | Bin 0 -> 63 bytes
5 files changed, 12 insertions(+)
Fix LZMA_SYNC_FLUSH handling in LZ and LZMA encoders.
That code is now almost completely in LZ coder, where
it can be shared with other LZ77-based algorithms in
future.
src/liblzma/lz/lz_encoder.c | 34 ++++++++++++++++++++++++++--------
src/liblzma/lz/lz_encoder.h | 1 +
src/liblzma/lzma/lzma_encoder.c | 27 ++-------------------------
3 files changed, 29 insertions(+), 33 deletions(-)
Don't add -g to CFLAGS when --enable-debug is specified.
It's the job of the user to put that in CFLAGS.
configure.ac | 1 -
1 file changed, 1 deletion(-)
Set stdin and stdout to binary mode on Windows. This patch is
a forward port of b7b22fcb979a16d3a47c8001f058c9f7d4416068
from lzma-utils-legacy.git. I don't know if the new code base
builds on Windows, but this is a start.
src/lzmadec/lzmadec.c | 9 +++++++++
1 file changed, 9 insertions(+)
Added test_compress.sh and bunch of files needed by it.
This new set of tests compress and decompress several
test files with many different compression options.
This set of tests will be extended later.
tests/Makefile.am | 30 ++++---
tests/bcj_test.c | 66 ++++++++++++++
tests/compress_prepared_bcj_sparc | Bin 0 -> 6804 bytes
tests/compress_prepared_bcj_x86 | Bin 0 -> 4649 bytes
tests/create_compress_files.c | 164 ++++++++++++++++++++++++++++++++++
tests/test_compress.sh | 183 ++++++++++++++++++++++++++++++++++++++
6 files changed, 433 insertions(+), 10 deletions(-)
Subblock decoder: Don't exit the main loop in decode_buffer()
too early if we hit End of Input while decoding a Subblock of
type Repeating Data. To keep the loop termination condition
elegant, the order of enumerations in coder->sequence were
changed.
To keep the case-labels in roughly the same order as the
enumerations in coder->sequence, large chunks of code was
moved around. This made the diff big and ugly compared to
the amount of the actual changes made.
src/liblzma/subblock/subblock_decoder.c | 272 ++++++++++++++++----------------
1 file changed, 139 insertions(+), 133 deletions(-)
Fix wrong too small size of argument unfiltered_max
in ia64_coder_init(). It triggered assert() in
simple_coder.c, and could have caused a buffer overflow.
This error was probably a copypaste mistake, since most
of the simple filters use unfiltered_max = 4.
src/liblzma/simple/ia64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Added --delta to the output of "lzma --help".
src/lzma/help.c | 4 ++++
1 file changed, 4 insertions(+)
Fix Subblock docoder: If Subblock filter was used with known
Uncompressed Size, and the last output byte was from RLE,
the code didn't stop decoding as it should have done.
src/liblzma/subblock/subblock_decoder.c | 6 ++++++
1 file changed, 6 insertions(+)
Tiny non-technical edits to file-format.txt.
doc/file-format.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Plugged a memory leak in stream_decoder.c.
src/liblzma/common/stream_decoder.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
Added memory leak detection to lzmadec.c.
src/lzmadec/lzmadec.c | 3 +++
1 file changed, 3 insertions(+)
Added lzma_memlimit_count().
src/liblzma/api/lzma/memlimit.h | 10 ++++++++++
src/liblzma/common/memory_limitter.c | 19 +++++++++++++++++++
2 files changed, 29 insertions(+)
Added ARRAY_SIZE(array) macro.
src/common/sysdefs.h | 4 ++++
1 file changed, 4 insertions(+)
Make Uncompresed Size validation more strict
in alone_decoder.c.
src/liblzma/common/alone_decoder.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Free the allocated memory in lzmadec if debugging is
enabled. This should make it possible to detect possible
memory leaks with Valgrind.
src/lzmadec/lzmadec.c | 7 +++++++
1 file changed, 7 insertions(+)
Fix memory leaks from test_block_header.c.
tests/test_block_header.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
Use fastpos.h when encoding LZMA dictionary size in
Filter Flags encoder.
src/liblzma/common/filter_flags_encoder.c | 40 +++++++++++++++----------------
1 file changed, 19 insertions(+), 21 deletions(-)
Revised the fastpos code. It now uses the slightly faster
table-based version from LZMA SDK 4.57. This should be
fast on most systems.
A simpler and smaller alternative version is also provided.
On some CPUs this can be even a little faster than the
default table-based version (see comments in fastpos.h),
but on most systems the table-based code is faster.
src/liblzma/common/init_encoder.c | 3 -
src/liblzma/lzma/Makefile.am | 4 +
src/liblzma/lzma/fastpos.h | 156 +++++++++
src/liblzma/lzma/fastpos_table.c | 519 +++++++++++++++++++++++++++++
src/liblzma/lzma/fastpos_tablegen.c | 63 ++++
src/liblzma/lzma/lzma_common.h | 3 +-
src/liblzma/lzma/lzma_encoder.c | 1 +
src/liblzma/lzma/lzma_encoder_getoptimum.c | 1 +
src/liblzma/lzma/lzma_encoder_init.c | 22 --
src/liblzma/lzma/lzma_encoder_private.h | 21 --
10 files changed, 746 insertions(+), 47 deletions(-)
Added bsr.h.
src/liblzma/common/Makefile.am | 1 +
src/liblzma/common/bsr.h | 61 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 62 insertions(+)
Fixed assembler detection in configure.ac, and added
detection for x86_64.
configure.ac | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
Omit invalid space from printf() format string
in price_table_gen.c.
src/liblzma/rangecoder/price_table_gen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Removed a few unused macros from lzma_common.h.
src/liblzma/lzma/lzma_common.h | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
Fix a typo in lzma_encoder.c.
src/liblzma/lzma/lzma_encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Convert bittree_get_price() and bittree_reverse_get_price()
from macros to inline functions.
src/liblzma/lzma/lzma_encoder.c | 19 +++-----
src/liblzma/lzma/lzma_encoder_getoptimum.c | 16 +++----
src/liblzma/rangecoder/range_encoder.h | 76 +++++++++++++++++-------------
3 files changed, 56 insertions(+), 55 deletions(-)
Fix CRC code in case --enable-small is used.
src/liblzma/check/crc32_init.c | 2 +-
src/liblzma/check/crc64_init.c | 2 +-
src/liblzma/common/init_decoder.c | 2 --
src/liblzma/common/init_encoder.c | 2 --
tests/test_check.c | 2 ++
5 files changed, 4 insertions(+), 6 deletions(-)
Fix typo in test_index.c.
tests/test_index.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Added precomputed range coder probability price table.
src/liblzma/common/init_encoder.c | 5 +-
src/liblzma/rangecoder/Makefile.am | 9 ++-
src/liblzma/rangecoder/price_table.c | 70 ++++++++++++++++++++++
src/liblzma/rangecoder/price_table_gen.c | 55 +++++++++++++++++
.../{range_encoder.c => price_table_init.c} | 6 +-
src/liblzma/rangecoder/range_common.h | 4 +-
src/liblzma/rangecoder/range_encoder.h | 21 ++++---
7 files changed, 153 insertions(+), 17 deletions(-)
Remove RC_BUFFER_SIZE from lzma_encoder_private.h
and replace it with a sanity check.
src/liblzma/lzma/lzma_encoder_private.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Major changes to LZ encoder, LZMA encoder, and range encoder.
These changes implement support for LZMA_SYNC_FLUSH in LZMA
encoder, and move the temporary buffer needed by range encoder
from lzma_range_encoder structure to lzma_lz_encoder.
src/liblzma/lz/lz_encoder.c | 138 ++++++++++++++++++++++++++++-----
src/liblzma/lz/lz_encoder.h | 17 ++--
src/liblzma/lzma/lzma_encoder.c | 74 ++++++++++--------
src/liblzma/rangecoder/range_encoder.h | 117 ++++++++--------------------
4 files changed, 206 insertions(+), 140 deletions(-)
Added one assert() to process.c of the command line tool.
src/lzma/process.c | 1 +
1 file changed, 1 insertion(+)
Don't use coder->lz.stream_end_was_reached in assertions
in match_c.h.
src/liblzma/lz/match_c.h | 2 --
1 file changed, 2 deletions(-)
In lzma_read_match_distances(), don't use
coder->lz.stream_end_was_reached. That variable
will be removed, and the check isn't required anyway.
Rearrange the check so that it doesn't make one to
think that there could be an integer overflow.
src/liblzma/lzma/lzma_encoder_private.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Small LZMA_SYNC_FLUSH fixes to Block and Single-Stream encoders.
src/liblzma/common/block_encoder.c | 4 ++--
src/liblzma/common/stream_encoder_single.c | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
More fixes to LZMA decoder's flush marker handling.
src/liblzma/lzma/lzma_decoder.c | 52 ++++++++++++++++++++++++-----------------
1 file changed, 30 insertions(+), 22 deletions(-)
Eliminate lzma_lz_encoder.must_move_pos. It's needed
only in one place which isn't performance criticial.
src/liblzma/lz/lz_encoder.c | 6 ++----
src/liblzma/lz/lz_encoder.h | 4 ----
2 files changed, 2 insertions(+), 8 deletions(-)
Define HAVE_ASM_X86 when x86 assembler optimizations are
used. This #define will be useful for inline assembly.
configure.ac | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Added good-single-none-empty_3.lzma and
bad-single-none-empty.lzma.
tests/files/README | 6 ++++++
tests/files/bad-single-none-empty.lzma | Bin 0 -> 19 bytes
tests/files/good-single-none-empty_3.lzma | Bin 0 -> 19 bytes
3 files changed, 6 insertions(+)
Take advantage of return_if_error() in block_decoder.c.
src/liblzma/common/block_decoder.c | 23 +++++++----------------
1 file changed, 7 insertions(+), 16 deletions(-)
Updated tests/files/README.
tests/files/README | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
Added test files with empty Compressed Data.
tests/files/README | 6 ++++++
tests/files/good-single-lzma-empty.lzma | Bin 0 -> 21 bytes
tests/files/good-single-none-empty_1.lzma | Bin 0 -> 18 bytes
tests/files/good-single-none-empty_2.lzma | Bin 0 -> 26 bytes
4 files changed, 6 insertions(+)
Fix decoding of Blocks that have only Block Header.
src/liblzma/common/block_decoder.c | 37 ++++++++++++++-----------------------
1 file changed, 14 insertions(+), 23 deletions(-)
Added good-single-subblock_implicit.lzma.
tests/files/README | 2 ++
tests/files/good-single-subblock_implicit.lzma | Bin 0 -> 35 bytes
2 files changed, 2 insertions(+)
Disable CRC32 from Block Headers when --check=none
has been specified.
src/lzma/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fixed encoding of empty files. Arguments to is_size_valid()
were in wrong order in block_encoder.c.
src/liblzma/common/block_encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Added a few test files.
tests/files/README | 21 ++++++++++++++++++---
tests/files/bad-cat-single-none-pad_garbage_1.lzma | Bin 0 -> 65 bytes
tests/files/bad-cat-single-none-pad_garbage_2.lzma | Bin 0 -> 65 bytes
tests/files/bad-cat-single-none-pad_garbage_3.lzma | Bin 0 -> 65 bytes
...eopm.lzma => bad-single-data_after_eopm_1.lzma} | Bin
tests/files/bad-single-none-truncated.lzma | Bin 0 -> 29 bytes
6 files changed, 18 insertions(+), 3 deletions(-)
Avoid using ! in test_files.sh, because that doesn't work
with some ancient /bin/sh versions.
tests/test_files.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
More pre-C99 inttypes.h compatibility fixes. Now the code
should work even if the system has no inttypes.h.
src/common/physmem.h | 11 -----------
src/liblzma/check/crc32_init.c | 5 +----
src/liblzma/check/crc32_tablegen.c | 7 ++-----
src/liblzma/check/crc64_init.c | 5 +----
src/liblzma/check/crc64_tablegen.c | 7 ++-----
5 files changed, 6 insertions(+), 29 deletions(-)
Updated fi.po although it's currently pretty much crap.
po/fi.po | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Test for $GCC = yes instead of if it is non-empty. This
way it is possible to use ac_cv_c_compiler_gnu=no to
force configure to think it is using non-GNU C compiler.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Added test_files.sh to tests/Makefile.am so it gets
included in the tarball with "make dist".
tests/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Cosmetic edit to test_files.sh.
tests/test_files.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Added tests/files/README.
tests/files/README | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 108 insertions(+)
Tell in COPYING that everything in tests/files is
public domain.
COPYING | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Cleaned up the tests/files directory.
...ck-loop.lzma => bad-single-subblock-padding_loop.lzma} | Bin
...ck1023-slow.lzma => bad-single-subblock1023-slow.lzma} | Bin
tests/files/malicious-single-subblock-lzma.lzma | Bin 505 -> 0 bytes
3 files changed, 0 insertions(+), 0 deletions(-)
Added test_files.sh to test decoding of the files in
the tests/files directory. It doesn't test the malicious
files yet.
tests/Makefile.am | 4 +++-
tests/test_files.sh | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 1 deletion(-)
Updated README regarding the assembler optimizations.
README | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Updated THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
Cosmetic changes to configure.ac.
configure.ac | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
Automatically disable assembler code on Darwin x86.
Darwin has different ABI than GNU+Linux and Solaris,
thus the assembler code doesn't assemble on Darwin.
configure.ac | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
With printf(), use PRIu64 with a cast to uint64_t instead
of %zu, because some pre-C99 libc versions don't support %zu.
src/lzma/help.c | 13 +++++++------
src/lzmadec/lzmadec.c | 6 ++++--
2 files changed, 11 insertions(+), 8 deletions(-)
Introduced compatibility with systems that have pre-C99
or no inttypes.h. This is useful when the compiler has
good enough support for C99, but libc headers don't.
Changed liblzma API so that sys/types.h and inttypes.h
have to be #included before #including lzma.h. On systems
that don't have C99 inttypes.h, it's the problem of the
applications to provide the required types and macros
before #including lzma.h.
If lzma.h defined the missing types and macros, it could
conflict with third-party applications whose configure
has detected that the types are missing and defined them
in config.h already. An alternative would have been
introducing lzma_uint32 and similar types, but that would
just be an extra pain on modern systems.
configure.ac | 13 ++++++++-
doc/liblzma-intro.txt | 10 +++++--
src/common/sysdefs.h | 59 +++++++++++++++++++++++++++++++++++++-
src/liblzma/api/lzma.h | 40 +++++++++++++++++---------
src/liblzma/check/crc32_table.c | 4 +--
src/liblzma/check/crc32_table_be.h | 2 --
src/liblzma/check/crc32_table_le.h | 2 --
src/liblzma/check/crc32_tablegen.c | 1 -
src/liblzma/check/crc64_table.c | 4 +--
src/liblzma/check/crc64_table_be.h | 2 --
src/liblzma/check/crc64_table_le.h | 2 --
src/liblzma/check/crc64_tablegen.c | 1 -
src/lzma/private.h | 1 -
13 files changed, 106 insertions(+), 35 deletions(-)
Fix typo in comment (INT64_MAX -> UINT64_MAX).
src/liblzma/api/lzma/vli.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Rearranged testing of GCC-specific flags.
configure.ac | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
Another bug fix for flush marker detection.
src/liblzma/lzma/lzma_decoder.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
Fix stupid bugs in flush marker detection.
src/liblzma/lzma/lzma_decoder.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Added support for flush marker, which will be in files
that use LZMA_SYNC_FLUSH with encoder (not implemented
yet). This is a new feature in the raw LZMA format,
which isn't supported by old decoders. This shouldn't
be a problem in practice, since lzma_alone_encoder()
will not allow LZMA_SYNC_FLUSH, and thus not allow
creating files on decodable with old decoders.
Made lzma_decoder.c to require tab width of 4 characters
if one wants to fit the code in 80 columns. This makes
the code easier to read.
src/liblzma/lzma/lzma_common.h | 4 +
src/liblzma/lzma/lzma_decoder.c | 217 ++++++++++++++++++----------------------
2 files changed, 104 insertions(+), 117 deletions(-)
Moved range decoder initialization (reading the first
five input bytes) from LZMA decoder to range decoder
header. Did the same for decoding of direct bits.
src/liblzma/lzma/lzma_decoder.c | 42 +++-------------
src/liblzma/rangecoder/range_decoder.h | 87 +++++++++++++++++++++++-----------
2 files changed, 66 insertions(+), 63 deletions(-)
Added a note to README that --disable-assembler
must be used on Darwin.
README | 4 ++++
1 file changed, 4 insertions(+)
Use the filename suffix .S instead of .s for assembler files
so that the preprocessor removes the /* */ style comments,
which are not supported by some non-GNU assemblers (Solaris)
that otherwise work with this code.
src/liblzma/check/Makefile.am | 4 ++--
src/liblzma/check/{crc32_x86.s => crc32_x86.S} | 0
src/liblzma/check/{crc64_x86.s => crc64_x86.S} | 0
3 files changed, 2 insertions(+), 2 deletions(-)
Fixed wrong symbol name in crc64_x86.s.
src/liblzma/check/crc64_x86.s | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Use .globl instead of .global in x86 assembler code for
better portability. Still needs fixing the commenting.
src/liblzma/check/crc32_x86.s | 2 +-
src/liblzma/check/crc64_x86.s | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Fixed a few short options that take an argument.
short_opts[] was missing colons to indicate
required argument. Thanks to Fabio Pedretti for
the bug report.
src/lzma/args.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Removed uncompressed size tracking from Delta encoder too.
src/liblzma/common/delta_coder.c | 21 +++------------------
1 file changed, 3 insertions(+), 18 deletions(-)
Remove uncompressed size tracking from the filter encoders.
It's not strictly needed there, and just complicates the
code. LZ encoder never even had this feature.
The primary reason to have uncompressed size tracking in
filter encoders was validating that the application
doesn't give different amount of input that it had
promised. A side effect was to validate internal workings
of liblzma.
Uncompressed size tracking is still present in the Block
encoder. Maybe it should be added to LZMA_Alone and raw
encoders too. It's simpler to have one coder just to
validate the uncompressed size instead of having it
in every filter.
src/liblzma/common/copy_coder.c | 25 ++--------------------
src/liblzma/simple/simple_coder.c | 29 ++++---------------------
src/liblzma/subblock/subblock_encoder.c | 38 ++++++---------------------------
3 files changed, 12 insertions(+), 80 deletions(-)
Get rid of no-NLS gnulib. I don't know how to get it
working with Automake. People who want smaller lzmadec
should use --disable-nls on non-GNU systems.
lib/Makefile.am | 10 +---------
src/lzma/Makefile.am | 2 +-
src/lzmadec/Makefile.am | 4 +++-
3 files changed, 5 insertions(+), 11 deletions(-)
Fixed a typo in tests/Makefile.am which prevented
building the tests if gnulib was needed.
tests/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fixed wrong type of flags_size in Subblock encoder.
src/liblzma/subblock/subblock_encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Bumped version number to 4.42.3alpha.
configure.ac | 2 +-
src/liblzma/api/lzma/version.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Disabled some unneeded warnings and made "make dist" work.
Makefile.am | 9 +++------
configure.ac | 9 ++++++---
po/fi.po | 47 ++++++++++++++++++++++++-----------------------
3 files changed, 33 insertions(+), 32 deletions(-)
Added LZMA_SYNC_FLUSH support to the Copy filter.
src/liblzma/common/copy_coder.c | 92 +++++++++++++++++++++++++----------------
1 file changed, 57 insertions(+), 35 deletions(-)
Added missing LZMA_API to the C versions of the CRC functions.
The x86 assembler versions were already OK.
src/liblzma/check/crc32.c | 2 +-
src/liblzma/check/crc64.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
* tests/test_block_header.c (test3): Remove duplicate initializer.
autogen.sh | 2 +-
tests/test_block_header.c | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
Take advantage of return_if_error() macro in more places.
Cleaned Subblock filter's initialization code too.
src/liblzma/common/block_decoder.c | 22 +++-------
src/liblzma/common/delta_coder.c | 8 +---
src/liblzma/common/stream_decoder.c | 17 +++-----
src/liblzma/common/stream_encoder_multi.c | 68 ++++++++++--------------------
src/liblzma/common/stream_encoder_single.c | 8 ++--
src/liblzma/subblock/subblock_decoder.c | 33 +++++----------
src/liblzma/subblock/subblock_encoder.c | 45 ++++++--------------
7 files changed, 63 insertions(+), 138 deletions(-)
Added a bunch of .lzma test files.
tests/files/bad-single-data_after_eopm.lzma | Bin 0 -> 55 bytes
tests/files/bad-single-data_after_eopm_2.lzma | Bin 0 -> 56 bytes
tests/files/bad-single-subblock_subblock.lzma | Bin 0 -> 26 bytes
tests/files/good-cat-single-none-pad.lzma | Bin 0 -> 64 bytes
tests/files/good-single-delta-lzma.tiff.lzma | Bin 0 -> 51409 bytes
tests/files/good-single-lzma.lzma | Bin 0 -> 44 bytes
tests/files/good-single-none-pad.lzma | Bin 0 -> 32 bytes
tests/files/good-single-none.lzma | Bin 0 -> 30 bytes
tests/files/good-single-subblock-lzma.lzma | Bin 0 -> 50 bytes
tests/files/good-single-subblock_rle.lzma | Bin 0 -> 118 bytes
tests/files/malicious-multi-metadata-64PiB.lzma | Bin 0 -> 51 bytes
tests/files/malicious-single-subblock-256MiB.lzma | Bin 0 -> 30 bytes
tests/files/malicious-single-subblock-64PiB.lzma | Bin 0 -> 45 bytes
tests/files/malicious-single-subblock-loop.lzma | Bin 0 -> 43 bytes
tests/files/malicious-single-subblock-lzma.lzma | Bin 0 -> 505 bytes
tests/files/malicious-single-subblock1023-slow.lzma | Bin 0 -> 7886 bytes
tests/files/malicious-single-subblock31-slow.lzma | Bin 0 -> 1233 bytes
17 files changed, 0 insertions(+), 0 deletions(-)
Re-enabled the security checks in Subblock decoder
that were disabled for debugging reasons.
src/liblzma/subblock/subblock_decoder.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Fixed the tests to build with -Werror.
tests/test_block_header.c | 2 +-
tests/test_check.c | 2 +-
tests/test_filter_flags.c | 2 +-
tests/test_index.c | 14 +++++++-------
tests/test_info.c | 2 +-
tests/test_stream_flags.c | 2 +-
6 files changed, 12 insertions(+), 12 deletions(-)
Imported to git.
AUTHORS | 18 +
COPYING | 24 +
COPYING.GPLv2 | 339 +++++
COPYING.GPLv3 | 674 +++++++++
COPYING.LGPLv2.1 | 504 +++++++
ChangeLog | 2 +
Doxyfile.in | 1229 ++++++++++++++++
Makefile.am | 38 +
NEWS | 0
README | 151 ++
THANKS | 23 +
TODO | 109 ++
autogen.sh | 38 +
configure.ac | 611 ++++++++
doc/bugs.txt | 46 +
doc/faq.txt | 247 ++++
doc/file-format.txt | 1861 ++++++++++++++++++++++++
doc/history.txt | 140 ++
doc/liblzma-advanced.txt | 324 +++++
doc/liblzma-hacking.txt | 112 ++
doc/liblzma-intro.txt | 188 +++
doc/liblzma-security.txt | 219 +++
doc/lzma-intro.txt | 107 ++
extra/scanlzma/scanlzma.c | 85 ++
lib/Makefile.am | 40 +
lib/getopt.c | 1191 +++++++++++++++
lib/getopt1.c | 171 +++
lib/getopt_.h | 226 +++
lib/getopt_int.h | 131 ++
lib/gettext.h | 240 +++
m4/acx_pthread.m4 | 279 ++++
m4/getopt.m4 | 83 ++
po/LINGUAS | 1 +
po/Makevars | 46 +
po/POTFILES.in | 13 +
po/fi.po | 445 ++++++
src/Makefile.am | 16 +
src/common/open_stdxxx.h | 50 +
src/common/physmem.h | 77 +
src/common/sysdefs.h | 100 ++
src/liblzma/Makefile.am | 47 +
src/liblzma/api/Makefile.am | 39 +
src/liblzma/api/lzma.h | 122 ++
src/liblzma/api/lzma/alignment.h | 60 +
src/liblzma/api/lzma/alone.h | 82 ++
src/liblzma/api/lzma/auto.h | 41 +
src/liblzma/api/lzma/base.h | 410 ++++++
src/liblzma/api/lzma/block.h | 409 ++++++
src/liblzma/api/lzma/check.h | 128 ++
src/liblzma/api/lzma/copy.h | 29 +
src/liblzma/api/lzma/delta.h | 49 +
src/liblzma/api/lzma/extra.h | 114 ++
src/liblzma/api/lzma/filter.h | 166 +++
src/liblzma/api/lzma/index.h | 84 ++
src/liblzma/api/lzma/info.h | 315 ++++
src/liblzma/api/lzma/init.h | 85 ++
src/liblzma/api/lzma/lzma.h | 312 ++++
src/liblzma/api/lzma/memlimit.h | 157 ++
src/liblzma/api/lzma/metadata.h | 100 ++
src/liblzma/api/lzma/raw.h | 72 +
src/liblzma/api/lzma/simple.h | 85 ++
src/liblzma/api/lzma/stream.h | 178 +++
src/liblzma/api/lzma/stream_flags.h | 142 ++
src/liblzma/api/lzma/subblock.h | 197 +++
src/liblzma/api/lzma/version.h | 59 +
src/liblzma/api/lzma/vli.h | 244 ++++
src/liblzma/check/Makefile.am | 64 +
src/liblzma/check/check.c | 160 ++
src/liblzma/check/check.h | 102 ++
src/liblzma/check/check_byteswap.h | 43 +
src/liblzma/check/check_init.c | 37 +
src/liblzma/check/crc32.c | 88 ++
src/liblzma/check/crc32_init.c | 58 +
src/liblzma/check/crc32_table.c | 22 +
src/liblzma/check/crc32_table_be.h | 527 +++++++
src/liblzma/check/crc32_table_le.h | 527 +++++++
src/liblzma/check/crc32_tablegen.c | 55 +
src/liblzma/check/crc32_x86.s | 217 +++
src/liblzma/check/crc64.c | 75 +
src/liblzma/check/crc64_init.c | 58 +
src/liblzma/check/crc64_table.c | 22 +
src/liblzma/check/crc64_table_be.h | 523 +++++++
src/liblzma/check/crc64_table_le.h | 523 +++++++
src/liblzma/check/crc64_tablegen.c | 56 +
src/liblzma/check/crc64_x86.s | 203 +++
src/liblzma/check/crc_macros.h | 33 +
src/liblzma/check/sha256.c | 203 +++
src/liblzma/common/Makefile.am | 94 ++
src/liblzma/common/alignment.c | 118 ++
src/liblzma/common/allocator.c | 57 +
src/liblzma/common/alone_decoder.c | 197 +++
src/liblzma/common/alone_decoder.h | 24 +
src/liblzma/common/alone_encoder.c | 167 +++
src/liblzma/common/auto_decoder.c | 113 ++
src/liblzma/common/block_decoder.c | 405 ++++++
src/liblzma/common/block_decoder.h | 29 +
src/liblzma/common/block_encoder.c | 375 +++++
src/liblzma/common/block_encoder.h | 29 +
src/liblzma/common/block_header_decoder.c | 373 +++++
src/liblzma/common/block_header_encoder.c | 211 +++
src/liblzma/common/block_private.h | 46 +
src/liblzma/common/chunk_size.c | 74 +
src/liblzma/common/code.c | 203 +++
src/liblzma/common/common.h | 271 ++++
src/liblzma/common/copy_coder.c | 143 ++
src/liblzma/common/copy_coder.h | 31 +
src/liblzma/common/delta_coder.c | 210 +++
src/liblzma/common/delta_coder.h | 31 +
src/liblzma/common/extra.c | 33 +
src/liblzma/common/features.c | 70 +
src/liblzma/common/filter_flags_decoder.c | 382 +++++
src/liblzma/common/filter_flags_encoder.c | 359 +++++
src/liblzma/common/index.c | 140 ++
src/liblzma/common/info.c | 823 +++++++++++
src/liblzma/common/init.c | 39 +
src/liblzma/common/init_decoder.c | 33 +
src/liblzma/common/init_encoder.c | 44 +
src/liblzma/common/memory_limitter.c | 200 +++
src/liblzma/common/memory_usage.c | 113 ++
src/liblzma/common/metadata_decoder.c | 555 +++++++
src/liblzma/common/metadata_decoder.h | 31 +
src/liblzma/common/metadata_encoder.c | 436 ++++++
src/liblzma/common/metadata_encoder.h | 30 +
src/liblzma/common/next_coder.c | 65 +
src/liblzma/common/raw_common.c | 175 +++
src/liblzma/common/raw_common.h | 31 +
src/liblzma/common/raw_decoder.c | 127 ++
src/liblzma/common/raw_decoder.h | 30 +
src/liblzma/common/raw_encoder.c | 124 ++
src/liblzma/common/raw_encoder.h | 30 +
src/liblzma/common/stream_common.c | 23 +
src/liblzma/common/stream_common.h | 28 +
src/liblzma/common/stream_decoder.c | 454 ++++++
src/liblzma/common/stream_encoder_multi.c | 460 ++++++
src/liblzma/common/stream_encoder_single.c | 220 +++
src/liblzma/common/stream_flags_decoder.c | 258 ++++
src/liblzma/common/stream_flags_decoder.h | 31 +
src/liblzma/common/stream_flags_encoder.c | 75 +
src/liblzma/common/sysdefs.h | 1 +
src/liblzma/common/version.c | 25 +
src/liblzma/common/vli_decoder.c | 69 +
src/liblzma/common/vli_encoder.c | 81 ++
src/liblzma/common/vli_reverse_decoder.c | 55 +
src/liblzma/lz/Makefile.am | 63 +
src/liblzma/lz/bt2.c | 27 +
src/liblzma/lz/bt2.h | 31 +
src/liblzma/lz/bt3.c | 29 +
src/liblzma/lz/bt3.h | 31 +
src/liblzma/lz/bt4.c | 30 +
src/liblzma/lz/bt4.h | 31 +
src/liblzma/lz/hc3.c | 30 +
src/liblzma/lz/hc3.h | 31 +
src/liblzma/lz/hc4.c | 31 +
src/liblzma/lz/hc4.h | 31 +
src/liblzma/lz/lz_decoder.c | 462 ++++++
src/liblzma/lz/lz_decoder.h | 214 +++
src/liblzma/lz/lz_encoder.c | 481 ++++++
src/liblzma/lz/lz_encoder.h | 161 ++
src/liblzma/lz/lz_encoder_private.h | 40 +
src/liblzma/lz/match_c.h | 401 +++++
src/liblzma/lz/match_h.h | 69 +
src/liblzma/lzma.pc.in | 11 +
src/liblzma/lzma/Makefile.am | 43 +
src/liblzma/lzma/lzma_common.h | 128 ++
src/liblzma/lzma/lzma_decoder.c | 844 +++++++++++
src/liblzma/lzma/lzma_decoder.h | 41 +
src/liblzma/lzma/lzma_encoder.c | 413 ++++++
src/liblzma/lzma/lzma_encoder.h | 35 +
src/liblzma/lzma/lzma_encoder_features.c | 59 +
src/liblzma/lzma/lzma_encoder_getoptimum.c | 893 ++++++++++++
src/liblzma/lzma/lzma_encoder_getoptimumfast.c | 201 +++
src/liblzma/lzma/lzma_encoder_init.c | 245 ++++
src/liblzma/lzma/lzma_encoder_presets.c | 34 +
src/liblzma/lzma/lzma_encoder_private.h | 225 +++
src/liblzma/lzma/lzma_literal.c | 74 +
src/liblzma/lzma/lzma_literal.h | 74 +
src/liblzma/rangecoder/Makefile.am | 28 +
src/liblzma/rangecoder/range_common.h | 68 +
src/liblzma/rangecoder/range_decoder.h | 189 +++
src/liblzma/rangecoder/range_encoder.c | 46 +
src/liblzma/rangecoder/range_encoder.h | 317 ++++
src/liblzma/simple/Makefile.am | 46 +
src/liblzma/simple/arm.c | 76 +
src/liblzma/simple/armthumb.c | 81 ++
src/liblzma/simple/ia64.c | 117 ++
src/liblzma/simple/powerpc.c | 80 +
src/liblzma/simple/simple_coder.c | 306 ++++
src/liblzma/simple/simple_coder.h | 68 +
src/liblzma/simple/simple_private.h | 86 ++
src/liblzma/simple/sparc.c | 88 ++
src/liblzma/simple/x86.c | 161 ++
src/liblzma/subblock/Makefile.am | 33 +
src/liblzma/subblock/subblock_decoder.c | 681 +++++++++
src/liblzma/subblock/subblock_decoder.h | 29 +
src/liblzma/subblock/subblock_decoder_helper.c | 80 +
src/liblzma/subblock/subblock_decoder_helper.h | 36 +
src/liblzma/subblock/subblock_encoder.c | 841 +++++++++++
src/liblzma/subblock/subblock_encoder.h | 28 +
src/lzma/Makefile.am | 63 +
src/lzma/alloc.c | 106 ++
src/lzma/alloc.h | 42 +
src/lzma/args.c | 566 +++++++
src/lzma/args.h | 64 +
src/lzma/error.c | 156 ++
src/lzma/error.h | 67 +
src/lzma/hardware.c | 99 ++
src/lzma/hardware.h | 31 +
src/lzma/help.c | 178 +++
src/lzma/help.h | 32 +
src/lzma/io.c | 664 +++++++++
src/lzma/io.h | 60 +
src/lzma/list.c | 477 ++++++
src/lzma/main.c | 254 ++++
src/lzma/options.c | 346 +++++
src/lzma/options.h | 46 +
src/lzma/private.h | 55 +
src/lzma/process.c | 458 ++++++
src/lzma/process.h | 30 +
src/lzma/suffix.c | 145 ++
src/lzma/suffix.h | 25 +
src/lzma/util.c | 182 +++
src/lzma/util.h | 32 +
src/lzmadec/Makefile.am | 27 +
src/lzmadec/lzmadec.c | 515 +++++++
src/scripts/Makefile.am | 24 +
src/scripts/lzdiff | 67 +
src/scripts/lzdiff.1 | 51 +
src/scripts/lzgrep | 123 ++
src/scripts/lzgrep.1 | 61 +
src/scripts/lzmore | 74 +
src/scripts/lzmore.1 | 55 +
tests/Makefile.am | 43 +
tests/test_block.c | 59 +
tests/test_block_header.c | 352 +++++
tests/test_check.c | 90 ++
tests/test_filter_flags.c | 326 +++++
tests/test_index.c | 43 +
tests/test_info.c | 717 +++++++++
tests/test_stream_flags.c | 191 +++
tests/tests.h | 148 ++
240 files changed, 42513 insertions(+)