debian/0000775000000000000000000000000012276706734007206 5ustar debian/xzdec.install0000664000000000000000000000012612276706601011703 0ustar usr/bin/xzdec usr/bin/lzmadec usr/share/man/man1/xzdec.1 usr/share/man/man1/lzmadec.1 debian/xzdec.docs0000664000000000000000000000006712276706601011171 0ustar README NEWS AUTHORS THANKS doc/history.txt doc/faq.txt debian/xz-utils.prerm0000664000000000000000000000032712276706601012047 0ustar #!/bin/sh set -e if test "$1" != upgrade || # downgrading to a pre-alternatives version dpkg --compare-versions "$2" lt-nl 5.1.1alpha+20120614-1 then update-alternatives --remove lzma /usr/bin/xz fi #DEBHELPER# debian/xz-utils.postinst0000664000000000000000000000072512276706601012607 0ustar #!/bin/sh set -e slave () { dir=$1 filename=$2 target=$3 echo "--slave $dir/$filename $filename $dir/$target" } update-alternatives --install /usr/bin/lzma lzma /usr/bin/xz 20 $( slave /usr/share/man/man1 lzma.1.gz xz.1.gz slave /usr/bin unlzma unxz slave /usr/share/man/man1 unlzma.1.gz unxz.1.gz for util in cat more less diff cmp grep egrep fgrep do slave /usr/bin lz$util xz$util slave /usr/share/man/man1 lz$util.1.gz xz$util.1.gz done ) #DEBHELPER# debian/xz-utils.install0000664000000000000000000000063612276706601012373 0ustar usr/bin/xz usr/bin/unxz usr/bin/xzcat usr/bin/xzmore usr/bin/xzless usr/bin/xzdiff usr/bin/xzcmp usr/bin/xz*grep usr/share/man/man1/xz.1 usr/share/man/man1/unxz.1 usr/share/man/man1/xzcat.1 usr/share/man/man1/xzmore.1 usr/share/man/man1/xzless.1 usr/share/man/man1/xzdiff.1 usr/share/man/man1/xzcmp.1 usr/share/man/man1/xz*grep.1 usr/bin/lzmainfo usr/share/man/man1/lzmainfo.1 usr/share/locale/*/LC_MESSAGES/xz.mo debian/xz-utils.docs0000664000000000000000000000007512276706601011652 0ustar README NEWS AUTHORS THANKS doc/history.txt doc/faq.txt extra debian/xz-utils.README.Debian0000664000000000000000000000604112276706601013037 0ustar XZ Utils for Debian =================== Contents: 1. History 2. Differences from standard XZ Utils 3. LZMA Utils compatibility 4. Configuration History ------- XZ Utils should have been called LZMA Utils 4.42, but it came too late. The old .lzma file format has some problems, worst of which is the lack of magic number, but it gets enough use to still need to be supported. See /usr/share/doc/xz-utils/history.txt.gz for the full story. Differences from standard XZ Utils ---------------------------------- XZ Utils 5.1.y has some experimental features which are disabled in Debian to allow interfaces to evolve. Debian liblzma is also modified to avoid breakage when the same process loads liblzma2 from Debian 6.0 (squeeze) and liblzma5. abi-threaded-encoder Disable threaded compression in liblzma and xz. abi-version-script liblzma: Do not pretend to satisfy dependencies on XZ_5.1.1alpha. abi-liblzma2-compat, configure-liblzma2-compat Do not check reserved fields past the historical end of the lzma_stream structure if liblzma.so.2 is loaded in the same process image. Likewise when linked statically. (See bug #649522.) man-date, man-xz-lvv-minver (from upstream) Document the "Minimum version required to decompress" field of "xz --robot -v -v --list" output. xz-lvv-empty-block-minver (from upstream) Fix the version number printed by "xz -lvv" for files with Blocks of zero uncompressed_size: the decoder bug preventing reading such files was fixed in xz 5.0.2, not 5.0.3. decoder-check-first-0x00 (from upstream) Check that the first byte of range encoded data is zero to catch broken files sooner. Changes in 5.1.2alpha not applied: Docs: Language fix to 01_compress_easy.c xz: Add incomplete support for --block-list INSTALL: Document --enable-symbol-versions configure: Add a comment about *-linux tuples for clarity TODO: Warn that threads and fork() do not mix well Bump the version number and update NEWS for 5.1.2alpha LZMA Utils compatibility ------------------------ To support old scripts and muscle memory, XZ Utils can emulate the legacy LZMA Utils interface. To use this feature, you can install some subset of the following list of symbolic links to your $PATH. lzma, unlzma, lzcat -> /usr/bin/xz lzgrep, lzegrep, lzfgrep -> /usr/bin/xzgrep lzless -> /usr/bin/xzless lzmore -> /usr/bin/xzmore lzdiff, lzcmp -> /usr/bin/xzdiff If you would like XZ Utils to provide these commands by default for all users, use "update-alternatives --config lzma". Configuration ------------- The memory usage of xz can vary from a few hundred kilobytes to several gigabytes depending on the compression settings. If you would like xz to automatically scale down its settings while compressing to decrease memory usage, you can declare so by adding an option like the following to your environment (e.g., in ~/.profile): XZ_DEFAULTS=--memlimit-compress=256MiB export XZ_DEFAULTS See the "Memory usage" section of the xz(1) manual page for details. -- Jonathan Nieder Mon, 10 Sep 2012 14:35:27 -0700 debian/xz-utils.NEWS0000664000000000000000000000252312276706601011476 0ustar xz-utils (4.999.9beta+20100212-2) unstable; urgency=low The tiny xzdec and lzmadec decompressors have been moved to the new xzdec package. One can use xzcat (which is an abbreviation for “xz --decompress --stdout”) to replace them where space is not a premium. -- Jonathan Nieder Tue, 23 Feb 2010 08:24:10 -0600 xz-utils (4.999.9beta+20100117-1) unstable; urgency=low From this version on, xz produces sparse files by default when decompressing. This saves disk space when reproducing files with long runs of zero bytes, such as file system images. Implementing this feature requires seeking forward beyond the end of a file so that the operating system knows where to put in a hole. If you use xz --decompress to write to end of a file that is appended to at the same time by another process, this could cause concurrent output from the other command to be overwritten. This is a rare and quite weird thing to do. If you really want to do it, note that xz’s buffering strategy is not part of its documented interface; to safely interleave concurrent output from xz and another command, a construction such as xz --decompress input.xz | dd ibs=1k obs=1k >> log would be needed to avoid unpredictable results. -- Jonathan Nieder Tue, 02 Feb 2010 15:51:37 -0600 debian/watch0000664000000000000000000000014112276706601010224 0ustar version=3 opts=dversionmangle=s/\+\d{8}$// \ http://tukaani.org/xz/xz-([\d.]*(?:beta)?)\.tar\.gz debian/symbols0000664000000000000000000000036412276706601010615 0ustar liblzma.so.5 liblzma5 #MINVER# * Build-Depends-Package: liblzma-dev (symver)XZ_5.0 5.1.1alpha+20110809 lzma_code@XZ_5.0 5.1.1alpha+20120614 lzma_raw_buffer_decode@XZ_5.0 5.1.1alpha+20120614 lzma_raw_buffer_encode@XZ_5.0 5.1.1alpha+20120614 debian/rules0000775000000000000000000001247212276706601010265 0ustar #!/usr/bin/make -f build clean install binary-arch binary-indep binary: +dh $@ --parallel $(opt_no_act) # Runs tests, too, if and only if nocheck is unset (see below). build-arch:: build-plain build-static build-small build-indep: debian/normal-build/Makefile cd debian/normal-build && doxygen Doxyfile autoreconf_sources := $(wildcard Makefile.am */Makefile.am */*/Makefile.am) autoreconf_sources += configure.ac autoreconf_products := $(wildcard Makefile.in */Makefile.in */*/Makefile.in) autoreconf_products += configure # and more, but these will do configure_input := $(autoreconf_products) configure_input += Doxyfile.in configure_input += src/liblzma/liblzma.pc.in configure_input += $(wildcard src/scripts/*.in) override_dh_auto_clean: rm -f debian/*-stamp dh_auto_clean --builddirectory debian/xzdec-build dh_auto_clean --builddirectory debian/normal-build dh_auto_clean --builddirectory debian/static-build sh debian/clean.sh override_dh_auto_install: dh_auto_install --builddirectory debian/xzdec-build dh_auto_install --builddirectory debian/normal-build dh_auto_install --builddirectory debian/static-build set -e; arch=$$(dpkg-architecture -qDEB_HOST_MULTIARCH); \ install -d debian/tmp/lib/$$arch; \ mv debian/tmp/usr/lib/$$arch/liblzma.so.* debian/tmp/lib/$$arch/; \ dso=$$(basename $$(readlink debian/tmp/usr/lib/$$arch/liblzma.so)); \ ln -s -f /lib/$$arch/$$dso debian/tmp/usr/lib/$$arch/liblzma.so override_dh_installchangelogs: dh_installchangelogs debian/changelog.upstream build-plain: debian/normal-build/Makefile dh_auto_build --builddirectory debian/normal-build build-static: debian/static-build/Makefile dh_auto_build --builddirectory debian/static-build build-small: debian/xzdec-build/Makefile dh_auto_build --builddirectory debian/xzdec-build debian/test-plain-stamp: | build-plain dh_auto_test --builddirectory debian/normal-build >$@ debian/test-static-stamp: | build-static dh_auto_test --builddirectory debian/static-build >$@ debian/test-xzdec-stamp: | build-small $(MAKE) -C debian/xzdec-build/tests create_compress_files $(MAKE) -C debian/xzdec-build/tests \ TESTS="test_check test_files.sh test_compress.sh" \ check-TESTS >$@ debian/normal-build/Makefile debian/normal-build/Doxyfile: $(configure_input) dh_auto_configure --builddirectory debian/normal-build -- \ --disable-threads --disable-static \ $(opt_optimize) $(opt_quiet) \ --disable-xzdec --disable-lzmadec debian/static-build/Makefile: $(configure_input) dh_auto_configure --builddirectory debian/static-build -- \ --disable-threads --disable-shared \ --enable-liblzma2-compat \ $(opt_optimize) $(opt_quiet) \ --disable-lzmainfo --disable-scripts \ --disable-xzdec --disable-lzmadec \ --disable-xz --disable-lzma-links debian/xzdec-build/Makefile: $(configure_input) dh_auto_configure --builddirectory debian/xzdec-build -- \ --disable-shared --disable-nls --disable-encoders \ --enable-small --disable-threads \ --disable-liblzma2-compat \ $(opt_optimize_small) $(opt_quiet) \ --disable-lzmainfo --disable-scripts \ --disable-xz --disable-lzma-links $(autoreconf_products): $(autoreconf_sources) autoreconf -is small_flags_env = small_flags_env += DEB_CFLAGS_MAINT_STRIP='-O2 -O3' small_flags_env += DEB_CFLAGS_MAINT_PREPEND=-Os flags_cmd = dpkg-buildflags --export=configure opt_optimize = $(shell $(flags_cmd)) opt_optimize_small = $(shell $(small_flags_env) $(flags_cmd)) opt_no_act = opt_quiet = # Unless noopt is set, use optimized CRC32 routine on the Hurd. ifeq (hurd,$(shell dpkg-architecture -qDEB_HOST_ARCH_OS)) cputype := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) ifeq (i386,$(cputype)) opt_optimize += --enable-assembler=x86 opt_optimize_small += --enable-assembler=x86 endif ifeq (amd64,$(cputype)) opt_optimize += --enable-assembler=x86_64 opt_optimize_small += --enable-assembler=x86_64 endif endif ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) opt_optimize += --disable-assembler opt_optimize_small += --disable-assembler endif ifneq (,$(findstring n,$(MAKEFLAGS))) opt_no_act = --no-act endif ifneq (,$(filter quiet,$(DEB_BUILD_OPTIONS))) opt_quiet = --quiet MAKEFLAGS += --quiet endif ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) build-arch:: debian/test-plain-stamp build-arch:: debian/test-static-stamp build-arch:: debian/test-xzdec-stamp endif # Build a tarball with the latest upstream version. # This is made complicated by the need to choose a nice version number. REPO = http://git.tukaani.org/xz.git BRANCH = master get-orig-source: mkdir debian-orig-source -set -e; cd debian-orig-source; \ : Fetch latest upstream version.; \ git init -q; \ git fetch -q --tags $(REPO); \ git fetch -q $(REPO) $(BRANCH); \ : Determine version number.; \ commit_name=$$(git describe FETCH_HEAD); \ release=$${commit_name%%-*}; \ date=$$(date --utc --date="$$( \ git log -1 --pretty=format:%cD "$$commit_name" \ )" "+%Y%m%d"); \ if test "$$commit_name" = "$$release"; \ then upstream_version=$${commit_name#v}; \ else upstream_version="$${release#v}+$${date}"; \ fi; \ : Generate tarball.; \ echo "packaging $$commit_name"; \ git archive --format=tar "$$commit_name" \ --prefix="xz-utils-$$upstream_version/" | \ gzip -n --rsyncable -9 \ > "../xz-utils_$$upstream_version.orig.tar.gz" rm -fr debian-orig-source debian/liblzma5.install0000664000000000000000000000002312276706601012301 0ustar lib/*/liblzma.so.* debian/liblzma5.docs0000664000000000000000000000002412276706601011564 0ustar AUTHORS THANKS NEWS debian/liblzma-doc.docs0000664000000000000000000000003612276706601012245 0ustar debian/normal-build/doc/html/ debian/liblzma-doc.doc-base0000664000000000000000000000064212276706601012775 0ustar Document: liblzma-doc Title: liblzma API Documentation Author: Lasse Collin Abstract: liblzma is a compression library supporting the .xz and .lzma formats, among others. This Doxygen-generated reference manual describes the data structures and functions making up its public interface. Section: Programming/C Format: HTML Index: /usr/share/doc/liblzma-doc/html/index.html Files: /usr/share/doc/liblzma-doc/html/* debian/liblzma-doc.README.Debian0000664000000000000000000000132212276706601013432 0ustar From the XZ Utils README (included in the xz-utils package): 1.3. Documentation for liblzma The liblzma API headers include short docs about each function and data type as Doxygen tags. These docs should be quite OK as a quick reference. I have planned to write a bunch of very well documented example programs, which (due to comments) should work as a tutorial to various features of liblzma. No such example programs have been written yet. For now, if you have never used liblzma, libbzip2, or zlib, I recommend learning *basics* of zlib API. Once you know that, it should be easier to learn liblzma. http://zlib.net/manual.html http://zlib.net/zlib_how.html debian/liblzma-dev.links0000664000000000000000000000030112276706601012441 0ustar usr/share/doc/liblzma5/AUTHORS usr/share/doc/liblzma-dev/AUTHORS usr/share/doc/liblzma5/THANKS usr/share/doc/liblzma-dev/THANKS usr/share/doc/liblzma5/NEWS.gz usr/share/doc/liblzma-dev/NEWS.gz debian/liblzma-dev.install0000664000000000000000000000013212276706601012771 0ustar usr/include/* usr/include/lzma/* usr/lib/*/lib*.a usr/lib/*/lib*.so usr/lib/*/pkgconfig/* debian/liblzma-dev.docs0000664000000000000000000000012312276706601012253 0ustar doc/xz-file-format.txt doc/lzma-file-format.txt doc/examples doc/examples_old TODO debian/liblzma-dev.README.Debian0000664000000000000000000000132212276706601013443 0ustar From the XZ Utils README (included in the xz-utils package): 1.3. Documentation for liblzma The liblzma API headers include short docs about each function and data type as Doxygen tags. These docs should be quite OK as a quick reference. I have planned to write a bunch of very well documented example programs, which (due to comments) should work as a tutorial to various features of liblzma. No such example programs have been written yet. For now, if you have never used liblzma, libbzip2, or zlib, I recommend learning *basics* of zlib API. Once you know that, it should be easier to learn liblzma. http://zlib.net/manual.html http://zlib.net/zlib_how.html debian/liblzma-dev.NEWS0000664000000000000000000000203212276706601012100 0ustar xz-utils (4.999.9beta+20100527-1) unstable; urgency=low Starting with this version, the declarations needed to use the Subblock filter are not present in the liblzma headers. liblzma never supported the Subblock filter, so compiled applications should not be affected by this change. The lzma_restrict macro has been removed from the liblzma headers. This only affects the declarations contained there; the semantics are still the same. -- Jonathan Nieder Thu, 27 May 2010 15:52:28 -0500 xz-utils (4.999.9beta+20100212-1) unstable; urgency=low Starting with this version, the lzma_block_header_decode() function is advertised to require its block->version parameter to be initialized. Future versions of liblzma may use an alternate version of the Block options if the application declares it supports it. Existing applications will continue to work for now because the only supported Block format version is zero. -- Jonathan Nieder Mon, 15 Feb 2010 23:59:21 -0600 debian/generated-po.list0000664000000000000000000000053012276706601012444 0ustar # autopoint Makefile.in.in Makevars.template Rules-quot boldquot.sed en@boldquot.header en@quot.header insert-header.sin quot.sed remove-potcdate.sin # configure Makefile.in Makefile POTFILES # intermediate files (make) stamp-poT xz.po xz.1po xz.2po *.new.po # make remove-potcdate.sed xz.mo stamp-po *.gmo # cached templates (make) xz.pot debian/generated-m4.list0000664000000000000000000000062312276706601012351 0ustar codeset.m4 gettext.m4 glibc2.m4 glibc21.m4 iconv.m4 intdiv0.m4 intl.m4 intldir.m4 intmax.m4 inttypes-pri.m4 inttypes_h.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 libtool.m4 lock.m4 longdouble.m4 longlong.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 lt~obsolete.m4 nls.m4 po.m4 printf-posix.m4 progtest.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 visibility.m4 wchar_t.m4 wint_t.m4 xsize.m4 debian/generated-build-aux.list0000664000000000000000000000012212276706601013715 0ustar compile config.guess config.rpath config.sub depcomp install-sh ltmain.sh missing debian/copyright0000664000000000000000000003571412276706601011144 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: XZ Utils Upstream-Contact: Lasse Collin http://tukaani.org/xz/lists.html Source: http://tukaani.org/xz http://git.tukaani.org/xz.git Comment: XZ Utils is developed and maintained upstream by Lasse Collin. Major portions are based on code by other authors; see AUTHORS for details. Most of the source has been put into the public domain, but some files have not (details below). . This file describes the source package. The binary packages contain some files derived from other works: for example, images in the API documentation come from Doxygen. License: Different licenses apply to different files in this package. Here is a rough summary of which licenses apply to which parts of this package (but check the individual files to be sure!): . - liblzma is in the public domain. . - xz, xzdec, and lzmadec command line tools are in the public domain unless GNU getopt_long had to be compiled and linked in from the lib directory. The getopt_long code is under GNU LGPLv2.1+. . - The scripts to grep, diff, and view compressed files have been adapted from gzip. These scripts and their documentation are under GNU GPLv2+. . - All the documentation in the doc directory and most of the XZ Utils specific documentation files in other directories are in the public domain. . - Translated messages are in the public domain. . - The build system contains public domain files, and files that are under GNU GPLv2+ or GNU GPLv3+. None of these files end up in the binaries being built. . - Test files and test code in the tests directory, and debugging utilities in the debug directory are in the public domain. . - The extra directory may contain public domain files, and files that are under various free software licenses. . You can do whatever you want with the files that have been put into the public domain. If you find public domain legally problematic, take the previous sentence as a license grant. If you still find the lack of copyright legally problematic, you have too many lawyers. . As usual, this software is provided "as is", without any warranty. . If you copy significant amounts of public domain code from XZ Utils into your project, acknowledging this somewhere in your software is polite (especially if it is proprietary, non-free software), but naturally it is not legally required. Here is an example of a good notice to put into "about box" or into documentation: . This software includes code from XZ Utils . . The following license texts are included in the following files: - COPYING.LGPLv2.1: GNU Lesser General Public License version 2.1 - COPYING.GPLv2: GNU General Public License version 2 - COPYING.GPLv3: GNU General Public License version 3 . Note that the toolchain (compiler, linker etc.) may add some code pieces that are copyrighted. Thus, it is possible that e.g. liblzma binary wouldn't actually be in the public domain in its entirety even though it contains no copyrighted code from the XZ Utils source package. . If you have questions, don't hesitate to ask the author(s) for more information. Files: * Copyright: 2006-2012, Lasse Collin 1999-2008, Igor Pavlov 2006, Ville Koskinen 1998, Steve Reid 2000, Wei Dai 2003, Kevin Springle 2009, Jonathan Nieder 2010, Anders F Björklund License: PD This file has been put in the public domain. You can do whatever you want with this file. Comment: From: Lasse Collin To: Jonathan Nieder Subject: Re: XZ utils for Debian Date: Sun, 19 Jul 2009 13:28:23 +0300 Message-Id: <200907191328.23816.lasse.collin@tukaani.org> . [...] . > AUTHORS, ChangeLog, COPYING, README, THANKS, TODO, > dos/README, windows/README . COPYING says that most docs are in the public domain. Maybe that's not clear enough, but on the other hand it looks a bit stupid to put copyright information in tiny and relatively small docs like README. . I don't dare to say that _all_ XZ Utils specific docs are in the public domain unless otherwise mentioned in the file. I'm including PDF files generated by groff + ps2pdf, and some day I might include Doxygen- generated HTML docs too. Those don't include any copyright notices, but it seems likely that groff + ps2pdf or at least Doxygen put some copyrighted content into the generated files. Files: INSTALL NEWS PACKAGERS windows/README-Windows.txt windows/INSTALL-Windows.txt Copyright: 2009-2010, Lasse Collin License: probably-PD See the note on AUTHORS, README, and so on above. Files: src/scripts/* lib/* extra/scanlzma/scanlzma.c Copyright: © 1993, Jean-loup Gailly © 1989-1994, 1996-1999, 2001-2007, Free Software Foundation, Inc. © 2006 Timo Lindfors 2005, Charles Levert 2005, 2009, Lasse Collin 2009, Andrew Dudman Other-Authors: Paul Eggert, Ulrich Drepper License: GPL-2+ Files: src/scripts/Makefile.am src/scripts/xzless.1 Copyright: 2009, Andrew Dudman 2009, Lasse Collin License: PD This file has been put in the public domain. You can do whatever you want with this file. Files: doc/examples/xz_pipe_comp.c doc/examples/xz_pipe_decomp.c Copyright: 2010, Daniel Mealha Cabrita License: PD Not copyrighted -- provided to the public domain. Files: lib/getopt.c lib/getopt1.c lib/getopt.in.h Copyright: © 1987-2007 Free Software Foundation, Inc. Other-Authors: Ulrich Drepper License: LGPL-2.1+ Files: m4/getopt.m4 m4/posix-shell.m4 Copyright: © 2002-2006, 2008 Free Software Foundation, Inc. © 2007-2008 Free Software Foundation, Inc. Other-Authors: Bruno Haible, Paul Eggert License: permissive-fsf Files: m4/acx_pthread.m4 Copyright: © 2008, Steven G. Johnson License: Autoconf Files: Doxyfile.in Copyright: © 1997-2007 by Dimitri van Heesch Origin: Doxygen 1.4.7 License: GPL-2 Files: src/liblzma/check/crc32_table_?e.h src/liblzma/check/crc64_table_?e.h src/liblzma/lzma/fastpos_table.c src/liblzma/rangecoder/price_table.c Copyright: none, automatically generated data Generated-With: src/liblzma/check/crc32_tablegen.c src/liblzma/check/crc64_tablegen.c src/liblzma/lzma/fastpos_tablegen.c src/liblzma/rangecoder/price_tablegen.c License: none No copyright to license. Files: .gitignore m4/.gitignore po/.gitignore po/LINGUAS po/POTFILES.in Copyright: none; these are just short lists. License: none No copyright to license. Files: tests/compress_prepared_bcj_* Copyright: 2008-2009, Lasse Collin Source-Code: tests/bcj_test.c License: PD This file has been put into the public domain. You can do whatever you want with this file. Comment: changelog.gz (commit 975d8fd) explains: . 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. Files: po/cs.po po/de.po po/fr.po Copyright: 2010, Marek Černocký 2010, Andre Noll 2011, Adrien Nader License: PD This file is put in the public domain. Files: po/it.po po/pl.po Copyright: 2009, 2010, Gruppo traduzione italiano di Ubuntu-it 2010, Lorenzo De Liso 2009, 2010, 2011, Milo Casagrande 2011, Jakub Bogusz License: PD This file is in the public domain Files: INSTALL.generic Copyright: © 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. License: permissive-nowarranty Files: dos/config.h Copyright: © 1992, 1993, 1994, 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc. 2007-2010, Lasse Collin Other-Authors: Roland McGrath, Akim Demaille, Paul Eggert, David Mackenzie, Bruno Haible, and many others. Origin: configure.ac from XZ Utils, visibility.m4 serial 1 (gettext-0.15), Autoconf 2.52g License: config-h configure.ac: . # Author: Lasse Collin # # This file has been put into the public domain. # You can do whatever you want with this file. . visibility.m4: . dnl Copyright (C) 2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. . dnl From Bruno Haible. . comments from Autoconf 2.52g: . # Copyright 1992, 1993, 1994, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. . [...] . # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. . On Debian systems, the complete text of the GNU General Public License version 2 can be found in ‘/usr/share/common-licenses/GPL-2’. dos/config.h was generated with autoheader, which tells Autoconf to output a script to generate a config.h file and then runs it. Files: po/Makevars Origin: gettext-runtime/po/Makevars (gettext-0.12) Copyright: © 2003 Free Software Foundation, Inc. Authors: Bruno Haible License: LGPL-2.1+ The gettext-runtime package is under the LGPL, see files intl/COPYING.LIB-2.0 and intl/COPYING.LIB-2.1. . On Debian systems, the complete text of intl/COPYING.LIB-2.0 from gettext-runtime 0.12 can be found in ‘/usr/share/common-licenses/LGPL-2’ and the text of intl/COPYING.LIB-2.1 can be found in ‘/usr/share/common-licenses/LGPL-2.1’. . po/Makevars consists mostly of helpful comments and does not contain a copyright and license notice. Files: COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 Copyright: © 1989, 1991, 1999, 2007 Free Software Foundation, Inc. License: noderivs Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Files: debian/* Copyright: 2009-2012, Jonathan Nieder License: PD-debian The Debian packaging files are in the public domain. You may freely use, modify, distribute, and relicense them. License: LGPL-2.1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian systems, the complete text of the GNU Lesser General Public License version 2.1 can be found in ‘/usr/share/common-licenses/LGPL-2.1’. License: GPL-2 Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. See the GNU General Public License for more details. . Documents produced by doxygen are derivative works derived from the input used in their production; they are not affected by this license. . On Debian systems, the complete text of the version of the GNU General Public License distributed with Doxygen can be found in ‘/usr/share/common-licenses/GPL-2’. License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian systems, the complete text of the GNU General Public License version 2 can be found in ‘/usr/share/common-licenses/GPL-2’. License: Autoconf This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . As a special exception, the respective Autoconf Macro's copyright owner gives unlimited permission to copy, distribute and modify the configure scripts that are the output of Autoconf when processing the Macro. You need not follow the terms of the GNU General Public License when using or distributing such scripts, even though portions of the text of the Macro appear in them. The GNU General Public License (GPL) does govern all other use of the material that constitutes the Autoconf Macro. . This special exception to the GPL applies to versions of the Autoconf Macro released by the Autoconf Archive. When you make and distribute a modified version of the Autoconf Macro, you may extend this special exception to the GPL to apply to your modified version as well. . On Debian systems, the complete text of the GNU General Public License version 3 can be found in ‘/usr/share/common-licenses/GPL-3’. License: permissive-fsf This file is free software; the Free Software Foundation gives unlimited permission to copy and/or distribute it, with or without modifications, as long as this notice is preserved. License: permissive-nowarranty Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. debian/control0000664000000000000000000001062212276706601010603 0ustar Source: xz-utils Section: utils Priority: required Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Jonathan Nieder Uploaders: Mohammed Adnène Trojette Build-Depends: debhelper (>= 8.9.0), dpkg-dev (>= 1.16.2), autoconf (>= 2.64~), automake, libtool (>= 2.2), gettext, autopoint | gettext (<< 0.18-1), autopoint | cvs Build-Depends-Indep: doxygen Build-Conflicts: automake1.4 Standards-Version: 3.9.3 Vcs-Browser: http://git.debian.org/?p=collab-maint/xz.git Vcs-Git: git://git.debian.org/collab-maint/xz.git Homepage: http://tukaani.org/xz/ Package: liblzma5 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same Description: XZ-format compression library XZ is the successor to the Lempel-Ziv/Markov-chain Algorithm compression format, which provides memory-hungry but powerful compression (often better than bzip2) and fast, easy decompression. . The native format of liblzma is XZ; it also supports raw (headerless) streams and the older LZMA format used by lzma. (For 7-Zip's related format, use the p7zip package instead.) Package: xz-utils Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Multi-Arch: foreign Conflicts: lzma (<< 9.22-1), xz-lzma Breaks: lzip (<< 1.8~rc2) Replaces: lzip (<< 1.8~rc2), xz-lzma Provides: lzma Description: XZ-format compression utilities XZ is the successor to the Lempel-Ziv/Markov-chain Algorithm compression format, which provides memory-hungry but powerful compression (often better than bzip2) and fast, easy decompression. . This package provides the command line tools for working with XZ compression, including xz, unxz, xzcat, xzgrep, and so on. They can also handle the older LZMA format, and if invoked via appropriate symlinks will emulate the behavior of the commands in the lzma package. . The XZ format is similar to the older LZMA format but includes some improvements for general use: . * 'file' magic for detecting XZ files; * crc64 data integrity check; * limited random-access reading support; * improved support for multithreading (not used in xz-utils); * support for flushing the encoder. Package: xzdec Priority: extra Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Multi-Arch: foreign Suggests: xz-utils Breaks: xz-lzma (<< 4.999.9beta+20091004-1) Replaces: xz-lzma (<< 4.999.9beta+20091004-1) Description: XZ-format compression utilities - tiny decompressors XZ is the successor to the Lempel-Ziv/Markov-chain Algorithm compression format, which provides memory-hungry but powerful compression (often better than bzip2) and fast, easy decompression. . This package provides the xzdec and lzmadec utilities, which write the decompressed version of a compressed file to standard output. The binaries are very small, so they can be easily stored on small media with some compressed files, and they are linked statically against liblzma so they can be used on machines without a compatible version of liblzma installed. However, they have: . * no compression support; * no support for writing to a file other than standard output; * no translated messages; * been optimized for size rather than speed. . For a full-featured xzcat command without these limitations, use the xz-utils package instead. Package: liblzma-dev Section: libdevel Priority: optional Multi-Arch: same Architecture: any Depends: liblzma5 (= ${binary:Version}), ${misc:Depends} Suggests: liblzma-doc Description: XZ-format compression library - development files XZ is the successor to the Lempel-Ziv/Markov-chain Algorithm compression format, which provides memory-hungry but powerful compression (often better than bzip2) and fast, easy decompression. . The native format of liblzma is XZ; it also supports raw (headerless) streams and the older LZMA format used by lzma. (For 7-Zip's related format, use the p7zip package instead.) This package provides the development library needed to build programs using liblzma. Package: liblzma-doc Section: doc Priority: optional Architecture: all Depends: ${misc:Depends} Suggests: liblzma-dev Description: XZ-format compression library - API documentation This package contains a reference manual for the liblzma data compression library, in Doxygen-generated HTML files. The purpose of each struct, macro, and function in the public interface is explained. debian/compat0000664000000000000000000000000212276706601010375 0ustar 9 debian/clean.sh0000664000000000000000000000212512276706601010615 0ustar #!/bin/sh # Remove files generated by autoreconf -fi. # For use by the clean target in debian/rules. set -e remove_files='#!/usr/bin/perl # Remove specified files from the current directory. # Each line must be a filename, a comment (starting with #), # a simple glob (of the form *.extension), or blank. # Filenames are restricted to a small character set. use strict; use warnings; my $fnchar = qr/[-_~.@[:alnum:]]/; my $empty = qr/^$/; my $comment = qr/^#/; my $simple = qr/^$fnchar+$/; my $glob = qr/^\*$fnchar+$/; while (my $line = <>) { chomp $line; next if $line =~ $empty; next if $line =~ $comment; if ($line =~ $simple) { unlink $line; next; } if ($line =~ $glob) { unlink glob($line); next; } die "cannot parse $line"; } ' dh_testdir rm -f debug/translation.bash tests/test_block.c ChangeLog rm -f ABOUT-NLS aclocal.m4 config.h.in configure (cd po && perl -e "$remove_files") < debian/generated-po.list (cd m4 && perl -e "$remove_files") < debian/generated-m4.list (cd build-aux && perl -e "$remove_files") < debian/generated-build-aux.list find . -name Makefile.in -delete debian/changelog.upstream.sh0000664000000000000000000000535412276706601013330 0ustar #!/bin/sh # Generate debian/changelog.upstream from debian/changelog and # the git revision log. Inspired by Gerrit Pape’s # debian/changelog.upstream.sh, from the git-core Debian package. set -e # If argument matches /^Version: /, output remaining text. # Result is true if and only if argument matches. version_line() { local line result line=$1 result=${line#Version: } if test "$result" = "$line" then return 1 else printf "%s\n" "$result" return 0 fi } # If argument matches /^\* New.*snapshot.*commit /, # output remaining text. # Result is true if and only if argument matches. commit_id_line() { local line result line=$1 result=${line#\* New*snapshot*commit } if test "$result" = "$line" then return 1 else printf "%s\n" "$result" return 0 fi } # Read standard input, scanning for a changelog entry of the # form “New snapshot, taken from upstream commit .” # Output is . # Fails and writes a message to standard error if no such entry is # found before the next Version: line with a different upstream # version (or EOF). # $1 is the upstream version sought. read_commit_id() { local upstream_version line version cid upstream_version=$1 while read line do if version=$(version_line "$line") && test "${version%-*}" != "$upstream_version" then break fi if cid=$(commit_id_line "$line") then printf "%s\n" "${cid%.}" return 0 fi done echo >&2 "No commit id for $upstream_version" return 1 } last=none last_cid=none # Add a list of all revisions up to $last to debian/changelog.upstream # and set last=$2. # $1 is a user-readable name for the commit $2 add_version() { local new new_cid limiter new=$1 new_cid=$2 if test "$last" = none then : > debian/changelog.upstream last=$new last_cid=$new_cid return 0 fi exec >> debian/changelog.upstream if test "$new" = none then echo "Version $last:" echo "Version $last:" | tr "[:print:]" - limiter= elif test "$new" = "$last" then return 0 else echo "Version $last; changes since $new:" echo "Version $last; changes since $new:" | tr "[:print:]" - limiter="$new_cid.." fi echo git rev-list --no-merges "$limiter$last_cid" | git diff-tree --date=iso --stat --format=medium --stdin test "$new" = none || echo last=$new last_cid=$new_cid } dpkg-parsechangelog --format rfc822 --all | { while read line do if version=$(version_line "$line") then # strip Debian revision upstream_version=${version%-*} if git rev-parse --verify -q "v$upstream_version" > /dev/null then # upstream release add_version "$upstream_version" "v$upstream_version" else # snapshot cid=$(read_commit_id "$upstream_version") || exit 1 add_version "$upstream_version" "$cid" fi fi done add_version none none } debian/changelog.upstream0000664000000000000000000154206412276706601012724 0ustar Version 5.1.1alpha+20120614; changes since 5.1.1alpha+20110809: --------------------------------------------------------------- commit f1675f765fe228cb5a5f904f853445a03e33cfe9 Author: Lasse Collin Date: 2012-06-14 20:15:30 +0300 Fix the top-level Makefile.am for the new example programs. Makefile.am | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) commit 3a0c5378abefaf86aa39a62a7c9682bdb21568a1 Author: Lasse Collin Date: 2012-06-14 10:52:33 +0300 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(+), 0 deletions(-) commit 1bd2c2c553e30c4a73cfb82abc6908efd6be6b8d Author: Lasse Collin Date: 2012-06-14 10:33:27 +0300 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/xz_pipe_comp.c | 127 ------------------------------------- doc/examples/xz_pipe_decomp.c | 123 ----------------------------------- doc/examples_old/xz_pipe_comp.c | 127 +++++++++++++++++++++++++++++++++++++ doc/examples_old/xz_pipe_decomp.c | 123 +++++++++++++++++++++++++++++++++++ 4 files changed, 250 insertions(+), 250 deletions(-) commit 905f0ab5b5ce544d4b68a2ed6077df0f3d021292 Author: Lasse Collin Date: 2012-06-14 10:33:01 +0300 Docs: Fix a bug in xz_pipe_decomp.c example program. doc/examples/xz_pipe_decomp.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) commit 4bd1a3bd5fdf4870b2f96dd0b8a21657c8a58ad8 Author: Lasse Collin Date: 2012-05-30 23:14:33 +0300 Translations: Update the French translation. Thanks to Adrien Nader. po/fr.po | 148 +++++++++++++++++++++++++++++++++----------------------------- 1 files changed, 79 insertions(+), 69 deletions(-) commit d2e836f2f3a87df6fe6bb0589b037db51205d910 Author: Lasse Collin Date: 2012-05-29 23:42:37 +0300 Translations: Update the German translation. The previous only included the new strings in v5.0. po/de.po | 229 ++++++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 133 insertions(+), 96 deletions(-) commit c9a16151577ba459afd6e3528df23bc0ddb95171 Author: Lasse Collin Date: 2012-05-29 22:26:27 +0300 Translations: Update the German translation. po/de.po | 169 +++++++++++++++++++++++++++++++++---------------------------- 1 files changed, 91 insertions(+), 78 deletions(-) commit 1530a74fd48f8493372edad137a24541efe24713 Author: Lasse Collin Date: 2012-05-29 22:14:21 +0300 Translations: Update Polish translation. po/pl.po | 283 ++++++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 165 insertions(+), 118 deletions(-) commit d8db706acb8316f9861abd432cfbe001dd6d0c5c Author: Lasse Collin Date: 2012-05-28 20:42:11 +0300 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(-) commit 3f94b6d87f1b8f1c421ba548f8ebb83dca9c8cda Author: Lasse Collin Date: 2012-05-28 15:38:32 +0300 Update THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 7769ea051d739a38a1640fd448cf5eb83cb119c6 Author: Lasse Collin Date: 2012-05-28 15:37:43 +0300 xz: Don't show a huge number in -vv when memory limit is disabled. src/xz/message.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) commit ec921105725e4d3ef0a683dd83eee6f24ab60ccd Author: Lasse Collin Date: 2012-05-27 22:30:17 +0300 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 files changed, 19 insertions(+), 0 deletions(-) commit 27d24eb0a9f6eed96d6a4594c2b0bf7a91d29f9a Author: Lasse Collin Date: 2012-05-27 21:53:20 +0300 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 files changed, 1 insertions(+), 1 deletions(-) commit ab25b82a91754d9388c89abddf806424671d9431 Author: Lasse Collin Date: 2012-05-24 18:33:54 +0300 Build: Upgrade m4/acx_pthread.m4 to the latest version. m4/ax_pthread.m4 | 98 ++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 62 insertions(+), 36 deletions(-) commit d05d6d65c41a4bc83f162fa3d67c5d84e8751634 Author: Lasse Collin Date: 2012-05-10 21:15:17 +0300 Update THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit e077391982f9f28dbfe542bba8800e7c5b916666 Author: Lasse Collin Date: 2012-05-10 21:14:16 +0300 Docs: Cleanup line wrapping a bit. README | 12 ++++++------ doc/history.txt | 49 +++++++++++++++++++++++++------------------------ 2 files changed, 31 insertions(+), 30 deletions(-) commit fc39849c350225c6a1cd7f6e6adff1020521eabc Author: Benno Schulenberg Date: 2012-03-13 22:04:04 +0100 Fix a few typos and add some missing articles in some documents. Also hyphenate several compound adjectives. Signed-off-by: Benno Schulenberg AUTHORS | 6 ++-- README | 42 +++++++++++++++++++------------------- doc/faq.txt | 24 +++++++++++----------- doc/history.txt | 58 +++++++++++++++++++++++++++--------------------------- 4 files changed, 65 insertions(+), 65 deletions(-) commit 29fa0566d5df199cb9acb2d17bf7eea61acc7fa1 Author: Lasse Collin Date: 2012-04-29 11:51:25 +0300 Windows: Update notes about static linking with MSVC. windows/README-Windows.txt | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) commit aac1b31ea4e66cf5a7a8c116bdaa15aa45e6c56e Author: Lasse Collin Date: 2012-04-19 15:25:26 +0300 liblzma: Remove outdated comments. src/liblzma/simple/simple_coder.c | 3 --- src/liblzma/simple/simple_private.h | 3 +-- 2 files changed, 1 insertions(+), 5 deletions(-) commit df14a46013bea70c0bd35be7821b0b9108f97de7 Author: Lasse Collin Date: 2012-04-19 14:17:52 +0300 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 files changed, 1 insertions(+), 1 deletions(-) commit 03ed742a3a4931bb5c821357832083b26f577b13 Author: Lasse Collin Date: 2012-04-19 14:02:25 +0300 liblzma: Fix Libs.private in liblzma.pc to include -lrt when needed. src/liblzma/liblzma.pc.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 8c5b13ad59df70f49429bfdfd6ac120b8f892fda Author: Lasse Collin Date: 2012-04-19 13:58:55 +0300 Docs: Update MINIX 3 information in INSTALL. INSTALL | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit c7376fc415a1566f38b2de4b516a17013d516a8b Author: Lasse Collin Date: 2012-02-22 14:23:13 +0200 Update THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit cff070aba6281ba743d29a62b8c0c66e5da4b2a6 Author: Lasse Collin Date: 2012-02-22 14:02:34 +0200 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 files changed, 2 insertions(+), 1 deletions(-) commit 41cafb2bf9beea915710ee68f05fe929cd17759c Author: Lasse Collin Date: 2012-02-22 12:08:43 +0200 Update THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 2dcea03712fa881930d69ec9eff70855c3d126d9 Author: Lasse Collin Date: 2012-02-22 12:00:16 +0200 Fix compiling with IBM XL C on AIX. INSTALL | 36 ++++++++++++++++++++++-------------- configure.ac | 6 +++++- 2 files changed, 27 insertions(+), 15 deletions(-) commit 7db6bdf4abcf524115be2cf5659ed540cef074c5 Author: Lasse Collin Date: 2012-01-10 17:13:03 +0200 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 files changed, 2 insertions(+), 1 deletions(-) commit 694952d545b6cf056547893ced69486eff9ece55 Author: Lasse Collin Date: 2011-12-19 21:21:29 +0200 Docs: Explain the stable releases better in README. README | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit 418fe668b3c53a9a20020b6cc652aaf25c734b29 Author: Lasse Collin Date: 2011-11-07 13:07:52 +0200 xz: Show minimum required XZ Utils version in xz -lvv. Man page wasn't updated yet. src/xz/list.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 57 insertions(+), 6 deletions(-) commit 7081d82c37326bac97184e338345fa1c327e3580 Author: Lasse Collin Date: 2011-11-04 17:57:16 +0200 xz: Fix a typo in a comment. Thanks to Bela Lubkin. src/xz/args.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 232fe7cd70ad258d6a37f17e860e0f1b1891eeb5 Author: Lasse Collin Date: 2011-11-03 17:08:02 +0200 Update THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 74d2bae4d3449c68453b0473dd3430ce91fd90c1 Author: Lasse Collin Date: 2011-11-03 17:07:22 +0200 xz: Fix xz on EBCDIC systems. Thanks to Chris Donawa. src/xz/coder.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 4ac4923f47cc0ef97dd9ca5cfcc44fc53eeab34a Author: Lasse Collin Date: 2011-10-23 17:09:10 +0300 Update THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit ab50ae3ef40c81e5bf613905ca3fd636548b75e7 Author: Lasse Collin Date: 2011-10-23 17:08:14 +0300 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 files changed, 4 insertions(+), 0 deletions(-) commit 6b620a0f0813d28c3c544b4ff8cb595b38a6e908 Author: Lasse Collin Date: 2011-10-23 17:05:55 +0300 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 files changed, 3 insertions(+), 1 deletions(-) commit bd52cf150ecd51e3ab63a9cc1a3cff6a77500178 Author: Lasse Collin Date: 2011-09-06 12:03:41 +0300 Build: Fix "make check" on Windows. tests/Makefile.am | 7 +++++-- windows/build.bash | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) Version 5.1.1alpha+20110809; changes since 5.0.0: ------------------------------------------------- commit 5c5b2256969ac473001b7d67615ed3bd0a54cc82 Author: Lasse Collin Date: 2011-08-09 21:19:13 +0300 Update THANKS. THANKS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 5b1e1f10741af9e4bbe4cfc3261fb7c7b04f7809 Author: Lasse Collin Date: 2011-08-09 21:16:44 +0300 Workaround unusual SIZE_MAX on SCO OpenServer. src/common/sysdefs.h | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) commit e9ed88126eee86e2511fa42681a5c7104820cf0a Author: Lasse Collin Date: 2011-08-06 20:37:28 +0300 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(-) commit 1c673e5681720491a74fc4b2992e075f47302c22 Author: Lasse Collin Date: 2011-07-31 11:01:47 +0300 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 deletions(-) commit 324cde7a864f4506c32ae7846d688c359a83fe65 Author: Lasse Collin Date: 2011-06-16 12:15:29 +0300 liblzma: Remove unneeded semicolon. src/liblzma/lz/lz_encoder_hash.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 492c86345551a51a29bf18e55fe55a5e86f169ce Author: Lasse Collin Date: 2011-05-28 19:24:56 +0300 Build: Make configure print if symbol versioning is enabled or not. configure.ac | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit fc4d4436969bd4d71b704d400a165875e596034a Author: Lasse Collin Date: 2011-05-28 16:43:26 +0300 Don't call close(-1) in tuklib_open_stdxxx() on error. Thanks to Jim Meyering. src/common/tuklib_open_stdxxx.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit bd35d903a04c4d388adb4065b0fa271302380895 Author: Lasse Collin Date: 2011-05-28 15:55:39 +0300 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(+), 0 deletions(-) commit afbb244362c9426a37ce4eb9d54aab768da3adad Author: Lasse Collin Date: 2011-05-28 09:46:46 +0300 Translations: Update the Italian translation. Thanks to Milo Casagrande. po/it.po | 365 +++++++++++++++++++++++++++++++++++++------------------------- 1 files changed, 216 insertions(+), 149 deletions(-) commit 79bef85e0543c0c3723281c3c817616c6cec343b Author: Lasse Collin Date: 2011-05-28 08:46:04 +0300 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(+), 0 deletions(-) commit c0297445064951807803457dca1611b3c47e7f0f Author: Lasse Collin Date: 2011-05-27 22:25:44 +0300 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 files changed, 6 insertions(+), 15 deletions(-) commit 8bd91918ac50731f00b1a2a48072980572eb2ff9 Author: Lasse Collin Date: 2011-05-27 22:09:49 +0300 liblzma: Handle allocation failures correctly in lzma_index_init(). Thanks to Jim Meyering. src/liblzma/common/index.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) commit fe00f95828ef5627721b57e054f7eb2d42a2c961 Author: Lasse Collin Date: 2011-05-24 00:23:46 +0300 Build: Fix checking for system-provided SHA-256. configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 21b45b9bab541f419712cbfd473ccc31802e0397 Author: Lasse Collin Date: 2011-05-23 18:30:30 +0300 Build: Set GZIP_ENV=-9n in top-level Makefile.am. Makefile.am | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 48053e8a4550233af46359024538bff90c870ab1 Author: Lasse Collin Date: 2011-05-22 16:42:11 +0300 Update NEWS for 5.0.3. NEWS | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) commit bba37df2c9e54ad773e15ff00a09d2d6989fb3b2 Author: Lasse Collin Date: 2011-05-21 16:28:44 +0300 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(+), 0 deletions(-) commit 4161d7634965a7a287bf208dcd79f6185f448fe8 Author: Lasse Collin Date: 2011-05-21 15:12:10 +0300 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 files changed, 5 insertions(+), 1 deletions(-) commit b94aa0c8380cdb18cddb33440d625474c16643cf Author: Lasse Collin Date: 2011-05-21 15:08:44 +0300 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(-) commit f004128678d43ea10b4a6401aa184cf83252d6ec Author: Lasse Collin Date: 2011-05-17 12:52:18 +0300 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 files changed, 2 insertions(+), 0 deletions(-) commit f779516f42ebd2db47a5b7d6143459bf7737cf2f Author: Lasse Collin Date: 2011-05-17 12:26:28 +0300 Update THANKS. THANKS | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 830ba587775bb562f6eaf05cad61bf669d1f8892 Author: Lasse Collin Date: 2011-05-17 12:21:33 +0300 Update INSTALL with a note about linker problem on OpenSolaris x86. INSTALL | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) commit ec7106309c8060e9c646dba20c4f15689a0bbb04 Author: Lasse Collin Date: 2011-05-17 12:01:37 +0300 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 files changed, 1 insertions(+), 1 deletions(-) commit 4c6e146df99696920f12410fb17754412797ef36 Author: Lasse Collin Date: 2011-05-17 11:54:38 +0300 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(-) commit 7a480e485938884ef3021b48c3b0b9f9699dc9b6 Author: Lasse Collin Date: 2011-05-01 12:24:23 +0300 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(+), 0 deletions(-) commit c29e6630c1450c630c4e7b783bdd76515db9004c Author: Lasse Collin Date: 2011-05-01 12:15:51 +0300 xz: Print the maximum number of worker threads in xz -vv. src/xz/coder.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 0b77c4a75158ccc416b07d6e81df8ee0abaea720 Author: Lasse Collin Date: 2011-04-19 10:44:48 +0300 Build: Warn if no supported method to detect the number of CPU cores. configure.ac | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) commit e4622df9ab4982f8faa53d85b17be66216175a58 Author: Lasse Collin Date: 2011-04-19 09:55:06 +0300 Update THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 9c1b05828a88eff54409760b92162c7cc2c7cff6 Author: Lasse Collin Date: 2011-04-19 09:20:44 +0300 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(-) commit 3de00cc75da7b0e7b65e84c62b5351e231f501e9 Author: Lasse Collin Date: 2011-04-18 19:35:49 +0300 Update THANKS. THANKS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit bd5002f5821e3d1b04f2f56989e4a19318e73633 Author: Martin Väth Date: 2011-04-15 04:54:49 -0400 xzgrep: fix typo in $0 parsing Reported-by: Diego Elio Pettenò Signed-off-by: Martin Väth Signed-off-by: Mike Frysinger src/scripts/xzgrep.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 6ef4eabc0acc49e1bb9dc68064706e19fa9fcf48 Author: Lasse Collin Date: 2011-04-12 12:48:31 +0300 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(-) commit 9a4377be0d21e597c66bad6c7452873aebfb3c1c Author: Lasse Collin Date: 2011-04-12 12:42:37 +0300 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(+), 0 deletions(-) commit 3e321a3acd50002cf6fdfd259e910f56d3389bc3 Author: Lasse Collin Date: 2011-04-12 11:59:49 +0300 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(-) commit d91a84b534b012d19474f2fda1fbcaef873e1ba4 Author: Lasse Collin Date: 2011-04-12 11:46:01 +0300 Update NEWS. NEWS | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 45 insertions(+), 2 deletions(-) commit 14e6ad8cfe0165c1a8beeb5b2a1536558b29b0a1 Author: Lasse Collin Date: 2011-04-12 11:45:40 +0300 Update TODO. TODO | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) commit 70e750f59793f9b5cd306a5adce9b8e427739e04 Author: Lasse Collin Date: 2011-04-12 11:08:55 +0300 xz: Update the man page about threading. src/xz/xz.1 | 34 ++++++++++++++++++++-------------- 1 files changed, 20 insertions(+), 14 deletions(-) commit 24e0406c0fb7494d2037dec033686faf1bf67068 Author: Lasse Collin Date: 2011-04-11 22:06:03 +0300 xz: Add support for threaded compression. src/xz/args.c | 3 +- src/xz/coder.c | 204 ++++++++++++++++++++++++++++++++++---------------------- 2 files changed, 126 insertions(+), 81 deletions(-) commit de678e0c924aa79a19293a8a6ed82e8cb6572a42 Author: Lasse Collin Date: 2011-04-11 22:03:30 +0300 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 deletions(-) commit 25fe729532cdf4b8fed56a4519b73cf31efaec50 Author: Lasse Collin Date: 2011-04-11 21:15:07 +0300 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(+), 0 deletions(-) commit 91afb785a1dee34862078d9bf844ef12b8cc3e35 Author: Lasse Collin Date: 2011-04-11 21:04:13 +0300 liblzma: Document lzma_easy_(enc|dec)oder_memusage() better too. src/liblzma/api/lzma/container.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) commit 4a9905302a9e4a1601ae09d650d3f08ce98ae9ee Author: Lasse Collin Date: 2011-04-11 20:59:07 +0300 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 files changed, 6 insertions(+), 2 deletions(-) commit 0badb0b1bd649163322783b0bd9e590b4bc7a93d Author: Lasse Collin Date: 2011-04-11 19:28:18 +0300 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 files changed, 2 insertions(+), 4 deletions(-) commit a7934c446a58e20268689899d2a39f50e571f251 Author: Lasse Collin Date: 2011-04-11 19:26:27 +0300 liblzma: API comment about lzma_allocator with threaded coding. src/liblzma/api/lzma/base.h | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) commit 5eefc0086d24a65e136352f8c1d19cefb0cbac7a Author: Lasse Collin Date: 2011-04-11 19:16:30 +0300 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(-) commit d1199274758049fc523d98c5b860ff814a799eec Author: Lasse Collin Date: 2011-04-11 13:59:50 +0300 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 files changed, 13 insertions(+), 7 deletions(-) commit 3b22fc2c87ec85fcdd385c163b68fc49c97aa848 Author: Lasse Collin Date: 2011-04-11 13:28:40 +0300 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(+), 0 deletions(-) commit 71b9380145dccf001f22e66a06b9d508905c25ce Author: Lasse Collin Date: 2011-04-11 13:21:28 +0300 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(-) commit ec7e3dbad704268825fc48f0bdd4577bc46b4f13 Author: Lasse Collin Date: 2011-04-11 09:57:30 +0300 xz: Move the description of --block-size in --long-help. src/xz/message.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit cd3086ff443bb282bdf556919c28b3e3cbed8169 Author: Lasse Collin Date: 2011-04-11 09:55:35 +0300 Docs: Document --single-stream and --block-size. src/xz/xz.1 | 38 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 36 insertions(+), 2 deletions(-) commit fb64a4924334e3c440865710990fe08090f2fed0 Author: Lasse Collin Date: 2011-04-11 09:27:57 +0300 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(-) commit a34730cf6af4d33a4057914e57227b6dfde6567e Author: Lasse Collin Date: 2011-04-11 08:31:42 +0300 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(-) commit 9f0a806aef7ea79718e3f1f2baf3564295229a27 Author: Lasse Collin Date: 2011-04-10 21:23:21 +0300 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(-) commit 352ac82db5d3f64585c07b39e4759388dec0e4d7 Author: Lasse Collin Date: 2011-04-10 20:37:36 +0300 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(-) commit 9e807fe3fe79618ac48f58207cf7082ea20a6928 Author: Lasse Collin Date: 2011-04-10 14:58:10 +0300 DOS: Update the docs and include notes about 8.3 filenames. dos/INSTALL.txt | 79 +++++++++++++++++++++++++++++++++++ dos/README | 88 --------------------------------------- dos/README.txt | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 202 insertions(+), 88 deletions(-) commit ebd54dbd6e481d31e80757f900ac8109ad1423c6 Author: Lasse Collin Date: 2011-04-10 13:09:42 +0300 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 files changed, 167 insertions(+), 9 deletions(-) commit cd4fe97852bcaeffe674ee51b4613709292a0972 Author: Lasse Collin Date: 2011-04-10 12:47:47 +0300 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 files changed, 33 insertions(+), 2 deletions(-) commit 607f9f98ae5ef6d49f4c21c806d462bf6b3d6796 Author: Lasse Collin Date: 2011-04-09 18:29:30 +0300 Update THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit fca396b37410d272b754843a5dc13847be443a3a Author: Lasse Collin Date: 2011-04-09 18:28:58 +0300 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 files changed, 3 insertions(+), 3 deletions(-) commit b03f6cd3ebadd675f2cc9d518cb26fa860269447 Author: Lasse Collin Date: 2011-04-09 15:24:59 +0300 xz: Avoid unneeded fstat() on DOS-like systems. src/xz/file_io.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) commit 335fe260a81f61ec99ff5940df733b4c50aedb7c Author: Lasse Collin Date: 2011-04-09 15:11:13 +0300 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(-) commit 9edd6ee895fbe71d245a173f48e511f154a99875 Author: Lasse Collin Date: 2011-04-08 17:53:05 +0300 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(-) commit 411013ea4506a6df24d35a060fcbd73a57b73eb3 Author: Lasse Collin Date: 2011-04-08 17:48:41 +0300 xz: Fix a typo in a comment. src/xz/coder.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b34c5ce4b22e8d7b81f9895d15054af41d17f805 Author: Lasse Collin Date: 2011-04-05 22:41:33 +0300 liblzma: Use TUKLIB_GNUC_REQ to check GCC version in sha256.c. src/liblzma/check/sha256.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit db33117cc85c17e0b897b5312bd5eb43aac41c03 Author: Lasse Collin Date: 2011-04-05 17:12:20 +0300 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 | 279 ---------------------------------------------------- m4/ax_pthread.m4 | 283 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 284 insertions(+), 280 deletions(-) commit 1039bfcfc098b69d56ecb39d198a092552eacf6d Author: Lasse Collin Date: 2011-04-05 15:27:26 +0300 xz: Use posix_fadvise() if it is available. configure.ac | 3 +++ src/xz/file_io.c | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) commit 1ef3cf44a8eb9512480af4482a5232ea08363b14 Author: Lasse Collin Date: 2011-04-05 15:13:29 +0300 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(+), 0 deletions(-) commit bd432015d33dcade611d297bc01eb0700088ef6c Author: Lasse Collin Date: 2011-04-02 14:49:56 +0300 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 files changed, 1 insertions(+), 1 deletions(-) commit 16889013214e7620d204b6e6c1bf9f3103a13655 Author: Lasse Collin Date: 2011-04-01 08:47:20 +0300 Updated NEWS for 5.0.2. NEWS | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) commit 85cdf7dd4e97b078e7b929e47f55a7f1da36010f Author: Lasse Collin Date: 2011-03-31 15:06:58 +0300 Update INSTALL with another note about IRIX. INSTALL | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit c3f4995586873d6a4fb7e451010a128571a9a370 Author: Lasse Collin Date: 2011-03-31 12:22:55 +0300 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(+), 0 deletions(-) commit 0d21f49a809dc2088da6cc0da7f948404df7ecfa Author: Lasse Collin Date: 2011-03-31 11:54:48 +0300 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 files changed, 4 insertions(+), 4 deletions(-) commit 40277998cb9bad564ce4827aff152e6e1c904dfa Author: Lasse Collin Date: 2011-03-24 01:42:49 +0200 Scripts: Better fix for xzgrep. Now it uses "grep -q". Thanks to Gregory Margo. src/scripts/xzgrep.in | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) commit 2118733045ad0ca183a3f181a0399baf876983a6 Author: Lasse Collin Date: 2011-03-24 01:22:18 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit c7210d9a3fca6f31a57208bfddfc9ab20a2e097a Author: Lasse Collin Date: 2011-03-24 01:21:32 +0200 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 files changed, 2 insertions(+), 2 deletions(-) commit 4eb83e32046a6d670862bc91c3d82530963b455e Author: Lasse Collin Date: 2011-03-19 13:08:22 +0200 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(-) commit 923b22483bd9356f3219b2b784d96f455f4dc499 Author: Lasse Collin Date: 2011-03-18 19:10:30 +0200 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(-) commit 57597d42ca1740ad506437be168d800a50f1a0ad Author: Lasse Collin Date: 2011-03-18 18:19:19 +0200 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(-) commit 96f94bc925d579a700147fa5d7793b64d69cfc18 Author: Lasse Collin Date: 2011-02-04 22:49:31 +0200 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 files changed, 20 insertions(+), 24 deletions(-) commit 8930c7ae3f82bdae15aa129f01de08be23d7e8d7 Author: Lasse Collin Date: 2011-02-04 11:29:47 +0200 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 files changed, 9 insertions(+), 0 deletions(-) commit 940d5852c6cf08abccc6befd9d1b5411c9076a58 Author: Lasse Collin Date: 2011-02-02 23:01:51 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 4ebe65f839613f27f127bab7b8c347d982330ee3 Author: Lasse Collin Date: 2011-02-02 23:00:33 +0200 Translations: Add Polish translation. Thanks to Jakub Bogusz. po/LINGUAS | 1 + po/pl.po | 825 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 826 insertions(+), 0 deletions(-) commit fc1d292dca1925dfd17174f443f91a696ecd5bf8 Author: Lasse Collin Date: 2011-02-02 22:24:00 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 5fbce0b8d96dc96775aa0215e3581addc830e23d Author: Lasse Collin Date: 2011-01-28 20:16:57 +0200 Update NEWS for 5.0.1. NEWS | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) commit 03ebd1bbb314f9f204940219a835c883bf442475 Author: Lasse Collin Date: 2011-01-26 12:19:08 +0200 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 files changed, 7 insertions(+), 8 deletions(-) commit 7bd0a5e7ccc354f7c2e95c8bc27569c820f6a136 Author: Lasse Collin Date: 2011-01-18 21:25:24 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit f71c4e16e913f660977526f0ef8d2acdf458d7c9 Author: Lasse Collin Date: 2011-01-18 21:23:50 +0200 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(-) commit 316cbe24465143edde8f6ffb7532834b7b2ea93f Author: Lasse Collin Date: 2010-12-13 16:36:33 +0200 Scripts: Fix gzip and bzip2 support in xzdiff. src/scripts/xzdiff.in | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit 9311774c493c19deab51ded919dcd2e9c4aa2829 Author: Lasse Collin Date: 2010-12-12 21:23:55 +0200 Build: Enable ASM on DJGPP by default. configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4a42aaee282fc73b482581684d65110506d5efdd Author: Lasse Collin Date: 2010-12-12 16:09:42 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit ce56f63c41ee210e6308090eb6d49221fdf67d6c Author: Lasse Collin Date: 2010-12-12 16:07:11 +0200 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 files changed, 9 insertions(+), 0 deletions(-) commit e6baedddcf54e7da049ebc49183565b99facd4c7 Author: Lasse Collin Date: 2010-12-12 14:50:04 +0200 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 files changed, 29 insertions(+), 4 deletions(-) commit b7afd3e22a8fac115b75c738d40d3eb1de7e286f Author: Lasse Collin Date: 2010-12-07 18:52:04 +0200 Translations: Fix Czech translation of "sparse file". Thanks to Petr Hubený and Marek Černocký. po/cs.po | 88 +++++++++++++++++++++++++++++++------------------------------- 1 files changed, 44 insertions(+), 44 deletions(-) commit 3e564704bc6f463cb2db11e3f3f0dbd71d85992e Author: Lasse Collin Date: 2010-11-15 14:28:26 +0200 liblzma: Document the return value of lzma_lzma_preset(). src/liblzma/api/lzma/lzma.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 2964d8d691ed92abdcf214888d79ad6d79774735 Author: Jonathan Nieder Date: 2010-11-12 15:22:13 -0600 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 files changed, 1 insertions(+), 1 deletions(-) commit b4d42f1a7120e2cefeb2f14425efe2ca6db85416 Author: Anders F Bjorklund Date: 2010-11-05 12:56:11 +0100 add build script for macosx universal macosx/build.sh | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 92 insertions(+), 0 deletions(-) commit 15ee6935abe4a2fc76639ee342ca2e69af3e0ad6 Author: Lasse Collin Date: 2010-11-04 18:31:40 +0200 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(-) commit 37c25658efd25b034266daf87cd381d20d1df776 Author: Lasse Collin Date: 2010-10-26 15:48:48 +0300 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 deletions(-) commit 974ebe63497bdf0d262e06474f0dd5a70b1dd000 Author: Lasse Collin Date: 2010-10-26 10:36:41 +0300 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(-) commit 7c427ec38d016c0070a42315d752857e33792fc4 Author: Lasse Collin Date: 2010-10-25 12:59:25 +0300 Bump version 5.1.0alpha. src/liblzma/api/lzma/version.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Version 5.0.0; changes since 4.999.9beta+20100927: -------------------------------------------------- commit e45929260cd902036efd40c5610a8d0a50d5712b Author: Lasse Collin Date: 2010-10-23 17:25:52 +0300 Build: Fix mydist rule when .git doesn't exist. Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 6e1326fcdf6b6209949be57cfe3ad4b781b65168 Author: Lasse Collin Date: 2010-10-23 14:15:35 +0300 Add NEWS for 5.0.0. NEWS | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 62 insertions(+), 0 deletions(-) commit b667a3ef6338a2c1db7b7706b1f6c99ea392221c Author: Lasse Collin Date: 2010-10-23 14:02:53 +0300 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(-) commit 8c947e9291691629714dafb4536c718b6cc24fbd Author: Lasse Collin Date: 2010-10-23 12:30:54 +0300 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 files changed, 14 insertions(+), 0 deletions(-) commit e61d85e082743ebd2dd0ff28fc0a82482ede0538 Author: Lasse Collin Date: 2010-10-23 12:26:33 +0300 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 files changed, 5 insertions(+), 0 deletions(-) commit 23e23f1dc029146714c9a98313ab3ea93d71a2fc Author: Lasse Collin Date: 2010-10-23 12:21:32 +0300 liblzma: Use 512 as INDEX_GROUP_SIZE. This lets compiler use shifting instead of 64-bit division. src/liblzma/common/index.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 613939fc82603b75b59eee840871a05bc8dd08e0 Author: Lasse Collin Date: 2010-10-23 12:20:11 +0300 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(-) commit 68b83f252df3d27480a9f6f03445d16f6506fef1 Author: Lasse Collin Date: 2010-10-21 23:16:11 +0300 xz: Make sure that message_strm() can never return NULL. src/xz/message.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) commit d09c5753e33ff96ee57edb6d1e98e34041203695 Author: Lasse Collin Date: 2010-10-21 23:06:31 +0300 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(-) commit 33c1c0e102eb529588503b8beea0903a45488fad Author: Lasse Collin Date: 2010-10-19 12:08:30 +0300 Update INSTALL.generic. INSTALL.generic | 99 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 81 insertions(+), 18 deletions(-) commit 0076e03641f201c4b77dddd5a6db5880be19a78c Author: Lasse Collin Date: 2010-10-19 11:44:37 +0300 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(-) commit ce34ec4f54ff8b753da236f371ad8dd23c8135c9 Author: Lasse Collin Date: 2010-10-19 10:21:08 +0300 Update docs. INSTALL | 192 +++++++++++++++++++++++++++++++++++++++++------------------- PACKAGERS | 104 +++++++++------------------------ TODO | 17 ++++-- dos/README | 2 +- 4 files changed, 172 insertions(+), 143 deletions(-) commit f0fa880d247e73264d2c04fe31fb3412318a0026 Author: Lasse Collin Date: 2010-10-12 15:13:30 +0300 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 files changed, 1 insertions(+), 1 deletions(-) commit ac462b1c47c451f5c62e428306314c4bdad8ae7f Author: Lasse Collin Date: 2010-10-11 21:26:19 +0300 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(-) commit d52b411716a614c202e89ba732492efb9916cd3f Author: Lasse Collin Date: 2010-10-10 17:58:58 +0300 xz: Use "%"PRIu32 instead of "%d" in a format string. src/xz/message.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ae74d1bdeb075c3beefe76e1136c5741804e7e91 Author: Lasse Collin Date: 2010-10-10 17:43:26 +0300 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 files changed, 1 insertions(+), 1 deletions(-) commit d492b80ddd6f9a13419de6d102df7374d8f448e8 Author: Lasse Collin Date: 2010-10-10 16:49:01 +0300 lzmainfo: Use "%"PRIu32 instead of "%u" for uint32_t. src/lzmainfo/lzmainfo.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 825e859a9054bd91202e5723c41a17e72f63040a Author: Lasse Collin Date: 2010-10-10 16:47:01 +0300 lzmainfo: Use fileno(stdin) instead of STDIN_FILENO. src/lzmainfo/lzmainfo.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit acbc4cdecbeec2a4dfaac04f185ece49b2ff17c8 Author: Lasse Collin Date: 2010-10-09 23:20:51 +0300 lzmainfo: Use setmode() on DOS-like systems. src/lzmainfo/lzmainfo.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) commit ef364d3abc5647111c5424ea0d83a567e184a23b Author: Lasse Collin Date: 2010-10-09 21:51:03 +0300 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 files changed, 7 insertions(+), 0 deletions(-) commit 5629c4be07b6c67e79842b2569da1cedc9c0d69a Author: Lasse Collin Date: 2010-10-09 19:28:49 +0300 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(-) commit f25a77e6b9bc48a243ddfbbd755b7960eec7e0ac Author: Lasse Collin Date: 2010-10-09 18:57:55 +0300 Windows: Put some license info into README-Windows.txt. windows/README-Windows.txt | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit e75100f549f85d231df25c07aa94d63e78e2d668 Author: Lasse Collin Date: 2010-10-09 18:57:04 +0300 Windows: Fix a diagnostics bug in build.bash. windows/build.bash | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit efeb998a2b1025df1c1d202cc7d21d866cd1c336 Author: Lasse Collin Date: 2010-10-09 13:02:15 +0300 lzmainfo: Add Windows resource file. src/lzmainfo/Makefile.am | 9 +++++++++ src/lzmainfo/lzmainfo_w32res.rc | 12 ++++++++++++ 2 files changed, 21 insertions(+), 0 deletions(-) commit 389d418445f1623593dfdbba55d52fbb6d1205f5 Author: Lasse Collin Date: 2010-10-09 12:57:25 +0300 Add missing public domain notice to lzmadec_w32res.rc. src/xzdec/lzmadec_w32res.rc | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit 6389c773a4912dd9f111256d74ba1605230a7957 Author: Lasse Collin Date: 2010-10-09 12:52:12 +0300 Windows: Update common_w32res.rc. src/common/common_w32res.rc | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) commit 71275457ca24c9b01721f5cfc3638cf094daf454 Author: Lasse Collin Date: 2010-10-09 12:27:08 +0300 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 . windows/build.bash | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) commit 3ac35719d8433af937af6491383d4a50e343099b Author: Lasse Collin Date: 2010-10-09 11:33:21 +0300 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 files changed, 12 insertions(+), 2 deletions(-) commit 7b5db576fd7a4a67813b8437a9ccd4dbc94bbaae Author: Lasse Collin Date: 2010-10-08 21:42:37 +0300 Windows: Fix build.bash again. 630a8beda34af0ac153c8051b1bf01230558e422 wasn't good. windows/build.bash | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit d3cd7abe85ec7c2f46cf198b15c00d5d119df3dd Author: Lasse Collin Date: 2010-10-08 16:53:20 +0300 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 files changed, 1 insertions(+), 1 deletions(-) commit 084c60d318f2dbaef4078d9b100b4a373d0c3a7f Author: Lasse Collin Date: 2010-10-08 15:59:25 +0300 configure.ac: Remove two unused defines. configure.ac | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit 11f51b6714357cb67ec7e56ed9575c199b5581fe Author: Lasse Collin Date: 2010-10-08 15:32:29 +0300 Make tests accommodate missing xz or xzdec. tests/test_compress.sh | 45 +++++++++++++++++++++++++++++---------------- tests/test_files.sh | 28 ++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 18 deletions(-) commit b1c7368f95e93ccdefdd0748e04398c26766f47f Author: Lasse Collin Date: 2010-10-08 15:25:45 +0300 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(-) commit 630a8beda34af0ac153c8051b1bf01230558e422 Author: Lasse Collin Date: 2010-10-07 00:44:53 +0300 Windows: Make build.bash work without --enable-dynamic=no. windows/build.bash | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit f9907503f882a745dce9d84c2968f6c175ba966a Author: Lasse Collin Date: 2010-10-05 14:13:16 +0300 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(-) commit fda4724d8114fccfa31c1839c15479f350c2fb4c Author: Lasse Collin Date: 2010-10-05 12:18:58 +0300 configure.ac: Silence a warning from Autoconf 2.68. configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 80b5675fa62c87426fe86f8fcd20feeabc4361b9 Author: Lasse Collin Date: 2010-10-04 19:43:01 +0300 A few more languages files to the xz man page. Thanks to Jonathan Nieder. src/xz/xz.1 | 45 ++++++++++++++++++++++++--------------------- 1 files changed, 24 insertions(+), 21 deletions(-) commit f9722dbeca4dc4c43cfd15d122dafaac50b0a0bb Author: Lasse Collin Date: 2010-10-02 12:07:33 +0300 Update the FAQ. doc/faq.txt | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 100 insertions(+), 4 deletions(-) commit 61ae593661e8dc402394e84d567ca2044a51572b Author: Lasse Collin Date: 2010-10-02 11:38:20 +0300 liblzma: Small fixes to comments in the API headers. src/liblzma/api/lzma/lzma.h | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) commit 9166682dc601fd42c1b9510572e3f917d18de504 Author: Lasse Collin Date: 2010-09-28 11:40:12 +0300 Create the PDF versions of the man pages better. Makefile.am | 14 +++++++----- build-aux/manconv.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 6 deletions(-) commit 17d3c61edd35de8fa884944fc70d1db86daa5dd8 Author: Lasse Collin Date: 2010-09-28 10:59:53 +0300 Move version.sh to build-aux. Makefile.am | 4 ++-- build-aux/version.sh | 24 ++++++++++++++++++++++++ configure.ac | 2 +- version.sh | 24 ------------------------ windows/build.bash | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-) commit 84af9d8770451339a692e9b70f96cf56156a6069 Author: Lasse Collin Date: 2010-09-28 10:53:02 +0300 Update .gitignore. .gitignore | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) commit 31575a449ac64c523da3bab8d0c0b522cdc7c780 Author: Lasse Collin Date: 2010-09-28 01:17:14 +0300 Fix accomodate -> accommodate on the xz man page. src/xz/xz.1 | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Version 4.999.9beta+20100927; changes since 4.999.9beta+20100903: ----------------------------------------------------------------- commit cec0ddc8ec4ce81685a51998b978e22167e461f9 Author: Lasse Collin Date: 2010-09-27 23:29:34 +0300 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(-) commit 075257ab0416a0603be930082e31a5703e4ba345 Author: Lasse Collin Date: 2010-09-26 18:10:31 +0300 Fix the preset -3e. depth=0 was missing. src/liblzma/lzma/lzma_encoder_presets.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 2577da9ebdba13fbe99ae5ee8bde35f7ed60f6d1 Author: Lasse Collin Date: 2010-09-23 14:03:10 +0300 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(-) commit a3c5997c57e5b1a20aae6d1071b584b4f17d0b23 Author: Lasse Collin Date: 2010-09-17 22:14:30 +0300 xz: Update the Czech translation. Thanks to Marek Černocký. po/cs.po | 202 ++++++++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 131 insertions(+), 71 deletions(-) commit a1766af582dc23fddd9da1eeb4b9d61e3eb4c2e6 Author: Lasse Collin Date: 2010-09-16 23:40:41 +0300 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(+), 0 deletions(-) commit 21088018554e2b0e02914205377ceb6e34a090bd Author: Lasse Collin Date: 2010-09-15 00:34:13 +0300 xz: Edit a translators comment. src/xz/list.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit be16e28ece1b492b8f93382b7fa1cc4da23c6ff6 Author: Lasse Collin Date: 2010-09-14 22:47:14 +0300 xz: Add German translation. Thanks to Andre Noll. THANKS | 1 + po/LINGUAS | 1 + po/de.po | 903 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 905 insertions(+), 0 deletions(-) commit e23ea74f3240e6b69683f9e69d1716e0f9e9092b Author: Lasse Collin Date: 2010-09-10 14:30:25 +0300 Updated README. README | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 8dad2fd69336985adb9f774fa96dc9c0efcb5a71 Author: Lasse Collin Date: 2010-09-10 14:30:07 +0300 Updated INSTALL. INSTALL | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit 0b5f07fe3728c27cce416ddc40f7e4803ae96ac2 Author: Lasse Collin Date: 2010-09-10 14:26:20 +0300 Updated the git repository address in ChangeLog. ChangeLog | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a8760203f93a69bc39fd14520a6e9e7b7d70be06 Author: Lasse Collin Date: 2010-09-10 14:09:33 +0300 xz: Add a comment to translators about "literal context bits". src/xz/message.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit bb0b1004f83cdc4d309e1471c2ecaf9f95ce60c5 Author: Lasse Collin Date: 2010-09-10 10:30:33 +0300 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(-) commit 639f8e2af33cf8a184d59ba56b6df7c098679d61 Author: Lasse Collin Date: 2010-09-08 08:49:22 +0300 Update the Czech translation. Thanks to Marek Černocký. po/cs.po | 655 +++++++++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 454 insertions(+), 201 deletions(-) commit 41bc9956ebfd7c86777d33676acf34c45e7ca7c7 Author: Lasse Collin Date: 2010-09-07 12:31:40 +0300 xz: Add a note to translators. src/xz/hardware.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 77a7746616e555fc08028e883a56d06bf0088b81 Author: Lasse Collin Date: 2010-09-07 10:42:13 +0300 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(-) commit e6ad39335842343e622ab51207d1d3cb9caad801 Author: Lasse Collin Date: 2010-09-06 19:43:12 +0300 Add missing files to POTFILES.in. po/POTFILES.in | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 58f55131820d2e08a1a6beb9ec0ee2378044eb30 Author: Lasse Collin Date: 2010-09-06 10:16:24 +0300 xz: Improve a comment. src/xz/file_io.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit bcb1b898341f7073f51660d7052d7ed6c5461a66 Author: Lasse Collin Date: 2010-09-05 21:34:29 +0300 xz: Update the comment about NetBSD in file_io.c. Thanks to Joerg Sonnenberger. src/xz/file_io.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit da014d55972f5addbf6b4360d3d8ed2ef4282170 Author: Lasse Collin Date: 2010-09-05 21:11:33 +0300 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(-) commit 8c7d3d1a0781c296c6b6e2465becaffd2132f7ee Author: Lasse Collin Date: 2010-09-05 12:16:17 +0300 xz: Hopefully ease translating the messages in list.c. src/xz/list.c | 33 +++++++++++++++++++++++---------- 1 files changed, 23 insertions(+), 10 deletions(-) commit ef840950ad99cf2955c754875af0e01acf125079 Author: Lasse Collin Date: 2010-09-04 23:14:44 +0300 xz: Fix grammar. src/xz/options.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit c46afd6edc04ea140db6c59e8486f5707c810c13 Author: Lasse Collin Date: 2010-09-04 23:12:20 +0300 xz: Use lzma_lzma_preset() to initialize the options structure. src/xz/options.c | 14 ++------------ 1 files changed, 2 insertions(+), 12 deletions(-) commit 8fd3ac046d0b1416a2094fecc456d9e0f4d5d065 Author: Lasse Collin Date: 2010-09-04 22:16:28 +0300 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 files changed, 0 insertions(+), 1 deletions(-) commit 474bac0c33e94aeaca8ada17ab19972b1424bc2b Author: Lasse Collin Date: 2010-09-04 22:10:32 +0300 xz: Minor improvements to --help and --long-help. src/xz/message.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) Version 4.999.9beta+20100903; changes since 4.999.9beta+20100810: ----------------------------------------------------------------- commit 373ee26f955617295c5c537b04a153a1969140d2 Author: Jonathan Nieder Date: 2010-09-03 16:49:15 -0500 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 tests/test_compress.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2fce9312f36727ea82f3430cc5d3a7d243c5f087 Author: Lasse Collin Date: 2010-09-03 15:54:40 +0300 xz: Make -vv show also decompressor memory usage. src/xz/coder.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit b4b1cbcb53624ab832f8b3189c74450dc7ea29b6 Author: Lasse Collin Date: 2010-09-03 15:13:12 +0300 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 files changed, 19 insertions(+), 10 deletions(-) commit 77fe5954cd3d10fb1837372684cbc133b56b6a87 Author: Lasse Collin Date: 2010-09-03 12:28:41 +0300 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 files changed, 4 insertions(+), 3 deletions(-) commit fce69059cf901ce8075a78c7607d591f144a3b5a Author: Lasse Collin Date: 2010-09-03 11:11:25 +0300 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 files changed, 5 insertions(+), 2 deletions(-) commit a848e47ced6e5e2a564b5c454b2f5a19c2f40298 Author: Lasse Collin Date: 2010-09-02 19:22:35 +0300 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 files changed, 9 insertions(+), 0 deletions(-) commit b3ff7ba044eaeab3e424d7b51fe914daf681b1a3 Author: Lasse Collin Date: 2010-09-02 19:09:57 +0300 xz: Always warn if adjusting dictionary size due to memlimit. src/xz/coder.c | 28 +++++++++------------------- 1 files changed, 9 insertions(+), 19 deletions(-) Version 4.999.9beta+20100810; changes since 4.999.9beta+20100713: ----------------------------------------------------------------- commit d5653ba8a1ea9c00de4fddc617aba3c51e18139d Author: Lasse Collin Date: 2010-08-10 11:04:30 +0300 Fix test_compress.sh. It broke when --memory option was removed from xzdec. Thanks to Jonathan Nieder. tests/test_compress.sh | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 792331bdee706aa852a78b171040ebf814c6f3ae Author: Lasse Collin Date: 2010-08-07 20:45:18 +0300 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(-) commit 4a45dd4c39f75d25c7a37b6400cb24d4010ca801 Author: Lasse Collin Date: 2010-08-06 20:22:16 +0300 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(-) commit 01aa4869cb220b7fdad6d1acbabb2233045daa8f Author: Lasse Collin Date: 2010-07-28 11:44:55 +0300 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(-) commit ce1f0deafe8504e1492bf1b1efb3e3ec950b1a2b Author: Lasse Collin Date: 2010-07-27 20:47:12 +0300 Windows: Add a note about building a Git repository snapshot windows/INSTALL-Windows.txt | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) commit 507a4a4dea1e5462f12f7ed4b076c34e02054a38 Author: Lasse Collin Date: 2010-07-27 20:45:03 +0300 Windows: build.sh is a bash script so name it correctly. INSTALL | 2 +- windows/INSTALL-Windows.txt | 6 +- windows/build.bash | 189 +++++++++++++++++++++++++++++++++++++++++++ windows/build.sh | 189 ------------------------------------------- 4 files changed, 193 insertions(+), 193 deletions(-) commit b1cbfd40f049a646a639eb78a3e41e9e3ef73339 Author: Lasse Collin Date: 2010-07-27 20:27:32 +0300 Windows: Don't strip liblzma.a too much. windows/build.sh | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Version 4.999.9beta+20100713; changes since 4.999.9beta+20100602: ----------------------------------------------------------------- commit a540198ffb25fad36380c5e92ac20c2d28eec46a Author: Lasse Collin Date: 2010-07-13 20:07:26 +0300 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit bab0f01ed931f606b4675aa9f9331a17cec09bad Author: Lasse Collin Date: 2010-07-13 19:55:50 +0300 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(+), 0 deletions(-) commit c15c42abb3c8c6e77c778ef06c97a4a10b8b5d00 Author: Lasse Collin Date: 2010-06-15 14:06:29 +0300 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(-) commit 2130926dd1c839280358172dfadd8d3054bde2b4 Author: Lasse Collin Date: 2010-06-11 21:51:32 +0300 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit bc612d0e0c9e4504c59d49168e87a7ae3e458443 Author: Lasse Collin Date: 2010-06-11 21:48:32 +0300 Clarify the description of the default memlimit in the man page. Thanks to Denis Excoffier. src/xz/xz.1 | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit e1b6935d60a00405e6b5b455a3426d2248cc926c Author: Lasse Collin Date: 2010-06-11 21:43:28 +0300 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(-) commit 3e49c8acb0f5312948eddb2342dbb5802d4571d0 Author: Lasse Collin Date: 2010-06-11 10:40:28 +0300 Put the git commit to the filename in mydist rule. Makefile.am | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) Version 4.999.9beta+20100602; changes since 4.999.9beta+20100527: ----------------------------------------------------------------- commit d8b41eedce486d400f701b757b7b5e4e32276618 Author: Lasse Collin Date: 2010-06-02 23:13:55 +0300 Fix compiling with -Werror. src/xz/message.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit b5fbab6123a39c9a55cd5d7af410e9aae067d5f8 Author: Lasse Collin Date: 2010-06-02 23:09:22 +0300 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 files changed, 5 insertions(+), 1 deletions(-) commit 29a7b250e685852f2f97615493ec49acaf528623 Author: Lasse Collin Date: 2010-06-02 21:32:12 +0300 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(-) commit e89d987056cee7d4e279be3ef3a6cc690bfc0e6d Author: Lasse Collin Date: 2010-06-02 17:46:58 +0300 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 files changed, 7 insertions(+), 7 deletions(-) commit e243145c84ab5c3be8259fd486ead0de5235b3f0 Author: Lasse Collin Date: 2010-06-01 16:02:30 +0300 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 files changed, 366 insertions(+), 19 deletions(-) commit ce6dc3c0a891f23a862f80ec08d3b6f0beb2a562 Author: Lasse Collin Date: 2010-06-01 15:51:44 +0300 Major update to xz --list. src/xz/list.c | 652 +++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 471 insertions(+), 181 deletions(-) commit 905e54804a899e4ad526d38fdba7e803ab9b71bd Author: Lasse Collin Date: 2010-06-01 14:13:03 +0300 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(-) commit 4b346ae8af20045027ae5efb068c6d69da3324d2 Author: Lasse Collin Date: 2010-06-01 14:09:12 +0300 Fix a comment. src/liblzma/api/lzma/index.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 07dc34f6da45c9ab757dad7fd5eef522ad27d296 Author: Lasse Collin Date: 2010-05-27 16:17:42 +0300 Fix lzma_block_compressed_size(). src/liblzma/common/block_util.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 44d70cb154225e47eebf15a3cfbdf3794cbb4593 Author: Lasse Collin Date: 2010-05-27 14:32:51 +0300 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(-) Version 4.999.9beta+20100527; changes since 4.999.9beta+20100307: ----------------------------------------------------------------- commit a334348dc02803241cf4e0a539eecdc0e7ad2cc7 Author: Lasse Collin Date: 2010-05-27 13:42:44 +0300 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, 0 insertions(+), 32 deletions(-) commit 70e5e2f6a7084e6af909deee88ceac2f6efa7893 Author: Lasse Collin Date: 2010-05-27 13:35:36 +0300 Remove unused chunk_size.c. Thanks to Jonathan Nieder for the reminder. src/liblzma/common/chunk_size.c | 67 --------------------------------------- 1 files changed, 0 insertions(+), 67 deletions(-) commit 01a414eaf4be6352c06b48001b041b47e8202faa Author: Jonathan Nieder Date: 2010-05-27 02:31:33 -0500 Use my_min() instead of MIN() in src/xz/list.c This should have been done in 920a69a8d8e4203c5edddd829d932130eac188ea. src/xz/list.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 920a69a8d8e4203c5edddd829d932130eac188ea Author: Lasse Collin Date: 2010-05-26 10:36:46 +0300 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(-) commit 019ae27c24d0c694545a6a46f8b9fb552198b015 Author: Lasse Collin Date: 2010-05-26 10:30:20 +0300 Fix compilation of debug/known_sizes.c. debug/known_sizes.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 98a4856a6ea84f79c790057a6eb89a25bc45b074 Author: Lasse Collin Date: 2010-05-26 10:28:54 +0300 Remove references to Subblock filter in debug/sync_flush.c. debug/sync_flush.c | 13 ------------- 1 files changed, 0 insertions(+), 13 deletions(-) commit 703d2c33c095c41ae0693ee8c27c45e3847e4535 Author: Lasse Collin Date: 2010-05-26 10:16:57 +0300 Better #error message. src/common/sysdefs.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit d8a55c48b39703dd83f11089ad01e1ff2ac102e0 Author: Lasse Collin Date: 2010-05-26 09:55:47 +0300 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(-) commit b6377fc990f9b8651149cae0fecb8b9c5904e26d Author: Lasse Collin Date: 2010-05-16 18:42:22 +0300 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(-) commit d9986db782d6cf0f314342127280519339378fa0 Author: Lasse Collin Date: 2010-05-14 23:17:20 +0300 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(-) commit 0d3489efca0a723dca0394809fa3e6170843af4b Author: Lasse Collin Date: 2010-05-10 19:57:24 +0300 Updated INSTALL. INSTALL | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) commit 3fb3d594a2b53886adee161b6261e92277f05f7c Author: Lasse Collin Date: 2010-05-10 19:54:52 +0300 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 6548e304657e77d3a972053db3c41c5daf591113 Author: Lasse Collin Date: 2010-05-10 19:54:15 +0300 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(-) commit a290cfee3e23f046889c022aa96b4eca2016fdda Author: Lasse Collin Date: 2010-04-12 21:55:56 +0300 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 and Jonathan Nieder for suggestions how to fix it. THANKS | 1 + src/xz/message.c | 86 ++++++++++++++++++++++++------------------------------ 2 files changed, 39 insertions(+), 48 deletions(-) commit a1f7a986b8d708f9290da9799ca1b8d7082fad3e Author: Lasse Collin Date: 2010-03-31 16:47:25 +0300 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(+), 0 deletions(-) commit c737eec91d200d730aa82662affd6b06ebb0bff0 Author: Lasse Collin Date: 2010-03-22 21:03:03 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) Version 4.999.9beta+20100307; changes since 4.999.9beta+20100212: ----------------------------------------------------------------- commit f4b2b52624b802c786e4e2a8eb6895794dd93b24 Author: Lasse Collin Date: 2010-03-07 19:52:25 +0200 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 files changed, 1 insertions(+), 1 deletions(-) commit cf38da00a140bd3bd65b192390ae5553380fd774 Author: Lasse Collin Date: 2010-03-07 13:59:32 +0200 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(-) commit 00fc1211ae7b687ac912098f4479112059deccbd Author: Lasse Collin Date: 2010-03-07 13:50:23 +0200 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(-) commit 9886d436ff5615fc70eef32ff757b1e934069621 Author: Lasse Collin Date: 2010-03-07 13:34:34 +0200 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(-) commit 2672bcc9f85ba28ff648e092e9eb4cd9e69ce418 Author: Lasse Collin Date: 2010-03-07 13:29:28 +0200 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(-) commit 5527b7269a997e7f335d60f237a64bbf225d9dc7 Author: Lasse Collin Date: 2010-03-06 21:36:19 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit d0d1c51aea4351288a7e533cce28cb7f852f6b05 Author: Lasse Collin Date: 2010-03-06 21:17:20 +0200 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 . Thanks to Rafał Mużyło for helping to debug it on IRC. src/liblzma/common/common.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) Version 4.999.9beta+20100212; changes since 4.999.9beta+20100131: ----------------------------------------------------------------- commit eb7d51a3faf9298c0c7aa9aaeae1023dcf9e37ea Author: Lasse Collin Date: 2010-02-12 13:16:15 +0200 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(-) commit 4785f2021aa6a23f1caf724fcc823e562584f225 Author: Lasse Collin Date: 2010-02-12 12:41:20 +0200 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(-) commit 6b50c9429bf85521d355adc61745d06ee017f8c8 Author: Lasse Collin Date: 2010-02-12 12:31:22 +0200 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(-) commit 6503fde658a5cdbdd907a788865470dd64771601 Author: Lasse Collin Date: 2010-02-07 19:48:06 +0200 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(-) commit dd7c3841ff78cb94ce02b0220c6e4748460970f7 Author: Lasse Collin Date: 2010-02-02 11:50:11 +0200 Fix wrong assertion. This was added in 455e68c030fde8a8c2f5e254c3b3ab9489bf3735. src/xz/main.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit 9d67588c1597849504a3e5ac8bf6f06e7d2ee8be Author: Lasse Collin Date: 2010-02-01 22:48:42 +0200 Updated TODO. TODO | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit fef6333f52c8801308c3b78acb7942988541d137 Author: Lasse Collin Date: 2010-02-01 22:47:54 +0200 Fix typos in comments. src/xz/list.c | 2 +- windows/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 455e68c030fde8a8c2f5e254c3b3ab9489bf3735 Author: Lasse Collin Date: 2010-02-01 22:46:56 +0200 Fix signal handling for --list. src/xz/main.c | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) commit 82220a149015616f75641ee8bbea415137535b9b Author: Lasse Collin Date: 2010-02-01 11:44:45 +0200 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 files changed, 13 insertions(+), 1 deletions(-) commit d4da177d5ba3d2ef7323a6f1e06ca16e0478810e Author: Lasse Collin Date: 2010-02-01 10:20:57 +0200 Fix a comment. windows/build.sh | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Version 4.999.9beta+20100131; changes since 4.999.9beta+20100117: ----------------------------------------------------------------- commit f9dd797a423a148903cf345b4146cb1fe1eab11d Author: Lasse Collin Date: 2010-01-31 23:43:54 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit ee5ddb8b28419fe4923ded5c18a50570a762dcab Author: Lasse Collin Date: 2010-01-31 23:41:29 +0200 Updated TODO. TODO | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) commit 11936ad3f5a2e97bda3463c7a56a2f4bb9265ea6 Author: Lasse Collin Date: 2010-01-31 23:35:04 +0200 Mention TODO in README. README | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 2901a8e7e82af05675b8cd8758a8ceddb111359f Author: Lasse Collin Date: 2010-01-31 23:31:14 +0200 Updated INSTALL. INSTALL | 52 ++++++++++++++++++++++++++-------------------------- 1 files changed, 26 insertions(+), 26 deletions(-) commit 8884e16864ba53fb4b58623d7537d7ef30c28e11 Author: Lasse Collin Date: 2010-01-31 23:28:51 +0200 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(-) commit 34eb5e201d62f7f46bbe6fe97cfe08cb31b3b88c Author: Lasse Collin Date: 2010-01-31 19:52:38 +0200 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 files changed, 14 insertions(+), 5 deletions(-) commit 96a4f840e3b9ca5c81e5711ff9c267b194f93ef1 Author: Lasse Collin Date: 2010-01-31 18:17:50 +0200 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(-) commit b3cc4d8edd68a0250cc69680c99b9f7343f99cf2 Author: Lasse Collin Date: 2010-01-31 12:53:56 +0200 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 files changed, 24 insertions(+), 10 deletions(-) commit 231c3c7098f1099a56abb8afece76fc9b8699f05 Author: Lasse Collin Date: 2010-01-31 12:01:54 +0200 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(-) commit 0dbd0641db99d5e73d51d04ce7a71e52dc6b4105 Author: Lasse Collin Date: 2010-01-29 22:48:04 +0200 Add list.h to src/xz/Makefile.am. This should have been already in 0bc9eab243dee3be764b3530433a7fcdc3f7c6a1. src/xz/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit b4b1a56e0cbd597157858264f5c7189201ac9018 Author: Lasse Collin Date: 2010-01-29 13:24:27 +0200 Add lzmainfo.1 to manfiles list to convert to .txt and .pdf. Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 5574d64e03ad3a3d6e00e4b0d3e81c7b5529ec95 Author: Lasse Collin Date: 2010-01-27 16:42:11 +0200 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 deletions(-) commit b063cc34a30a4edf109343ff373b2b62b8ca72d3 Author: Lasse Collin Date: 2010-01-27 13:31:03 +0200 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(-) commit 38b8035b5cb5f56457c5fa5a891d6900fcf5984f Author: Lasse Collin Date: 2010-01-26 23:37:46 +0200 Add a missing space to an error message. Thanks to Robert Readman. src/xz/args.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e5496f9628ff5979392a80421d0b63a4de8015b4 Author: Lasse Collin Date: 2010-01-26 22:53:37 +0200 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(-) commit d9a9800597ea540090e434132c3b511217df0a2b Author: Lasse Collin Date: 2010-01-26 15:42:24 +0200 Fix too small static buffer in util.c. This was introduced in 0dd6d007669b946543ca939a44243833c79e08f4 two days ago. src/xz/util.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) commit d0b4bbf5da068503c099cd456e294d7673548cc0 Author: Lasse Collin Date: 2010-01-26 14:46:43 +0200 Minor comment fix. src/xz/main.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 0bc9eab243dee3be764b3530433a7fcdc3f7c6a1 Author: Lasse Collin Date: 2010-01-24 23:50:54 +0200 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(-) commit df254ce03be016e217b511e7acd5d493f9929ca5 Author: Lasse Collin Date: 2010-01-24 22:46:11 +0200 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(+), 0 deletions(-) commit ef68dd4a92976276304de2aedfbe34ae91a86abb Author: Lasse Collin Date: 2010-01-24 22:45:14 +0200 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 files changed, 4 insertions(+), 0 deletions(-) commit 0dd6d007669b946543ca939a44243833c79e08f4 Author: Lasse Collin Date: 2010-01-24 16:57:40 +0200 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(-) commit 2a98fdffd68c66371279c211c29153c808ad5c1d Author: Lasse Collin Date: 2010-01-20 22:02:35 +0200 Fix a typo in README. Thanks to R. Bijker. README | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Version 4.999.9beta+20100117; changes since 4.999.9beta+20091116: ----------------------------------------------------------------- commit 07a11dad44e041b01dcfc73e8d4e00731158c06d Author: Lasse Collin Date: 2010-01-17 11:59:54 +0200 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(-) commit 37f31ead9d2b4e467df11450cf29ed7d7e3e25f3 Author: Lasse Collin Date: 2010-01-15 11:05:11 +0200 Update the xz man page to match the previous two commits. src/xz/xz.1 | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) commit 3ffd5d81a43210c8da56da5c5b3637d3f8bc63c7 Author: Lasse Collin Date: 2010-01-13 19:10:25 +0200 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(-) commit 23ac2c44c3ac76994825adb7f9a8f719f78b5ee4 Author: Lasse Collin Date: 2010-01-13 18:12:40 +0200 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 files changed, 10 insertions(+), 5 deletions(-) commit cee12aa852ec0902983dc1f153346ef750157fb9 Author: Lasse Collin Date: 2010-01-12 16:30:33 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 153c7740c54b3c90129dbd3d6153ac1303c4d605 Author: Lasse Collin Date: 2010-01-12 16:18:14 +0200 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(-) commit 8ea8dc754a7a5bc2d60db1eac201839cabdab6a1 Author: Lasse Collin Date: 2010-01-01 00:29:10 +0200 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(-) commit 1a7ec87c8ee61dfc2e496d2e1fb7ab0939804691 Author: Lasse Collin Date: 2009-12-31 22:45:53 +0200 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(-) commit f29997a846e673cb3b8cbd57de47ed313b3978bb Author: Lasse Collin Date: 2009-12-31 21:13:25 +0200 Remove c-format tag in cs.po. It was fixed in the C code earlier. po/cs.po | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 097bad000363e0bf29f8274ad2d7ab59f7dbf644 Author: Lasse Collin Date: 2009-12-31 21:11:05 +0200 Add missing lzma_nothrow in filter.h. src/liblzma/api/lzma/filter.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit b56cb1fc31fa2381f92eefc040df85667048d626 Author: Lasse Collin Date: 2009-12-09 18:13:44 +0200 Remove redefinition of _(msgid) macro from lzmainfo.c. src/lzmainfo/lzmainfo.c | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) commit 171b03febfe09d9fae6ac8be6aa4518bcaf427d2 Author: Jonathan Nieder Date: 2009-12-08 19:41:57 -0600 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 po/.gitignore | 28 ++++++++++++++++++++++------ 1 files changed, 22 insertions(+), 6 deletions(-) commit f7e44c6c11f630519072971b8b07a5729c096c36 Author: Lasse Collin Date: 2009-12-09 00:38:55 +0200 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 files changed, 9 insertions(+), 7 deletions(-) commit 7b76a3e2336f25088957cba92b0dbd854d9caa3c Author: Lasse Collin Date: 2009-12-07 21:46:53 +0200 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 files changed, 4 insertions(+), 0 deletions(-) commit 0696f5d268362221380e039bad48a86e29067c6a Author: Lasse Collin Date: 2009-12-07 20:54:21 +0200 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(+), 0 deletions(-) commit 5e817a50d276f0a3607638c1c1d449d50b9aa4e5 Author: Lasse Collin Date: 2009-12-07 20:32:08 +0200 Add a note for translators to add a bug reporting address for translation bugs. src/xz/message.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 6db1c35be9e1e364cdacff6878910e1b7aac2a37 Author: Lasse Collin Date: 2009-12-07 20:07:02 +0200 Prevent xgettext from taking one regular string as a C format string. Thanks to Marek Černocký. src/xz/message.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e0c2776b6ffbd2b1900fde353aceac734edc93d7 Author: Lasse Collin Date: 2009-11-28 17:45:22 +0200 Remove duplicate code in io_open_dest(). Fix a missing _() in the error message too. src/xz/file_io.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) commit f057a33c6f7c5992389479f2d4feabf2900ba7ee Author: Lasse Collin Date: 2009-11-26 10:11:23 +0200 Typo fix to sysdefs.h. Thanks to Jonathan Nieder. src/common/sysdefs.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 8767b41534eafdf5e742e12190646bf5740b0cdb Author: Lasse Collin Date: 2009-11-26 10:10:36 +0200 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 files changed, 2 insertions(+), 0 deletions(-) commit 919fbaff860acdaa4bcd216500a0b1c960a6db92 Author: Lasse Collin Date: 2009-11-25 14:22:19 +0200 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 files changed, 11 insertions(+), 9 deletions(-) commit bd13b04e202b6f495a68eb0766f97085b7c50a06 Author: Lasse Collin Date: 2009-11-25 13:04:10 +0200 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(-) commit 1f196909143b888e062bd9a0c4ba8c34d3019bfa Author: Lasse Collin Date: 2009-11-25 12:52:56 +0200 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(-) commit 465d1b0d6518c5d980f2db4c2d769f9905bdd902 Author: Lasse Collin Date: 2009-11-25 11:19:20 +0200 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(-) commit 37de544414fc2dc5039471d1002ebd015eb3e627 Author: Lasse Collin Date: 2009-11-22 12:43:06 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit f1a28b96c900c658fe016852ff62f6c24d1f50fa Author: Lasse Collin Date: 2009-11-22 12:05:33 +0200 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(-) commit b9b5c54cd438b3ae47b44cc211b71f3bc53e35ef Author: Lasse Collin Date: 2009-11-22 12:00:30 +0200 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 files changed, 12 insertions(+), 14 deletions(-) commit 0733f4c9994db696420a405810d5f02c79ebc404 Author: Lasse Collin Date: 2009-11-22 11:55:03 +0200 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 insertions(+), 65 deletions(-) commit 7ac3985d891dcc5773543f84cc5bce6c14841b12 Author: Lasse Collin Date: 2009-11-22 11:52:30 +0200 Update tuklib_integer.h with bit scan functions. Thanks to Joachim Henke for the original patch. src/common/tuklib_integer.h | 189 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 181 insertions(+), 8 deletions(-) commit c74c132f7f79a842c073c66575a4fdb985e4c2e3 Author: Lasse Collin Date: 2009-11-20 12:51:19 +0200 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(-) Version 4.999.9beta+20091116; changes since 4.999.9beta+20091016: ----------------------------------------------------------------- commit d315ca4930ff96e1428c6021c96f209e1abdd83e Author: Lasse Collin Date: 2009-11-16 18:16:45 +0200 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(-) commit e330fb7e6b8162894280c8a3dc22fdc05cd2d85e Author: Lasse Collin Date: 2009-11-15 12:54:45 +0200 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(-) commit 93e418562cf127a9171e87bcd4e9af8e1bfcdae4 Author: Lasse Collin Date: 2009-11-15 12:40:17 +0200 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(-) commit cf39faca59083d38422058c6c97aa757ea7797d0 Author: Lasse Collin Date: 2009-11-14 20:21:19 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 2ddcae247c284cc2f396b6cfdab57790c7588b5f Author: Lasse Collin Date: 2009-11-14 20:20:03 +0200 Some updates to xz man page. src/xz/xz.1 | 54 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 49 insertions(+), 5 deletions(-) commit 19b2674f07f8b588dfaf6638396b4b42866d7e23 Author: Lasse Collin Date: 2009-11-14 19:51:03 +0200 Fix description of --memory in --long-help. src/xz/message.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 2291346f0cccf88e605d84b75c9c5aaaaddb5df8 Author: Lasse Collin Date: 2009-11-14 19:45:39 +0200 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(-) commit 418d64a32e8144210f98a810738fed5a897e8367 Author: Lasse Collin Date: 2009-11-14 18:59:19 +0200 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(-) commit f0bf7634b77263a4dd02b20c71861ab67995da68 Author: Lasse Collin Date: 2009-10-17 11:11:58 +0300 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(-) commit 6d118a0b9def82e96afba7386ec8d7da0b59649f Author: Lasse Collin Date: 2009-10-17 01:47:07 +0300 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(+), 0 deletions(-) Version 4.999.9beta+20091016; changes since 4.999.9beta+20091004: ----------------------------------------------------------------- commit 78e92c18470483e161388e679c1ee556adb3a691 Author: Jonathan Nieder Date: 2009-10-15 20:44:13 -0500 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 files changed, 2 insertions(+), 2 deletions(-) commit 7b7fe902d98da28e5769e2aa1e0c08c92384f7ee Author: Lasse Collin Date: 2009-10-16 20:35:39 +0300 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 files changed, 1 insertions(+), 1 deletions(-) Version 4.999.9beta+20091004; changes since 4.999.9beta+20091002: ----------------------------------------------------------------- commit ebfb2c5e1f344e5c6e549b9dedaa49b0749a4a24 Author: Lasse Collin Date: 2009-10-04 22:57:12 +0300 Use a tuklib module for integer handling. This replaces bswap.h and integer.h. The tuklib module uses on GNU, on *BSDs and 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(-) Version 4.999.9beta+20091002; changes since 4.999.9beta: -------------------------------------------------------- commit 29fd321033276261b87da7be5223db33d879a4c7 Author: Lasse Collin Date: 2009-10-02 14:35:56 +0300 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(-) commit 3782b3fee4812b0dd4ffdfa6563ed49f73060f25 Author: Lasse Collin Date: 2009-10-02 11:28:17 +0300 Use unaligned access (if possible) on both endiannesses in lz_encoder_hash.h. src/liblzma/lz/lz_encoder_hash.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit c5f68b5cc79085a87f950fea53843e27f328068e Author: Lasse Collin Date: 2009-10-02 11:03:26 +0300 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(-) commit 4a84d1adfda35e4fb4d41ecf0feb8223b100517a Author: Mike Frysinger Date: 2009-09-26 12:51:50 -0400 add lzmainfo to gitignore Signed-off-by: Mike Frysinger .gitignore | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 188a1dcd0cc7867810ed3a55c598d0680922c63b Author: Lasse Collin Date: 2009-09-27 11:53:36 +0300 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit db9119b9181b307e7ac5d2bae82444d04b902b59 Author: Lasse Collin Date: 2009-09-27 11:48:54 +0300 Work around a bug in Interix header files. Thanks to Markus Duft for the patch. src/common/sysdefs.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit b3d105e69786a45963176fd2193abe75e05ba738 Author: Lasse Collin Date: 2009-09-24 17:50:17 +0300 Fix an error in OpenVMS-specific code. Thanks to Jouk Jansen. src/xz/file_io.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 5e000ff00d4d01e559397b49eb648ad3f159d496 Author: Lasse Collin Date: 2009-09-22 18:59:56 +0300 Added OpenVMS-specific information to INSTALL. INSTALL | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) commit 932b2e204463d70f3eee5b8a1ea5a23bf9d001a4 Author: Lasse Collin Date: 2009-09-22 14:03:02 +0300 Better fixes for OpenVMS support. Thanks to Jouk Jansen. src/xz/file_io.c | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) commit 4c3630ec4179fe9265407a35c4db1374ffc82372 Author: Lasse Collin Date: 2009-09-22 13:40:19 +0300 Avoid non-standard preprocessor construct. Thanks to Jouk Jansen. src/common/tuklib_common.h | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) commit 0deb1bb60addd1306b525e0ac0ad2a84eb0390d9 Author: Lasse Collin Date: 2009-09-21 19:50:09 +0300 Make sure that TUKLIB_DOSLIKE doesn't get defined on Cygwin. Thanks to Charles Wilson. src/common/tuklib_common.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit e599bba4216c0edb8cc8f40adad3a6dba88685f4 Author: Lasse Collin Date: 2009-09-19 09:47:30 +0300 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_cpucores.m4 | 57 --------------- m4/lc_physmem.m4 | 84 ---------------------- m4/tuklib_common.m4 | 22 ++++++ m4/tuklib_cpucores.m4 | 72 +++++++++++++++++++ m4/tuklib_physmem.m4 | 119 +++++++++++++++++++++++++++++++ m4/tuklib_progname.m4 | 25 +++++++ src/common/cpucores.h | 51 -------------- src/common/open_stdxxx.h | 49 ------------- src/common/physmem.h | 144 -------------------------------------- src/common/sysdefs.h | 4 - src/common/tuklib_common.h | 67 ++++++++++++++++++ src/common/tuklib_config.h | 1 + src/common/tuklib_cpucores.c | 46 ++++++++++++ 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/tuklib_open_stdxxx.c | 51 ++++++++++++++ src/common/tuklib_open_stdxxx.h | 23 ++++++ src/common/tuklib_physmem.c | 146 +++++++++++++++++++++++++++++++++++++++ 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 ++++----------- 41 files changed, 974 insertions(+), 640 deletions(-) commit 49cfc8d392cf535f8dd10233225b1fc726fec9ef Author: Lasse Collin Date: 2009-09-15 21:07:23 +0300 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(-) commit 15ffd675ab7af84592eb1c23b0e9f4699aa0fd8c Author: Lasse Collin Date: 2009-09-12 14:09:17 +0300 Fix GCC version check for nothrow attribute. src/liblzma/api/lzma.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6bfdd3a88a819f04c8f202e7d3c6f88a01c7d224 Author: Lasse Collin Date: 2009-09-12 14:08:15 +0300 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 4ab7b16b9573bdfa32279e4adadff684d5cd58ac Author: Lasse Collin Date: 2009-09-12 14:07:36 +0300 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(-) commit 8905a33daadcd2d6557c83c81c490b827d566c94 Author: Lasse Collin Date: 2009-09-11 17:08:15 +0300 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 68059334ff435300ab1ce2c616b0eee1b0d88dd9 Author: Lasse Collin Date: 2009-09-11 17:06:32 +0300 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(+), 0 deletions(-) commit 221be761f467da76875247bc02d7a1716682075d Author: Lasse Collin Date: 2009-09-11 10:24:09 +0300 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(-) commit 18a4233a53d9b82abac7db7d7804684c5fea9c2c Author: Lasse Collin Date: 2009-09-11 09:25:09 +0300 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(-) commit 429910b2ba67611d8df60d1a9da9641bdb5f82b4 Author: Lasse Collin Date: 2009-09-05 18:39:21 +0300 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 files changed, 21 insertions(+), 11 deletions(-) commit 7aca7b3174bcbba4a4915682ff0cd405d63f5740 Author: Lasse Collin Date: 2009-09-05 01:21:15 +0300 Updated THANKS. THANKS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 60ccb80c9c4a0d771acc5b7d9d6f32b17fed1071 Author: Lasse Collin Date: 2009-09-05 01:20:29 +0300 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(-) commit 173368911cf09ab0b03fc4db8f3d4b81d86dce32 Author: Lasse Collin Date: 2009-09-02 09:43:51 +0300 Mention in INSTALL that --enable-small doesn't modify CFLAGS. INSTALL | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 319a0fd7d7e9ebbb71ca6930abfc20777cb4aacc Author: Lasse Collin Date: 2009-09-01 20:40:01 +0300 Refactored option parsing. src/xz/options.c | 70 +++++++++++++++++++++++++++--------------------------- 1 files changed, 35 insertions(+), 35 deletions(-) commit 25adaaa56e2e51a47a910a8d73452414619a2e53 Author: Lasse Collin Date: 2009-09-01 20:23:30 +0300 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 files changed, 2 insertions(+), 4 deletions(-) commit 5f6dddc6c911df02ba660564e78e6de80947c947 Author: Lasse Collin Date: 2009-09-01 20:20:19 +0300 Updated TODO. TODO | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 655457b9ada5ec7db398c5392e41290f3f332ea8 Author: Lasse Collin Date: 2009-08-31 21:59:25 +0300 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(-) commit 162189c3477953805a28f96d3a75cb9ab9417928 Author: Lasse Collin Date: 2009-08-30 17:29:19 +0300 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 2331f5f97af3e5897e23da45d9df3d664099c7f8 Author: Lasse Collin Date: 2009-08-30 17:28:52 +0300 Add more OS/2 specific info to INSTALL. INSTALL | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 94c66b3297b3ad307eee93cf6b160e3c43997f11 Author: Lasse Collin Date: 2009-08-29 14:43:52 +0300 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 files changed, 25 insertions(+), 11 deletions(-) commit 3432e9c6aab851da1227b63dce645d7f190c04d8 Author: Lasse Collin Date: 2009-08-29 13:42:56 +0300 Updated THANKS. THANKS | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 27414daadf5727e8ab942374b5ec1c8990122878 Author: Lasse Collin Date: 2009-08-29 13:39:21 +0300 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(-) commit 43f44160b1ddcbf7e5205c37db09b3bebe7226f9 Author: Lasse Collin Date: 2009-08-29 13:35:23 +0300 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(-) Version 4.999.9beta; changes since 4.999.8beta: ----------------------------------------------- commit 682efdc1f9492fdd76c9ce82e7c00ca0768067e8 Author: Lasse Collin Date: 2009-08-27 18:36:59 +0300 "make dist" fixes Makefile.am | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) commit c8c184db1c95bf70f78256ec6237845a57f342af Author: Lasse Collin Date: 2009-08-27 17:08:33 +0300 Update xz man page date. src/xz/xz.1 | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9756fce565e98b8fa5fe6ead296d84e7601ec254 Author: Lasse Collin Date: 2009-08-27 17:00:22 +0300 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(-) commit 77007a7fb20187fcf3d1dd9839c79ace2d63f2ea Author: Lasse Collin Date: 2009-08-27 16:36:40 +0300 Add missing files to EXTRA_DIST. Makefile.am | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) commit 04dcbfdeb921e5f361a4487134e91e23fffbe09d Author: Lasse Collin Date: 2009-08-27 16:21:22 +0300 Bumped version to 4.999.9beta. src/liblzma/api/lzma/version.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit fd7618611a22f42a6913bc8d518c9bbc9252d6b4 Author: Lasse Collin Date: 2009-08-27 16:17:47 +0300 Updated THANKS. THANKS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit c29e76c0f910fca0a90a50b78d337f6c32623e9d Author: Lasse Collin Date: 2009-08-27 16:12:52 +0300 .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 files changed, 15 insertions(+), 11 deletions(-) commit 696d7ee3953beaf4f0ed18e78917ccf300431966 Author: Lasse Collin Date: 2009-08-27 15:43:54 +0300 Require GNU libtool 2.2. configure.ac | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) commit 4c3558aa8305a8f8b6c43b8569eb539717ca9e8d Author: Lasse Collin Date: 2009-08-27 15:34:45 +0300 Add "dos" to EXTRA_DIST. Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 35b29e4424ced5a3ababf132283e519080c7b298 Author: Lasse Collin Date: 2009-08-27 15:23:27 +0300 Updated TODO. TODO | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit 23414377192c21f3f34c84cdfe0ef0fbd06a1dea Author: Lasse Collin Date: 2009-08-27 15:17:00 +0300 Some xz man page improvements. src/xz/xz.1 | 78 ++++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 62 insertions(+), 16 deletions(-) commit 371b04e19fc9051dbaeec51ec0badec6a1f0699d Author: Lasse Collin Date: 2009-08-27 10:41:01 +0300 Removed doc/bugs.txt. doc/bugs.txt | 46 ---------------------------------------------- 1 files changed, 0 insertions(+), 46 deletions(-) commit d88c4072b36d3a76f839185799fb1d91037a1b81 Author: Lasse Collin Date: 2009-08-27 10:40:25 +0300 Updated README. It now includes bug reporting instructions/tips. README | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 55 insertions(+), 10 deletions(-) commit 92e536d8b8d33a6b12d0802bcd7be4437046f13e Author: Lasse Collin Date: 2009-08-27 10:21:18 +0300 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 files changed, 1 insertions(+), 1 deletions(-) commit 3e2ba8b58585743e59251e69ad2783eb08357079 Author: Lasse Collin Date: 2009-08-27 10:13:46 +0300 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(-) commit 8e8ebc17c535a1f8846718059b48417409c37050 Author: Lasse Collin Date: 2009-08-18 00:30:09 +0300 Install faq.txt. Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit b198e770a146e4a41f91a93f0b233713f2515848 Author: Lasse Collin Date: 2009-08-18 00:26:48 +0300 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 files changed, 73 insertions(+), 166 deletions(-) commit fe111a25cd788d31b581996e4533910388a7f0a9 Author: Lasse Collin Date: 2009-08-17 22:45:50 +0300 Some xz man changes. src/xz/xz.1 | 88 +++++++++++++++++++++++++++++------------------------------ 1 files changed, 43 insertions(+), 45 deletions(-) commit 10242a21e9abda0c5c6a03501703cc40b8a699a5 Author: Lasse Collin Date: 2009-08-16 22:15:42 +0300 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 3ce1916c83041113b9cad9ead5c97a527cf8aa1d Author: Lasse Collin Date: 2009-08-16 22:15:13 +0300 Fix data corruption in LZ/LZMA2 encoder. Thanks to Jonathan Stott for the bug report. src/liblzma/lz/lz_encoder.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 66da129c8ec33dd66acc92f113f7c1ca740ca81a Author: Lasse Collin Date: 2009-08-13 15:15:37 +0300 Updated INSTALL and PACKAGERS to match the changes made in --enable-dynamic. INSTALL | 20 ++++++++++++++++---- PACKAGERS | 11 ++++++----- 2 files changed, 22 insertions(+), 9 deletions(-) commit 8238c4b2402f952c4e492e5b778aa272e57b6705 Author: Lasse Collin Date: 2009-08-13 15:03:46 +0300 Link lzmainfo against shared liblzma by default. src/lzmainfo/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 71f18e8a066a01dda0c8e5508b135ef104e43e4c Author: Lasse Collin Date: 2009-08-13 15:00:21 +0300 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 files changed, 57 insertions(+), 20 deletions(-) commit 5aa4678b2342dcfc1d2b31aa9fa4f39c539e4b61 Author: Lasse Collin Date: 2009-08-13 12:56:47 +0300 Fix xz Makefile.am for the man page. install-exec-hook -> install-data-hook src/xz/Makefile.am | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit e51b4e49e800bd84e6d589dca2964d3985e88139 Author: Lasse Collin Date: 2009-08-13 12:55:45 +0300 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 deletions(-) commit a4165d0584376d948c213ec93c6065d24ff6a5e7 Author: Lasse Collin Date: 2009-08-13 12:42:36 +0300 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(-) commit df636eb4e066b4e154ce8e66e82c87ba1db652a6 Author: Lasse Collin Date: 2009-08-13 09:37:21 +0300 Add xz man page to manfiles in toplevel Makefile.am. Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 180bdf58ea5bb07941e0a99b304d9aa832198748 Author: Lasse Collin Date: 2009-08-13 09:37:01 +0300 Fix first line of xz man page. src/xz/xz.1 | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e1ce2291e759b50ebfcf7cbbcc04cd098f1705a4 Author: Lasse Collin Date: 2009-08-10 11:22:31 +0300 Added a rough version of the xz man page. src/xz/Makefile.am | 15 + src/xz/xz.1 | 1206 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1221 insertions(+), 0 deletions(-) commit e71903fc6101f1c039d702e335b08aad1e1b4100 Author: Jonathan Nieder Date: 2009-08-09 13:41:20 -0500 “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 files changed, 1 insertions(+), 1 deletions(-) commit 1d314b81aa5b0c4530638ffabd4e0edb52e5362c Author: Jonathan Nieder Date: 2009-08-09 13:22:12 -0500 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 files changed, 7 insertions(+), 1 deletions(-) commit a7f5d2fe4826ac68839d00059f05004fb81d5c69 Author: Lasse Collin Date: 2009-08-09 20:57:46 +0300 GPLv2+ not GPLv2 for Doxyfile.in is probably OK. Doxyfile.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b735cde20cc14857136ae65a0e5d336ed7ddc862 Author: Lasse Collin Date: 2009-08-02 00:27:29 +0300 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 files changed, 3 insertions(+), 0 deletions(-) commit 0fd157cc008446adfc8f91394f5503868025a642 Author: Lasse Collin Date: 2009-08-02 00:11:37 +0300 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit b198da96ff9ac8c89b466b4d196c5f3fe1c7904f Author: Lasse Collin Date: 2009-08-02 00:10:22 +0300 Updated TODO. TODO | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 669413bb2db954bbfde3c4542fddbbab53891eb4 Author: Lasse Collin Date: 2009-07-30 12:25:55 +0300 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit dbbd8fb870ae789d96497911006c869d37148c15 Author: Jonathan Nieder Date: 2009-07-28 17:37:24 -0500 xzdiff: add missing ;; to case statement src/scripts/xzdiff.in | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit adbad2d16cb5909f85d4a429011005613ea62ffe Author: Lasse Collin Date: 2009-07-24 13:15:06 +0300 Added history.txt to doc_DATA. Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit e0236f12569eb36f9b81ce7a1e52e0f73698ac27 Author: Lasse Collin Date: 2009-07-24 12:00:40 +0300 Updated .gitignore files. .gitignore | 36 +++++++++++++++++++----------------- po/.gitignore | 3 +++ 2 files changed, 22 insertions(+), 17 deletions(-) commit 2f34fb269265e3aba43a2a9c734020a45268826d Author: Lasse Collin Date: 2009-07-24 11:34:02 +0300 Minor improvements to COPYING. COPYING | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) commit 0db1befcfbc120377df4b89923762f16d25f548a Author: Lasse Collin Date: 2009-07-23 19:10:55 +0300 Fix incorrect usage of getopt_long(), which caused invalid memory access if XZ_OPT was defined. src/xz/args.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 8f8ec942d6d21ada2096eaf063411bc8bc7e2d48 Author: Lasse Collin Date: 2009-07-20 15:43:32 +0300 Avoid internal error with --format=xz --lzma1. src/xz/coder.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) commit 99f9e879a6a8bb54a65da99c12e0f390216c152a Author: Lasse Collin Date: 2009-07-19 13:14:20 +0300 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(-) commit ef4cf1851de89022cba5674784f1a8f6343c15b0 Author: Lasse Collin Date: 2009-07-19 11:09:31 +0300 Added missing author notice to xzless.in. src/scripts/xzless.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 4c9c989d45b188667799a7a1d6c728ed43f7bf77 Author: Lasse Collin Date: 2009-07-18 18:54:55 +0300 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(-) commit 366e436090a7a87215e9bf0e3ddcd55f05b50587 Author: Lasse Collin Date: 2009-07-18 14:34:08 +0300 Updated the totally outdated TODO file. TODO | 117 +++++++++++++++-------------------------------------------------- 1 files changed, 27 insertions(+), 90 deletions(-) commit 64e498c89d8b9966e8663f43bf64d47c26c55c62 Author: Lasse Collin Date: 2009-07-18 11:26:39 +0300 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 deletions(-) commit a35755c5de808df027675688855d1b621a4fb428 Author: Lasse Collin Date: 2009-07-14 21:10:36 +0300 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 files changed, 7 insertions(+), 0 deletions(-) commit 98f3cac1ad31191c5160a7e48398bf85141e941c Author: Lasse Collin Date: 2009-07-14 18:04:31 +0300 Accept --lzma2=preset=6e where "e" is equivalent to --extreme when no custom chain is in use. src/xz/options.c | 80 +++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 59 insertions(+), 21 deletions(-) commit d873a09e956363e54bf58c577c8f7e487b6fb464 Author: Lasse Collin Date: 2009-07-12 19:08:30 +0300 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 files changed, 31 insertions(+), 0 deletions(-) commit cd69a5a6c16c289f6f8e2823b03c72289472270f Author: Lasse Collin Date: 2009-07-10 11:39:38 +0300 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(-) commit eed9953732b801f6c97317fb3160445a8754180b Author: Lasse Collin Date: 2009-07-10 11:33:21 +0300 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 files changed, 13 insertions(+), 9 deletions(-) commit 6f62fa88f4ff7ba78565c314c0e6e71c498fa658 Author: Lasse Collin Date: 2009-07-08 23:06:46 +0300 Updated THANKS. THANKS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 1754b7e03e2aa7e2e0196807fe8b0f3f5a637b0e Author: Lasse Collin Date: 2009-07-08 23:05:29 +0300 Portability improvement to version.sh. version.sh | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 3bdb53792c0e3e3febe9370e56eda5b08f89410f Author: Lasse Collin Date: 2009-07-08 22:50:16 +0300 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 insertions(+), 9 deletions(-) commit 5f16ef4abf220028a9ddbcb138217597a9455f62 Author: Lasse Collin Date: 2009-07-06 10:36:04 +0300 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(-) commit 96e4b257e101d72072d43e144897d92920270669 Author: Lasse Collin Date: 2009-07-05 22:25:17 +0300 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(-) commit 25cc7a6e8c2506a0d80084a4c1c67d33e7439100 Author: Lasse Collin Date: 2009-07-05 19:26:53 +0300 Use @PACKAGE_HOMEPAGE@ in liblzma.pc.in. src/liblzma/liblzma.pc.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 18c10c30d2833f394cd7bce0e6a821044b15832f Author: Lasse Collin Date: 2009-07-04 00:40:44 +0300 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 files changed, 178 insertions(+), 35 deletions(-) commit 0a289c01ac821ea9c4250aa906b0ae3cfa953633 Author: Lasse Collin Date: 2009-07-02 14:30:38 +0300 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(-) commit 5cc99db5bae8633f85559e5cdaef4cd905a4ee9c Author: Lasse Collin Date: 2009-07-01 12:21:24 +0300 Avoid visibility related compiler warnings on Windows. configure.ac | 20 +++++++++----------- 1 files changed, 9 insertions(+), 11 deletions(-) commit 7653d1cf48080e63b189ed9d58dea0e82b6b1c5e Author: Lasse Collin Date: 2009-06-30 17:14:39 +0300 Use static liblzma by default also for tests. tests/Makefile.am | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit f42ee981668b545ab6d06c6072e262c29605273c Author: Lasse Collin Date: 2009-06-30 17:09:57 +0300 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 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(-) commit 89dac1db6f168d7469cfbc4432651d4724c5c0de Author: Lasse Collin Date: 2009-06-29 22:19:51 +0300 Added a comment about "autoconf -fi" to autogen.sh. autogen.sh | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 6e685aae4594bc0af1b5032e01bb37d0edaa3ebd Author: Lasse Collin Date: 2009-06-28 10:04:24 +0300 Add -no-undefined to get shared liblzma on Windows. src/liblzma/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 73f560ee5fa064992b76688d9472baf139432540 Author: Lasse Collin Date: 2009-06-27 22:57:15 +0300 Make physmem() work on Cygwin 1.5 and older. src/common/physmem.h | 77 ++++++++++++++++++++++++++------------------------ 1 files changed, 40 insertions(+), 37 deletions(-) commit 7ff0004fbce24ae72eddfe392828ffd7d4639ed1 Author: Lasse Collin Date: 2009-06-27 17:28:01 +0300 Moved the Windows resource files outside the windows directory to prepare for building them with Autotools. src/common/common_w32res.rc | 46 +++++++++++++++++++++++++++++++++++++++++ src/liblzma/liblzma_w32res.rc | 5 ++++ src/xz/xz_w32res.rc | 5 ++++ src/xzdec/lzmadec_w32res.rc | 5 ++++ src/xzdec/xzdec_w32res.rc | 5 ++++ windows/Makefile | 35 +++++++++++++++++-------------- windows/common.rc | 46 ----------------------------------------- windows/liblzma.rc | 5 ---- windows/lzmadec.rc | 5 ---- windows/xz.rc | 5 ---- windows/xzdec.rc | 5 ---- 11 files changed, 85 insertions(+), 82 deletions(-) commit 449c634674f35336a4815d398172e447659a135e Author: Lasse Collin Date: 2009-06-27 13:05:03 +0300 Added missing $(EXEEXT). src/xz/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 792db79f27ad9ab1fb977e23be65c7761f545752 Author: Lasse Collin Date: 2009-06-27 12:32:40 +0300 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(-) commit 0adc72feb84f5b903f6ad9d3f759b1c326fafc6b Author: Lasse Collin Date: 2009-06-27 10:02:24 +0300 Silence a compiler warning on DOS-like systems. src/xz/file_io.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit ad12edc95254ede3f0cb8dec8645e8789e984c4f Author: Lasse Collin Date: 2009-06-27 09:35:15 +0300 Updated the filenames in POTFILES.in too. po/POTFILES.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit b2b1f867532732fe9969131f8713bdd6b0731763 Author: Lasse Collin Date: 2009-06-27 00:43:06 +0300 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(-) commit c393055947247627a09b6a6b8f20aa0c32f9be16 Author: Lasse Collin Date: 2009-06-26 21:17:29 +0300 Updated THANKS (most of today's commits are based on Charles Wilson's patches). THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit da0af22e4b4139b8a10710945f8b245b3a77c97d Author: Lasse Collin Date: 2009-06-26 21:00:35 +0300 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(-) commit 65014fd211dfbd4be48685998cb5a12aaa29c8d2 Author: Lasse Collin Date: 2009-06-26 20:49:54 +0300 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/coder.c | 488 +++++++++++++++++++++++++++++++++++ src/xz/coder.h | 57 ++++ src/xz/file_io.c | 716 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/xz/file_io.h | 86 +++++++ src/xz/io.c | 716 ---------------------------------------------------- src/xz/io.h | 86 ------- src/xz/private.h | 4 +- src/xz/process.c | 488 ----------------------------------- src/xz/process.h | 57 ---- windows/Makefile | 4 +- 12 files changed, 1357 insertions(+), 1357 deletions(-) commit 5e1257466dcb66f1d7a3f71814a5ad885cba43e8 Author: Lasse Collin Date: 2009-06-26 20:43:36 +0300 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(-) commit cad62551c5fa9865dbe0841a0b3bc729c4fbe8fc Author: Lasse Collin Date: 2009-06-26 20:36:45 +0300 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(-) commit fe378d47074b16c52b00fe184d119287c68ce2e7 Author: Lasse Collin Date: 2009-06-26 15:40:40 +0300 Added missing source files to windows/Makefile. windows/Makefile | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 390a6408563067613b29de895cb40e4d0386d62c Author: Lasse Collin Date: 2009-06-26 15:37:53 +0300 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(-) commit 1c9360b7d1197457aaad2f8888b99f1149861579 Author: Lasse Collin Date: 2009-06-26 14:47:31 +0300 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(-) commit d45615c555e250209ebb55aa3649abe790f1eeac Author: Lasse Collin Date: 2009-06-26 14:20:02 +0300 Allow to explicitly specify autotool versions in autogen.sh. autogen.sh | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit eaf8367368a329afa48785380f9dca6b681f3397 Author: Lasse Collin Date: 2009-06-26 14:18:32 +0300 Add version.sh to EXTRA_DIST. Makefile.am | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit b317b218e2d383dd27a700094c0de4510540ea18 Author: Lasse Collin Date: 2009-06-24 20:14:10 +0300 Support HW_PHYSMEM64 src/common/physmem.h | 30 +++++++++++++++++++----------- 1 files changed, 19 insertions(+), 11 deletions(-) commit ae82dde5d9cc60c80cc89601b6c51cc1611d48e7 Author: Lasse Collin Date: 2009-06-24 13:01:59 +0300 Cast a char argument to isspace() to unsigned char. src/xz/args.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) commit 1735d31ea347210e914df038eeea4b2626e76e42 Author: Lasse Collin Date: 2009-06-05 13:46:26 +0300 A few more spelling fixes. Released the .xz spec 1.0.3. doc/xz-file-format.txt | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) commit 8ed156ce894966103e895aa08f2a9fb912f6fad5 Author: Lasse Collin Date: 2009-06-04 23:42:12 +0300 Added xzdec man page. src/xzdec/Makefile.am | 11 +++ src/xzdec/xzdec.1 | 173 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 184 insertions(+), 0 deletions(-) commit f6df39afaa84f71439507178a49b2a5dda6e824c Author: Lasse Collin Date: 2009-06-04 23:26:47 +0300 Harmonized xzdec --memory with xz --memory and made minor cleanups. src/xzdec/xzdec.c | 74 ++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 53 insertions(+), 21 deletions(-) commit 1774f27c61ce294a56712ca2f4785f90a62441bc Author: Lasse Collin Date: 2009-06-04 22:59:55 +0300 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(-) commit cb613455642f48fb51059e22018615f64c59b70f Author: Lasse Collin Date: 2009-06-01 14:53:57 +0300 The .xz file format version 1.0.1 doc/xz-file-format.txt | 29 ++++++++++++++++++++++------- 1 files changed, 22 insertions(+), 7 deletions(-) commit 083c23c680ff844846d177cfc58bb7a874e7e6b9 Author: Lasse Collin Date: 2009-05-26 14:48:48 +0300 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(-) commit b4f5c814090dc07d4350453576305e41eb9c998d Author: Lasse Collin Date: 2009-05-23 16:57:21 +0300 Remove undocumented alternative option names --bcj, --ppc, and --itanium. src/xz/args.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit b1edee2cdc7ef4411b1a21c07094ec763f071281 Author: Lasse Collin Date: 2009-05-23 15:12:23 +0300 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(-) commit 72aa0e9c5f4289f10ef5bf240a9448d3017f1ceb Author: Lasse Collin Date: 2009-05-23 14:51:09 +0300 Updated THANKS. THANKS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit dcedb6998cefeca6597dd1219328a3abf5acf66d Author: Lasse Collin Date: 2009-05-22 16:40:50 +0300 Added support for --quiet and --no-warn to xzdec. Cleaned up the --help message a little. src/xzdec/xzdec.c | 76 ++++++++++++++++++++++++++++++++++------------------- 1 files changed, 49 insertions(+), 27 deletions(-) commit 5f735dae80aa629853f4831d7b84ec1c614979eb Author: Lasse Collin Date: 2009-05-22 15:11:52 +0300 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 files changed, 5 insertions(+), 5 deletions(-) commit b60376249e0c586910c4121fab4f791820cc1289 Author: Lasse Collin Date: 2009-05-22 14:43:00 +0300 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 deletions(-) commit b4f92f522d4b854c0adb7c38be7531e1a6a7b008 Author: Lasse Collin Date: 2009-05-22 14:27:40 +0300 Fix a comment. src/xz/main.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4dd21d23f22569285ae706b58b0e5904b8db1839 Author: Lasse Collin Date: 2009-05-22 14:21:20 +0300 Remove the --info option, which was an alias for --list. src/xz/args.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 8836139b63ce774bdd62abf17ab69b290e08229e Author: Lasse Collin Date: 2009-05-22 12:27:43 +0300 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 files changed, 6 insertions(+), 11 deletions(-) commit b0063023f8adb06ea735ec4af5c6f5b7bdb8e84d Author: Lasse Collin Date: 2009-05-22 11:29:50 +0300 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(-) commit 071b825b23911a69dd1cd2f8cda004ef8a781fae Author: Lasse Collin Date: 2009-05-21 17:22:01 +0300 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 deletions(-) commit 03ca67fd37dd43fa7f590de340899cd497c10802 Author: ABCD Date: 2009-05-20 17:31:18 -0400 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 files changed, 14 insertions(+), 2 deletions(-) commit a6f43e64128a6da5cd641de1e1e527433b3e5638 Author: Lasse Collin Date: 2009-05-02 16:10:14 +0300 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(-) commit f6ce63ebdb45a857c8949960c83c9580ae888951 Author: Lasse Collin Date: 2009-05-02 14:46:50 +0300 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 files changed, 8 insertions(+), 40 deletions(-) commit be06858d5cf8ba46557395035d821dc332f3f830 Author: Lasse Collin Date: 2009-05-01 11:28:52 +0300 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, 0 insertions(+), 956 deletions(-) commit 0255401e57c96af87c6b159eca28974e79430a82 Author: Lasse Collin Date: 2009-05-01 11:21:46 +0300 Added documentation about the legacy .lzma file format. doc/lzma-file-format.txt | 166 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 166 insertions(+), 0 deletions(-) commit 1496ff437c46f38303e0e94c511ca604b3a11f85 Author: Lasse Collin Date: 2009-05-01 11:20:23 +0300 Renamed the file format specification to xz-file-format.txt which is the filename used on the WWW. doc/file-format.txt | 1127 ------------------------------------------------ doc/xz-file-format.txt | 1127 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1127 insertions(+), 1127 deletions(-) commit 21c6b94373d239d7e86bd480fcd558e30391712f Author: Lasse Collin Date: 2009-04-28 23:08:32 +0300 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(-) commit e518d167aa5958e469982f4fb3a24b9b6a2b5d1c Author: Lasse Collin Date: 2009-04-15 14:13:38 +0300 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(-) commit 31decdce041581e57c0d8a407d4795b114ef27ca Author: Lasse Collin Date: 2009-04-14 11:48:46 +0300 Minor fixes to test files' README. tests/files/README | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) commit 4787d654434891c7df5b43959b0d2873718f06e0 Author: Lasse Collin Date: 2009-04-13 16:36:41 +0300 Updated history.txt. doc/history.txt | 123 +++++++++++++++++++++++++++++------------------------- 1 files changed, 66 insertions(+), 57 deletions(-) commit 2f0bc9cd40f709152a0177c8e585c0757e9af9c9 Author: Lasse Collin Date: 2009-04-13 14:49:48 +0300 Quick & dirty update to support xz in diff/grep/more scripts. src/scripts/Makefile.am | 38 +++++++++----- 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 --------------------- src/scripts/xzdiff | 67 +++++++++++++++++++++++++ src/scripts/xzdiff.1 | 58 ++++++++++++++++++++++ src/scripts/xzgrep | 123 +++++++++++++++++++++++++++++++++++++++++++++++ src/scripts/xzgrep.1 | 77 +++++++++++++++++++++++++++++ src/scripts/xzmore | 74 ++++++++++++++++++++++++++++ src/scripts/xzmore.1 | 66 +++++++++++++++++++++++++ 13 files changed, 489 insertions(+), 445 deletions(-) commit 02ddf09bc3079b3e17297729b9e43f14d407b8fc Author: Lasse Collin Date: 2009-04-13 11:27:40 +0300 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 | 42 +++++++-------- 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, 866 insertions(+), 2021 deletions(-) commit e79c42d854657ae7f75613bd80c1a35ff7c525cb Author: Lasse Collin Date: 2009-04-10 11:17:02 +0300 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 files changed, 1 insertions(+), 1 deletions(-) commit 94eb9ad46f1fded6d8369cf3d38bb9754c1375af Author: Pavel Roskin Date: 2009-03-31 12:15:01 -0400 Fix minor typos in README README | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 9bab5336ebd765ec4e12252f416eefdf04eba750 Author: Lasse Collin Date: 2009-03-31 21:52:51 +0300 Add a note and work-around instructions to README about problems detecting a C99 compiler when some standard headers are missing. README | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) commit a0497ff7a06f9350349264fe9b52dfefc6d53ead Author: Lasse Collin Date: 2009-03-18 16:54:38 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 390e69887fc5e0a108eb41203bed9acd100a3d76 Author: Lasse Collin Date: 2009-03-18 16:51:41 +0200 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(-) commit 0df9299e2478c2a0c62c05b1ae14a85a353e20d6 Author: Lasse Collin Date: 2009-03-01 09:03:08 +0200 Test for Linux-specific sysinfo() only on Linux systems. Some other systems have sysinfo() with different semantics. m4/lc_physmem.m4 | 28 +++++++++++++++++++--------- 1 files changed, 19 insertions(+), 9 deletions(-) commit cf751edfde3ad6e088dc18e0522d31ae38405933 Author: Lasse Collin Date: 2009-03-01 09:00:06 +0200 Added AC_CONFIG_MACRO_DIR to configure.ac. configure.ac | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 63df14c57dee7c461717784287056688482a7eb9 Author: Lasse Collin Date: 2009-03-01 08:58:41 +0200 Fix the Autoconf test for getopt_long replacement. It was broken by e114502b2bc371e4a45449832cb69be036360722. m4/getopt.m4 | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit fd6a380f4eda4f00be5f2aa8d222992cd74a714f Author: Lasse Collin Date: 2009-02-22 19:07:54 +0200 Add a rough explanation of --extreme to output of --help. src/xz/message.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 68bf7ac2984d3627369a240ef0491934d53f7899 Author: Lasse Collin Date: 2009-02-22 18:52:49 +0200 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(-) commit 47c2e21f82242f50f18713a27d644c2c94ab3fea Author: Lasse Collin Date: 2009-02-18 13:00:10 +0200 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 deletions(-) commit 489a3dbaa0465f04400804e956a1cfbbee3654a2 Author: Lasse Collin Date: 2009-02-17 10:43:00 +0200 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.c | 128 ---------------------------- src/liblzma/common/easy_buffer_encoder.c | 34 ++++++++ src/liblzma/common/easy_decoder_memusage.c | 31 +++++++ src/liblzma/common/easy_encoder.c | 87 +++++++++++++++++++ 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 +- 9 files changed, 266 insertions(+), 130 deletions(-) commit 7494816ab08d82f4d6409788825930c4e43cfd0d Author: Lasse Collin Date: 2009-02-15 15:48:45 +0200 Make physmem.h work on old Windows versions. Thanks to Hongbo Ni for the original patch. src/common/physmem.h | 31 +++++++++++++++++++++++++++---- 1 files changed, 27 insertions(+), 4 deletions(-) commit 11ae4ae35fd70182c713f2d914b7cb1143bc76f0 Author: Lasse Collin Date: 2009-02-14 20:44:52 +0200 Fix microsecond vs. nanosecond confusion in my_time(). src/xz/message.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 3084d662d2646ab7eb58daf0dc32cf3f9a74eec7 Author: Lasse Collin Date: 2009-02-14 00:45:29 +0200 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(-) commit 9c62371eab2706c46b1072f5935e28cb4cd9dca8 Author: Lasse Collin Date: 2009-02-13 18:23:50 +0200 Initial port to DOS using DJGPP. dos/Makefile | 261 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ dos/README | 113 +++++++++++++++++++++++++ dos/config.h | 150 +++++++++++++++++++++++++++++++++ 3 files changed, 524 insertions(+), 0 deletions(-) commit 0dae8b7751d09e9c5a482d5519daaee4800ce203 Author: Lasse Collin Date: 2009-02-13 18:02:05 +0200 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(-) commit fdbc0cfa71f7d660855098a609175ba384259529 Author: Lasse Collin Date: 2009-02-13 18:00:03 +0200 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(-) commit 1d924e584b146136989f48c13fff2632896efb3d Author: Lasse Collin Date: 2009-02-13 17:30:30 +0200 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 deletions(-) commit 96c46df7deb231ea68a03d8d1da9de4c774e36d8 Author: Lasse Collin Date: 2009-02-13 17:29:02 +0200 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(-) commit b6a30ee8c2de60ecd722cd05223e4ba72f822e33 Author: Lasse Collin Date: 2009-02-11 20:02:32 +0200 Remove dead directories from .gitignore. .gitignore | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 1ec5b0027911d94cb6f98892cbc690f818d8a861 Author: Jim Meyering Date: 2009-02-11 14:45:14 +0100 .gitignore vs. Makefiles How about this for those of us who do srcdir builds? .gitignore | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) commit 154f5aec2de201c674841de4fcc9804c2a87af07 Author: Lasse Collin Date: 2009-02-10 21:48:35 +0200 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 files changed, 0 insertions(+), 1 deletions(-) commit e605c2663691b0a4c307786aa368d124ea081daa Author: Lasse Collin Date: 2009-02-10 21:48:05 +0200 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(-) commit a3bbbe05d32b1f7ea9eb98805df4dda2e811b476 Author: Lasse Collin Date: 2009-02-09 14:54:31 +0200 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(-) commit 53f7598998b1860a69c51243b5d2e34623c6bf60 Author: Lasse Collin Date: 2009-02-08 21:35:11 +0200 Fix aliasing issue in physmem.h. src/common/physmem.h | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) commit 0e27028d74c5c7a8e036ae2a9b8cecb0ac79d3a6 Author: Lasse Collin Date: 2009-02-08 18:24:50 +0200 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(-) commit ae1ad9af54210c9a2be336b1316532da5071516c Author: Lasse Collin Date: 2009-02-08 18:17:05 +0200 Make "xz --force" to write to terminal as the error message suggests. src/xz/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 79e25eded48d2fe33f31441ab7a034f902e335f8 Author: Lasse Collin Date: 2009-02-08 10:37:50 +0200 Support both slash and backslash as path component separator on Windows when parsing argv[0]. src/xz/args.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) commit bc7c7109cc4410055a888c1c70cbd1c9445c4361 Author: Lasse Collin Date: 2009-02-07 23:18:13 +0200 Omit the wrong and (even if corrected) nowadays useless rm from autogen.sh. autogen.sh | 28 ---------------------------- 1 files changed, 0 insertions(+), 28 deletions(-) commit edfc2031e56f8a2ccda063f02936b3a848d88723 Author: Lasse Collin Date: 2009-02-07 21:41:52 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 880c3309386aac58fc4f3d7ca99bd31bcb1526a3 Author: Lasse Collin Date: 2009-02-07 21:17:07 +0200 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(-) commit 3f86532407e4ace3debb62be16035e009b56ca36 Author: Mike Frysinger Date: 2009-02-06 23:38:39 -0500 add gitignore files Signed-off-by: Mike Frysinger .gitignore | 32 ++++++++++++++++++++++++++++++++ m4/.gitignore | 35 +++++++++++++++++++++++++++++++++++ po/.gitignore | 12 ++++++++++++ 3 files changed, 79 insertions(+), 0 deletions(-) commit bd7ca1dad5c146b6217799ffaa230c32d207a3e5 Author: Lasse Collin Date: 2009-02-07 17:07:52 +0200 Assume 32 MiB of RAM on unsupported operating systems like the comment in hardware.c already said. src/xz/hardware.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d0ab8c1c73ae712adb0d26fbb9da762d99a63618 Author: Lasse Collin Date: 2009-02-07 16:26:58 +0200 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(-) commit bfd91198e44a52bd9bfe3cd6dcae5edab7c6eb45 Author: Lasse Collin Date: 2009-02-07 15:55:47 +0200 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(+), 0 deletions(-) commit 3306cf3883492720b3c34baa02f4eb4227d91c73 Author: Lasse Collin Date: 2009-02-07 11:11:50 +0200 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(-) commit b719e63c5f4c91d2d5e2ea585d4c055ec3767d0b Author: Lasse Collin Date: 2009-02-06 16:55:45 +0200 Another grammar fix README | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit fe5434f940f75fec3611cf9d9edf78c4da8ac760 Author: Lasse Collin Date: 2009-02-06 12:30:23 +0200 Grammar fix in README. README | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Version 4.999.8beta: -------------------- commit 3dfa58a9eedf5a0e566452b078801c9cbcf7a245 Author: Lasse Collin Date: 2009-02-06 10:06:32 +0200 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(-) commit 975d8fd72a5148d46b2e1745f7a211cf1dfd9d31 Author: Lasse Collin Date: 2009-02-06 09:13:15 +0200 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 insertions(+), 1 deletions(-) commit 094b1b09a531f0d201ec81f2b07346a995fd80b9 Author: Lasse Collin Date: 2009-02-05 21:21:27 +0200 Add the "windows" directory to EXTRA_DIST. Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit e1c3412eec7acec7ca3b32c9c828f3147dc65b49 Author: Lasse Collin Date: 2009-02-05 09:17:51 +0200 Added initial experimental makefile for use with MinGW. windows/Makefile | 253 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ windows/README | 164 +++++++++++++++++++++++++++++++++++ windows/config.h | 180 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 597 insertions(+), 0 deletions(-) commit 75905a9afc0ee89954ede7d08af70d1148bf0fd9 Author: Lasse Collin Date: 2009-02-05 09:12:57 +0200 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(-) commit d0c0b9e94e0af59d1d8f7f4829695d6efe19ccfe Author: Lasse Collin Date: 2009-02-03 12:15:17 +0200 Another utime() fix. src/xz/io.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) commit ccf92a29e8c7234284f1568c1ec0fd7cb98356ca Author: Lasse Collin Date: 2009-02-03 10:41:11 +0200 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 files changed, 2 insertions(+), 2 deletions(-) commit 99c1c2abfae2e87f3c17e929783e6d1bb7a3f302 Author: Lasse Collin Date: 2009-02-02 21:19:01 +0200 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(-) commit 22a0c6dd940b78cdac2f4a4b4b0e7cc0ac15021f Author: Lasse Collin Date: 2009-02-02 20:14:03 +0200 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(-) commit 8dd7b6052e18621e2e6c62f40f762ee88bd3eb65 Author: Lasse Collin Date: 2009-02-01 22:40:35 +0200 Fix a bug in lzma_block_buffer_decode(), although this function should be rewritten anyway. src/liblzma/common/block_buffer_decoder.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 55fd41431e61fb8178858283d636b6781e33e847 Author: Lasse Collin Date: 2009-02-01 22:39:07 +0200 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(-) commit 3e54ecee5cad30a5ca361a88a99230407abc0699 Author: Lasse Collin Date: 2009-02-01 00:11:20 +0200 Fix missing newlines in xzdec.c. src/xzdec/xzdec.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit d64ca34f1b6f34e86adefc7f735b4eff8e6d4a35 Author: Lasse Collin Date: 2009-02-01 00:10:07 +0200 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(-) commit 6a2eb54092fc625d59921a607ff68cd1a90aa898 Author: Lasse Collin Date: 2009-01-31 11:01:48 +0200 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(-) commit d9993fcb4dfc1f93abaf31ae23b3ef1f3123892b Author: Lasse Collin Date: 2009-01-31 10:13:09 +0200 Use _WIN32 instead of WIN32 in xzdec.c to test if compiling on Windows. src/xzdec/xzdec.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 2dbdc5befb33c3703e4609809101047c67caf343 Author: Lasse Collin Date: 2009-01-31 10:02:52 +0200 Fix two lines in lzma.h on which the # wasn't at the beginning of the line. src/liblzma/api/lzma.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 4ab760109106dc04f39dd81c97d50f528d1b51c1 Author: Lasse Collin Date: 2009-01-31 09:55:05 +0200 Add support for using liblzma headers in MSVC, which has no stdint.h or inttypes.h. src/liblzma/api/lzma.h | 70 +++++++++++++++++++++++++++++++---------------- 1 files changed, 46 insertions(+), 24 deletions(-) commit b2172cf823d3be34cb0246cb4cb32d105e2a34c9 Author: Lasse Collin Date: 2009-01-31 08:49:54 +0200 Fix # -> ## in a macro in lzma.h. src/liblzma/api/lzma.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1aae8698746d3c87a93f8398cdde2de9ba1f7208 Author: Lasse Collin Date: 2009-01-30 18:50:16 +0200 Updated README. README | 30 ++++++++++++++++++++---------- 1 files changed, 20 insertions(+), 10 deletions(-) commit f54bcf6f80d585236bc03ce49f7c73e1abaa17eb Author: Lasse Collin Date: 2009-01-30 00:29:58 +0200 Remove dangling crc64_init.c. src/liblzma/check/crc64_init.c | 55 ---------------------------------------- 1 files changed, 0 insertions(+), 55 deletions(-) commit 982da7ed314398420c38bf154a8f759d5f18b480 Author: Lasse Collin Date: 2009-01-28 17:16:38 +0200 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 files changed, 49 insertions(+), 35 deletions(-) commit c4683a660b4372156bdaf92f0cdc54a58f95ee6f Author: Lasse Collin Date: 2009-01-28 08:45:59 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 3241317093595db9f79104faafe93cb989c9f858 Author: Lasse Collin Date: 2009-01-28 08:43:26 +0200 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 files changed, 2 insertions(+), 0 deletions(-) commit f76e39cf930f888d460b443d18f977ebedea8b2a Author: Lasse Collin Date: 2009-01-27 18:36:05 +0200 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(-) commit 449b8c832b26c3633f3bec60095e57d2d3ada1f3 Author: Lasse Collin Date: 2009-01-26 20:09:17 +0200 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(-) commit 850f7400428dc9c5fd08a2f35a5bd2c9e45aede2 Author: Jim Meyering Date: 2009-01-19 21:37:16 +0100 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(-) commit 667481f1aad34e1ed15738e7913a9c7e256b4cf5 Author: Lasse Collin Date: 2009-01-26 14:34:10 +0200 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(+), 0 deletions(-) commit 5fb34d8324d3e7e0061df25d0086b64c8726b19d Author: Lasse Collin Date: 2009-01-26 14:33:28 +0200 Add more sanity checks to lzma_stream_buffer_decode(). src/liblzma/common/stream_buffer_decoder.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit c129748675a5daa8838df92bde32cc04f6ce61ba Author: Lasse Collin Date: 2009-01-26 14:33:13 +0200 Avoid hardcoded constant in easy.c. src/liblzma/common/easy.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1859d22d75e072463db74c25bc3f5a7992e5fdf6 Author: Lasse Collin Date: 2009-01-26 13:06:49 +0200 Tiny bit better sanity check in block_util.c src/liblzma/common/block_util.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2c5fe958e4bbe9b147b10c255955dfe2827fb8e7 Author: Lasse Collin Date: 2009-01-25 01:35:56 +0200 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 files changed, 3 insertions(+), 3 deletions(-) commit c81f13ff29271de7293f8af3d81848b1dcae3d19 Author: Lasse Collin Date: 2009-01-23 22:27:50 +0200 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(-) commit 0b3318661ce749550b8531dfd469639a08930391 Author: Lasse Collin Date: 2009-01-22 12:53:33 +0200 Fix a comment. src/liblzma/common/common.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9ec80355a7212a0a2f8c89d98e51b1d8b4e34eec Author: Lasse Collin Date: 2009-01-20 16:37:27 +0200 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(-) commit d8b58d099340f8f4007b24b211ee41a7210c061c Author: Lasse Collin Date: 2009-01-20 13:45:41 +0200 Block encoder cleanups src/liblzma/common/block_encoder.c | 28 +++++++--------------------- src/liblzma/common/block_encoder.h | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 21 deletions(-) commit 0c09810cb3635cb575cb54e694d41523e7d0a335 Author: Lasse Collin Date: 2009-01-20 10:35:15 +0200 Use LZMA_PROG_ERROR in lzma_code() as documented in base.h. src/liblzma/common/common.c | 24 ++++++++---------------- 1 files changed, 8 insertions(+), 16 deletions(-) commit 2f1a8e8eb898f6c036cde55d153ad348bfab3c00 Author: Lasse Collin Date: 2009-01-19 22:53:18 +0200 Fix handling of non-fatal errors in lzma_code(). src/liblzma/common/common.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) commit 4810b6bc25087be872960b9dd1d11ff07735dc88 Author: Lasse Collin Date: 2009-01-19 14:00:33 +0200 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(-) commit 00be5d2e09f9c7a6a8563465ad8b8042866817a4 Author: Lasse Collin Date: 2009-01-19 13:52:36 +0200 Remove dead code. src/liblzma/lzma/lzma_encoder.h | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-) commit 128586213f77c9bd82b7e9a62927f6d0c3769d85 Author: Lasse Collin Date: 2009-01-17 14:24:25 +0200 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(-) commit b056379490be5c584c264a967f0540041a163a1e Author: Lasse Collin Date: 2009-01-15 14:29:22 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit dc8f3be06d54ef6e6cfb5134dd3d25edd08cef89 Author: Lasse Collin Date: 2009-01-15 14:27:32 +0200 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 files changed, 24 insertions(+), 23 deletions(-) commit 8286a60b8f4bd5accfbc9d229d2204bac31994f2 Author: Lasse Collin Date: 2009-01-07 18:41:15 +0200 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(-) commit 4fd43cb3a906f6da2943f69239ee984c4787c9a9 Author: Lasse Collin Date: 2008-12-31 20:01:00 +0200 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(-) commit 061748f5932719643cda73383db715167d543c22 Author: Lasse Collin Date: 2008-12-31 18:59:02 +0200 Disable Subblock filter from test_compress.sh since it is disabled by default in configure.ac. tests/test_compress.sh | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) commit 9c45658ddc8bd4a7819ef8547d3e7ccf73203e78 Author: Lasse Collin Date: 2008-12-31 17:44:20 +0200 Disable both Subblock encoder and decoder my default, since they are not finished and may have security issues too. configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b59f1e98f50694cf6a8f1b342fd878feebdb2f88 Author: Lasse Collin Date: 2008-12-31 17:42:50 +0200 Update some files in debug directory. debug/full_flush.c | 2 -- debug/memusage.c | 2 -- debug/sync_flush.c | 2 -- 3 files changed, 0 insertions(+), 6 deletions(-) commit d1d17a40d33a9682424ca37282813492f2cba6d0 Author: Lasse Collin Date: 2008-12-31 17:41:46 +0200 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(-) commit 88d3e6b0b18e24142b6d3b41dc1b84b00c49fef3 Author: Lasse Collin Date: 2008-12-31 17:15:03 +0200 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(-) commit 322ecf93c961e45a1da8c4a794a7fdacefcd7f40 Author: Lasse Collin Date: 2008-12-31 16:29:39 +0200 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/bcj.h | 94 +++++++++++++++++++++++++++++++++++ src/liblzma/api/lzma/simple.h | 94 ----------------------------------- 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 ++-- 8 files changed, 105 insertions(+), 105 deletions(-) commit 7eea8bec3abfed883efba66264a1452a1c04f6b0 Author: Lasse Collin Date: 2008-12-31 00:57:27 +0200 Fixed missing quoting in configure.ac. configure.ac | 38 +++++++++++++++++++------------------- 1 files changed, 19 insertions(+), 19 deletions(-) commit 28e75f7086dbe9501d926c370375c69dfb1236ce Author: Lasse Collin Date: 2008-12-31 00:48:23 +0200 Updated src/liblzma/Makefile.am to use liblzma.pc.in, which should have been in the previous commit. src/liblzma/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 7ed9d943b31d3ee9c5fb2387e84a241ba33afe90 Author: Lasse Collin Date: 2008-12-31 00:30:49 +0200 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 | 88 ----------------------------- src/liblzma/check/crc32_fast.c | 88 +++++++++++++++++++++++++++++ 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 | 75 ------------------------ src/liblzma/check/crc64_fast.c | 75 ++++++++++++++++++++++++ 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/liblzma.pc.in | 12 ++++ src/liblzma/lz/lz_encoder.c | 6 ++ src/liblzma/lzma.pc.in | 11 ---- 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 +- 40 files changed, 519 insertions(+), 628 deletions(-) commit 5cda29b5665004fc0f21d0c41d78022a6a559ab2 Author: Lasse Collin Date: 2008-12-27 19:40:31 +0200 Use 28 MiB as memory usage limit for encoding in test_compress.sh. tests/test_compress.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 050eb14d29e2537c014662e83599fd8a77f13c45 Author: Lasse Collin Date: 2008-12-27 19:32:20 +0200 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 files changed, 8 insertions(+), 15 deletions(-) commit 4820f10d0f173864f6a2ea7479663b509ac53358 Author: Lasse Collin Date: 2008-12-27 19:30:19 +0200 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(-) commit e33194e79d8f5ce07cb4aca909b324ae75098f7e Author: Lasse Collin Date: 2008-12-27 19:27:49 +0200 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(-) commit 4d00652e75dd2736aedc3a3a8baff3dd0ea38074 Author: Lasse Collin Date: 2008-12-18 13:42:52 +0200 Updated Makefile.am that was missing from the previous commit. src/liblzma/common/Makefile.am | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 634636fa56ccee6e744f78b0abed76c8940f2f8f Author: Lasse Collin Date: 2008-12-17 21:49:53 +0200 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, 0 insertions(+), 176 deletions(-) commit 4fed98417d1687f5eccccb42a133fde3ec81216a Author: Lasse Collin Date: 2008-12-17 20:11:23 +0200 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(-) commit 653e457e3756ef35e5d1b2be3523b3e4b1e9ee4d Author: Lasse Collin Date: 2008-12-15 23:26:43 +0200 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 files changed, 14 insertions(+), 15 deletions(-) commit 671a5adf1e844bfdd6fd327016c3c28694493158 Author: Lasse Collin Date: 2008-12-15 19:39:13 +0200 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(-) commit 17781c2c20fd77029cb32e77792889f2f211d69d Author: Lasse Collin Date: 2008-12-15 14:26:52 +0200 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 files changed, 23 insertions(+), 10 deletions(-) commit f9f2d1e74398500724041f7fb3c38db35ad8c8d8 Author: Lasse Collin Date: 2008-12-15 11:20:22 +0200 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(+), 0 deletions(-) commit ff7fb2c605bccc411069e07b9f11fb957aea2ddf Author: Lasse Collin Date: 2008-12-15 10:01:59 +0200 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(-) commit 1ceebcf7e1bd30b95125f0ad67a09fdb6215d613 Author: Lasse Collin Date: 2008-12-13 00:54:11 +0200 Name the package "xz" in configure.ac. configure.ac | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) commit a94bf00d0af9b423851905b031be5a645a657820 Author: Lasse Collin Date: 2008-12-12 22:43:21 +0200 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 files changed, 5 insertions(+), 3 deletions(-) commit 8582d392baacd2cdac07ca60041f8c661323676d Author: Lasse Collin Date: 2008-12-10 01:31:00 +0200 Remove obsolete comment. src/xz/message.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit b1ae6dd731ea3636c3c2bfc7aefa71457d3328f1 Author: Lasse Collin Date: 2008-12-10 01:27:15 +0200 Use "decompression" consistently in --long-help. src/xz/message.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1ea9e7f15afd5d3981e2432710e932320597bca9 Author: Lasse Collin Date: 2008-12-10 01:23:58 +0200 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(+), 0 deletions(-) commit bceb3918dbb21f34976bfdd4c171a81319de71f7 Author: Lasse Collin Date: 2008-12-09 17:43:31 +0200 Put the file format specification into the public domain. Same will be done to the actual code later. doc/file-format.txt | 24 +++++++++--------------- 1 files changed, 9 insertions(+), 15 deletions(-) commit 6efa2d80d46a38861016f41f0eb6fa2ec9260fe6 Author: Lasse Collin Date: 2008-12-09 17:41:49 +0200 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(-) commit f20a03206b71ff01b827bb7a932411d6a6a4e06a Author: Lasse Collin Date: 2008-12-09 10:36:24 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit ef7890d56453dca1aeb2e12db29b7e418d93dde4 Author: Lasse Collin Date: 2008-12-01 23:04:12 +0200 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 files changed, 4 insertions(+), 4 deletions(-) commit ccd57afa09e332d664d6d6a7498702791ea5f659 Author: Lasse Collin Date: 2008-12-01 22:59:28 +0200 Validate the filter chain before checking filter-specific memory usage. src/liblzma/common/filter_common.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) commit c596fda40b62fe1683d0ac34d0c673dcaae2aa15 Author: Lasse Collin Date: 2008-12-01 22:58:22 +0200 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(-) commit c58f469be5bb9b0bdab825c6687445fd553f4f3a Author: Lasse Collin Date: 2008-12-01 22:55:18 +0200 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(-) commit cd708015202dbf7585b84a8781462a20c42a324b Author: Lasse Collin Date: 2008-12-01 22:50:28 +0200 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 files changed, 41 insertions(+), 54 deletions(-) commit 656ec87882ee74b192c4ea4a233a235eca7b04d4 Author: Lasse Collin Date: 2008-12-01 16:30:11 +0200 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(-) commit 691a9155b7a28882baf37e9d1e969e32e91dbc7a Author: Lasse Collin Date: 2008-11-29 10:03:49 +0200 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 insertions(+), 1 deletions(-) commit c7007ddf06ac2b0e018d71d281c21b99f16e7ae0 Author: Lasse Collin Date: 2008-11-28 12:00:48 +0200 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 files changed, 9 insertions(+), 5 deletions(-) commit ae65dcfde27014e4d811e1a1308aa5d0fe8debbd Author: Lasse Collin Date: 2008-11-27 19:28:59 +0200 Cleanups to message.c. src/xz/message.c | 47 ++++++++++++++++++----------------------------- 1 files changed, 18 insertions(+), 29 deletions(-) commit a8368b75cdcd5427299001cc42839287f27b244d Author: Lasse Collin Date: 2008-11-25 02:37:47 +0200 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, 0 insertions(+), 614 deletions(-) commit 69472ee5f055a2bb6f28106f0923e1461fd1d080 Author: Lasse Collin Date: 2008-11-23 15:09:03 +0200 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(-) commit 4249c8c15a08f55b51b7012e6aaafce3aa9eb650 Author: Lasse Collin Date: 2008-11-22 17:44:33 +0200 Typo fix src/xz/process.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6d1d6f4598d121253dbe1084c6866b66e95c361b Author: Lasse Collin Date: 2008-11-20 22:59:10 +0200 Support NetBSD's errno for O_NOFOLLOW. src/xz/io.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit f901a290eef67b8ea4720ccdf5f46edf775ed9d7 Author: Lasse Collin Date: 2008-11-20 18:05:52 +0200 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(-) commit 86a0ed8f01c8ed44721223f885e679c71b7bb94c Author: Lasse Collin Date: 2008-11-20 11:01:29 +0200 Minor cleanups to xzdec. src/xzdec/xzdec.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) commit 54f716ba8905d09752dcd1519455a40bd21d5317 Author: Lasse Collin Date: 2008-11-19 23:55:22 +0200 Added missing check for uint16_t. configure.ac | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 1880a3927b23f265f63b2adb86fbdb81ea09eb06 Author: Lasse Collin Date: 2008-11-19 23:52:24 +0200 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/Makefile.am | 72 ---- src/lzma/args.c | 500 -------------------------- src/lzma/args.h | 56 --- src/lzma/hardware.c | 122 ------- src/lzma/hardware.h | 45 --- src/lzma/io.c | 658 ---------------------------------- src/lzma/io.h | 97 ----- src/lzma/list.c | 477 ------------------------- src/lzma/main.c | 402 --------------------- src/lzma/main.h | 60 ---- src/lzma/message.c | 892 ----------------------------------------------- src/lzma/message.h | 132 ------- src/lzma/options.c | 352 ------------------- src/lzma/options.h | 46 --- src/lzma/private.h | 52 --- src/lzma/process.c | 391 --------------------- src/lzma/process.h | 70 ---- src/lzma/suffix.c | 213 ----------- src/lzma/suffix.h | 40 --- src/lzma/util.c | 199 ----------- src/lzma/util.h | 71 ---- src/lzmadec/Makefile.am | 29 -- src/lzmadec/lzmadec.c | 492 -------------------------- src/xz/Makefile.am | 74 ++++ src/xz/args.c | 500 ++++++++++++++++++++++++++ src/xz/args.h | 56 +++ src/xz/hardware.c | 122 +++++++ src/xz/hardware.h | 45 +++ src/xz/io.c | 658 ++++++++++++++++++++++++++++++++++ src/xz/io.h | 97 +++++ src/xz/list.c | 477 +++++++++++++++++++++++++ src/xz/main.c | 402 +++++++++++++++++++++ src/xz/main.h | 60 ++++ src/xz/message.c | 892 +++++++++++++++++++++++++++++++++++++++++++++++ src/xz/message.h | 132 +++++++ src/xz/options.c | 352 +++++++++++++++++++ src/xz/options.h | 46 +++ src/xz/private.h | 52 +++ src/xz/process.c | 391 +++++++++++++++++++++ src/xz/process.h | 70 ++++ src/xz/suffix.c | 213 +++++++++++ src/xz/suffix.h | 40 +++ src/xz/util.c | 199 +++++++++++ src/xz/util.h | 71 ++++ src/xzdec/Makefile.am | 29 ++ src/xzdec/xzdec.c | 492 ++++++++++++++++++++++++++ tests/test_compress.sh | 29 +- tests/test_files.sh | 4 +- 51 files changed, 5498 insertions(+), 5500 deletions(-) commit e114502b2bc371e4a45449832cb69be036360722 Author: Lasse Collin Date: 2008-11-19 20:46:52 +0200 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.in.h | 226 +++++++ lib/getopt1.c | 8 +- lib/getopt_.h | 226 ------- 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 +- 113 files changed, 3462 insertions(+), 2946 deletions(-) commit 3c3905b53462ae235c9438d86a4dc51086410932 Author: Lasse Collin Date: 2008-10-09 11:12:29 +0300 Fixed the test that should have been fixed as part of 1e8e4fd1f3e50129b4541406ad765d2aa1233943. tests/test_block_header.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 0f295bf7a3ece01f667caae318cc3e3424085886 Author: Lasse Collin Date: 2008-10-07 16:42:18 +0300 Fixed some help messages. src/lzma/help.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 1e8e4fd1f3e50129b4541406ad765d2aa1233943 Author: Lasse Collin Date: 2008-10-07 09:40:31 +0300 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(-) commit 5e4df4c3c09c82bbbb1a916784e3dc717ca4ff81 Author: Lasse Collin Date: 2008-10-03 19:36:09 +0300 Removed fi from po/LINGUAS. po/LINGUAS | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit fcfb86c7770328cfffa2e83b176af9a1ba2d9128 Author: Lasse Collin Date: 2008-10-03 07:06:48 +0300 Fixed suffix handling with --format=raw. src/lzma/suffix.c | 28 +++++++++++++++++++--------- 1 files changed, 19 insertions(+), 9 deletions(-) commit bd137524f2f50e30ba054f42f1f6536cd3cee920 Author: Lasse Collin Date: 2008-10-02 22:51:46 +0300 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(-) commit 4c321a41c482821aa3c4d64cdf886a6ed904d844 Author: Lasse Collin Date: 2008-09-30 17:43:55 +0300 Renamed the test files from .lzma suffix to .xz suffix. tests/files/README | 128 ++++++++++++------------ tests/files/bad-0-backward_size.lzma | Bin 32 -> 0 bytes tests/files/bad-0-backward_size.xz | Bin 0 -> 32 bytes tests/files/bad-0-empty-truncated.lzma | Bin 31 -> 0 bytes tests/files/bad-0-empty-truncated.xz | Bin 0 -> 31 bytes tests/files/bad-0-footer_magic.lzma | Bin 32 -> 0 bytes tests/files/bad-0-footer_magic.xz | Bin 0 -> 32 bytes tests/files/bad-0-header_magic.lzma | Bin 32 -> 0 bytes tests/files/bad-0-header_magic.xz | Bin 0 -> 32 bytes tests/files/bad-0-nonempty_index.lzma | Bin 32 -> 0 bytes tests/files/bad-0-nonempty_index.xz | Bin 0 -> 32 bytes tests/files/bad-0cat-alone.lzma | Bin 55 -> 0 bytes tests/files/bad-0cat-alone.xz | Bin 0 -> 55 bytes tests/files/bad-0cat-header_magic.lzma | Bin 64 -> 0 bytes tests/files/bad-0cat-header_magic.xz | Bin 0 -> 64 bytes tests/files/bad-0catpad-empty.lzma | Bin 69 -> 0 bytes tests/files/bad-0catpad-empty.xz | Bin 0 -> 69 bytes tests/files/bad-0pad-empty.lzma | Bin 37 -> 0 bytes tests/files/bad-0pad-empty.xz | Bin 0 -> 37 bytes tests/files/bad-1-block_header-1.lzma | Bin 64 -> 0 bytes tests/files/bad-1-block_header-1.xz | Bin 0 -> 64 bytes tests/files/bad-1-block_header-2.lzma | Bin 64 -> 0 bytes tests/files/bad-1-block_header-2.xz | Bin 0 -> 64 bytes tests/files/bad-1-block_header-3.lzma | Bin 68 -> 0 bytes tests/files/bad-1-block_header-3.xz | Bin 0 -> 68 bytes tests/files/bad-1-block_header-4.lzma | Bin 72 -> 0 bytes tests/files/bad-1-block_header-4.xz | Bin 0 -> 72 bytes tests/files/bad-1-check-crc32.lzma | Bin 68 -> 0 bytes tests/files/bad-1-check-crc32.xz | Bin 0 -> 68 bytes tests/files/bad-1-check-crc64.lzma | Bin 72 -> 0 bytes tests/files/bad-1-check-crc64.xz | Bin 0 -> 72 bytes tests/files/bad-1-check-sha256.lzma | Bin 96 -> 0 bytes tests/files/bad-1-check-sha256.xz | Bin 0 -> 96 bytes tests/files/bad-1-lzma2-1.lzma | Bin 64 -> 0 bytes tests/files/bad-1-lzma2-1.xz | Bin 0 -> 64 bytes tests/files/bad-1-lzma2-2.lzma | Bin 424 -> 0 bytes tests/files/bad-1-lzma2-2.xz | Bin 0 -> 424 bytes tests/files/bad-1-lzma2-3.lzma | Bin 424 -> 0 bytes tests/files/bad-1-lzma2-3.xz | Bin 0 -> 424 bytes tests/files/bad-1-lzma2-4.lzma | Bin 408 -> 0 bytes tests/files/bad-1-lzma2-4.xz | Bin 0 -> 408 bytes tests/files/bad-1-lzma2-5.lzma | Bin 408 -> 0 bytes tests/files/bad-1-lzma2-5.xz | Bin 0 -> 408 bytes tests/files/bad-1-lzma2-6.lzma | Bin 68 -> 0 bytes tests/files/bad-1-lzma2-6.xz | Bin 0 -> 68 bytes tests/files/bad-1-lzma2-7.lzma | Bin 408 -> 0 bytes tests/files/bad-1-lzma2-7.xz | Bin 0 -> 408 bytes tests/files/bad-1-stream_flags-1.lzma | Bin 68 -> 0 bytes tests/files/bad-1-stream_flags-1.xz | Bin 0 -> 68 bytes tests/files/bad-1-stream_flags-2.lzma | Bin 68 -> 0 bytes tests/files/bad-1-stream_flags-2.xz | Bin 0 -> 68 bytes tests/files/bad-1-stream_flags-3.lzma | Bin 68 -> 0 bytes tests/files/bad-1-stream_flags-3.xz | Bin 0 -> 68 bytes tests/files/bad-1-vli-1.lzma | Bin 72 -> 0 bytes tests/files/bad-1-vli-1.xz | Bin 0 -> 72 bytes tests/files/bad-1-vli-2.lzma | Bin 72 -> 0 bytes tests/files/bad-1-vli-2.xz | Bin 0 -> 72 bytes tests/files/bad-2-compressed_data_padding.lzma | Bin 92 -> 0 bytes tests/files/bad-2-compressed_data_padding.xz | Bin 0 -> 92 bytes tests/files/bad-2-index-1.lzma | Bin 92 -> 0 bytes tests/files/bad-2-index-1.xz | Bin 0 -> 92 bytes tests/files/bad-2-index-2.lzma | Bin 92 -> 0 bytes tests/files/bad-2-index-2.xz | Bin 0 -> 92 bytes tests/files/bad-2-index-3.lzma | Bin 92 -> 0 bytes tests/files/bad-2-index-3.xz | Bin 0 -> 92 bytes tests/files/bad-2-index-4.lzma | Bin 92 -> 0 bytes tests/files/bad-2-index-4.xz | Bin 0 -> 92 bytes tests/files/good-0-empty.lzma | Bin 32 -> 0 bytes tests/files/good-0-empty.xz | Bin 0 -> 32 bytes tests/files/good-0cat-empty.lzma | Bin 64 -> 0 bytes tests/files/good-0cat-empty.xz | Bin 0 -> 64 bytes tests/files/good-0catpad-empty.lzma | Bin 68 -> 0 bytes tests/files/good-0catpad-empty.xz | Bin 0 -> 68 bytes tests/files/good-0pad-empty.lzma | Bin 36 -> 0 bytes tests/files/good-0pad-empty.xz | Bin 0 -> 36 bytes tests/files/good-1-3delta-lzma2.lzma | Bin 528 -> 0 bytes tests/files/good-1-3delta-lzma2.xz | Bin 0 -> 528 bytes tests/files/good-1-block_header-1.lzma | Bin 72 -> 0 bytes tests/files/good-1-block_header-1.xz | Bin 0 -> 72 bytes tests/files/good-1-block_header-2.lzma | Bin 68 -> 0 bytes tests/files/good-1-block_header-2.xz | Bin 0 -> 68 bytes tests/files/good-1-block_header-3.lzma | Bin 68 -> 0 bytes tests/files/good-1-block_header-3.xz | Bin 0 -> 68 bytes tests/files/good-1-check-crc32.lzma | Bin 68 -> 0 bytes tests/files/good-1-check-crc32.xz | Bin 0 -> 68 bytes tests/files/good-1-check-crc64.lzma | Bin 72 -> 0 bytes tests/files/good-1-check-crc64.xz | Bin 0 -> 72 bytes tests/files/good-1-check-none.lzma | Bin 64 -> 0 bytes tests/files/good-1-check-none.xz | Bin 0 -> 64 bytes tests/files/good-1-check-sha256.lzma | Bin 96 -> 0 bytes tests/files/good-1-check-sha256.xz | Bin 0 -> 96 bytes tests/files/good-1-delta-lzma2.tiff.lzma | Bin 51312 -> 0 bytes tests/files/good-1-delta-lzma2.tiff.xz | Bin 0 -> 51312 bytes tests/files/good-1-lzma2-1.lzma | Bin 424 -> 0 bytes tests/files/good-1-lzma2-1.xz | Bin 0 -> 424 bytes tests/files/good-1-lzma2-2.lzma | Bin 424 -> 0 bytes tests/files/good-1-lzma2-2.xz | Bin 0 -> 424 bytes tests/files/good-1-lzma2-3.lzma | Bin 408 -> 0 bytes tests/files/good-1-lzma2-3.xz | Bin 0 -> 408 bytes tests/files/good-1-sparc-lzma2.lzma | Bin 2292 -> 0 bytes tests/files/good-1-sparc-lzma2.xz | Bin 0 -> 2292 bytes tests/files/good-1-x86-lzma2.lzma | Bin 1936 -> 0 bytes tests/files/good-1-x86-lzma2.xz | Bin 0 -> 1936 bytes tests/files/good-2-lzma2.lzma | Bin 92 -> 0 bytes tests/files/good-2-lzma2.xz | Bin 0 -> 92 bytes tests/files/unsupported-block_header.lzma | Bin 68 -> 0 bytes tests/files/unsupported-block_header.xz | Bin 0 -> 68 bytes tests/files/unsupported-check.lzma | Bin 68 -> 0 bytes tests/files/unsupported-check.xz | Bin 0 -> 68 bytes tests/files/unsupported-filter_flags-1.lzma | Bin 68 -> 0 bytes tests/files/unsupported-filter_flags-1.xz | Bin 0 -> 68 bytes tests/files/unsupported-filter_flags-2.lzma | Bin 68 -> 0 bytes tests/files/unsupported-filter_flags-2.xz | Bin 0 -> 68 bytes tests/files/unsupported-filter_flags-3.lzma | Bin 68 -> 0 bytes tests/files/unsupported-filter_flags-3.xz | Bin 0 -> 68 bytes tests/test_files.sh | 6 +- 116 files changed, 66 insertions(+), 68 deletions(-) commit 8e60c889a2816a63013a35c99ce26bf28f5b78eb Author: Lasse Collin Date: 2008-09-30 13:57:44 +0300 Fixed Stream decoder to actually use the first_stream variable. src/liblzma/common/stream_decoder.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 3bdbc12c054d1961133ee19802af7dd3c3494543 Author: Lasse Collin Date: 2008-09-30 13:56:57 +0300 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(-) commit a6639022fdc536e5659b070a465221b4cf7c51fa Author: Lasse Collin Date: 2008-09-30 13:34:07 +0300 Fixed uninitialized variable in Stream decoder. src/liblzma/common/stream_decoder.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit ed3709000a3f17ecefab29b2235d7e2221b00003 Author: Lasse Collin Date: 2008-09-30 13:27:28 +0300 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(+), 0 deletions(-) commit ea560b0ea80525752bdcd0074d24f8dc170bbe29 Author: Lasse Collin Date: 2008-09-27 23:49:24 +0300 Fix conflicting Subblock helper filter's ID. src/liblzma/common/common.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ad97483b6e55142fd8d5c041db057017a891cd95 Author: Lasse Collin Date: 2008-09-27 23:37:13 +0300 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(-) commit 7a57069167e9e63394e2b095ee3a63253fcb51c7 Author: Lasse Collin Date: 2008-09-27 23:16:09 +0300 Remove po/fi.po since I'm not keeping it updated for now. po/fi.po | 446 -------------------------------------------------------------- 1 files changed, 0 insertions(+), 446 deletions(-) commit 018ae09df8f2fee5a7374f307df4cb42fad0b81e Author: Lasse Collin Date: 2008-09-27 23:13:54 +0300 Fix also test_compress.sh. tests/test_compress.sh | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 3a62a5fb85d2eebd8666e64ed5d364d095062858 Author: Lasse Collin Date: 2008-09-27 23:01:15 +0300 Fixed compilation of test_filter_flags.c, which was broken by 1dcecfb09b55157b8653d747963069c8bed74f04. tests/test_filter_flags.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) commit c6ca26eef7cd07eba449035514e2b8f9ac3111c0 Author: Lasse Collin Date: 2008-09-27 19:11:02 +0300 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 files changed, 32 insertions(+), 93 deletions(-) commit 1dcecfb09b55157b8653d747963069c8bed74f04 Author: Lasse Collin Date: 2008-09-27 19:09:21 +0300 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(-) commit 5cc5064cae603b649c64c40125c7dd365de54c9d Author: Lasse Collin Date: 2008-09-27 11:28:49 +0300 Added 7z2lzma.bash. extra/7z2lzma/7z2lzma.bash | 114 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 114 insertions(+), 0 deletions(-) commit f147666a5cd15542d4e427da58629f4a71cc38e1 Author: Lasse Collin Date: 2008-09-17 22:11:39 +0300 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(-) commit 13d68b069849e19c33822cd8996cd6447890abb1 Author: Lasse Collin Date: 2008-09-13 13:54:00 +0300 LZ decoder cleanup src/liblzma/lz/lz_decoder.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) commit 13a74b78e37f16c9096ba5fe1859cc04eaa2f9f7 Author: Lasse Collin Date: 2008-09-13 12:10:43 +0300 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(-) commit 320601b2c7b08fc7da9da18d5bf7c3c1a189b080 Author: Lasse Collin Date: 2008-09-12 22:41:40 +0300 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(-) commit ec490da5228263b25bf786bb23d1008468f55b30 Author: Lasse Collin Date: 2008-09-11 23:10:44 +0300 Simplified debug/known_sizes.c to match the relaxed requirements of Block encoder. debug/known_sizes.c | 14 +++++--------- 1 files changed, 5 insertions(+), 9 deletions(-) commit 16e8b98f2659347edfa74afdbbb9e73311153cb9 Author: Lasse Collin Date: 2008-09-11 23:09:24 +0300 Remove a check from Block encoder that should have already been removed in 2ba01bfa755e47ff6af84a978e3c8d63d7d2775e. src/liblzma/common/block_encoder.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) commit 5a710c3805bdf6d7e3c92e954e4e4565b27bcb13 Author: Lasse Collin Date: 2008-09-11 20:02:38 +0300 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, 0 insertions(+), 36 deletions(-) commit 01892b2ca5f69bed0ea746e04b604030d57806bb Author: Lasse Collin Date: 2008-09-11 10:49:14 +0300 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 962f2231d49409fe6852e44ffe8c5dbabb04bc7d Author: Lasse Collin Date: 2008-09-11 10:48:12 +0300 Fix a compiler error on big endian systems that don't support unaligned memory access. src/common/integer.h | 32 ++++++++++++++++++-------------- 1 files changed, 18 insertions(+), 14 deletions(-) commit fa3ab0df8ae7a8a1ad55b52266dc0fd387458671 Author: Lasse Collin Date: 2008-09-11 10:46:14 +0300 Silence a compiler warning. src/lzma/process.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9373e81e18822db4972819442ea4c2cb9955470b Author: Lasse Collin Date: 2008-09-10 19:16:32 +0300 Bumped version to 4.999.6alpha. configure.ac | 2 +- src/liblzma/api/lzma/version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit cb072b7c8442ba68bb0c62c0abbbe939794887a3 Author: Lasse Collin Date: 2008-09-10 17:02:00 +0300 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 files changed, 4 insertions(+), 3 deletions(-) commit 123ab0acec435c9e9866a99e30482116cfbd9ba5 Author: Lasse Collin Date: 2008-09-10 16:44:32 +0300 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(-) commit 9cfcd0c4f2f865d8fbbb46ea28344a9be0dd8ad1 Author: Lasse Collin Date: 2008-09-10 00:33:00 +0300 Comments src/liblzma/common/stream_encoder.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit 2ba01bfa755e47ff6af84a978e3c8d63d7d2775e Author: Lasse Collin Date: 2008-09-10 00:27:02 +0300 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(-) commit 07efcb5a6bc5d7018798ebd728586f84183e7d64 Author: Lasse Collin Date: 2008-09-07 10:23:13 +0300 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(-) commit 32fe5fa541e82c08e054086279079ae5016bd8d8 Author: Lasse Collin Date: 2008-09-06 23:42:50 +0300 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(-) commit 0a31ed9d5e3cde4feb094b66f3a8b2c074605d84 Author: Lasse Collin Date: 2008-09-06 15:14:30 +0300 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(-) commit da98df54400998be2a6c3876f9655a3c51b93c10 Author: Lasse Collin Date: 2008-09-04 11:53:06 +0300 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(-) commit 2496aee8a7741a8a0d42987db41ff2cf1a4bdabd Author: Lasse Collin Date: 2008-09-04 10:39:15 +0300 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(-) commit bea301c26d5d52675e11e0236faec0492af98f60 Author: Lasse Collin Date: 2008-09-03 17:06:25 +0300 Minor updates to the file format specification. doc/file-format.txt | 105 +++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 85 insertions(+), 20 deletions(-) commit 9c75b089b4a9e0edcf4cf7970a4383768707d6c8 Author: Lasse Collin Date: 2008-09-02 19:33:32 +0300 Command line tool fixes src/lzma/process.c | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) commit bab0590504b5aeff460ab4ca8c964dd7c1bad9e4 Author: Lasse Collin Date: 2008-09-02 19:31:42 +0300 Auto decoder cleanup src/liblzma/common/auto_decoder.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 689602336d126a46b60d791a67decab65e1e81f5 Author: Lasse Collin Date: 2008-09-02 19:12:12 +0300 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 files changed, 71 insertions(+), 16 deletions(-) commit 80c4158f19904026433eb6f5d5ca98a0ecd4f66c Author: Lasse Collin Date: 2008-09-02 14:56:52 +0300 Stream decoder cleanups src/liblzma/common/stream_decoder.c | 57 +++++++++++++++++++--------------- 1 files changed, 32 insertions(+), 25 deletions(-) commit fc681657450ce57be1fe08f7a15d31dcc705e514 Author: Lasse Collin Date: 2008-09-02 11:45:39 +0300 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(-) commit ede675f9ac1ca82a7d7c290324adba672118bc8d Author: Lasse Collin Date: 2008-08-31 11:47:01 +0300 Fix wrong pointer calculation in LZMA encoder. src/liblzma/lzma/lzma_encoder.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 3b34851de1eaf358cf9268922fa0eeed8278d680 Author: Lasse Collin Date: 2008-08-28 22:53:15 +0300 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 +- debug/crc32.c | 45 + 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 | 203 --- src/liblzma/common/common.c | 298 +++++ src/liblzma/common/common.h | 237 ++-- src/liblzma/common/delta_common.c | 66 - src/liblzma/common/delta_common.h | 44 - src/liblzma/common/delta_decoder.c | 61 - src/liblzma/common/delta_decoder.h | 28 - src/liblzma/common/delta_encoder.c | 98 -- src/liblzma/common/delta_encoder.h | 28 - 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_common.h | 30 - src/liblzma/common/raw_decoder.c | 116 -- src/liblzma/common/raw_decoder.h | 29 - src/liblzma/common/raw_encoder.c | 111 -- src/liblzma/common/raw_encoder.h | 29 - src/liblzma/common/stream_common.c | 23 - src/liblzma/common/stream_common.h | 31 - 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 +- src/liblzma/common/stream_flags_common.c | 40 + src/liblzma/common/stream_flags_common.h | 31 + src/liblzma/common/stream_flags_decoder.c | 2 +- src/liblzma/common/stream_flags_encoder.c | 2 +- src/liblzma/common/stream_flags_equal.c | 36 - src/liblzma/common/version.c | 25 - src/liblzma/common/vli_decoder.c | 29 +- src/liblzma/common/vli_encoder.c | 23 +- src/liblzma/common/vli_size.c | 37 + src/liblzma/delta/Makefile.am | 34 + src/liblzma/delta/delta_common.c | 66 + src/liblzma/delta/delta_common.h | 44 + src/liblzma/delta/delta_decoder.c | 82 ++ src/liblzma/delta/delta_decoder.h | 32 + src/liblzma/delta/delta_encoder.c | 119 ++ src/liblzma/delta/delta_encoder.h | 30 + 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/lz_encoder_private.h | 40 - 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 ++++++ src/liblzma/lzma/lzma2_encoder.h | 34 + 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_gen.c | 55 - src/liblzma/rangecoder/price_table_init.c | 33 +- src/liblzma/rangecoder/price_tablegen.c | 56 + 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 + src/liblzma/simple/simple_decoder.h | 29 + src/liblzma/simple/simple_encoder.c | 45 + src/liblzma/simple/simple_encoder.h | 30 + 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 tests/files/good-1-sparc-lzma2.lzma | Bin 0 -> 2292 bytes tests/files/good-1-x86-lzma2.lzma | Bin 0 -> 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-sparc-lzma.lzma | Bin 2263 -> 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/good-single-x86-lzma.lzma | Bin 1909 -> 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 + 294 files changed, 9768 insertions(+), 8195 deletions(-) commit 57b9a145a527f0716822615e5ed536d33aebd3fc Author: Lasse Collin Date: 2008-06-20 17:16:32 +0300 Fix test_filter_flags to match the new restriction of lc+lp. tests/test_filter_flags.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit eaafc4367c77ec1d910e16d11b4da293969d97a3 Author: Lasse Collin Date: 2008-06-20 16:19:54 +0300 Remove some redundant code from LZMA encoder. src/liblzma/lzma/lzma_encoder.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) commit 0809c46534fa5664fe35d9e98d95e87312ed130e Author: Lasse Collin Date: 2008-06-19 16:35:08 +0300 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(-) commit d25ab1b96178f06a0e724f58e3cd68300b2b1275 Author: Lasse Collin Date: 2008-06-18 21:45:19 +0300 Comments src/liblzma/lzma/lzma_encoder.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) commit 6368a2fa5901c75864be5171dd57a50af7adbb41 Author: Lasse Collin Date: 2008-06-18 19:19:02 +0300 Delete old code that was supposed to be already deleted from test_block_header.c. tests/test_block_header.c | 30 ------------------------------ 1 files changed, 0 insertions(+), 30 deletions(-) commit 7d17818cec8597f847b0a2537fde991bbc3d9e96 Author: Lasse Collin Date: 2008-06-18 18:02:10 +0300 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 +- src/common/bswap.h | 44 ++ 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 | 304 +++------- 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/check_byteswap.h | 43 -- 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.c | 122 ++++ 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/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 +++++++ src/liblzma/common/index_encoder.h | 30 + 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/metadata_encoder.h | 30 - 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 ++++---------- src/liblzma/common/stream_decoder.h | 28 + src/liblzma/common/stream_encoder.c | 282 ++++++++ src/liblzma/common/stream_encoder.h | 30 + src/liblzma/common/stream_encoder_multi.c | 445 ------------- src/liblzma/common/stream_encoder_multi.h | 26 - src/liblzma/common/stream_encoder_single.c | 219 ------- src/liblzma/common/stream_flags_decoder.c | 260 ++------- src/liblzma/common/stream_flags_encoder.c | 56 +- src/liblzma/common/stream_flags_equal.c | 36 + 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 +- 115 files changed, 4845 insertions(+), 8155 deletions(-) commit bf6348d1a3ff09fdc06940468f318f75ffa6af11 Author: Lasse Collin Date: 2008-06-17 15:03:46 +0300 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 files changed, 508 insertions(+), 1286 deletions(-) commit 803194ddd26f01ff60ba4e9924c6087a56b29827 Author: Lasse Collin Date: 2008-06-11 21:42:47 +0300 Fix uninitialized variable in LZMA encoder. This was introduced in 369f72fd656f537a9a8e06f13e6d0d4c242be22f. src/liblzma/lzma/lzma_encoder_init.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 0ea98e52ba87453497b1355c51f13bad55c8924a Author: Lasse Collin Date: 2008-06-11 15:08:44 +0300 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(-) commit 436fa5fae96d4e35759aed33066060f09ee8c6ef Author: Lasse Collin Date: 2008-06-10 20:36:12 +0300 s/decompressed/compressed/ in the command line tool's error message. src/lzma/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 369f72fd656f537a9a8e06f13e6d0d4c242be22f Author: Lasse Collin Date: 2008-06-01 12:48:17 +0300 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(-) commit e55e0e873ce2511325749d415ae547d62ab5f00d Author: Lasse Collin Date: 2008-05-30 11:53:41 +0300 Typo fixes from meyering. doc/faq.txt | 4 ++-- doc/liblzma-advanced.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit ed6664146fcbe9cc4a3b23b31632182ed812ea93 Author: Lasse Collin Date: 2008-05-11 14:24:42 +0300 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(-) commit b09464bf9ae694afc2d1dc26188ac4e2e8af0a63 Author: Lasse Collin Date: 2008-05-11 14:17:21 +0300 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 files changed, 12 insertions(+), 12 deletions(-) commit 11de5d5267f7a0a7f0a4d34eec147e65eaf9f9cf Author: Lasse Collin Date: 2008-05-06 15:15:07 +0300 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(-) commit dc192b6343ae36276c85fcf7ef6006147816eadc Author: Lasse Collin Date: 2008-05-06 13:41:05 +0300 Typo fix src/liblzma/api/lzma/init.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 944b62b93239b27b338d117f2668c0e95849659b Author: Lasse Collin Date: 2008-05-04 22:29:27 +0300 Don't print an error message on broken pipe unless --verbose is used. src/lzma/io.c | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) commit 8e074349e47ea6832b8fdf9244e581d453733433 Author: Lasse Collin Date: 2008-04-30 22:16:17 +0300 Fix a crash with --format=alone if other filters than LZMA are specified on the command line. src/lzma/args.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) commit 2f361ac19b7fd3abcd362de4d470e6a9eb495b73 Author: Lasse Collin Date: 2008-04-28 17:08:27 +0300 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 3be21fb12f4cec2cf07799e8960382f4cb375369 Author: Lasse Collin Date: 2008-04-28 17:06:34 +0300 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_limiter.c | 288 ++++++++++++++++++++++++++++++++++ src/liblzma/common/memory_limitter.c | 288 ---------------------------------- src/lzma/list.c | 6 +- src/lzmadec/lzmadec.c | 12 +- tests/test_memlimit.c | 4 +- 10 files changed, 316 insertions(+), 316 deletions(-) commit beeb81060821dfec4e7898e0d44b7900dcb2215e Author: Lasse Collin Date: 2008-04-25 15:39:50 +0300 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 files changed, 7 insertions(+), 2 deletions(-) commit c324325f9f13cdeb92153c5d00962341ba070ca2 Author: Lasse Collin Date: 2008-04-25 13:58:56 +0300 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(-) commit d3ba30243c75c13d094de1793f9c58acdbacc692 Author: Lasse Collin Date: 2008-04-25 13:41:29 +0300 Added memusage.c to debug directory. debug/Makefile.am | 3 +- debug/memusage.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletions(-) commit 8f804c29aa8471ccd6438ddca254092b8869ca52 Author: Lasse Collin Date: 2008-04-25 13:32:35 +0300 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(-) commit c99037ea10f121cbacf60c37a36c29768ae53447 Author: Lasse Collin Date: 2008-04-24 20:25:39 +0300 Fix a memory leak by calling free(extra->data) in lzma_extra_free(). src/liblzma/common/extra.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 22ba3b0b5043fa481903482ce85015fe775939e5 Author: Lasse Collin Date: 2008-04-24 20:23:05 +0300 Make unlzma and lzcat symlinks. src/lzma/Makefile.am | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) commit 17c36422d4cbc2c70d5c83ec389406f92cd9e85e Author: Lasse Collin Date: 2008-04-24 20:20:27 +0300 Fixed a bug in command line option parsing. src/lzma/options.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 283f939974c32c47f05d495e8dea455ec646ed64 Author: Lasse Collin Date: 2008-04-24 20:19:20 +0300 Added two assert()s. src/liblzma/lzma/lzma_encoder.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit eb348a60b6e19a7c093f892434f23c4756973ffd Author: Lasse Collin Date: 2008-04-24 19:22:53 +0300 Switch to uint16_t as the type of range coder probabilities. src/liblzma/rangecoder/range_common.h | 25 +++++++++++++++++++------ 1 files changed, 19 insertions(+), 6 deletions(-) commit 6c5306e312bcfd254cf654f88c04e34ba786df3d Author: Lasse Collin Date: 2008-04-24 18:39:57 +0300 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(-) commit 712cfe3ebfd24df24d8896b1315c53c3bc4369c8 Author: Lasse Collin Date: 2008-04-24 18:38:00 +0300 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(-) commit bc04486e368d20b3027cde625267762aae063965 Author: Lasse Collin Date: 2008-04-24 17:33:01 +0300 Fix fastpos problem in Makefile.am when built with --enable-small. src/liblzma/lzma/Makefile.am | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 7ab493924e0ed590a5121a15ee54038d238880d3 Author: Lasse Collin Date: 2008-04-24 17:30:51 +0300 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 files changed, 1 insertions(+), 1 deletions(-) commit 641998c3e1ecc8b598fe0eb051fab8b9535c291b Author: Lasse Collin Date: 2008-03-24 16:38:40 +0200 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(-) commit ad999efd279d95f1e7ac555b14170e8e9020488c Author: Lasse Collin Date: 2008-03-22 14:39:34 +0200 Take advantage of arithmetic right shift in range decoder. src/liblzma/rangecoder/range_decoder.h | 52 ++++++++++++++++++++++--------- 1 files changed, 37 insertions(+), 15 deletions(-) commit 03e0e8a0d7228b6ff1f0af39e2c040a4e425973d Author: Lasse Collin Date: 2008-03-22 14:18:29 +0200 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(+), 0 deletions(-) commit 7521bbdc83acab834594a22bec50c8e1bd836298 Author: Lasse Collin Date: 2008-03-22 01:26:36 +0200 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 files changed, 1 insertions(+), 1 deletions(-) commit 63b74d000eedaebb8485f623e56864ff5ab71064 Author: Lasse Collin Date: 2008-03-22 00:57:33 +0200 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(-) commit e6eb0a26757e851cef62b9440319a8e73b015cb9 Author: Lasse Collin Date: 2008-03-14 23:16:11 +0200 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 files changed, 4 insertions(+), 0 deletions(-) commit 7d516f5129e4373a6d57249d7f608c634c66bf12 Author: Lasse Collin Date: 2008-03-14 21:32:37 +0200 Fix a comment API header. src/liblzma/api/lzma/lzma.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 748d6e4274921a350bd0a317380309717441ef9c Author: Lasse Collin Date: 2008-03-12 23:14:50 +0200 Make lzma_stream.next_in const. Let's see if anyone complains. src/liblzma/api/lzma/base.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit bfde3b24a5ae25ce53c854762b6148952386b025 Author: Lasse Collin Date: 2008-03-11 15:35:34 +0200 Apply a minor speed optimization to LZMA decoder. src/liblzma/lzma/lzma_decoder.c | 85 ++++++++++++++++++++------------------- 1 files changed, 43 insertions(+), 42 deletions(-) commit f310c50286d9e4e9c6170bb65348c9bb430a65b4 Author: Lasse Collin Date: 2008-03-11 15:17:16 +0200 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 files changed, 1 insertions(+), 0 deletions(-) commit 5ead36cf7f823093672a4e43c3180b38c9abbaff Author: Lasse Collin Date: 2008-03-10 15:57:55 +0200 Really fix the price count initialization. src/liblzma/lzma/lzma_encoder_init.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit d4d7feb83d1a1ded8f662a82e21e053841ca726c Author: Lasse Collin Date: 2008-03-10 13:47:17 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 0541c5ea63ef3c0ff85eeddb0a420e56b0c65258 Author: Lasse Collin Date: 2008-03-10 13:46:48 +0200 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 files changed, 2 insertions(+), 0 deletions(-) commit 596fa1fac72823e4ef5bc26bb53f9090445bf748 Author: Lasse Collin Date: 2008-03-10 13:44:29 +0200 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 files changed, 6 insertions(+), 5 deletions(-) commit 45e43e169527e7a98a8c8a821d37bf25822b764d Author: Lasse Collin Date: 2008-03-10 13:41:25 +0200 Don't fill allocated memory with 0xFD when debugging is enabled. It hides errors from Valgrind. src/liblzma/common/allocator.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit c0e19e0662205f81a86da8903cdc325d50635870 Author: Lasse Collin Date: 2008-02-28 10:24:31 +0200 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 files changed, 4 insertions(+), 19 deletions(-) commit de7485806284d1614095ae8cb2ebbb5d74c9ac45 Author: Lasse Collin Date: 2008-02-06 13:25:32 +0200 Tiny clean up to file-format.txt. doc/file-format.txt | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 1a3b21859818e4d8e89a1da99699233c1bfd197d Author: Lasse Collin Date: 2008-02-02 14:51:06 +0200 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 files changed, 3 insertions(+), 4 deletions(-) commit 7e796e312bf644ea95aea0ff85480f47cfa30fc0 Author: Lasse Collin Date: 2008-02-01 08:39:26 +0200 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 files changed, 73 insertions(+), 17 deletions(-) commit 7dd48578a3853e0cfab9f1830bc30927173ec4bc Author: Lasse Collin Date: 2008-02-01 08:32:05 +0200 Avoid unneeded function call in raw_common.c. src/liblzma/common/raw_common.c | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) commit b596fac963c3ff96f615d4d9b427a213ec341211 Author: Lasse Collin Date: 2008-01-26 21:42:38 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit e9f6e9c075ad93141a568d94f7d4eb0f2edbd6c2 Author: Lasse Collin Date: 2008-01-26 21:40:23 +0200 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(+), 0 deletions(-) commit 4c7ad179c78f97f68ad548cb40a9dfa6871655ae Author: Lasse Collin Date: 2008-01-26 19:12:50 +0200 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 files changed, 174 insertions(+), 0 deletions(-) commit 288b232f54c3692cd36f471d4042f51daf3ea79f Author: Lasse Collin Date: 2008-01-26 11:09:17 +0200 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(+), 0 deletions(-) commit c467b0defccf233d0c79234407bc38d7d09574d3 Author: Lasse Collin Date: 2008-01-26 10:47:55 +0200 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(+), 0 deletions(-) commit f9842f712732c482f2def9f24437851e57dd83f8 Author: Lasse Collin Date: 2008-01-26 00:25:34 +0200 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(+), 0 deletions(-) commit e988ea1d1a286dd0f27af0657f9665d5cd8573aa Author: Lasse Collin Date: 2008-01-25 23:50:35 +0200 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(-) commit 4441e004185cd4c61bda184010eca5924c9dec87 Author: Lasse Collin Date: 2008-01-25 23:12:36 +0200 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(-) commit bf4200c818fcf9102e56328d39cde91bfa13cfb6 Author: Lasse Collin Date: 2008-01-25 19:21:22 +0200 Added test_memlimit.c. tests/Makefile.am | 2 + tests/test_memlimit.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+), 0 deletions(-) commit 7b8fc7e6b501a32a36636dac79ecb57099269005 Author: Lasse Collin Date: 2008-01-25 19:20:28 +0200 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(-) commit e0c3d0043da2f670cfdb1abbb3223d5a594ad8db Author: Lasse Collin Date: 2008-01-25 13:55:52 +0200 Use more parenthesis in succeed() macro in tests/tests.h. tests/tests.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1fd76d488179580d37f31ee11948f4932aed31fd Author: Lasse Collin Date: 2008-01-24 14:49:34 +0200 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(+), 0 deletions(-) commit 6e27b1098a28f4ce09bfa6df68ad94182dfc2936 Author: Lasse Collin Date: 2008-01-24 00:46:05 +0200 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(+), 0 deletions(-) commit db9df0a9609c01a00a227329fb96e983971040f5 Author: Lasse Collin Date: 2008-01-23 23:43:00 +0200 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 files changed, 3 insertions(+), 1 deletions(-) commit 765f0b05f6e95ed9194fb90819cee189ebbac36b Author: Lasse Collin Date: 2008-01-23 23:38:18 +0200 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 files changed, 7 insertions(+), 6 deletions(-) commit 3a7cc5c3dec7b078941f961b0393b86c418883b6 Author: Lasse Collin Date: 2008-01-23 23:35:49 +0200 Fix decoding of Extra Records that have empty Data. src/liblzma/common/metadata_decoder.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) commit e5fdec93e273855c1bcc2579b83cfb481a9a1492 Author: Lasse Collin Date: 2008-01-23 22:02:38 +0200 Add the trailing '\0' to lzma_extra.data as the API header already documents. src/liblzma/common/metadata_decoder.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit ed40dc5a2c28a8dfccab8c165b3780738eeef93e Author: Lasse Collin Date: 2008-01-23 21:21:21 +0200 Added debug/full_flush.c. debug/Makefile.am | 3 +- debug/full_flush.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+), 1 deletions(-) commit ae0cd09a666a1682da8fc09487322227679e218d Author: Lasse Collin Date: 2008-01-23 21:05:33 +0200 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 files changed, 5 insertions(+), 1 deletions(-) commit 0e80ded13dfceb98f9494cbb5381a95eb44d03db Author: Lasse Collin Date: 2008-01-23 20:05:01 +0200 Added bad-single-none-footer_filter_flags.lzma and bad-single-none-too_long_vli.lzma. tests/files/README | 5 +++++ .../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(+), 0 deletions(-) commit 8c8eb14055d8dd536b1b1c58fb284d34bb8ed1dd Author: Lasse Collin Date: 2008-01-23 13:42:35 +0200 Fixed a typo. src/liblzma/subblock/subblock_decoder_helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 980f65a9a10160c4d105767871e3002b9aaba3e0 Author: Lasse Collin Date: 2008-01-23 13:40:45 +0200 Fix a memory leak in the Subblock encoder. src/liblzma/subblock/subblock_encoder.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 99e12af4e2b866c011fe0106cd1e0bfdcc8fe9c6 Author: Lasse Collin Date: 2008-01-23 13:36:07 +0200 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(-) commit 58b78ab20c1bcced45cf71ae6684868fc90b4b81 Author: Lasse Collin Date: 2008-01-23 13:15:55 +0200 Fix a memory leak in metadata_decoder.c. src/liblzma/common/metadata_decoder.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 4d8cdbdab44400fd98f0f18a0f701e27cd1acdae Author: Lasse Collin Date: 2008-01-23 13:13:58 +0200 Fix the fix 863028cb7ad6d8d0455fa69348f56b376d7b908f which just moved to problem. Now it's really fixed. src/liblzma/common/info.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 67321de963ccf69410b3868b8e31534fe18a90de Author: Lasse Collin Date: 2008-01-23 00:21:04 +0200 Take advantage of return_if_error() macro in lzma_info_metadata_set() in info.c. src/liblzma/common/info.c | 24 ++++++++---------------- 1 files changed, 8 insertions(+), 16 deletions(-) commit 863028cb7ad6d8d0455fa69348f56b376d7b908f Author: Lasse Collin Date: 2008-01-23 00:18:32 +0200 Fixed a dangling pointer that caused invalid free(). src/liblzma/common/info.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit cf49f42a6bd40143f54a6b10d6e605599e958c0b Author: Lasse Collin Date: 2008-01-22 22:49:24 +0200 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(-) commit 1747b85a43abc1c3f152dbd349be2ef4089ecf6a Author: Lasse Collin Date: 2008-01-22 21:16:22 +0200 Fix Multi-Block Stream encoder's EOPM usage. src/liblzma/common/stream_encoder_multi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 0ed6f1adcea540fb9593ca115d36de537f7f0dc6 Author: Lasse Collin Date: 2008-01-22 00:15:11 +0200 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(-) commit 305afa38f64c75af8e81c4167e2d8fa8d85b53a4 Author: Lasse Collin Date: 2008-01-20 20:15:21 +0200 Updated debug/sync_flush.c. debug/sync_flush.c | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) commit d53e9b77054cfade6a643e77d085273a348b189c Author: Lasse Collin Date: 2008-01-20 20:14:26 +0200 Added debug/repeat.c. debug/Makefile.am | 1 + debug/repeat.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 0 deletions(-) commit 107259e306bcfc2336a0fb870fb58034c28faa52 Author: Lasse Collin Date: 2008-01-20 20:12:58 +0200 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 files changed, 119 insertions(+), 51 deletions(-) commit e141fe18950400faaa3503ff88ac20eacd73e88c Author: Lasse Collin Date: 2008-01-19 21:16:33 +0200 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(-) commit 23c227a864a3b69f38c6a74306161d4e6918d1cc Author: Lasse Collin Date: 2008-01-19 15:19:21 +0200 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_coder.h | 31 ------ src/liblzma/common/delta_common.c | 70 +++++++++++++ src/liblzma/common/delta_common.h | 48 +++++++++ src/liblzma/common/delta_decoder.c | 102 +++++++++++++++++++ src/liblzma/common/delta_decoder.h | 28 ++++++ 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 +- 11 files changed, 387 insertions(+), 224 deletions(-) commit 61dc82f3e306b25ce3cd3d529df9ec7a0ec04b73 Author: Lasse Collin Date: 2008-01-18 20:18:08 +0200 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(+), 0 deletions(-) commit 0ae3208db94585eb8294b97ded387de0a3a07646 Author: Lasse Collin Date: 2008-01-18 20:13:00 +0200 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(+), 0 deletions(-) commit ab5feaf1fcc146ef9fd39360c53c290bec39524e Author: Lasse Collin Date: 2008-01-18 20:02:52 +0200 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(-) commit 079c4f7fc26b3d0b33d9ae7536697b45f3b73585 Author: Lasse Collin Date: 2008-01-18 17:21:24 +0200 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 files changed, 0 insertions(+), 1 deletions(-) commit 61d1784d8f1761d979a6da6e223e279ca33815e6 Author: Lasse Collin Date: 2008-01-18 14:17:37 +0200 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 files changed, 9 insertions(+), 0 deletions(-) commit c9cba976913e55ff9aac8a8133cc94416c7c1c9c Author: Lasse Collin Date: 2008-01-18 00:50:29 +0200 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(-) commit 33be3c0e24d8f43376ccf71cc77d53671e792f07 Author: Lasse Collin Date: 2008-01-17 18:56:53 +0200 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 files changed, 139 insertions(+), 133 deletions(-) commit b254bd97b1cdb68d127523d91ca9e054ed89c4fd Author: Lasse Collin Date: 2008-01-17 17:39:42 +0200 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 files changed, 1 insertions(+), 1 deletions(-) commit 8f5794c8f1a30e8e3b524b415bbe81af2e04c64a Author: Lasse Collin Date: 2008-01-17 17:27:45 +0200 Added --delta to the output of "lzma --help". src/lzma/help.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit f88590e0014b38d40465937c19f25f05f16c79ae Author: Lasse Collin Date: 2008-01-17 13:14:20 +0200 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 files changed, 6 insertions(+), 0 deletions(-) commit bc0b945ca376e333077644d2f7fd54c2848aab8a Author: Lasse Collin Date: 2008-01-16 16:33:37 +0200 Tiny non-technical edits to file-format.txt. doc/file-format.txt | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 7599bb7064ccf007f054595dedda7927af868252 Author: Lasse Collin Date: 2008-01-16 14:48:04 +0200 Plugged a memory leak in stream_decoder.c. src/liblzma/common/stream_decoder.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) commit 0b581539311f3712946e81e747839f8fb5f441a7 Author: Lasse Collin Date: 2008-01-16 14:47:27 +0200 Added memory leak detection to lzmadec.c. src/lzmadec/lzmadec.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 5b5b13c7bb8fde6331064d21f3ebde41072480c4 Author: Lasse Collin Date: 2008-01-16 14:46:50 +0200 Added lzma_memlimit_count(). src/liblzma/api/lzma/memlimit.h | 10 ++++++++++ src/liblzma/common/memory_limitter.c | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 0 deletions(-) commit 19389f2b82ec54fd4c847a18f16482e7be4c9887 Author: Lasse Collin Date: 2008-01-16 14:31:44 +0200 Added ARRAY_SIZE(array) macro. src/common/sysdefs.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 9bc33a54cbf83952130adbcb1be32c6882485416 Author: Lasse Collin Date: 2008-01-16 13:27:03 +0200 Make Uncompresed Size validation more strict in alone_decoder.c. src/liblzma/common/alone_decoder.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 01d71d60b79027e1ce3eb9c79ae5191e1407c883 Author: Lasse Collin Date: 2008-01-15 17:46:59 +0200 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 files changed, 7 insertions(+), 0 deletions(-) commit 8235e6e5b2878f76633afcda9a334640db503ef5 Author: Lasse Collin Date: 2008-01-15 16:25:38 +0200 Fix memory leaks from test_block_header.c. tests/test_block_header.c | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) commit f10fc6a69d40b6d5c9cfbf8d3746f49869c2e2f6 Author: Lasse Collin Date: 2008-01-15 14:23:35 +0200 Use fastpos.h when encoding LZMA dictionary size in Filter Flags encoder. src/liblzma/common/filter_flags_encoder.c | 40 +++++++++++++--------------- 1 files changed, 19 insertions(+), 21 deletions(-) commit e5728142a2048979f5c0c2149ce71ae952a092e1 Author: Lasse Collin Date: 2008-01-15 14:02:22 +0200 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(-) commit 10437b5b567f6a025ff16c45a572e417a0a9cc26 Author: Lasse Collin Date: 2008-01-15 13:32:13 +0200 Added bsr.h. src/liblzma/common/Makefile.am | 1 + src/liblzma/common/bsr.h | 61 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 0 deletions(-) commit f3c88e8b8d8dd57f4bba5f0921eebf276437c244 Author: Lasse Collin Date: 2008-01-15 13:29:14 +0200 Fixed assembler detection in configure.ac, and added detection for x86_64. configure.ac | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) commit 54ec204f58287f50d3976288295da4188a19192b Author: Lasse Collin Date: 2008-01-15 12:20:41 +0200 Omit invalid space from printf() format string in price_table_gen.c. src/liblzma/rangecoder/price_table_gen.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 01b4b19f49f00e17a0f9cb8754c672ac0847b6e1 Author: Lasse Collin Date: 2008-01-15 09:54:34 +0200 Removed a few unused macros from lzma_common.h. src/liblzma/lzma/lzma_common.h | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) commit 19bd7f3cf25e4ff8487ef7098ca4a7b58681961d Author: Lasse Collin Date: 2008-01-15 08:37:42 +0200 Fix a typo in lzma_encoder.c. src/liblzma/lzma/lzma_encoder.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9f9b1983013048f2142e8bc7e240149d2687bedc Author: Lasse Collin Date: 2008-01-15 08:36:25 +0200 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(-) commit 78e85cb1a7667c54853670d2eb09d754bcbda87d Author: Lasse Collin Date: 2008-01-15 07:44:59 +0200 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(-) commit 949d4346e2d75bcd9dcb66c394d8d851d8db3aa0 Author: Lasse Collin Date: 2008-01-15 07:41:39 +0200 Fix typo in test_index.c. tests/test_index.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d13d693155c176fc9e9ad5c50d48ccba27c2d9c6 Author: Lasse Collin Date: 2008-01-15 07:40:21 +0200 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 ++++++++++++++++++++++ src/liblzma/rangecoder/price_table_init.c | 48 ++++++++++++++++++++ src/liblzma/rangecoder/range_common.h | 4 +- src/liblzma/rangecoder/range_encoder.c | 46 ------------------- src/liblzma/rangecoder/range_encoder.h | 21 ++++----- 8 files changed, 197 insertions(+), 61 deletions(-) commit 362dc3843b373c1007a50a4719f378981f18ae03 Author: Lasse Collin Date: 2008-01-14 13:42:43 +0200 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 files changed, 4 insertions(+), 2 deletions(-) commit e22b37968d153683fec61ad37b6b160cb7ca4ddc Author: Lasse Collin Date: 2008-01-14 13:39:54 +0200 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(-) commit b59ef3973781f892c0a72b5e5934194567100be5 Author: Lasse Collin Date: 2008-01-14 13:34:29 +0200 Added one assert() to process.c of the command line tool. src/lzma/process.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 9547e734a00ddb64c851fa3f116e4f9e7d763ea7 Author: Lasse Collin Date: 2008-01-14 12:09:52 +0200 Don't use coder->lz.stream_end_was_reached in assertions in match_c.h. src/liblzma/lz/match_c.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 3e09e1c05871f3757f759b801890ccccc9286608 Author: Lasse Collin Date: 2008-01-14 12:08:02 +0200 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 files changed, 3 insertions(+), 3 deletions(-) commit a670fec8021e5962429689c194148a04c3418872 Author: Lasse Collin Date: 2008-01-14 11:56:41 +0200 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(-) commit 3599dba9570a6972a16b6398d6c838e9b420e985 Author: Lasse Collin Date: 2008-01-14 11:54:56 +0200 More fixes to LZMA decoder's flush marker handling. src/liblzma/lzma/lzma_decoder.c | 52 ++++++++++++++++++++++---------------- 1 files changed, 30 insertions(+), 22 deletions(-) commit f73c2ab6079ed5675a42b39d584a567befbd4624 Author: Lasse Collin Date: 2008-01-10 17:13:42 +0200 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(-) commit 382808514a42b2f4b4a64515e2dfb3fc1bc48ecd Author: Lasse Collin Date: 2008-01-09 20:05:57 +0200 Define HAVE_ASM_X86 when x86 assembler optimizations are used. This #define will be useful for inline assembly. configure.ac | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 0e70fbe4032351aab13a1cd8e5deced105c0b276 Author: Lasse Collin Date: 2008-01-09 12:06:46 +0200 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(+), 0 deletions(-) commit 379fbbe84d922c7cc00afa65c6f0c095da596b19 Author: Lasse Collin Date: 2008-01-08 23:11:59 +0200 Take advantage of return_if_error() in block_decoder.c. src/liblzma/common/block_decoder.c | 23 +++++++---------------- 1 files changed, 7 insertions(+), 16 deletions(-) commit 97d5fa82077e57815dfad995dc393c2809a78539 Author: Lasse Collin Date: 2008-01-08 23:10:57 +0200 Updated tests/files/README. tests/files/README | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) commit 3bb9bb310936cba6a743b4f06739a397dec7c28f Author: Lasse Collin Date: 2008-01-08 23:05:40 +0200 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(+), 0 deletions(-) commit 7054c5f5888ac6a7178cd43dc9583ce6c7e78c9f Author: Lasse Collin Date: 2008-01-08 22:58:42 +0200 Fix decoding of Blocks that have only Block Header. src/liblzma/common/block_decoder.c | 37 +++++++++++++---------------------- 1 files changed, 14 insertions(+), 23 deletions(-) commit 753e4d95cd1cf29c632dfe1a670af7c67aeffbf4 Author: Lasse Collin Date: 2008-01-08 22:27:46 +0200 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(+), 0 deletions(-) commit faeac7b7aca75f86afed1e7cc06279d9d497c627 Author: Lasse Collin Date: 2008-01-08 18:50:30 +0200 Disable CRC32 from Block Headers when --check=none has been specified. src/lzma/process.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a751126dbb656767ed4666cf0e5d3e17349d93d1 Author: Lasse Collin Date: 2008-01-08 13:36:29 +0200 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 files changed, 1 insertions(+), 1 deletions(-) commit 9080267603b1006c4867c823307dca9df8be0d20 Author: Lasse Collin Date: 2008-01-08 13:35:36 +0200 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 tests/files/bad-single-data_after_eopm.lzma | Bin 55 -> 0 bytes tests/files/bad-single-data_after_eopm_1.lzma | Bin 0 -> 55 bytes tests/files/bad-single-none-truncated.lzma | Bin 0 -> 29 bytes 7 files changed, 18 insertions(+), 3 deletions(-) commit b4943ccf73b64fc93a90a23474509c316f55eb2b Author: Lasse Collin Date: 2008-01-08 12:29:58 +0200 Avoid using ! in test_files.sh, because that doesn't work with some ancient /bin/sh versions. tests/test_files.sh | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit e2417b2b9134f3f65e14b61e23cd3644d8954353 Author: Lasse Collin Date: 2008-01-08 00:48:30 +0200 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(-) commit 5d227e51c23639423f4ade06aabb54e131f8505e Author: Lasse Collin Date: 2008-01-07 23:25:32 +0200 Updated fi.po although it's currently pretty much crap. po/fi.po | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit c7189d981a1b27c63da0c1ee80d9b5cd8ce1733d Author: Lasse Collin Date: 2008-01-07 23:14:25 +0200 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 files changed, 1 insertions(+), 1 deletions(-) commit 3dbbea82b74bb841c995ad332a3aeca613015e10 Author: Lasse Collin Date: 2008-01-07 21:49:41 +0200 Added test_files.sh to tests/Makefile.am so it gets included in the tarball with "make dist". tests/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2fd2d181543feab1b4003f3ac6e85625fbee04f0 Author: Lasse Collin Date: 2008-01-07 18:22:24 +0200 Cosmetic edit to test_files.sh. tests/test_files.sh | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 9a71d573100a990ceb30ce0bec6a9a15d795605f Author: Lasse Collin Date: 2008-01-07 18:09:44 +0200 Added tests/files/README. tests/files/README | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 108 insertions(+), 0 deletions(-) commit 47f48fe9936ed72617a60fbd015df7e0e47a1e43 Author: Lasse Collin Date: 2008-01-07 14:20:57 +0200 Tell in COPYING that everything in tests/files is public domain. COPYING | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 3502b3e1d00251d3c8dda96079440705c28d8225 Author: Lasse Collin Date: 2008-01-07 14:19:05 +0200 Cleaned up the tests/files directory. tests/files/bad-single-subblock-padding_loop.lzma | Bin 0 -> 43 bytes tests/files/bad-single-subblock1023-slow.lzma | Bin 0 -> 7886 bytes tests/files/malicious-single-subblock-loop.lzma | Bin 43 -> 0 bytes tests/files/malicious-single-subblock-lzma.lzma | Bin 505 -> 0 bytes .../files/malicious-single-subblock1023-slow.lzma | Bin 7886 -> 0 bytes 5 files changed, 0 insertions(+), 0 deletions(-) commit 908b2ac604b9940369d7fe8a45e9eb6da5d2a24c Author: Lasse Collin Date: 2008-01-07 13:49:19 +0200 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 deletions(-) commit ecb2a6548f5978022a8fa931719dc575f5fd3bf6 Author: Lasse Collin Date: 2008-01-07 11:23:13 +0200 Updated README regarding the assembler optimizations. README | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit eacb8050438d3e6146c86eb9732d3fb1ef1825cb Author: Lasse Collin Date: 2008-01-07 10:58:00 +0200 Updated THANKS. THANKS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 1239649f96132b18e3b7e2dd152ecf53a195caa8 Author: Lasse Collin Date: 2008-01-06 21:47:17 +0200 Cosmetic changes to configure.ac. configure.ac | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) commit 88ee301ec2e4506a30ec7ac9aaa2288e2dcadd0e Author: Lasse Collin Date: 2008-01-06 19:46:38 +0200 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 files changed, 15 insertions(+), 2 deletions(-) commit c15a7abf66e3a70792f7444115e484c7981c8284 Author: Lasse Collin Date: 2008-01-06 19:45:27 +0200 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(-) commit 4e7e54c4c522ab2f6a7abb92cefc4f707e9568fb Author: Lasse Collin Date: 2008-01-06 16:27:41 +0200 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(-) commit a71864f77dfb76b5d78a270641539947c312583a Author: Lasse Collin Date: 2008-01-05 19:57:00 +0200 Fix typo in comment (INT64_MAX -> UINT64_MAX). src/liblzma/api/lzma/vli.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 072927905a3b66281c6311b4b351caa501d8b73a Author: Lasse Collin Date: 2008-01-05 19:42:04 +0200 Rearranged testing of GCC-specific flags. configure.ac | 33 +++++++++++++++++++++++---------- 1 files changed, 23 insertions(+), 10 deletions(-) commit d160ee32598c6d1cd9054ef019e8c9331208b188 Author: Lasse Collin Date: 2008-01-05 01:20:24 +0200 Another bug fix for flush marker detection. src/liblzma/lzma/lzma_decoder.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) commit fc67f79f607cbfa78c6f47a69dec098d8659b162 Author: Lasse Collin Date: 2008-01-04 21:37:01 +0200 Fix stupid bugs in flush marker detection. src/liblzma/lzma/lzma_decoder.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit 0029cbbabe87d491fc046a55a629a6d556010baa Author: Lasse Collin Date: 2008-01-04 21:30:33 +0200 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(-) commit bbfd1f6ab058a7e661545205befcb7f70c5685ab Author: Lasse Collin Date: 2008-01-04 20:45:05 +0200 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(-) commit 5db745cd2a74f6ed2e52f5c716c08ed0daf17ebc Author: Lasse Collin Date: 2007-12-14 11:15:21 +0200 Added a note to README that --disable-assembler must be used on Darwin. README | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 44b333d4615b5aabc557a0e1b6bb0096da3fae24 Author: Lasse Collin Date: 2007-12-14 10:07:10 +0200 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 | 217 +++++++++++++++++++++++++++++++++++++++++ src/liblzma/check/crc32_x86.s | 217 ----------------------------------------- src/liblzma/check/crc64_x86.S | 203 ++++++++++++++++++++++++++++++++++++++ src/liblzma/check/crc64_x86.s | 203 -------------------------------------- 5 files changed, 422 insertions(+), 422 deletions(-) commit ec1c82b2e82f395f6e8e19ac212a639644330cd7 Author: Lasse Collin Date: 2007-12-14 09:59:05 +0200 Fixed wrong symbol name in crc64_x86.s. src/liblzma/check/crc64_x86.s | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2881570df6803eed2fe550af34574e8e61794804 Author: Lasse Collin Date: 2007-12-14 09:53:24 +0200 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(-) commit 698470b8f33fc0e5f27dafa93b39b6dd5dde5a66 Author: Lasse Collin Date: 2007-12-13 20:14:37 +0200 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 files changed, 1 insertions(+), 1 deletions(-) commit 918bcb0e0728d2d976621e9f35b56f224f11d989 Author: Lasse Collin Date: 2007-12-11 17:08:04 +0200 Removed uncompressed size tracking from Delta encoder too. src/liblzma/common/delta_coder.c | 21 +++------------------ 1 files changed, 3 insertions(+), 18 deletions(-) commit 3e16d51dd645667b05ff826665b1fc353aa41cd9 Author: Lasse Collin Date: 2007-12-11 16:49:19 +0200 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(-) commit 5286723e0d1ac386d5b07f08d78e61becf895a5a Author: Lasse Collin Date: 2007-12-11 14:10:53 +0200 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(-) commit ce8b036a6c7a43b290356b673d953f6d76b2be64 Author: Lasse Collin Date: 2007-12-11 14:09:35 +0200 Fixed a typo in tests/Makefile.am which prevented building the tests if gnulib was needed. tests/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 7c1ad41eb611ed89e5bb8792a3beb533b7aa59f4 Author: Lasse Collin Date: 2007-12-11 11:18:58 +0200 Fixed wrong type of flags_size in Subblock encoder. src/liblzma/subblock/subblock_encoder.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ce64df716243fdc40359090d1f6541f3a4f5f21a Author: Lasse Collin Date: 2007-12-10 20:44:16 +0200 Bumped version number to 4.42.3alpha. configure.ac | 2 +- src/liblzma/api/lzma/version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b499a0403ea5c41d6a25b40275eb6c57643052ce Author: Lasse Collin Date: 2007-12-10 15:02:50 +0200 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(-) commit 2ab8adb5165a0b77114a7eb21f9ff1e6a266f172 Author: Lasse Collin Date: 2007-12-09 21:43:15 +0200 Added LZMA_SYNC_FLUSH support to the Copy filter. src/liblzma/common/copy_coder.c | 92 ++++++++++++++++++++++++--------------- 1 files changed, 57 insertions(+), 35 deletions(-) commit 329c272d501e88793dda5540358d55c12428d194 Author: Lasse Collin Date: 2007-12-09 17:14:07 +0200 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(-) commit c90daf86ce683fa8cf80491d624ffb158dfbd9d7 Author: Jim Meyering Date: 2007-12-09 15:34:25 +0100 * tests/test_block_header.c (test3): Remove duplicate initializer. autogen.sh | 2 +- tests/test_block_header.c | 1 - 2 files changed, 1 insertions(+), 2 deletions(-) commit 07ac881779a8477f2c1ab112b91a129e24aa743c Author: Lasse Collin Date: 2007-12-09 17:06:45 +0200 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(-) commit 41338717964f510ee61d70b25bd4c502ec9f77cf Author: Lasse Collin Date: 2007-12-09 12:13:01 +0200 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 .../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(-) commit ff946ceb7975d4f11950afd33f6315b4d20d1a03 Author: Lasse Collin Date: 2007-12-09 11:24:48 +0200 Re-enabled the security checks in Subblock decoder that were disabled for debugging reasons. src/liblzma/subblock/subblock_decoder.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 2bf36d22d2c24ac3f488e63b35564fa2f6dab8d1 Author: Lasse Collin Date: 2007-12-09 11:03:28 +0200 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(-) debian/changelog0000664000000000000000000007317312276706601011064 0ustar xz-utils (5.1.1alpha+20120614-2ubuntu2) trusty; urgency=low * debian/patches/error-parsing-less.patch. LP: #1248044 - parse correctly recent versions of less output -- Javier P.L. Sun, 09 Feb 2014 01:21:14 -0600 xz-utils (5.1.1alpha+20120614-2ubuntu1) raring; urgency=low * Remove build-dependency on perl; we use no non-trivial Perl modules so the Essential perl-base is perfectly adequate, and an unadorned build-dependency on perl is problematic for cross-building. -- Colin Watson Thu, 03 Jan 2013 17:21:16 +0000 xz-utils (5.1.1alpha+20120614-2) unstable; urgency=low * Apply fixes from 5.1.2alpha. Closes: #685220. - liblzma: report a LZMA_DATA_ERROR when range encoded data starts with a nonzero byte. This is a sanity check to catch malformed files that no known encoders produce. - xz -v -v --list: Support for decompressing blocks with zero-length uncompressed data was added in xz 5.0.2, not 5.0.3. - xz.1: "xz --robot -v -v --list" gained a "minimum xz version to decompress" field. * xz-utils/README.Debian: Document differences from upstream. Closes: #685217. -- Jonathan Nieder Mon, 10 Sep 2012 14:35:33 -0700 xz-utils (5.1.1alpha+20120614-1) unstable; urgency=low * New snapshot, taken from upstream commit f1675f76. - liblzma: BCJ filters would return a spurious LZMA_BUF_ERROR result in certain circumstances. As a result, the xz tool could produce inappropriate "Compressed data is corrupt" or "Unexpected end of input" failures (reported in XZ Embedded as Fedora bug 735408). - "xz -v -v --list" prints the minimal XZ Utils version needed to decompress a stream. - "xz --robot -v --list" formats filenames more plainly. - xzgrep does not fail unconditionally when the decompressor dies with SIGPIPE due to unconsumed output any more. This makes the exit status from commands such as "xzgrep -q" and "xzgrep -l" more predictable and convenient for scripts. - examples/xz_pipe_decomp.c did not check correctly for truncated input. - There is a new set of sample programs. The old ones have been renamed to examples_old but are still maintained. * liblzma: - If dlopen() indicates that liblzma.so.2 is loaded, check fewer reserved fields in the stream argument to the lzma_code() function. This prevents out-of-bounds reads when liblzma5 functions are called by code built against liblzma2 (see ). - Remove the lzma_code@Base compatibility symbol. Closes: #649522. Thanks to Eduard Bloch. - Install run-time library to /lib so it can be used before /usr is mounted. Closes: #672120. - Configure with --disable-threads for now to avoid needlessly linking to libpthread and librt. * liblzma-dev: - Install an appropriate library for static linking instead of the decompression-only version used to build xzdec. Closes: #673001. Thanks to Anton Tolchanov. - Use the liblzma2-compatible version of lzma_code() in the static library. - Multi-Arch: same. Thanks to Riku Voipio. - Install new examples and revised old examples to /usr/share/doc/liblzma-dev. * xz-utils: - Use update-alternatives to provide lzma, unlzma, lzcat, and the rest of the lz* scripts without conflicting with the lzma package. - Conflicts: lzma versions before before 9.22-1, when it started providing lzma, unlzma, and lzcat through the alternatives system. - Conflicts: and Replaces: xz-lzma. - README.Debian: Update instructions on configuring the package to provide lzma compatibility commands. * Remove xz-lzma package. * Use dpkg-buildflags to retrieve compiler flags, including hardening options. Build-Depends: dpkg-dev (>= 1.16.1). Closes: #653739. * debian/rules: - build-arch: Simplify by using a double-colon rule instead of a dependency on a dummy noop target. - build-indep: Assume doxygen is available, instead of trying to get by by assuming the caller meant to invoke build-arch when it is missing. Build-Depends: dpkg-dev (>= 1.16.2). - Rearrange for clarity. * debian/symbols: Bump the minimal version for lzma_code(), lzma_raw_buffer_decode(), and lzma_raw_buffer_encode(). * Use machine-readable copyright-format 1.0. * Update copyright file. * Standards-Version: 3.9.3 (checked). * debian/changelog.upstream.sh: Use ‘git rev-list | git diff-tree’ instead of ‘git log’ to avoid depending on the build system’s configuration. -- Jonathan Nieder Sat, 16 Jun 2012 15:03:17 -0500 xz-utils (5.1.1alpha+20110809-3) unstable; urgency=low * liblzma: Match upstream ABI. - Remove the lzma_chunk_size() function. - A few ABI tweaks to reserved space in structures. - Enable ELF symbol versioning. - Bump soname to 5. - Continue to leave out threading support, since the relevant interfaces in liblzma are not yet stable. * xz-utils/README.Debian: Remove note on ABI differences. * Remove liblzma/README.Debian. * liblzma: Introduce a lzma_code@Base compatibility symbol to ensure programs linked against unversioned symbols from liblzma2 can share a process image with liblzma5 without breaking. * debian/symbols: XZ_5.0 symbols come from liblzma5. Build-Depends: dpkg-dev (>= 1.15.6); thanks to Jakub Wilk for a reminder. * debian/symbols: The lzma_code@Base symbol is not guaranteed to continue to exist in the future, so tell dpkg-shlibdeps to produce an error if some package manages to use it. -- Jonathan Nieder Thu, 20 Oct 2011 21:31:31 -0500 xz-utils (5.1.1alpha+20110809-2) unstable; urgency=low * debian/rules build-arch: Do not trigger an infinite "make" recursion loop when DEB_BUILD_OPTIONS=nocheck. Closes: #638071. Thanks to Thorsten Glaser. -- Jonathan Nieder Tue, 16 Aug 2011 18:11:47 -0500 xz-utils (5.1.1alpha+20110809-1) unstable; urgency=low * New snapshot, taken from upstream commit 5c5b225. - liblzma: - lzma_stream_encoder() leaked memory. - The LZMA2 decoder rejected streams that decompress to a zero-length string. - lzma_easy_buffer_encode() and lzma_stream_buffer_encode() used to write such streams when asked to compress a 0-length buffer. - lzma_index_init() would segfault on allocation failure. - liblzma: Various functions check their arguments (especially choice of integrity check) better, making it harder to create a corrupt .xz file instead of receiving an error. - xz and scripts: - "xz -v -v --list" would read and try to free() uninitialized memory, continuing past the end of an on-stack array, when asked to describe certain corrupted XZ files. - xz -S.suf now refuses to compress a file whose name already ends with the suffix “.suf”. - xz --force can be used to compress setuid, setgid, sticky, and multiply linked files. - xz uses posix_fadvise() to speed up sequential input. - xz --block-size forces a full flush periodically during compression, for better random-access reading support and to make simple parallelism possible in the future. - unxz: The new --single-stream option discards trailing garbage after the end of the first stream. - xzdiff can read gzip- and bzip2-compressed files. - xzdiff and xzgrep can read lzop-compressed files. - xzegrep and xzfgrep perform extended regex and fixed-string matches, respectively. (The previous behavior was to always use basic regexes.) - xzgrep -l (= --files-with-match) works. - The Czech “xz --help” output uses a more correct term for files with holes. Thanks to Petr Hubený. Closes: #605762. - xz: New Polish and French translations. - The Doxygen-generated documentation uses short, relative paths to name source files. Closes: #572273. * Update copyright file. * Remove example programs from debian/examples. They are included in the upstream source package now. * Move liblzma to an architecture-specific directory, so the native library and foreign-architecture versions can be installed simultaneously. - liblzma2: Pre-Depends: multiarch-support. - Use debhelper compatibility level 9. This requires passing the dh sequence name before other options when invoking dh in debian/rules. Build-Depends: debhelper (>= 8.1.3). - liblzma2, liblzma-dev: Install files under /usr/lib/ instead of /usr/lib. - Thanks to Steve Langasek for explaining the process on the Debian wiki. * Standards-Version: 3.9.2 (checked). * debian/control: liblzma2 is Multi-Arch: same, while xz-utils and xzdec are Multi-Arch: foreign. Closes: #637883. Thanks to Riku Voipio. * debian/symbols: Bump the minimal version for LZMA2 encoder functions that reject more bad arguments and skip empty blocks. * debian/rules: ./configure --disable-symbol-versions for now. * debian/rules: Provide build-arch and build-indep targets that only build the code and the API documentation, respectively. Thanks to Roger Leigh for suggesting it through lintian. Build-Depends: debhelper (>= 8.9.0). * debian/rules: Treat DEB_BUILD_OPTIONS=nocheck as a request not to run build-time tests. Thanks to Thorsten Glaser for a reminder. Closes: #627209. -- Jonathan Nieder Tue, 16 Aug 2011 00:40:31 -0500 xz-utils (5.0.0-2) unstable; urgency=low * Upload to unstable. * liblzma2, liblzma-dev, xz-lzma: Install release notes. * debian/symbols: Bump the minimal versions for lzma_index_encoder, lzma_index_decoder to the version in which they gained LZMA_FINISH support. * xz-utils/README.Debian: Document differences from upstream ABI. * debian/changelog.upstream.sh: Avoid empty changelog entries when multiple Debian revisions match an upstream tag. -- Jonathan Nieder Thu, 11 Nov 2010 13:45:20 -0600 xz-utils (5.0.0-1) experimental; urgency=low * Upload to experimental. * New stable upstream release. Closes: #592298. - xz avoids SA_RESTART. This should not have a visible effect because xz already blocked signals during operations that would be difficult to resume after interruption. - liblzma: The coders returned by lzma_index_encoder() and lzma_index_decoder() support an LZMA_FINISH action, with identical semantics to LZMA_RUN. - The printable (PDF and PS) versions of the manual are easier to read. - Many documentation and build system cleanups. * liblzma: Back out upstream ABI tweaks. * liblzma/README.Debian: Document ABI differences from upstream. * Copy sample code not included in the release tarball from the development upstream repository to debian/examples. * debian/rules clean: Remove some files not included in the release tarball. * copyright: List new INSTALL.generic license. * debian/rules clean: Take new build-aux scripts into account. * debian/rules: Adapt for upstream build system changes. Closes: #540443. * xz-utils, xzdec: Install release notes. -- Jonathan Nieder Mon, 25 Oct 2010 05:45:18 -0500 xz-utils (4.999.9beta+20100927-1) experimental; urgency=low * New snapshot, taken from upstream commit cec0ddc. - liblzma: The meaning of --extreme has been tweaked to address cases in which it made the compression ratio worse. Some files might benefit slightly less from --extreme. - xz: Table columns are not misaligned any more in messages with multi-byte characters (e.g., file sizes with LANG=fi_FI.UTF-8). - xz: New German and Italian translations. - Various documentation, message, and translation updates. * Update copyright file. * debian/rules get-orig-source: Update upstream Git URL. * xz-utils/README.Debian: Advertise XZ_DEFAULTS. -- Jonathan Nieder Mon, 27 Sep 2010 16:22:22 -0500 xz-utils (4.999.9beta+20100903-1) experimental; urgency=low * New snapshot, taken from upstream commit 373ee26. - liblzma: The settings for compression levels 0 through 5 (used by xz -0/.../-5) have been tweaked. This affects the speed, compression ratio, and memory usage at compression and decompression time. - Does not search so hard for a match when a low "nice match length" setting is specified without a depth. - xz: The -1/.../-9 preset options override any previously specified filters, rather than vice versa. To mix presets with filter options, use the --lzma2=preset=n option. - xz: Warns about --memlimit-compress settings that result in compression settings changing even if no explicit -1/.../-9, --lzma1, or --lzma2 option was used. - "xz -v -v --compress" now prints an estimate of the memory required to decompress a file. * debian/copyright: Update upstream Git URL. * debian/changelog.upstream.sh: Permit terser changelog lines. * Standards-Version: 3.9.1 (checked). -- Jonathan Nieder Fri, 03 Sep 2010 17:05:20 -0500 xz-utils (4.999.9beta+20100810-1) unstable; urgency=low * New upstream snapshot, taken from upstream commit d5653ba8a. - xz: The memory usage limiter is now disabled by default. - xz: Support for an XZ_DEFAULTS environment variable was added. It contains user-specific default settings, such as memory usage limits, and can be overridden by the command line and XZ_OPT. - xz: The new --memlimit-compress and --memlimit-decompress options allow the memory usage limit to be set separately for compression and decompression. A new --memlimit alias has been added for the existing --memory option. - xz: The --info-memory option (with or without --robot) now prints how much RAM is installed in addition to the compression and decompression memory limits. * liblzma-doc: Simplify package description. * debian/control: Build-Depends: autopoint | gettext (<< 0.18-1), autopoint | cvs instead of autopoint, to help with backporting. Thanks to Thorsten Glaser for a report. -- Jonathan Nieder Tue, 10 Aug 2010 20:27:14 -0500 xz-utils (4.999.9beta+20100713-1) unstable; urgency=low [ Thorsten Glaser ] * Explicitly depend on autoconf (>= 2.64~) due to AC_PREREQ, discovered during backporting. [ Jonathan Nieder ] * Upload to unstable. * New upstream snapshot, taken from upstream commit a540198f. - xz: The new --no-adjust option can be used to error out if there is insufficient memory for the chosen compression level. * liblzma-dev: Install examples to /usr/share/doc/liblzma-dev. * Update copyright file. * Drop unpack-time conflicts in favor of configuration-time conflicts (Replaces + Breaks): - xz-utils: against old xz-lzma (for lzmainfo). - xzdec: against old xz-lzma (for lzmadec). - xz-lzma: against lzip 1.7 (for lzdiff and lzgrep). * Standards-Version: 3.9.0. * debian/autogen.sh: Don’t regenerate upstream changelog when it is not out of date. * debian/rules get-orig-source: Use gzip --no-name --rsyncable. -- Jonathan Nieder Thu, 15 Jul 2010 01:53:37 -0500 xz-utils (4.999.9beta+20100602-1) experimental; urgency=low * New upstream snapshot, taken from upstream commit d8b41eed. - The output from "xz -v --list" and "xz -v -v --list" has been improved. "xz -v -v --list" can be used to obtain an estimate for the memory required to decompress a file. - The xz manual page has some new material, including examples. Closes: #578465. - liblzma: The lzma_block_compressed_size() function no longer returns LZMA_DATA_ERROR for valid Blocks. * debian/symbols: Bump minimal version for lzma_block_compressed_size. * Correct the 4.999.9beta+20100307-1 changelog entry to describe which public functions were affected. * Add new xz-lzma package to allow xz to provide lzma and related commands. Conflicts: and Provides: lzma. * xz-utils: Suggests: xz-lzma. * xz-utils/README.Debian: Take xz-lzma into account. -- Jonathan Nieder Fri, 04 Jun 2010 15:53:58 -0500 xz-utils (4.999.9beta+20100527-1) unstable; urgency=low * New upstream snapshot, taken from upstream commit a334348dc. - Show both elapsed time and estimated remaining time in xz -v. Thanks to Trent W. Buck for the idea. Closes: #574583. - liblzma: Remove the Subblock filter from the public API (the ABI is unchanged). * liblzma-dev.NEWS: Update. * xz-utils: Update Czech translation. * Change priority of xz-utils and liblzma2 to required and xzdec to extra. -- Jonathan Nieder Thu, 27 May 2010 16:27:04 -0500 xz-utils (4.999.9beta+20100307-1) unstable; urgency=low * New upstream snapshot, taken from upstream commit f4b2b526. - liblzma: The stream initialization functions were not correctly initializing the internal allow_buffer_error flag. As a result, ever since 4.999.9beta-1 in rare circumstances when decompressing LZMA files, the xz tool would produce spurious "Unexpected end of input" failures (Gentoo bug 305591). - The default memory usage limit on low-memory systems has been increased. * debian/copyright: Clarify. -- Jonathan Nieder Tue, 09 Mar 2010 10:22:24 -0600 xz-utils (4.999.9beta+20100212-4) unstable; urgency=low * debian/control: Build-Depends: autopoint instead of cvs. Closes: #572481. * debian/copyright: Clean up and include more details. * debian/rules get-orig-source: Unindent comment lines. * xz-utils: include Czech translation. -- Jonathan Nieder Thu, 04 Mar 2010 10:17:15 -0600 xz-utils (4.999.9beta+20100212-3) unstable; urgency=low * liblzma-dev: Remove unneeded .la file. * xz-utils: Dynamically link the xz binary. * Do not waste time installing and running doxygen on buildds that are not going to build arch-all packages. Build-Depends-Indep: doxygen. Closes: #540444. -- Jonathan Nieder Tue, 23 Feb 2010 18:23:29 -0600 xz-utils (4.999.9beta+20100212-2) unstable; urgency=low * Split off xzdec and lzmadec commands into new xzdec package. Thanks to Guillem Jover for the idea. Closes: #571060. * xz-utils.NEWS: advertise this change. -- Jonathan Nieder Tue, 23 Feb 2010 08:09:39 -0600 xz-utils (4.999.9beta+20100212-1) unstable; urgency=low * New upstream snapshot, taken from upstream commit eb7d51a3f. - xz --force compresses symlinks without complaint now. - liblzma: the optimized CRC32 implementation for x86 no longer misdetects the Hurd as Mac OS X. * debian/rules: ./configure --enable-assembler on the Hurd. * xz-utils: Simplify NEWS.Debian.gz. * liblzma-dev: Add a NEWS file to keep track of future API changes. * Drop unnecessary build-time conflict with autoconf2.13. * Add a blank line to the end of all NEWS files. (Works around: #247356) * debian/README.source: Leave out “-I -i” options. Ignoring version control cruft is the default behavior with dpkg source format 3.0. * debian/changelog.upstream.sh: Pass ‘git log’ an explicit --format option to avoid problems if format.pretty is set in gitconfig. * Correct the 4.999.9beta+20100117-1 changelog entry. It said: + The user-specified memory usage limit was not being honored in some cases. No such bug was observed, so describe the change instead. -- Jonathan Nieder Tue, 16 Feb 2010 00:30:24 -0600 xz-utils (4.999.9beta+20100131-1) unstable; urgency=low * New upstream snapshot, taken from upstream commit f9dd797a. + xz: the --list option to display information about a compressed file (e.g., its uncompressed size) is now functional. The output of the xz --robot --list command still may change in future versions. * xz-utils: NEWS.Debian.gz: Clarify how interleaved output can go wrong. * debian/rules: Simplify: - remove support for comma as a delimiter for $(DEB_BUILD_OPTIONS). - rely on dh --parallel instead of tricky logic of our own to handle parallel builds. Build-Depends: debhelper (>= 7.4.10). * Correct some typos in the 4.999.9beta+20100117-1 changelog entry. * Standards-Version: 3.8.4 (checked). * Update copyright file. -- Jonathan Nieder Sun, 31 Jan 2010 17:32:02 -0600 xz-utils (4.999.9beta+20100117-1) unstable; urgency=low * New upstream snapshot, taken from upstream commit 07a11dad. + Fix some logic errors in the internal memory usage configuration API. + xz will no longer compress or decompress special files in place, even with --force. --force still enables compression of the target of a symlink. + xz will no longer read compressed data from a terminal or write it to a terminal, even with --force. + liblzma: many Index handling API improvements: - An lzma_index includes more useful metadata that is not actually from the Index. This is particularly helpful for describing multiple-stream files. * lzma_index_cat() does not take a stream padding argument any more; use lzma_index_stream_padding() instead. * lzma_index_memusage() takes two arguments now. The new lzma_index_memused() convenience function calculates the total memory usage of an lzma_index. * lzma_index_count() has been replaced with lzma_index_block_count() and lzma_index_stream_count(). * The new lzma_index_stream_flags() allows storing Stream Flags (e.g., checksum types) with the Index information. * The new lzma_index_checks() function indicates the list of checksum types in use. * lzma_index_equal() has been removed. Its semantics were unclear, and something approximately equivalent can be implemented by iterating over Blocks in application code. - An lzma_index no longer represents a position within an Index. The new lzma_index_iter type can be used for that purpose. * Certain functions generate an iterator on demand now rather than clobbering their lzma_index arguments. Using a single lzma_index for multiple concurrent invocations is safe now: lzma_index_buffer_encode(), lzma_index_encoder() * Functions that used to specify a Record by modifying an lzma_index argument have been renamed and taught to write an lzma_index_iter instead: lzma_index_locate() -> lzma_index_iter_locate() lzma_index_rewind() -> lzma_index_iter_rewind() lzma_index_read() -> lzma_index_iter_next() * The lzma_index_record type used by lzma_index_read() for complex seeks is no more. lzma_index_iter_next() instead takes a parameter of the new lzma_index_iter_mode type. * New function: lzma_index_iter_init() * lzma_index_init() cannot reuse memory from an existing lzma_index any more. The signature changed accordingly. + xz: support for decompressing to a sparse file - Try to write a sparse file if the decompressed stream contains long runs of null bytes. - The new --no-sparse option disables this behavior. + xz: add Czech translation. + liblzma-dev: lzma_filters_copy() and lzma_filters_update() are declared not to throw exceptions. * liblzma: bump soname. * xz-utils: Add NEWS.Debian describing the sparse file support. * debian/rules: Stop explicitly disabling assembler optimizations on the Hurd. The configure script will check if a platform is supported. * debian/rules: Update clean target to handle comments and wildcards in .gitignore. * Build-Depends: perl. * debian/rules: Speed up build by using autoreconf --symlink. * Remove debian/dirs lists. * Update copyright file and fix a small typo. -- Jonathan Nieder Mon, 18 Jan 2010 04:19:50 -0600 xz-utils (4.999.9beta+20091116-1) unstable; urgency=low * New upstream snapshot, taken from upstream commit d315ca4. + liblzma: add some new functions: - lzma_filters_copy() to copy a filter chain; - lzma_filters_update() to change compression options mid-stream; - lzma_physmem() to retrieve the total quantity of installed RAM. + Fix a design error in liblzma API. - Stop requiring caller to maintain filter chain during compression. The library used to read it for new compression options. Callers that need to change options mid-stream should use lzma_filters_update() instead. - Remove 'persistent' member from struct lzma_options_lzma. + xz: add --robot --info-memory options, for front-ends to use to read the memory usage limit. * liblzma: bump soname; add README.Debian explaining why soname differs from upstream. * Use source format 3.0 (quilt). * Update and clarify copyright file. -- Jonathan Nieder Mon, 16 Nov 2009 16:33:35 -0600 xz-utils (4.999.9beta+20091016-1) unstable; urgency=low * New upstream snapshot, taken from upstream commit 78e92c1. * Drop xzmore.1 patch, applied upstream. * debian/rules: Disable assembler optimizations on hurd. (Closes: #553331) * debian/control: Clarify binary package descriptions. Thanks to Justin B Rye and Ben Finney for the text. * debian/rules get-orig-source: Use commit date (instead of last patch date) to name snapshots. -- Jonathan Nieder Sun, 01 Nov 2009 00:22:04 -0500 xz-utils (4.999.9beta+20091004-1) unstable; urgency=low * Upload to unstable. (Closes: #543562) * New upstream snapshot, taken from upstream commit ebfb2c5. * Patch xzmore.1 to use dashes instead of minus signs. * debian/control: Conflicts: xz-lzma. (Closes: #550249) * liblzma-doc: Register Doxygen-generated docs with doc-base. * debian/changelog.upstream.sh: Declare local variables. * debian/changelog.upstream.sh: Cope with multiple Debian revisions per upstream version. * debian/rules: Use ":=" where appropriate. * Add watch file. -- Jonathan Nieder Fri, 16 Oct 2009 13:58:54 -0500 xz-utils (4.999.9beta+20091002-1) experimental; urgency=low * New upstream snapshot, taken from upstream commit 29fd321. * debian/control: Build-Depends: cvs (for autopoint). -- Jonathan Nieder Sun, 04 Oct 2009 00:21:08 -0500 xz-utils (4.999.9beta-1) experimental; urgency=low [ Jonathan Nieder ] * New upstream release. - Fix a data corruption in the compression code. (Closes: #544872) - xzdiff: Fix comparing two compressed files. (Closes: #540543) - Most of XZ Utils is now in the public domain. (Closes: #541391) - Add doc/history.txt to the distributed tarball. (Closes: #541540) * Update and clarify copyright file. * Drop lzma compatibility commands for now. (Closes: #542060, #540232) Add instructions to README.Debian for installing them locally. * debian/control: Add information about the packaging Git repository. * debian/control: Clarify package descriptions. * debian/README.source: Clarify build instructions. * Add debian/.gitignore listing build products. * Build xz-utils with static liblzma. - debian/rules: Use configure --enable-dynamic=mixed. * Optimize xzdec for size, following suggestion in PACKAGERS. - debian/rules: Build xzdec separately so it can be optimized for size. - debian/control: Build-Depends: debhelper (>= 7.3.0). * Generate upstream changelog instead of shipping placeholder. - debian/README.source: Add instructions for regenerating upstream changelog file. - debian/changelog.upstream.sh: New script. - debian/rules: Install generated changelog file. * liblzma-doc: Drop documentation already shipped in /usr/share/doc/xz-utils. * liblzma-dev, liblzma-doc: Add short README.Debian with pointers to development documentation. * Drop debian/xzdec.1, since upstream ships a better man page. * Run autotools at build time. + debian/control: - Build-Depends: autoconf, automake, libtool, gettext - Build-Conflicts: autoconf2.13, automake1.4 + debian/rules: - configure: autoreconf -fi - clean: remove autotools-generated files to avoid .diff.gz changes when built twice in a row. * debian/rules: Add get-orig-source target. * Prepare for upload to experimental. [ Cristian Greco ] * debian/copyright: refer to versioned GPL-3 file. * debian/control: remove duplicate field ‘section’ in package xz-utils. -- Jonathan Nieder Wed, 30 Sep 2009 01:44:04 -0500 xz-utils (4.999.8beta-1) experimental; urgency=low [ Jonathan Nieder ] * Initial package for Debian. (Closes: #518803) + debian/rules: - add minimal rules file (using Debhelper 7), a control file describing the binary packages, and an appropriate compat file. - use configure --enable-dynamic; use up-to-date config.guess and config.sub files. - do not run automake and so on on autobuilders. Instead, we can run them ourselves when we build the source package. + debian/README.source: - add informations about the packaging GIT repository. * Add liblzma-doc package with Doxygen-generated API docs. [ Mohammed Adnène Trojette ] * Prepare for upload to experimental. -- Mohammed Adnène Trojette Sat, 27 Jun 2009 17:26:56 +0200 debian/autogen.sh0000775000000000000000000000141012276706601011174 0ustar #!/bin/sh # Generate debian/changelog.upstream, debian/generated-m4.list, # and debian/generated-po.list. # # Uses debian/changelog, the git revision log, and .gitignore # files from the current checkout. set -e changelog_needs_update() { test -e debian/changelog.upstream && read line < debian/changelog.upstream || return 0 ver=${line#Version } && ver=${ver%;*} && test "$ver" != "" || return 0 read line < debian/changelog && rhs=${line#*(} && deb_ver=${rhs%)*} && new_ver=${deb_ver%-*} || return 0 test "$ver" != "$new_ver" } cp -f m4/.gitignore debian/generated-m4.list cp -f po/.gitignore debian/generated-po.list sed -n 's,^build-aux/,, p' .gitignore > debian/generated-build-aux.list ! changelog_needs_update || exec sh debian/changelog.upstream.sh debian/README.source0000664000000000000000000000102612276706601011355 0ustar XZ Utils sources for Debian --------------------------- This Debian package is developed in a public Git repository (see the Vcs-Git field of debian/control) based on XZ Utils’s repository on tukaani.org. To build from a git checkout: debian/rules get-orig-source mv xz-utils_*.tar.gz .. debian/autogen.sh debuild To build a released version, no special instructions apply. “dpkg-buildpackage” and “apt-get -b xz-utils” should work as usual. -- Jonathan Nieder Mon, 08 Feb 2010 17:30:00 -0600 debian/source/0000775000000000000000000000000012276706733010505 5ustar debian/source/format0000664000000000000000000000001412276706601011705 0ustar 3.0 (quilt) debian/patches/0000775000000000000000000000000012276706733010634 5ustar debian/patches/xz-lvv-empty-block-minver0000664000000000000000000000233612276706601015545 0ustar From: Lasse Collin Date: Wed, 4 Jul 2012 19:58:23 +0300 Subject: xz: Fix the version number printed by xz -lvv. The decoder bug was fixed in 5.0.2 instead of 5.0.3. Signed-off-by: Jonathan Nieder --- src/xz/list.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xz/list.c b/src/xz/list.c index e71fbe2..a9e0adb 100644 --- a/src/xz/list.c +++ b/src/xz/list.c @@ -482,7 +482,7 @@ parse_block_header(file_pair *pair, const lzma_index_iter *iter, // Determine the minimum XZ Utils version that supports this Block. // // Currently the only thing that 5.0.0 doesn't support is empty - // LZMA2 Block. This bug was fixed in 5.0.3. + // LZMA2 Block. This decoder bug was fixed in 5.0.2. { size_t i = 0; while (filters[i + 1].id != LZMA_VLI_UNKNOWN) @@ -490,8 +490,8 @@ parse_block_header(file_pair *pair, const lzma_index_iter *iter, if (filters[i].id == LZMA_FILTER_LZMA2 && iter->block.uncompressed_size == 0 - && xfi->min_version < 50000032U) - xfi->min_version = 50000032U; + && xfi->min_version < 50000022U) + xfi->min_version = 50000022U; } // Convert the filter chain to human readable form. -- 1.7.9.6 (Apple Git-31.1) debian/patches/series0000664000000000000000000000027512276706601012047 0ustar abi-threaded-encoder abi-version-script abi-liblzma2-compat configure-liblzma2-compat man-date man-xz-lvv-minver xz-lvv-empty-block-minver decoder-check-first-0x00 error-parsing-less.patch debian/patches/man-xz-lvv-minver0000664000000000000000000000233312276706601014067 0ustar From: Lasse Collin Date: Sun, 1 Jul 2012 18:44:33 +0300 Subject: xz: Update the man page about the new field in --robot -lvv. Signed-off-by: Jonathan Nieder --- src/xz/xz.1 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/xz/xz.1 b/src/xz/xz.1 index cb8cd1e..4da09ba 100644 --- a/src/xz/xz.1 +++ b/src/xz/xz.1 @@ -5,7 +5,7 @@ .\" This file has been put into the public domain. .\" You can do whatever you want with this file. .\" -.TH XZ 1 "2012-05-27" "Tukaani" "XZ Utils" +.TH XZ 1 "2012-07-01" "Tukaani" "XZ Utils" . .SH NAME xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files @@ -1889,6 +1889,14 @@ or .B no indicating if all block headers have both compressed size and uncompressed size stored in them +.PP +.I Since +.B xz +.I 5.1.2alpha: +.IP 4. 4 +Minimum +.B xz +version required to decompress the file .RE .PD .PP @@ -1939,6 +1947,14 @@ or .B no indicating if all block headers have both compressed size and uncompressed size stored in them +.PP +.I Since +.B xz +.I 5.1.2alpha: +.IP 12. 4 +Minimum +.B xz +version required to decompress the file .RE .PD .PP -- 1.7.9.6 (Apple Git-31.1) debian/patches/man-date0000664000000000000000000000131512276706601012237 0ustar From: Lasse Collin Date: Fri, 22 Jun 2012 14:34:03 +0300 Subject: xz: Update man page date to match the latest update. Signed-off-by: Jonathan Nieder --- src/xz/xz.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xz/xz.1 b/src/xz/xz.1 index 3ff89f0..cb8cd1e 100644 --- a/src/xz/xz.1 +++ b/src/xz/xz.1 @@ -5,7 +5,7 @@ .\" This file has been put into the public domain. .\" You can do whatever you want with this file. .\" -.TH XZ 1 "2011-04-11" "Tukaani" "XZ Utils" +.TH XZ 1 "2012-05-27" "Tukaani" "XZ Utils" . .SH NAME xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files -- 1.7.9.6 (Apple Git-31.1) debian/patches/error-parsing-less.patch0000664000000000000000000000117012276706720015406 0ustar Description: xzless: Make "less -V" parsing more robust Origin: lp:~chilicuil/ubuntu/trusty/xz-utils/fix-1248044 Bug-Ubuntu: https://launchpad.net/bugs/1248044 --- a/src/scripts/xzless.in +++ b/src/scripts/xzless.in @@ -46,7 +46,7 @@ if test "${LESSMETACHARS+set}" != set; t LESSMETACHARS="$space$tab$nl'"';*?"()<>[|&^`#\$%=~' fi -if test "$(less -V | { read ver && echo ${ver#less }; })" -ge 429; then +if test "$(less -V | { read ver && ver=${ver#less } && echo ${ver%% *}; })" -ge 429; then # less 429 or later: LESSOPEN pipe will be used on # standard input if $LESSOPEN begins with |-. LESSOPEN="|-$xz -cdfq -- %s" debian/patches/decoder-check-first-0x000000664000000000000000000000373612276706601015054 0ustar From: Lasse Collin Date: Thu, 28 Jun 2012 10:47:49 +0300 Subject: 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. Signed-off-by: Jonathan Nieder --- src/liblzma/lzma/lzma_decoder.c | 8 ++++++-- src/liblzma/rangecoder/range_decoder.h | 12 +++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/liblzma/lzma/lzma_decoder.c b/src/liblzma/lzma/lzma_decoder.c index 5abbc0d..b8f9317 100644 --- a/src/liblzma/lzma/lzma_decoder.c +++ b/src/liblzma/lzma/lzma_decoder.c @@ -289,8 +289,12 @@ lzma_decode(lzma_coder *restrict coder, lzma_dict *restrict dictptr, // Initialization // //////////////////// - if (!rc_read_init(&coder->rc, in, in_pos, in_size)) - return LZMA_OK; + { + const lzma_ret ret = rc_read_init( + &coder->rc, in, in_pos, in_size); + if (ret != LZMA_STREAM_END) + return ret; + } /////////////// // Variables // diff --git a/src/liblzma/rangecoder/range_decoder.h b/src/liblzma/rangecoder/range_decoder.h index fb96180..e0b051f 100644 --- a/src/liblzma/rangecoder/range_decoder.h +++ b/src/liblzma/rangecoder/range_decoder.h @@ -25,20 +25,26 @@ typedef struct { /// Reads the first five bytes to initialize the range decoder. -static inline bool +static inline lzma_ret rc_read_init(lzma_range_decoder *rc, const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size) { while (rc->init_bytes_left > 0) { if (*in_pos == in_size) - return false; + return LZMA_OK; + + // The first byte is always 0x00. It could have been omitted + // in LZMA2 but it wasn't, so one byte is wasted in every + // LZMA2 chunk. + if (rc->init_bytes_left == 5 && in[*in_pos] != 0x00) + return LZMA_DATA_ERROR; rc->code = (rc->code << 8) | in[*in_pos]; ++*in_pos; --rc->init_bytes_left; } - return true; + return LZMA_STREAM_END; } -- 1.7.9.6 (Apple Git-31.1) debian/patches/configure-liblzma2-compat0000664000000000000000000001435612276706601015536 0ustar From: Jonathan Nieder Date: Sat, 16 Jun 2012 05:57:42 -0500 Subject: liblzma: make dlopen()-based liblzma2 compatibility optional Suppose I want to build a statically linked program: gcc -static -o app app.c -lrpm -llzma Suppose further that librpm.a was built against a pre-5.0 version of liblzma so it does not allocate as much space for reserved fields at the end of lzma_stream as the current API requires. (This is a hypothetical scenario --- Debian librpm does not provide a static library.) If liblzma uses unpatched lzma_code() from XZ Utils >= 5.0, then during calls to librpm that try to compress or decompress an xz-compressed RPM, lzma_code’s reserved field checks will overflow the buffer and segfault. If liblzma uses the modified version of lzma_code() which asks libdl if liblzma.so.2 is resident and refrains from checking reserved fields past the end of the old lzma_stream struct when the answer is "yes", the behavior is no better. The dynamic library liblzma.so.2 is _not_ resident, so lzma_code() dutifully reads reserved fields past the end of the buffer --- segfault. So the only safe behavior in the static library is to unconditionally disable checks that might break for callers we want to continue to support. The new "./configure --enable-liblzma2-compat" option implements all three sets of semantics: - "./configure --disable-liblzma2-compat" means to check the full set of reserved fields unconditionally. You can use this to check how your application would behave with the unpatched library. - "./configure --enable-liblzma2-compat=auto" means to skip checks of reserved fields past the old end of struct lzma_stream when liblzma.so.2 is resident. If a DSO built against liblzma2 shares the process image, the ABI-incompatible checks are skipped for safety, whereas in the usual case when no such DSO is resident, the full set of checks is run to help application developers remember to zero all reserved fields. - "./configure --enable-liblzma2-compat" makes liblzma skip the ABI-incompatible checks unconditionallty. You can use this if you want your copy of liblzma to be usable by static libraries that were built against the old library. Signed-off-by: Jonathan Nieder --- configure.ac | 33 +++++++++++++++++++++++++++++++-- src/liblzma/common/common.c | 40 +++++++++++++++++++++++++++++++++++----- src/liblzma/common/common.h | 2 ++ 3 files changed, 68 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index cbf92659..eb510fd9 100644 --- a/configure.ac +++ b/configure.ac @@ -468,10 +468,39 @@ if test "x$enable_threads" = xyes; then CFLAGS=$OLD_CFLAGS fi -# As a Debian-specific hack, liblzma uses dlopen() to check if extra +# As a Debian-specific hack, liblzma can use dlopen() to check if extra # paranoia is needed because unversioned symbols from liblzma.so.2 are # present in the same process. See src/liblzma/common/common.c. -AC_SEARCH_LIBS([dlopen], [dl]) +AC_MSG_CHECKING([if lzma_code checks should be relaxed for compatibility]) +AC_ARG_ENABLE([liblzma2-compat], [AC_HELP_STRING([--enable-liblzma2-compat], + [Relax run-time checks to accomodate old binaries built + with smaller sizeof(lzma_stream). The default is "dynamic", + which means to only use the relaxed checks when the dynamic + loader reports that liblzma.so.2 is loaded in the same process.])], + [], [enable_liblzma2_compat=dynamic]) +case $enable_liblzma2_compat in +dynamic) + AC_SEARCH_LIBS([dlopen], [dl]) + AC_DEFINE([LIBLZMA2_COMPAT_DYNAMIC], [1], + [Define to 1 to use dlopen() to check if lzma_code() checks + should be more tolerant because the process is also linked to + liblzma from Debian 6.0.]) + AC_MSG_RESULT([auto]) + ;; +yes) + AC_DEFINE([LIBLZMA2_COMPAT], [1], + [Define to 1 to unconditionally make lzma_code() checks tolerant + to accomodate callers built against liblzma from Debian 6.0.]) + AC_MSG_RESULT([yes]) + ;; +no) + AC_MSG_RESULT([no]) + ;; +*) + AC_MSG_RESULT([]) + AC_MSG_ERROR([--enable-liblzma2: unrecognized value $enable_liblzma2_compat]) + ;; +esac echo echo "Initializing Libtool:" diff --git a/src/liblzma/common/common.c b/src/liblzma/common/common.c index e61d940d..3bfdb755 100644 --- a/src/liblzma/common/common.c +++ b/src/liblzma/common/common.c @@ -143,16 +143,46 @@ lzma_next_end(lzma_next_coder *next, lzma_allocator *allocator) // External to internal API wrapper // ////////////////////////////////////// -static bool -liblzma2_loaded(void) +#ifdef LIBLZMA2_COMPAT_DYNAMIC + +static void +init_liblzma2_compat(lzma_stream *strm) { void *handle = dlopen("liblzma.so.2", RTLD_LAZY | RTLD_NOLOAD); if (handle) { dlclose(handle); - return true; + strm->internal->liblzma2_compat = true; + return; } + strm->internal->liblzma2_compat = false; +} + +static bool +liblzma2_loaded(lzma_stream *strm) +{ + return strm->internal->liblzma2_compat; +} + +#else + +static void +init_liblzma2_compat(lzma_stream *strm) +{ +} + +#ifdef LIBLZMA2_COMPAT +static bool liblzma2_loaded(lzma_stream *strm) +{ + return true; +} +#else +static bool liblzma2_loaded(lzma_stream *strm) +{ return false; } +#endif + +#endif extern lzma_ret lzma_strm_init(lzma_stream *strm) @@ -167,7 +197,7 @@ lzma_strm_init(lzma_stream *strm) return LZMA_MEM_ERROR; strm->internal->next = LZMA_NEXT_CODER_INIT; - strm->internal->liblzma2_compat = liblzma2_loaded(); + init_liblzma2_compat(strm); } memzero(strm->internal->supported_actions, @@ -220,7 +250,7 @@ lzma_code(lzma_stream *strm, lzma_action action) || strm->reserved_ptr4 != NULL) return LZMA_OPTIONS_ERROR; - if (strm->internal->liblzma2_compat) + if (liblzma2_loaded(strm)) ; /* Enough checks. */ else if (strm->reserved_int1 != 0 || strm->reserved_int2 != 0 diff --git a/src/liblzma/common/common.h b/src/liblzma/common/common.h index 475661d8..4081c2d3 100644 --- a/src/liblzma/common/common.h +++ b/src/liblzma/common/common.h @@ -201,9 +201,11 @@ struct lzma_internal_s { /// made (no input consumed and no output produced by next.code). bool allow_buf_error; +#ifdef LIBLZMA2_COMPAT_DYNAMIC /// Indicates whether we are sharing a process image with /// liblzma.so.2 and need to tread carefully. bool liblzma2_compat; +#endif }; -- 1.7.10.4 debian/patches/abi-version-script0000664000000000000000000000223512276706601014273 0ustar From: Jonathan Nieder Date: Sat, 11 Jun 2011 23:33:43 -0500 Subject: liblzma: Remove XZ_5.1.1alpha version symbol Now that the lzma_stream_encoder_mt{,_memusage} symbols are gone on this branch, liblzma should stop pretending to satisfy dependencies on XZ_5.1.1alpha. After this change, programs relying on those symbols will error out immediately at startup like they are supposed to: app: liblzma.so.5: version `XZ_5.1.1alpha' not found (required by app) And your scripts that look for version definition entries with readelf -s (like RPM’s find-provides) can tell that this copy of liblzma lacks support for multithreaded encoding. Signed-off-by: Jonathan Nieder --- src/liblzma/liblzma.map | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/src/liblzma/liblzma.map b/src/liblzma/liblzma.map index 835eb26..47a7c22 100644 --- a/src/liblzma/liblzma.map +++ b/src/liblzma/liblzma.map @@ -93,13 +93,7 @@ global: lzma_vli_decode; lzma_vli_encode; lzma_vli_size; -}; - -XZ_5.1.1alpha { -global: - lzma_stream_encoder_mt; - lzma_stream_encoder_mt_memusage; local: *; -} XZ_5.0; +}; -- 1.7.7 debian/patches/abi-threaded-encoder0000664000000000000000000017625612276706601014520 0ustar From: Jonathan Nieder Date: Sat, 11 Jun 2011 21:41:15 -0500 Subject: Remove threading functionality for now This reverts the following commits: - 6ef4eabc0 (Bump the version number to 5.1.1alpha and liblzma soname to 5.0.99) - 70e750f59 (xz: Update the man page about threading) - c29e6630c (xz: Print the maximum number of worker threads in xz -vv) - 335fe260a (xz: Minor internal changes to handling of --threads) - 24e0406c0 (xz: Add support for threaded compression) - 9a4377be0 (Put the unstable APIs behind #ifdef LZMA_UNSTABLE) - de678e0c9 (liblmza: Add lzma_stream_encoder_mt() for threaded compression) The multithreaded compression functions, while useful, are not set in stone as part of the stable ABI. Changes will be easier to weather until the functions stabilize if they are left out from the non-experimental development branch of Debian for now. Signed-off-by: Jonathan Nieder --- configure.ac | 1 - src/liblzma/Makefile.am | 2 +- src/liblzma/api/lzma/container.h | 167 ------ src/liblzma/api/lzma/version.h | 2 +- src/liblzma/common/Makefile.inc | 7 - src/liblzma/common/common.c | 9 +- src/liblzma/common/common.h | 16 - src/liblzma/common/outqueue.c | 184 ------ src/liblzma/common/outqueue.h | 155 ----- src/liblzma/common/stream_encoder_mt.c | 1013 -------------------------------- src/xz/args.c | 5 +- src/xz/coder.c | 210 +++---- src/xz/hardware.c | 24 +- src/xz/hardware.h | 9 +- src/xz/private.h | 2 - src/xz/xz.1 | 34 +- 16 files changed, 117 insertions(+), 1723 deletions(-) delete mode 100644 src/liblzma/common/outqueue.c delete mode 100644 src/liblzma/common/outqueue.h delete mode 100644 src/liblzma/common/stream_encoder_mt.c diff --git a/configure.ac b/configure.ac index 25eb838..c9585e5 100644 --- a/configure.ac +++ b/configure.ac @@ -471,7 +471,6 @@ if test "x$enable_threads" = xyes; then AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [[#include ]]) CFLAGS=$OLD_CFLAGS fi -AM_CONDITIONAL([COND_THREADS], [test "x$ax_pthread_ok" = xyes]) echo echo "Initializing Libtool:" diff --git a/src/liblzma/Makefile.am b/src/liblzma/Makefile.am index 5bd205d..ac2d1ed 100644 --- a/src/liblzma/Makefile.am +++ b/src/liblzma/Makefile.am @@ -24,7 +24,7 @@ liblzma_la_CPPFLAGS = \ -I$(top_srcdir)/src/liblzma/simple \ -I$(top_srcdir)/src/common \ -DTUKLIB_SYMBOL_PREFIX=lzma_ -liblzma_la_LDFLAGS = -no-undefined -version-info 5:99:0 +liblzma_la_LDFLAGS = -no-undefined -version-info 5:0:0 if COND_SYMVERS EXTRA_DIST += liblzma.map diff --git a/src/liblzma/api/lzma/container.h b/src/liblzma/api/lzma/container.h index 499d8b9..7a9ffc6 100644 --- a/src/liblzma/api/lzma/container.h +++ b/src/liblzma/api/lzma/container.h @@ -60,129 +60,6 @@ #define LZMA_PRESET_EXTREME (UINT32_C(1) << 31) -#ifdef LZMA_UNSTABLE /* Unstable API that may change. Use only for testing. */ -/** - * \brief Multithreading options - */ -typedef struct { - /** - * \brief Flags - * - * Set this to zero if no flags are wanted. - * - * No flags are currently supported. - */ - uint32_t flags; - - /** - * \brief Number of worker threads to use - */ - uint32_t threads; - - /** - * \brief Maximum uncompressed size of a Block - * - * The encoder will start a new .xz Block every block_size bytes. - * Using LZMA_FULL_FLUSH or LZMA_FULL_BARRIER with lzma_code() - * the caller may tell liblzma to start a new Block earlier. - * - * With LZMA2, a recommended block size is 2-4 times the LZMA2 - * dictionary size. With very small dictionaries, it is recommended - * to use at least 1 MiB block size for good compression ratio, even - * if this is more than four times the dictionary size. Note that - * these are only recommendations for typical use cases; feel free - * to use other values. Just keep in mind that using a block size - * less than the LZMA2 dictionary size is waste of RAM. - * - * Set this to 0 to let liblzma choose the block size depending - * on the compression options. For LZMA2 it will be 3*dict_size - * or 1 MiB, whichever is more. - */ - uint64_t block_size; - - /** - * \brief Timeout to allow lzma_code() to return early - * - * Multithreading can make liblzma to consume input and produce - * output in a very bursty way: it may first read a lot of input - * to fill internal buffers, then no input or output occurs for - * a while. - * - * In single-threaded mode, lzma_code() won't return until it has - * either consumed all the input or filled the output buffer. If - * this is done in multithreaded mode, it may cause a call - * lzma_code() to take even tens of seconds, which isn't acceptable - * in all applications. - * - * To avoid very long blocking times in lzma_code(), a timeout - * (in milliseconds) may be set here. If lzma_code() would block - * longer than this number of milliseconds, it will return with - * LZMA_OK. Reasonable values are 100 ms or more. The xz command - * line tool uses 300 ms. - * - * If long blocking times are fine for you, set timeout to a special - * value of 0, which will disable the timeout mechanism and will make - * lzma_code() block until all the input is consumed or the output - * buffer has been filled. - * - * \note Even with a timeout, lzma_code() might sometimes take - * somewhat long time to return. No timing guarantees - * are made. - */ - uint32_t timeout; - - /** - * \brief Compression preset (level and possible flags) - * - * The preset is set just like with lzma_easy_encoder(). - * The preset is ignored if filters below is non-NULL. - */ - uint32_t preset; - - /** - * \brief Filter chain (alternative to a preset) - * - * If this is NULL, the preset above is used. Otherwise the preset - * is ignored and the filter chain specified here is used. - */ - const lzma_filter *filters; - - /** - * \brief Integrity check type - * - * See check.h for available checks. The xz command line tool - * defaults to LZMA_CHECK_CRC64, which is a good choice if you - * are unsure. - */ - lzma_check check; - - /* - * Reserved space to allow possible future extensions without - * breaking the ABI. You should not touch these, because the names - * of these variables may change. These are and will never be used - * with the currently supported options, so it is safe to leave these - * uninitialized. - */ - lzma_reserved_enum reserved_enum1; - lzma_reserved_enum reserved_enum2; - lzma_reserved_enum reserved_enum3; - uint32_t reserved_int1; - uint32_t reserved_int2; - uint32_t reserved_int3; - uint32_t reserved_int4; - uint64_t reserved_int5; - uint64_t reserved_int6; - uint64_t reserved_int7; - uint64_t reserved_int8; - void *reserved_ptr1; - void *reserved_ptr2; - void *reserved_ptr3; - void *reserved_ptr4; - -} lzma_mt; -#endif - - /** * \brief Calculate approximate memory usage of easy encoder * @@ -313,50 +190,6 @@ extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm, lzma_nothrow lzma_attr_warn_unused_result; -#ifdef LZMA_UNSTABLE /* Unstable API that may change. Use only for testing. */ -/** - * \brief Calculate approximate memory usage of multithreaded .xz encoder - * - * Since doing the encoding in threaded mode doesn't affect the memory - * requirements of single-threaded decompressor, you can use - * lzma_easy_decoder_memusage(options->preset) or - * lzma_raw_decoder_memusage(options->filters) to calculate - * the decompressor memory requirements. - * - * \param options Compression options - * - * \return Number of bytes of memory required for encoding with the - * given options. If an error occurs, for example due to - * unsupported preset or filter chain, UINT64_MAX is returned. - */ -extern LZMA_API(uint64_t) lzma_stream_encoder_mt_memusage( - const lzma_mt *options) lzma_nothrow lzma_attr_pure; - - -/** - * \brief Initialize multithreaded .xz Stream encoder - * - * This provides the functionality of lzma_easy_encoder() and - * lzma_stream_encoder() as a single function for multithreaded use. - * - * TODO: For lzma_code(), only LZMA_RUN and LZMA_FINISH are currently - * supported. Support for other actions has been planned. - * - * \param strm Pointer to properly prepared lzma_stream - * \param options Pointer to multithreaded compression options - * - * \return - LZMA_OK - * - LZMA_MEM_ERROR - * - LZMA_UNSUPPORTED_CHECK - * - LZMA_OPTIONS_ERROR - * - LZMA_PROG_ERROR - */ -extern LZMA_API(lzma_ret) lzma_stream_encoder_mt( - lzma_stream *strm, const lzma_mt *options) - lzma_nothrow lzma_attr_warn_unused_result; -#endif - - /** * \brief Initialize .lzma encoder (legacy file format) * diff --git a/src/liblzma/api/lzma/version.h b/src/liblzma/api/lzma/version.h index 4bf7e40..a908ea2 100644 --- a/src/liblzma/api/lzma/version.h +++ b/src/liblzma/api/lzma/version.h @@ -22,7 +22,7 @@ */ #define LZMA_VERSION_MAJOR 5 #define LZMA_VERSION_MINOR 1 -#define LZMA_VERSION_PATCH 1 +#define LZMA_VERSION_PATCH 0 #define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_ALPHA #ifndef LZMA_VERSION_COMMIT diff --git a/src/liblzma/common/Makefile.inc b/src/liblzma/common/Makefile.inc index dd5a8c8..81d751e 100644 --- a/src/liblzma/common/Makefile.inc +++ b/src/liblzma/common/Makefile.inc @@ -40,13 +40,6 @@ liblzma_la_SOURCES += \ common/stream_encoder.c \ common/stream_flags_encoder.c \ common/vli_encoder.c - -if COND_THREADS -liblzma_la_SOURCES += \ - common/outqueue.c \ - common/outqueue.h \ - common/stream_encoder_mt.c -endif endif if COND_MAIN_DECODER diff --git a/src/liblzma/common/common.c b/src/liblzma/common/common.c index 85ae96a..50c984c 100644 --- a/src/liblzma/common/common.c +++ b/src/liblzma/common/common.c @@ -263,9 +263,7 @@ lzma_code(lzma_stream *strm, lzma_action action) strm->internal->avail_in = strm->avail_in; - // Cast is needed to silence a warning about LZMA_TIMED_OUT, which - // isn't part of lzma_ret enumeration. - switch ((unsigned int)(ret)) { + switch (ret) { case LZMA_OK: // Don't return LZMA_BUF_ERROR when it happens the first time. // This is to avoid returning LZMA_BUF_ERROR when avail_out @@ -281,11 +279,6 @@ lzma_code(lzma_stream *strm, lzma_action action) } break; - case LZMA_TIMED_OUT: - strm->internal->allow_buf_error = false; - ret = LZMA_OK; - break; - case LZMA_STREAM_END: if (strm->internal->sequence == ISEQ_SYNC_FLUSH || strm->internal->sequence == ISEQ_FULL_FLUSH) diff --git a/src/liblzma/common/common.h b/src/liblzma/common/common.h index 5c92af2..45aba4f 100644 --- a/src/liblzma/common/common.h +++ b/src/liblzma/common/common.h @@ -32,8 +32,6 @@ #define LZMA_API(type) LZMA_API_EXPORT type LZMA_API_CALL -#define LZMA_UNSTABLE - #include "lzma.h" // These allow helping the compiler in some often-executed branches, whose @@ -51,13 +49,6 @@ #define LZMA_BUFFER_SIZE 4096 -/// Maximum number of worker threads within one multithreaded component. -/// The limit exists solely to make it simpler to prevent integer overflows -/// when allocating structures etc. This should be big enough for now... -/// the code won't scale anywhere close to this number anyway. -#define LZMA_THREADS_MAX 16384 - - /// Starting value for memory usage estimates. Instead of calculating size /// of _every_ structure and taking into account malloc() overhead etc., we /// add a base size to all memory usage estimates. It's not very accurate @@ -78,13 +69,6 @@ | LZMA_CONCATENATED ) -/// Special return value (lzma_ret) to indicate that a timeout was reached -/// and lzma_code() must not return LZMA_BUF_ERROR. This is converted to -/// LZMA_OK in lzma_code(). This is not in the lzma_ret enumeration because -/// there's no need to have it in the public API. -#define LZMA_TIMED_OUT 32 - - /// Type of encoder/decoder specific data; the actual structure is defined /// differently in different coders. typedef struct lzma_coder_s lzma_coder; diff --git a/src/liblzma/common/outqueue.c b/src/liblzma/common/outqueue.c deleted file mode 100644 index d7a87d9..0000000 --- a/src/liblzma/common/outqueue.c +++ /dev/null @@ -1,184 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -/// \file outqueue.c -/// \brief Output queue handling in multithreaded coding -// -// Author: Lasse Collin -// -// This file has been put into the public domain. -// You can do whatever you want with this file. -// -/////////////////////////////////////////////////////////////////////////////// - -#include "outqueue.h" - - -/// This is to ease integer overflow checking: We may allocate up to -/// 2 * LZMA_THREADS_MAX buffers and we need some extra memory for other -/// data structures (that's the second /2). -#define BUF_SIZE_MAX (UINT64_MAX / LZMA_THREADS_MAX / 2 / 2) - - -static lzma_ret -get_options(uint64_t *bufs_alloc_size, uint32_t *bufs_count, - uint64_t buf_size_max, uint32_t threads) -{ - if (threads > LZMA_THREADS_MAX || buf_size_max > BUF_SIZE_MAX) - return LZMA_OPTIONS_ERROR; - - // The number of buffers is twice the number of threads. - // This wastes RAM but keeps the threads busy when buffers - // finish out of order. - // - // NOTE: If this is changed, update BUF_SIZE_MAX too. - *bufs_count = threads * 2; - *bufs_alloc_size = *bufs_count * buf_size_max; - - return LZMA_OK; -} - - -extern uint64_t -lzma_outq_memusage(uint64_t buf_size_max, uint32_t threads) -{ - uint64_t bufs_alloc_size; - uint32_t bufs_count; - - if (get_options(&bufs_alloc_size, &bufs_count, buf_size_max, threads) - != LZMA_OK) - return UINT64_MAX; - - return sizeof(lzma_outq) + bufs_count * sizeof(lzma_outbuf) - + bufs_alloc_size; -} - - -extern lzma_ret -lzma_outq_init(lzma_outq *outq, lzma_allocator *allocator, - uint64_t buf_size_max, uint32_t threads) -{ - uint64_t bufs_alloc_size; - uint32_t bufs_count; - - // Set bufs_count and bufs_alloc_size. - return_if_error(get_options(&bufs_alloc_size, &bufs_count, - buf_size_max, threads)); - - // Allocate memory if needed. - if (outq->buf_size_max != buf_size_max - || outq->bufs_allocated != bufs_count) { - lzma_outq_end(outq, allocator); - -#if SIZE_MAX < UINT64_MAX - if (bufs_alloc_size > SIZE_MAX) - return LZMA_MEM_ERROR; -#endif - - outq->bufs = lzma_alloc(bufs_count * sizeof(lzma_outbuf), - allocator); - outq->bufs_mem = lzma_alloc((size_t)(bufs_alloc_size), - allocator); - - if (outq->bufs == NULL || outq->bufs_mem == NULL) { - lzma_outq_end(outq, allocator); - return LZMA_MEM_ERROR; - } - } - - // Initialize the rest of the main structure. Initialization of - // outq->bufs[] is done when they are actually needed. - outq->buf_size_max = (size_t)(buf_size_max); - outq->bufs_allocated = bufs_count; - outq->bufs_pos = 0; - outq->bufs_used = 0; - outq->read_pos = 0; - - return LZMA_OK; -} - - -extern void -lzma_outq_end(lzma_outq *outq, lzma_allocator *allocator) -{ - lzma_free(outq->bufs, allocator); - outq->bufs = NULL; - - lzma_free(outq->bufs_mem, allocator); - outq->bufs_mem = NULL; - - return; -} - - -extern lzma_outbuf * -lzma_outq_get_buf(lzma_outq *outq) -{ - // Caller must have checked it with lzma_outq_has_buf(). - assert(outq->bufs_used < outq->bufs_allocated); - - // Initialize the new buffer. - lzma_outbuf *buf = &outq->bufs[outq->bufs_pos]; - buf->buf = outq->bufs_mem + outq->bufs_pos * outq->buf_size_max; - buf->size = 0; - buf->finished = false; - - // Update the queue state. - if (++outq->bufs_pos == outq->bufs_allocated) - outq->bufs_pos = 0; - - ++outq->bufs_used; - - return buf; -} - - -extern bool -lzma_outq_is_readable(const lzma_outq *outq) -{ - uint32_t i = outq->bufs_pos - outq->bufs_used; - if (outq->bufs_pos < outq->bufs_used) - i += outq->bufs_allocated; - - return outq->bufs[i].finished; -} - - -extern lzma_ret -lzma_outq_read(lzma_outq *restrict outq, uint8_t *restrict out, - size_t *restrict out_pos, size_t out_size, - lzma_vli *restrict unpadded_size, - lzma_vli *restrict uncompressed_size) -{ - // There must be at least one buffer from which to read. - if (outq->bufs_used == 0) - return LZMA_OK; - - // Get the buffer. - uint32_t i = outq->bufs_pos - outq->bufs_used; - if (outq->bufs_pos < outq->bufs_used) - i += outq->bufs_allocated; - - lzma_outbuf *buf = &outq->bufs[i]; - - // If it isn't finished yet, we cannot read from it. - if (!buf->finished) - return LZMA_OK; - - // Copy from the buffer to output. - lzma_bufcpy(buf->buf, &outq->read_pos, buf->size, - out, out_pos, out_size); - - // Return if we didn't get all the data from the buffer. - if (outq->read_pos < buf->size) - return LZMA_OK; - - // The buffer was finished. Tell the caller its size information. - *unpadded_size = buf->unpadded_size; - *uncompressed_size = buf->uncompressed_size; - - // Free this buffer for further use. - --outq->bufs_used; - outq->read_pos = 0; - - return LZMA_STREAM_END; -} diff --git a/src/liblzma/common/outqueue.h b/src/liblzma/common/outqueue.h deleted file mode 100644 index 154f91b..0000000 --- a/src/liblzma/common/outqueue.h +++ /dev/null @@ -1,155 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -/// \file outqueue.h -/// \brief Output queue handling in multithreaded coding -// -// Author: Lasse Collin -// -// This file has been put into the public domain. -// You can do whatever you want with this file. -// -/////////////////////////////////////////////////////////////////////////////// - -#include "common.h" - - -/// Output buffer for a single thread -typedef struct { - /// Pointer to the output buffer of lzma_outq.buf_size_max bytes - uint8_t *buf; - - /// Amount of data written to buf - size_t size; - - /// Additional size information - lzma_vli unpadded_size; - lzma_vli uncompressed_size; - - /// True when no more data will be written into this buffer. - /// - /// \note This is read by another thread and thus access - /// to this variable needs a mutex. - bool finished; - -} lzma_outbuf; - - -typedef struct { - /// Array of buffers that are used cyclically. - lzma_outbuf *bufs; - - /// Memory allocated for all the buffers - uint8_t *bufs_mem; - - /// Amount of buffer space available in each buffer - size_t buf_size_max; - - /// Number of buffers allocated - uint32_t bufs_allocated; - - /// Position in the bufs array. The next buffer to be taken - /// into use is bufs[bufs_pos]. - uint32_t bufs_pos; - - /// Number of buffers in use - uint32_t bufs_used; - - /// Position in the buffer in lzma_outq_read() - size_t read_pos; - -} lzma_outq; - - -/** - * \brief Calculate the memory usage of an output queue - * - * \return Approximate memory usage in bytes or UINT64_MAX on error. - */ -extern uint64_t lzma_outq_memusage(uint64_t buf_size_max, uint32_t threads); - - -/// \brief Initialize an output queue -/// -/// \param outq Pointer to an output queue. Before calling -/// this function the first time, *outq should -/// have been zeroed with memzero() so that this -/// function knows that there are no previous -/// allocations to free. -/// \param allocator Pointer to allocator or NULL -/// \param buf_size_max Maximum amount of data that a single buffer -/// in the queue may need to store. -/// \param threads Number of buffers that may be in use -/// concurrently. Note that more than this number -/// of buffers will actually get allocated to -/// improve performance when buffers finish -/// out of order. -/// -/// \return - LZMA_OK -/// - LZMA_MEM_ERROR -/// -extern lzma_ret lzma_outq_init(lzma_outq *outq, lzma_allocator *allocator, - uint64_t buf_size_max, uint32_t threads); - - -/// \brief Free the memory associated with the output queue -extern void lzma_outq_end(lzma_outq *outq, lzma_allocator *allocator); - - -/// \brief Get a new buffer -/// -/// lzma_outq_has_buf() must be used to check that there is a buffer -/// available before calling lzma_outq_get_buf(). -/// -extern lzma_outbuf *lzma_outq_get_buf(lzma_outq *outq); - - -/// \brief Test if there is data ready to be read -/// -/// Call to this function must be protected with the same mutex that -/// is used to protect lzma_outbuf.finished. -/// -extern bool lzma_outq_is_readable(const lzma_outq *outq); - - -/// \brief Read finished data -/// -/// \param outq Pointer to an output queue -/// \param out Beginning of the output buffer -/// \param out_pos The next byte will be written to -/// out[*out_pos]. -/// \param out_size Size of the out buffer; the first byte into -/// which no data is written to is out[out_size]. -/// \param unpadded_size Unpadded Size from the Block encoder -/// \param uncompressed_size Uncompressed Size from the Block encoder -/// -/// \return - LZMA: All OK. Either no data was available or the buffer -/// being read didn't become empty yet. -/// - LZMA_STREAM_END: The buffer being read was finished. -/// *unpadded_size and *uncompressed_size were set. -/// -/// \note This reads lzma_outbuf.finished variables and thus call -/// to this function needs to be protected with a mutex. -/// -extern lzma_ret lzma_outq_read(lzma_outq *restrict outq, - uint8_t *restrict out, size_t *restrict out_pos, - size_t out_size, lzma_vli *restrict unpadded_size, - lzma_vli *restrict uncompressed_size); - - -/// \brief Test if there is at least one buffer free -/// -/// This must be used before getting a new buffer with lzma_outq_get_buf(). -/// -static inline bool -lzma_outq_has_buf(const lzma_outq *outq) -{ - return outq->bufs_used < outq->bufs_allocated; -} - - -/// \brief Test if the queue is completely empty -static inline bool -lzma_outq_is_empty(const lzma_outq *outq) -{ - return outq->bufs_used == 0; -} diff --git a/src/liblzma/common/stream_encoder_mt.c b/src/liblzma/common/stream_encoder_mt.c deleted file mode 100644 index a4b2800..0000000 --- a/src/liblzma/common/stream_encoder_mt.c +++ /dev/null @@ -1,1013 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -/// \file stream_encoder_mt.c -/// \brief Multithreaded .xz Stream encoder -// -// Author: Lasse Collin -// -// This file has been put into the public domain. -// You can do whatever you want with this file. -// -/////////////////////////////////////////////////////////////////////////////// - -#include "filter_encoder.h" -#include "easy_preset.h" -#include "block_encoder.h" -#include "index_encoder.h" -#include "outqueue.h" - - -/// Maximum supported block size. This makes it simpler to prevent integer -/// overflows if we are given unusually large block size. -#define BLOCK_SIZE_MAX (UINT64_MAX / LZMA_THREADS_MAX) - - -typedef enum { - /// Waiting for work. - THR_IDLE, - - /// Encoding is in progress. - THR_RUN, - - /// Encoding is in progress but no more input data will - /// be read. - THR_FINISH, - - /// The main thread wants the thread to stop whatever it was doing - /// but not exit. - THR_STOP, - - /// The main thread wants the thread to exit. We could use - /// cancellation but since there's stopped anyway, this is lazier. - THR_EXIT, - -} worker_state; - - -typedef struct worker_thread_s worker_thread; -struct worker_thread_s { - worker_state state; - - /// Input buffer of coder->block_size bytes. The main thread will - /// put new input into this and update in_size accordingly. Once - /// no more input is coming, state will be set to THR_FINISH. - uint8_t *in; - - /// Amount of data available in the input buffer. This is modified - /// only by the main thread. - size_t in_size; - - /// Output buffer for this thread. This is set by the main - /// thread every time a new Block is started with this thread - /// structure. - lzma_outbuf *outbuf; - - /// Pointer to the main structure is needed when putting this - /// thread back to the stack of free threads. - lzma_coder *coder; - - /// The allocator is set by the main thread. Since a copy of the - /// pointer is kept here, the application must not change the - /// allocator before calling lzma_end(). - lzma_allocator *allocator; - - /// Block encoder - lzma_next_coder block_encoder; - - /// Compression options for this Block - lzma_block block_options; - - /// Next structure in the stack of free worker threads. - worker_thread *next; - - pthread_mutex_t mutex; - pthread_cond_t cond; - - /// The ID of this thread is used to join the thread - /// when it's not needed anymore. - pthread_t thread_id; -}; - - -struct lzma_coder_s { - enum { - SEQ_STREAM_HEADER, - SEQ_BLOCK, - SEQ_INDEX, - SEQ_STREAM_FOOTER, - } sequence; - - /// Start a new Block every block_size bytes of input unless - /// LZMA_FULL_FLUSH or LZMA_FULL_BARRIER is used earlier. - size_t block_size; - - /// The filter chain currently in use - lzma_filter filters[LZMA_FILTERS_MAX + 1]; - - - /// Index to hold sizes of the Blocks - lzma_index *index; - - /// Index encoder - lzma_next_coder index_encoder; - - - /// Stream Flags for encoding the Stream Header and Stream Footer. - lzma_stream_flags stream_flags; - - /// Buffer to hold Stream Header and Stream Footer. - uint8_t header[LZMA_STREAM_HEADER_SIZE]; - - /// Read position in header[] - size_t header_pos; - - - /// Output buffer queue for compressed data - lzma_outq outq; - - - /// True if wait_max is used. - bool has_timeout; - - /// Maximum wait time if cannot use all the input and cannot - /// fill the output buffer. - struct timespec wait_max; - - - /// Error code from a worker thread - lzma_ret thread_error; - - /// Array of allocated thread-specific structures - worker_thread *threads; - - /// Number of structures in "threads" above. This is also the - /// number of threads that will be created at maximum. - uint32_t threads_max; - - /// Number of thread structures that have been initialized, and - /// thus the number of worker threads actually created so far. - uint32_t threads_initialized; - - /// Stack of free threads. When a thread finishes, it puts itself - /// back into this stack. This starts as empty because threads - /// are created only when actually needed. - worker_thread *threads_free; - - /// The most recent worker thread to which the main thread writes - /// the new input from the application. - worker_thread *thr; - - pthread_mutex_t mutex; - mythread_cond cond; -}; - - -/// Tell the main thread that something has gone wrong. -static void -worker_error(worker_thread *thr, lzma_ret ret) -{ - assert(ret != LZMA_OK); - assert(ret != LZMA_STREAM_END); - - mythread_sync(thr->coder->mutex) { - if (thr->coder->thread_error == LZMA_OK) - thr->coder->thread_error = ret; - - mythread_cond_signal(&thr->coder->cond); - } - - return; -} - - -static worker_state -worker_encode(worker_thread *thr, worker_state state) -{ - // Set the Block options. - thr->block_options = (lzma_block){ - .version = 0, - .check = thr->coder->stream_flags.check, - .compressed_size = thr->coder->outq.buf_size_max, - .uncompressed_size = thr->coder->block_size, - - // TODO: To allow changing the filter chain, the filters - // array must be copied to each worker_thread. - .filters = thr->coder->filters, - }; - - // Calculate maximum size of the Block Header. This amount is - // reserved in the beginning of the buffer so that Block Header - // along with Compressed Size and Uncompressed Size can be - // written there. - lzma_ret ret = lzma_block_header_size(&thr->block_options); - if (ret != LZMA_OK) { - worker_error(thr, ret); - return THR_STOP; - } - - // Initialize the Block encoder. - ret = lzma_block_encoder_init(&thr->block_encoder, - thr->allocator, &thr->block_options); - if (ret != LZMA_OK) { - worker_error(thr, ret); - return THR_STOP; - } - - size_t in_pos = 0; - size_t in_size = 0; - - thr->outbuf->size = thr->block_options.header_size; - const size_t out_size = thr->coder->outq.buf_size_max; - - do { - mythread_sync(thr->mutex) { - while (in_size == thr->in_size - && thr->state == THR_RUN) - pthread_cond_wait(&thr->cond, &thr->mutex); - - state = thr->state; - in_size = thr->in_size; - - // TODO? Store in_pos and out_pos into *thr here - // so that the application may read them via - // some currently non-existing function to get - // progress information. - } - - // Return if we were asked to stop or exit. - if (state >= THR_STOP) - return state; - - lzma_action action = state == THR_FINISH - ? LZMA_FINISH : LZMA_RUN; - - // Limit the amount of input given to the Block encoder - // at once. This way this thread can react fairly quickly - // if the main thread wants us to stop or exit. - static const size_t in_chunk_max = 16384; - size_t in_limit = in_size; - if (in_size - in_pos > in_chunk_max) { - in_limit = in_pos + in_chunk_max; - action = LZMA_RUN; - } - - ret = thr->block_encoder.code( - thr->block_encoder.coder, thr->allocator, - thr->in, &in_pos, in_limit, thr->outbuf->buf, - &thr->outbuf->size, out_size, action); - } while (ret == LZMA_OK); - - if (ret != LZMA_STREAM_END) { - worker_error(thr, ret); - return THR_STOP; - } - - assert(state == THR_FINISH); - - // Encode the Block Header. By doing it after the compression, - // we can store the Compressed Size and Uncompressed Size fields. - ret = lzma_block_header_encode(&thr->block_options, thr->outbuf->buf); - if (ret != LZMA_OK) { - worker_error(thr, ret); - return THR_STOP; - } - - // Set the size information that will be read by the main thread - // to write the Index field. - thr->outbuf->unpadded_size - = lzma_block_unpadded_size(&thr->block_options); - assert(thr->outbuf->unpadded_size != 0); - thr->outbuf->uncompressed_size = thr->block_options.uncompressed_size; - - return THR_FINISH; -} - - -static void * -worker_start(void *thr_ptr) -{ - worker_thread *thr = thr_ptr; - worker_state state = THR_IDLE; // Init to silence a warning - - while (true) { - // Wait for work. - mythread_sync(thr->mutex) { - while (true) { - // The thread is already idle so if we are - // requested to stop, just set the state. - if (thr->state == THR_STOP) { - thr->state = THR_IDLE; - pthread_cond_signal(&thr->cond); - } - - state = thr->state; - if (state != THR_IDLE) - break; - - pthread_cond_wait(&thr->cond, &thr->mutex); - } - } - - assert(state != THR_IDLE); - assert(state != THR_STOP); - - if (state <= THR_FINISH) - state = worker_encode(thr, state); - - if (state == THR_EXIT) - break; - - // Mark the thread as idle. Signal is needed for the case - // where the main thread is waiting for the threads to stop. - mythread_sync(thr->mutex) { - thr->state = THR_IDLE; - pthread_cond_signal(&thr->cond); - } - - mythread_sync(thr->coder->mutex) { - // Mark the output buffer as finished if - // no errors occurred. - thr->outbuf->finished = state == THR_FINISH; - - // Return this thread to the stack of free threads. - thr->next = thr->coder->threads_free; - thr->coder->threads_free = thr; - - mythread_cond_signal(&thr->coder->cond); - } - } - - // Exiting, free the resources. - pthread_mutex_destroy(&thr->mutex); - pthread_cond_destroy(&thr->cond); - - lzma_next_end(&thr->block_encoder, thr->allocator); - lzma_free(thr->in, thr->allocator); - return NULL; -} - - -/// Make the threads stop but not exit. Optionally wait for them to stop. -static void -threads_stop(lzma_coder *coder, bool wait) -{ - // Tell the threads to stop. - for (uint32_t i = 0; i < coder->threads_initialized; ++i) { - mythread_sync(coder->threads[i].mutex) { - coder->threads[i].state = THR_STOP; - pthread_cond_signal(&coder->threads[i].cond); - } - } - - if (!wait) - return; - - // Wait for the threads to settle in the idle state. - for (uint32_t i = 0; i < coder->threads_initialized; ++i) { - mythread_sync(coder->threads[i].mutex) { - while (coder->threads[i].state != THR_IDLE) - pthread_cond_wait(&coder->threads[i].cond, - &coder->threads[i].mutex); - } - } - - return; -} - - -/// Stop the threads and free the resources associated with them. -/// Wait until the threads have exited. -static void -threads_end(lzma_coder *coder, lzma_allocator *allocator) -{ - for (uint32_t i = 0; i < coder->threads_initialized; ++i) { - mythread_sync(coder->threads[i].mutex) { - coder->threads[i].state = THR_EXIT; - pthread_cond_signal(&coder->threads[i].cond); - } - } - - for (uint32_t i = 0; i < coder->threads_initialized; ++i) { - int ret = pthread_join(coder->threads[i].thread_id, NULL); - assert(ret == 0); - (void)ret; - } - - lzma_free(coder->threads, allocator); - return; -} - - -/// Initialize a new worker_thread structure and create a new thread. -static lzma_ret -initialize_new_thread(lzma_coder *coder, lzma_allocator *allocator) -{ - worker_thread *thr = &coder->threads[coder->threads_initialized]; - - thr->in = lzma_alloc(coder->block_size, allocator); - if (thr->in == NULL) - return LZMA_MEM_ERROR; - - if (pthread_mutex_init(&thr->mutex, NULL)) - goto error_mutex; - - if (pthread_cond_init(&thr->cond, NULL)) - goto error_cond; - - thr->state = THR_IDLE; - thr->allocator = allocator; - thr->coder = coder; - thr->block_encoder = LZMA_NEXT_CODER_INIT; - - if (mythread_create(&thr->thread_id, &worker_start, thr)) - goto error_thread; - - ++coder->threads_initialized; - coder->thr = thr; - - return LZMA_OK; - -error_thread: - pthread_cond_destroy(&thr->cond); - -error_cond: - pthread_mutex_destroy(&thr->mutex); - -error_mutex: - lzma_free(thr->in, allocator); - return LZMA_MEM_ERROR; -} - - -static lzma_ret -get_thread(lzma_coder *coder, lzma_allocator *allocator) -{ - // If there are no free output subqueues, there is no - // point to try getting a thread. - if (!lzma_outq_has_buf(&coder->outq)) - return LZMA_OK; - - // If there is a free structure on the stack, use it. - mythread_sync(coder->mutex) { - if (coder->threads_free != NULL) { - coder->thr = coder->threads_free; - coder->threads_free = coder->threads_free->next; - } - } - - if (coder->thr == NULL) { - // If there are no uninitialized structures left, return. - if (coder->threads_initialized == coder->threads_max) - return LZMA_OK; - - // Initialize a new thread. - return_if_error(initialize_new_thread(coder, allocator)); - } - - // Reset the parts of the thread state that have to be done - // in the main thread. - mythread_sync(coder->thr->mutex) { - coder->thr->state = THR_RUN; - coder->thr->in_size = 0; - coder->thr->outbuf = lzma_outq_get_buf(&coder->outq); - pthread_cond_signal(&coder->thr->cond); - } - - return LZMA_OK; -} - - -static lzma_ret -stream_encode_in(lzma_coder *coder, lzma_allocator *allocator, - const uint8_t *restrict in, size_t *restrict in_pos, - size_t in_size, lzma_action action) -{ - while (*in_pos < in_size - || (coder->thr != NULL && action != LZMA_RUN)) { - if (coder->thr == NULL) { - // Get a new thread. - const lzma_ret ret = get_thread(coder, allocator); - if (coder->thr == NULL) - return ret; - } - - // Copy the input data to thread's buffer. - size_t thr_in_size = coder->thr->in_size; - lzma_bufcpy(in, in_pos, in_size, coder->thr->in, - &thr_in_size, coder->block_size); - - // Tell the Block encoder to finish if - // - it has got block_size bytes of input; or - // - all input was used and LZMA_FINISH, LZMA_FULL_FLUSH, - // or LZMA_FULL_BARRIER was used. - // - // TODO: LZMA_SYNC_FLUSH and LZMA_SYNC_BARRIER. - const bool finish = thr_in_size == coder->block_size - || (*in_pos == in_size && action != LZMA_RUN); - - bool block_error = false; - - mythread_sync(coder->thr->mutex) { - if (coder->thr->state == THR_IDLE) { - // Something has gone wrong with the Block - // encoder. It has set coder->thread_error - // which we will read a few lines later. - block_error = true; - } else { - // Tell the Block encoder its new amount - // of input and update the state if needed. - coder->thr->in_size = thr_in_size; - - if (finish) - coder->thr->state = THR_FINISH; - - pthread_cond_signal(&coder->thr->cond); - } - } - - if (block_error) { - lzma_ret ret; - - mythread_sync(coder->mutex) { - ret = coder->thread_error; - } - - return ret; - } - - if (finish) - coder->thr = NULL; - } - - return LZMA_OK; -} - - -/// Wait until more input can be consumed, more output can be read, or -/// an optional timeout is reached. -static bool -wait_for_work(lzma_coder *coder, struct timespec *wait_abs, - bool *has_blocked, bool has_input) -{ - if (coder->has_timeout && !*has_blocked) { - // Every time when stream_encode_mt() is called via - // lzma_code(), *has_block starts as false. We set it - // to true here and calculate the absolute time when - // we must return if there's nothing to do. - // - // The idea of *has_blocked is to avoid unneeded calls - // to mythread_cond_abstime(), which may do a syscall - // depending on the operating system. - *has_blocked = true; - *wait_abs = coder->wait_max; - mythread_cond_abstime(&coder->cond, wait_abs); - } - - bool timed_out = false; - - mythread_sync(coder->mutex) { - // There are four things that we wait. If one of them - // becomes possible, we return. - // - If there is input left, we need to get a free - // worker thread and an output buffer for it. - // - Data ready to be read from the output queue. - // - A worker thread indicates an error. - // - Time out occurs. - while ((!has_input || coder->threads_free == NULL - || !lzma_outq_has_buf(&coder->outq)) - && !lzma_outq_is_readable(&coder->outq) - && coder->thread_error == LZMA_OK - && !timed_out) { - if (coder->has_timeout) - timed_out = mythread_cond_timedwait( - &coder->cond, &coder->mutex, - wait_abs) != 0; - else - mythread_cond_wait(&coder->cond, - &coder->mutex); - } - } - - return timed_out; -} - - -static lzma_ret -stream_encode_mt(lzma_coder *coder, lzma_allocator *allocator, - const uint8_t *restrict in, size_t *restrict in_pos, - size_t in_size, uint8_t *restrict out, - size_t *restrict out_pos, size_t out_size, lzma_action action) -{ - switch (coder->sequence) { - case SEQ_STREAM_HEADER: - lzma_bufcpy(coder->header, &coder->header_pos, - sizeof(coder->header), - out, out_pos, out_size); - if (coder->header_pos < sizeof(coder->header)) - return LZMA_OK; - - coder->header_pos = 0; - coder->sequence = SEQ_BLOCK; - - // Fall through - - case SEQ_BLOCK: { - // Initialized to silence warnings. - lzma_vli unpadded_size = 0; - lzma_vli uncompressed_size = 0; - lzma_ret ret = LZMA_OK; - - // These are for wait_for_work(). - bool has_blocked = false; - struct timespec wait_abs; - - while (true) { - mythread_sync(coder->mutex) { - // Check for Block encoder errors. - ret = coder->thread_error; - if (ret != LZMA_OK) { - assert(ret != LZMA_STREAM_END); - break; - } - - // Try to read compressed data to out[]. - ret = lzma_outq_read(&coder->outq, - out, out_pos, out_size, - &unpadded_size, - &uncompressed_size); - } - - if (ret == LZMA_STREAM_END) { - // End of Block. Add it to the Index. - ret = lzma_index_append(coder->index, - allocator, unpadded_size, - uncompressed_size); - - // If we didn't fill the output buffer yet, - // try to read more data. Maybe the next - // outbuf has been finished already too. - if (*out_pos < out_size) - continue; - } - - if (ret != LZMA_OK) { - // coder->thread_error was set or - // lzma_index_append() failed. - threads_stop(coder, false); - return ret; - } - - // Check if the last Block was finished. - if (action == LZMA_FINISH - && *in_pos == in_size - && lzma_outq_is_empty( - &coder->outq)) - break; - - // Try to give uncompressed data to a worker thread. - ret = stream_encode_in(coder, allocator, - in, in_pos, in_size, action); - if (ret != LZMA_OK) { - threads_stop(coder, false); - return ret; - } - - // Return if - // - we have used all the input and expect to - // get more input; or - // - the output buffer has been filled. - // - // TODO: Support flushing. - if ((*in_pos == in_size && action != LZMA_FINISH) - || *out_pos == out_size) - return LZMA_OK; - - // Neither in nor out has been used completely. - // Wait until there's something we can do. - if (wait_for_work(coder, &wait_abs, &has_blocked, - *in_pos < in_size)) - return LZMA_TIMED_OUT; - } - - // All Blocks have been encoded and the threads have stopped. - // Prepare to encode the Index field. - return_if_error(lzma_index_encoder_init( - &coder->index_encoder, allocator, - coder->index)); - coder->sequence = SEQ_INDEX; - } - - // Fall through - - case SEQ_INDEX: { - // Call the Index encoder. It doesn't take any input, so - // those pointers can be NULL. - const lzma_ret ret = coder->index_encoder.code( - coder->index_encoder.coder, allocator, - NULL, NULL, 0, - out, out_pos, out_size, LZMA_RUN); - if (ret != LZMA_STREAM_END) - return ret; - - // Encode the Stream Footer into coder->buffer. - coder->stream_flags.backward_size - = lzma_index_size(coder->index); - if (lzma_stream_footer_encode(&coder->stream_flags, - coder->header) != LZMA_OK) - return LZMA_PROG_ERROR; - - coder->sequence = SEQ_STREAM_FOOTER; - } - - // Fall through - - case SEQ_STREAM_FOOTER: - lzma_bufcpy(coder->header, &coder->header_pos, - sizeof(coder->header), - out, out_pos, out_size); - return coder->header_pos < sizeof(coder->header) - ? LZMA_OK : LZMA_STREAM_END; - } - - assert(0); - return LZMA_PROG_ERROR; -} - - -static void -stream_encoder_mt_end(lzma_coder *coder, lzma_allocator *allocator) -{ - // Threads must be killed before the output queue can be freed. - threads_end(coder, allocator); - lzma_outq_end(&coder->outq, allocator); - - for (size_t i = 0; coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i) - lzma_free(coder->filters[i].options, allocator); - - lzma_next_end(&coder->index_encoder, allocator); - lzma_index_end(coder->index, allocator); - - mythread_cond_destroy(&coder->cond); - pthread_mutex_destroy(&coder->mutex); - - lzma_free(coder, allocator); - return; -} - - -/// Options handling for lzma_stream_encoder_mt_init() and -/// lzma_stream_encoder_mt_memusage() -static lzma_ret -get_options(const lzma_mt *options, lzma_options_easy *opt_easy, - const lzma_filter **filters, uint64_t *block_size, - uint64_t *outbuf_size_max) -{ - // Validate some of the options. - if (options == NULL) - return LZMA_PROG_ERROR; - - if (options->flags != 0 || options->threads == 0 - || options->threads > LZMA_THREADS_MAX) - return LZMA_OPTIONS_ERROR; - - if (options->filters != NULL) { - // Filter chain was given, use it as is. - *filters = options->filters; - } else { - // Use a preset. - if (lzma_easy_preset(opt_easy, options->preset)) - return LZMA_OPTIONS_ERROR; - - *filters = opt_easy->filters; - } - - // Block size - if (options->block_size > 0) { - if (options->block_size > BLOCK_SIZE_MAX) - return LZMA_OPTIONS_ERROR; - - *block_size = options->block_size; - } else { - // Determine the Block size from the filter chain. - *block_size = lzma_mt_block_size(*filters); - if (*block_size == 0) - return LZMA_OPTIONS_ERROR; - - assert(*block_size <= BLOCK_SIZE_MAX); - } - - // Calculate the maximum amount output that a single output buffer - // may need to hold. This is the same as the maximum total size of - // a Block. - // - // FIXME: As long as the encoder keeps the whole input buffer - // available and doesn't start writing output before finishing - // the Block, it could use lzma_stream_buffer_bound() and use - // uncompressed LZMA2 chunks if the data doesn't compress. - *outbuf_size_max = *block_size + *block_size / 16 + 16384; - - return LZMA_OK; -} - - -static lzma_ret -stream_encoder_mt_init(lzma_next_coder *next, lzma_allocator *allocator, - const lzma_mt *options) -{ - lzma_next_coder_init(&stream_encoder_mt_init, next, allocator); - - // Get the filter chain. - lzma_options_easy easy; - const lzma_filter *filters; - uint64_t block_size; - uint64_t outbuf_size_max; - return_if_error(get_options(options, &easy, &filters, - &block_size, &outbuf_size_max)); - -#if SIZE_MAX < UINT64_MAX - if (block_size > SIZE_MAX) - return LZMA_MEM_ERROR; -#endif - - // FIXME TODO: Validate the filter chain so that we can give - // an error in this function instead of delaying it to the first - // call to lzma_code(). - - // Validate the Check ID. - if ((unsigned int)(options->check) > LZMA_CHECK_ID_MAX) - return LZMA_PROG_ERROR; - - if (!lzma_check_is_supported(options->check)) - return LZMA_UNSUPPORTED_CHECK; - - // Allocate and initialize the base structure if needed. - if (next->coder == NULL) { - next->coder = lzma_alloc(sizeof(lzma_coder), allocator); - if (next->coder == NULL) - return LZMA_MEM_ERROR; - - // For the mutex and condition variable initializations - // the error handling has to be done here because - // stream_encoder_mt_end() doesn't know if they have - // already been initialized or not. - if (pthread_mutex_init(&next->coder->mutex, NULL)) { - lzma_free(next->coder, allocator); - next->coder = NULL; - return LZMA_MEM_ERROR; - } - - if (mythread_cond_init(&next->coder->cond)) { - pthread_mutex_destroy(&next->coder->mutex); - lzma_free(next->coder, allocator); - next->coder = NULL; - return LZMA_MEM_ERROR; - } - - next->code = &stream_encode_mt; - next->end = &stream_encoder_mt_end; -// next->update = &stream_encoder_mt_update; - - next->coder->filters[0].id = LZMA_VLI_UNKNOWN; - next->coder->index_encoder = LZMA_NEXT_CODER_INIT; - next->coder->index = NULL; - memzero(&next->coder->outq, sizeof(next->coder->outq)); - next->coder->threads = NULL; - next->coder->threads_max = 0; - next->coder->threads_initialized = 0; - } - - // Basic initializations - next->coder->sequence = SEQ_STREAM_HEADER; - next->coder->block_size = (size_t)(block_size); - next->coder->thread_error = LZMA_OK; - next->coder->thr = NULL; - - // Allocate the thread-specific base structures. - assert(options->threads > 0); - if (next->coder->threads_max != options->threads) { - threads_end(next->coder, allocator); - - next->coder->threads = NULL; - next->coder->threads_max = 0; - - next->coder->threads_initialized = 0; - next->coder->threads_free = NULL; - - next->coder->threads = lzma_alloc( - options->threads * sizeof(worker_thread), - allocator); - if (next->coder->threads == NULL) - return LZMA_MEM_ERROR; - - next->coder->threads_max = options->threads; - } else { - // Reuse the old structures and threads. Tell the running - // threads to stop and wait until they have stopped. - threads_stop(next->coder, true); - } - - // Output queue - return_if_error(lzma_outq_init(&next->coder->outq, allocator, - outbuf_size_max, options->threads)); - - // Timeout - if (options->timeout > 0) { - next->coder->wait_max.tv_sec = options->timeout / 1000; - next->coder->wait_max.tv_nsec - = (options->timeout % 1000) * 1000000L; - next->coder->has_timeout = true; - } else { - next->coder->has_timeout = false; - } - - // Free the old filter chain and copy the new one. - for (size_t i = 0; next->coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i) - lzma_free(next->coder->filters[i].options, allocator); - - return_if_error(lzma_filters_copy(options->filters, - next->coder->filters, allocator)); - - // Index - lzma_index_end(next->coder->index, allocator); - next->coder->index = lzma_index_init(allocator); - if (next->coder->index == NULL) - return LZMA_MEM_ERROR; - - // Stream Header - next->coder->stream_flags.version = 0; - next->coder->stream_flags.check = options->check; - return_if_error(lzma_stream_header_encode( - &next->coder->stream_flags, next->coder->header)); - - next->coder->header_pos = 0; - - return LZMA_OK; -} - - -extern LZMA_API(lzma_ret) -lzma_stream_encoder_mt(lzma_stream *strm, const lzma_mt *options) -{ - lzma_next_strm_init(stream_encoder_mt_init, strm, options); - - strm->internal->supported_actions[LZMA_RUN] = true; -// strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true; -// strm->internal->supported_actions[LZMA_FULL_FLUSH] = true; -// strm->internal->supported_actions[LZMA_FULL_BARRIER] = true; - strm->internal->supported_actions[LZMA_FINISH] = true; - - return LZMA_OK; -} - - -// This function name is a monster but it's consistent with the older -// monster names. :-( 31 chars is the max that C99 requires so in that -// sense it's not too long. ;-) -extern LZMA_API(uint64_t) -lzma_stream_encoder_mt_memusage(const lzma_mt *options) -{ - lzma_options_easy easy; - const lzma_filter *filters; - uint64_t block_size; - uint64_t outbuf_size_max; - - if (get_options(options, &easy, &filters, &block_size, - &outbuf_size_max) != LZMA_OK) - return UINT64_MAX; - - // Memory usage of the input buffers - const uint64_t inbuf_memusage = options->threads * block_size; - - // Memory usage of the filter encoders - uint64_t filters_memusage - = lzma_raw_encoder_memusage(options->filters); - if (filters_memusage == UINT64_MAX) - return UINT64_MAX; - - filters_memusage *= options->threads; - - // Memory usage of the output queue - const uint64_t outq_memusage = lzma_outq_memusage( - outbuf_size_max, options->threads); - if (outq_memusage == UINT64_MAX) - return UINT64_MAX; - - // Sum them with overflow checking. - uint64_t total_memusage = LZMA_MEMUSAGE_BASE + sizeof(lzma_coder) - + options->threads * sizeof(worker_thread); - - if (UINT64_MAX - total_memusage < inbuf_memusage) - return UINT64_MAX; - - total_memusage += inbuf_memusage; - - if (UINT64_MAX - total_memusage < filters_memusage) - return UINT64_MAX; - - total_memusage += filters_memusage; - - if (UINT64_MAX - total_memusage < outq_memusage) - return UINT64_MAX; - - return total_memusage + outq_memusage; -} diff --git a/src/xz/args.c b/src/xz/args.c index dea93c5..f207e7f 100644 --- a/src/xz/args.c +++ b/src/xz/args.c @@ -179,9 +179,8 @@ parse_real(args_info *args, int argc, char **argv) break; case 'T': - // The max is from src/liblzma/common/common.h. - hardware_threads_set(str_to_uint64("threads", - optarg, 0, 16384)); + hardware_threadlimit_set(str_to_uint64( + "threads", optarg, 0, UINT32_MAX)); break; // --version diff --git a/src/xz/coder.c b/src/xz/coder.c index 41193a7..4139da4 100644 --- a/src/xz/coder.c +++ b/src/xz/coder.c @@ -55,14 +55,6 @@ static lzma_check check; /// This becomes false if the --check=CHECK option is used. static bool check_default = true; -#ifdef HAVE_PTHREAD -static lzma_mt mt_options = { - .flags = 0, - .timeout = 300, - .filters = filters, -}; -#endif - extern void coder_set_check(lzma_check new_check) @@ -125,15 +117,6 @@ memlimit_too_small(uint64_t memory_usage) extern void coder_set_compression_settings(void) { - // The default check type is CRC64, but fallback to CRC32 - // if CRC64 isn't supported by the copy of liblzma we are - // using. CRC32 is always supported. - if (check_default) { - check = LZMA_CHECK_CRC64; - if (!lzma_check_is_supported(check)) - check = LZMA_CHECK_CRC32; - } - // Options for LZMA1 or LZMA2 in case we are using a preset. static lzma_options_lzma opt_lzma; @@ -187,30 +170,15 @@ coder_set_compression_settings(void) // Print the selected filter chain. message_filters_show(V_DEBUG, filters); - // Get the memory usage. Note that if --format=raw was used, - // we can be decompressing. + // If using --format=raw, we can be decoding. The memusage function + // also validates the filter chain and the options used for the + // filters. const uint64_t memory_limit = hardware_memlimit_get(opt_mode); uint64_t memory_usage; - if (opt_mode == MODE_COMPRESS) { -#ifdef HAVE_PTHREAD - if (opt_format == FORMAT_XZ && hardware_threads_get() > 1) { - mt_options.threads = hardware_threads_get(); - mt_options.block_size = opt_block_size; - mt_options.check = check; - memory_usage = lzma_stream_encoder_mt_memusage( - &mt_options); - if (memory_usage != UINT64_MAX) - message(V_DEBUG, _("Using up to %" PRIu32 - " threads."), - mt_options.threads); - } else -#endif - { - memory_usage = lzma_raw_encoder_memusage(filters); - } - } else { + if (opt_mode == MODE_COMPRESS) + memory_usage = lzma_raw_encoder_memusage(filters); + else memory_usage = lzma_raw_decoder_memusage(filters); - } if (memory_usage == UINT64_MAX) message_fatal(_("Unsupported filter chain or filter options")); @@ -226,99 +194,90 @@ coder_set_compression_settings(void) round_up_to_mib(decmem), 0)); } - if (memory_usage <= memory_limit) - return; + if (memory_usage > memory_limit) { + // If --no-auto-adjust was used or we didn't find LZMA1 or + // LZMA2 as the last filter, give an error immediately. + // --format=raw implies --no-auto-adjust. + if (!opt_auto_adjust || opt_format == FORMAT_RAW) + memlimit_too_small(memory_usage); - // If --no-auto-adjust was used or we didn't find LZMA1 or - // LZMA2 as the last filter, give an error immediately. - // --format=raw implies --no-auto-adjust. - if (!opt_auto_adjust || opt_format == FORMAT_RAW) - memlimit_too_small(memory_usage); + assert(opt_mode == MODE_COMPRESS); - assert(opt_mode == MODE_COMPRESS); + // Look for the last filter if it is LZMA2 or LZMA1, so + // we can make it use less RAM. With other filters we don't + // know what to do. + size_t i = 0; + while (filters[i].id != LZMA_FILTER_LZMA2 + && filters[i].id != LZMA_FILTER_LZMA1) { + if (filters[i].id == LZMA_VLI_UNKNOWN) + memlimit_too_small(memory_usage); + + ++i; + } -#ifdef HAVE_PTHREAD - if (opt_format == FORMAT_XZ && mt_options.threads > 1) { - // Try to reduce the number of threads before - // adjusting the compression settings down. - do { - // FIXME? The real single-threaded mode has - // lower memory usage, but it's not comparable - // because it doesn't write the size info - // into Block Headers. - if (--mt_options.threads == 0) + // Decrease the dictionary size until we meet the memory + // usage limit. First round down to full mebibytes. + lzma_options_lzma *opt = filters[i].options; + const uint32_t orig_dict_size = opt->dict_size; + opt->dict_size &= ~((UINT32_C(1) << 20) - 1); + while (true) { + // If it is below 1 MiB, auto-adjusting failed. We + // could be more sophisticated and scale it down even + // more, but let's see if many complain about this + // version. + // + // FIXME: Displays the scaled memory usage instead + // of the original. + if (opt->dict_size < (UINT32_C(1) << 20)) memlimit_too_small(memory_usage); - memory_usage = lzma_stream_encoder_mt_memusage( - &mt_options); + memory_usage = lzma_raw_encoder_memusage(filters); if (memory_usage == UINT64_MAX) message_bug(); - } while (memory_usage > memory_limit); - - message(V_WARNING, _("Adjusted the number of threads " - "from %s to %s to not exceed " - "the memory usage limit of %s MiB"), - uint64_to_str(hardware_threads_get(), 0), - uint64_to_str(mt_options.threads, 1), - uint64_to_str(round_up_to_mib( - memory_limit), 2)); + // Accept it if it is low enough. + if (memory_usage <= memory_limit) + break; + + // Otherwise 1 MiB down and try again. I hope this + // isn't too slow method for cases where the original + // dict_size is very big. + opt->dict_size -= UINT32_C(1) << 20; + } + + // Tell the user that we decreased the dictionary size. + message(V_WARNING, _("Adjusted LZMA%c dictionary size " + "from %s MiB to %s MiB to not exceed " + "the memory usage limit of %s MiB"), + filters[i].id == LZMA_FILTER_LZMA2 + ? '2' : '1', + uint64_to_str(orig_dict_size >> 20, 0), + uint64_to_str(opt->dict_size >> 20, 1), + uint64_to_str(round_up_to_mib( + memory_limit), 2)); } -#endif - - if (memory_usage <= memory_limit) - return; - - // Look for the last filter if it is LZMA2 or LZMA1, so we can make - // it use less RAM. With other filters we don't know what to do. - size_t i = 0; - while (filters[i].id != LZMA_FILTER_LZMA2 - && filters[i].id != LZMA_FILTER_LZMA1) { - if (filters[i].id == LZMA_VLI_UNKNOWN) - memlimit_too_small(memory_usage); - ++i; +/* + // Limit the number of worker threads so that memory usage + // limit isn't exceeded. + assert(memory_usage > 0); + size_t thread_limit = memory_limit / memory_usage; + if (thread_limit == 0) + thread_limit = 1; + + if (opt_threads > thread_limit) + opt_threads = thread_limit; +*/ + + if (check_default) { + // The default check type is CRC64, but fallback to CRC32 + // if CRC64 isn't supported by the copy of liblzma we are + // using. CRC32 is always supported. + check = LZMA_CHECK_CRC64; + if (!lzma_check_is_supported(check)) + check = LZMA_CHECK_CRC32; } - // Decrease the dictionary size until we meet the memory - // usage limit. First round down to full mebibytes. - lzma_options_lzma *opt = filters[i].options; - const uint32_t orig_dict_size = opt->dict_size; - opt->dict_size &= ~((UINT32_C(1) << 20) - 1); - while (true) { - // If it is below 1 MiB, auto-adjusting failed. We could be - // more sophisticated and scale it down even more, but let's - // see if many complain about this version. - // - // FIXME: Displays the scaled memory usage instead - // of the original. - if (opt->dict_size < (UINT32_C(1) << 20)) - memlimit_too_small(memory_usage); - - memory_usage = lzma_raw_encoder_memusage(filters); - if (memory_usage == UINT64_MAX) - message_bug(); - - // Accept it if it is low enough. - if (memory_usage <= memory_limit) - break; - - // Otherwise 1 MiB down and try again. I hope this - // isn't too slow method for cases where the original - // dict_size is very big. - opt->dict_size -= UINT32_C(1) << 20; - } - - // Tell the user that we decreased the dictionary size. - message(V_WARNING, _("Adjusted LZMA%c dictionary size " - "from %s MiB to %s MiB to not exceed " - "the memory usage limit of %s MiB"), - filters[i].id == LZMA_FILTER_LZMA2 - ? '2' : '1', - uint64_to_str(orig_dict_size >> 20, 0), - uint64_to_str(opt->dict_size >> 20, 1), - uint64_to_str(round_up_to_mib(memory_limit), 2)); - return; } @@ -400,14 +359,7 @@ coder_init(file_pair *pair) break; case FORMAT_XZ: -#ifdef HAVE_PTHREAD - if (hardware_threads_get() > 1) - ret = lzma_stream_encoder_mt( - &strm, &mt_options); - else -#endif - ret = lzma_stream_encoder( - &strm, filters, check); + ret = lzma_stream_encoder(&strm, filters, check); break; case FORMAT_LZMA: @@ -528,8 +480,8 @@ coder_normal(file_pair *pair) // to the .xz format. If block_remaining == UINT64_MAX, only // a single block is created. uint64_t block_remaining = UINT64_MAX; - if (hardware_threads_get() == 1 && opt_mode == MODE_COMPRESS - && opt_format == FORMAT_XZ && opt_block_size > 0) + if (opt_mode == MODE_COMPRESS && opt_format == FORMAT_XZ + && opt_block_size > 0) block_remaining = opt_block_size; strm.next_out = out_buf.u8; diff --git a/src/xz/hardware.c b/src/xz/hardware.c index 925926c..a4733c2 100644 --- a/src/xz/hardware.c +++ b/src/xz/hardware.c @@ -14,9 +14,9 @@ #include "tuklib_cpucores.h" -/// Maximum number of worker threads. This can be set with +/// Maximum number of free *coder* threads. This can be set with /// the --threads=NUM command line option. -static uint32_t threads_max = 1; +static uint32_t threadlimit; /// Memory usage limit for compression static uint64_t memlimit_compress; @@ -29,16 +29,15 @@ static uint64_t total_ram; extern void -hardware_threads_set(uint32_t n) +hardware_threadlimit_set(uint32_t new_threadlimit) { - if (n == 0) { - // Automatic number of threads was requested. - // Use the number of available CPU cores. - threads_max = tuklib_cpucores(); - if (threads_max == 0) - threads_max = 1; + if (new_threadlimit == 0) { + // The default is the number of available CPU cores. + threadlimit = tuklib_cpucores(); + if (threadlimit == 0) + threadlimit = 1; } else { - threads_max = n; + threadlimit = new_threadlimit; } return; @@ -46,9 +45,9 @@ hardware_threads_set(uint32_t n) extern uint32_t -hardware_threads_get(void) +hardware_threadlimit_get(void) { - return threads_max; + return threadlimit; } @@ -140,5 +139,6 @@ hardware_init(void) // Set the defaults. hardware_memlimit_set(0, true, true, false); + hardware_threadlimit_set(0); return; } diff --git a/src/xz/hardware.h b/src/xz/hardware.h index 4fae618..ad526f2 100644 --- a/src/xz/hardware.h +++ b/src/xz/hardware.h @@ -15,11 +15,12 @@ extern void hardware_init(void); -/// Set the maximum number of worker threads. -extern void hardware_threads_set(uint32_t threadlimit); +/// Set custom value for maximum number of coder threads. +extern void hardware_threadlimit_set(uint32_t threadlimit); -/// Get the maximum number of worker threads. -extern uint32_t hardware_threads_get(void); +/// Get the maximum number of coder threads. Some additional helper threads +/// are allowed on top of this). +extern uint32_t hardware_threadlimit_get(void); /// Set the memory usage limit. There are separate limits for compression diff --git a/src/xz/private.h b/src/xz/private.h index 978f81a..6b01e51 100644 --- a/src/xz/private.h +++ b/src/xz/private.h @@ -12,8 +12,6 @@ #include "sysdefs.h" #include "mythread.h" - -#define LZMA_UNSTABLE #include "lzma.h" #include diff --git a/src/xz/xz.1 b/src/xz/xz.1 index f4680f4..0329128 100644 --- a/src/xz/xz.1 +++ b/src/xz/xz.1 @@ -5,7 +5,7 @@ .\" This file has been put into the public domain. .\" You can do whatever you want with this file. .\" -.TH XZ 1 "2011-04-12" "Tukaani" "XZ Utils" +.TH XZ 1 "2011-04-11" "Tukaani" "XZ Utils" . .SH NAME xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files @@ -907,30 +907,24 @@ Automatic adjusting is always disabled when creating raw streams .TP \fB\-T\fR \fIthreads\fR, \fB\-\-threads=\fIthreads Specify the number of worker threads to use. -Setting -.I threads -to a special value -.B 0 -makes -.B xz -use as many threads as there are CPU cores on the system. The actual number of threads can be less than .I threads -if the input file is not big enough -for threading with the given settings or if using more threads would exceed the memory usage limit. .IP "" -Currently the only threading method is to split the input into -blocks and compress them independently from each other. -The default block size depends on the compression level and -can be overriden with the -.BI \-\-block\-size= size -option. +.B "Multithreaded compression and decompression are not" +.B "implemented yet, so this option has no effect for now." .IP "" -.B "It is possible that the details of this option change before" -.B "the next stable XZ Utils release." -.B "This may include the meaning of the special value 0." -.\" FIXME +.B "As of writing (2010-09-27), it hasn't been decided" +.B "if threads will be used by default on multicore systems" +.B "once support for threading has been implemented." +.B "Comments are welcome." +The complicating factor is that using many threads +will increase the memory usage dramatically. +Note that if multithreading will be the default, +it will probably be done so that single-threaded and +multithreaded modes produce the same output, +so compression ratio won't be significantly affected +if threading will be enabled by default. . .SS "Custom compressor filter chains" A custom filter chain allows specifying -- 1.7.6 debian/patches/abi-liblzma2-compat0000664000000000000000000001652112276706601014304 0ustar From: Jonathan Nieder Date: Thu, 17 May 2012 18:49:00 -0500 Subject: liblzma: skip ABI-incompatible check when liblzma.so.2 is loaded When liblzma started using ELF symbol versioning at the same time as a soname bump (2 → 5) and a small increase in the reserved space at the end of the lzma_stream structure checked by lzma_code, introducing an unversioned compatibility symbol to ease the transition seemed like a great idea. After all: - most applications only use one version of the library (liblzma.so.2 or liblzma.so.5) and would obviously work fine - applications linking to the new version of the library (liblzma.so.5) should use the default, versioned lzma_code symbol so errors initializing the reserved space can be noticed - symbol versioning should ensure application/library mixtures independently making use of both versions of the library also work. Calls using the unversioned symbol names would be resolved using the old symbol from liblzma.so.2 or the compatibility symbol from liblzma.so.5, avoiding segfaults and spurious LZMA_OPTIONS_ERROR errors. - application/library mixtures using both versions of the library and passing lzma_stream objects between the two would break, but that was never supposed to be supported, anyway. Three toolchain bugs dash that plan. Current (2.22) versions of the gold linker cannot be used to build libraries providing versioned and unversioned symbols with the same name. On the other hand, BFD ld doesn't mind. So GNU gold refuses to link versions of liblzma including the compatibility symbol (PR12261): /usr/bin/ld: error: symbol lzma_code has undefined version Annoying, but livable. liblzma with the compatibility symbol just has to be built with BFD ld. More importantly, gold does not support linking to libraries providing versioned and unversioned symbols with the same name. If I link some code to a version of liblzma with the compatibility symbol: ld -o demo demo.o -llzma then the documented behavior, implemented by BFD ld, is to interpret calls to lzma_code as referring to the default version (lzma_code@XZ_5.0). Current versions of GNU gold treat such calls as referring to whichever symbol comes first in liblzma.so.5's symbol table. If the unversioned symbol comes first (and in Debian liblzma5 5.1.1alpha+20110809-3 it does), GNU gold will mislink new applications to use the unversioned compatibility symbol (PR13521): $ ld.gold -o test.gold test.o -llzma $ eu-readelf -s test.gold | grep lzma_code 1: 0000000000000000 0 FUNC GLOBAL DEFAULT UNDEF lzma_code 5: 0000000000000000 0 FUNC GLOBAL DEFAULT UNDEF lzma_code There is no warning. Worse, ld.so from glibc unpredictably will sometimes use the versioned symbol to resolve references to the unversioned base version when both are present (PR12977). Clearly no one has been testing mixtures of versioned and unversioned symbols at all, and we cannot trust the symbol resolution process to do anything in particular for them. This patch implements an alternative method to implement the same compatibility goals described above. - No more compatibility symbol. liblzma.so.5 will define lzma_code only once, with version XZ_5.0. - When initializing an lzma_stream object, use dlopen("liblzma.so.2", RTLD_NOLOAD) to detect whether the caller might have been expecting the old ABI, and store that information in the private stream->internal->liblzma2_compat field. - In lzma_code, when checking reserved fields, skip fields past the old end of the lzma_stream structure ifying reserved fields if and only if this->internal->liblzma2_compat is false. That's it. Hopefully this time it will work reliably. Thanks to Eduard Bloch for noticing PR13521 and to Ian Lance Taylor for PR12977. Signed-off-by: Jonathan Nieder --- configure.ac | 5 +++++ src/liblzma/common/common.c | 40 ++++++++++++++++++++++++++++++++++++++-- src/liblzma/common/common.h | 4 ++++ 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 25eb838f..88b81ba1 100644 --- a/configure.ac +++ b/configure.ac @@ -471,6 +471,11 @@ if test "x$enable_threads" = xyes; then AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [[#include ]]) CFLAGS=$OLD_CFLAGS fi + +# As a Debian-specific hack, liblzma uses dlopen() to check if extra +# paranoia is needed because unversioned symbols from liblzma.so.2 are +# present in the same process. See src/liblzma/common/common.c. +AC_SEARCH_LIBS([dlopen], [dl]) echo echo "Initializing Libtool:" diff --git a/src/liblzma/common/common.c b/src/liblzma/common/common.c index 50c984c7..e61d940d 100644 --- a/src/liblzma/common/common.c +++ b/src/liblzma/common/common.c @@ -12,6 +12,8 @@ #include "common.h" +#include + ///////////// // Version // @@ -141,6 +143,17 @@ lzma_next_end(lzma_next_coder *next, lzma_allocator *allocator) // External to internal API wrapper // ////////////////////////////////////// +static bool +liblzma2_loaded(void) +{ + void *handle = dlopen("liblzma.so.2", RTLD_LAZY | RTLD_NOLOAD); + if (handle) { + dlclose(handle); + return true; + } + return false; +} + extern lzma_ret lzma_strm_init(lzma_stream *strm) { @@ -154,6 +167,7 @@ lzma_strm_init(lzma_stream *strm) return LZMA_MEM_ERROR; strm->internal->next = LZMA_NEXT_CODER_INIT; + strm->internal->liblzma2_compat = liblzma2_loaded(); } memzero(strm->internal->supported_actions, @@ -168,6 +182,24 @@ lzma_strm_init(lzma_stream *strm) } +// Before v5.0.0~6 (liblzma: A few ABI tweaks to reserve space in +// structures, 2010-10-23), the reserved fields in lzma_stream were: +// +// void *reserved_ptr1; +// void *reserved_ptr2; +// uint64_t reserved_int1; +// uint64_t reserved_int2; +// lzma_reserved_enum reserved_enum1; +// lzma_reserved_enum reserved_enum2; +// +// Nowadays there are two more pointers between reserved_ptr2 and +// reserved_int1 and two size_t fields between reserved_int2 and +// reserved_enum1. +// +// When strm->internal->liblzma2_compat is set, limit the checks of +// reserved fields to fields that were present in the old ABI to avoid +// segfaults and spurious "Unsupported options" from callers sharing +// the process image that expect the old ABI. extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action) { @@ -185,8 +217,12 @@ lzma_code(lzma_stream *strm, lzma_action action) if (strm->reserved_ptr1 != NULL || strm->reserved_ptr2 != NULL || strm->reserved_ptr3 != NULL - || strm->reserved_ptr4 != NULL - || strm->reserved_int1 != 0 + || strm->reserved_ptr4 != NULL) + return LZMA_OPTIONS_ERROR; + + if (strm->internal->liblzma2_compat) + ; /* Enough checks. */ + else if (strm->reserved_int1 != 0 || strm->reserved_int2 != 0 || strm->reserved_int3 != 0 || strm->reserved_int4 != 0 diff --git a/src/liblzma/common/common.h b/src/liblzma/common/common.h index 45aba4f0..475661d8 100644 --- a/src/liblzma/common/common.h +++ b/src/liblzma/common/common.h @@ -200,6 +200,10 @@ struct lzma_internal_s { /// If true, lzma_code will return LZMA_BUF_ERROR if no progress was /// made (no input consumed and no output produced by next.code). bool allow_buf_error; + + /// Indicates whether we are sharing a process image with + /// liblzma.so.2 and need to tread carefully. + bool liblzma2_compat; }; -- 1.7.10.2