[Midnightbsd-cvs] src [11014] vendor/xz/5.2.3: tag 5.2.3

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Jun 15 18:33:43 EDT 2018


Revision: 11014
          http://svnweb.midnightbsd.org/src/?rev=11014
Author:   laffer1
Date:     2018-06-15 18:33:43 -0400 (Fri, 15 Jun 2018)
Log Message:
-----------
tag 5.2.3

Added Paths:
-----------
    vendor/xz/5.2.3/
    vendor/xz/5.2.3/ChangeLog
    vendor/xz/5.2.3/THANKS
    vendor/xz/5.2.3/TODO
    vendor/xz/5.2.3/po/
    vendor/xz/5.2.3/src/common/mythread.h
    vendor/xz/5.2.3/src/common/sysdefs.h
    vendor/xz/5.2.3/src/common/tuklib_cpucores.c
    vendor/xz/5.2.3/src/common/tuklib_integer.h
    vendor/xz/5.2.3/src/common/tuklib_physmem.c
    vendor/xz/5.2.3/src/liblzma/api/lzma/base.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/block.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/container.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/filter.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/hardware.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/index.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/index_hash.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/lzma12.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/version.h
    vendor/xz/5.2.3/src/liblzma/api/lzma.h
    vendor/xz/5.2.3/src/liblzma/check/check.h
    vendor/xz/5.2.3/src/liblzma/check/sha256.c
    vendor/xz/5.2.3/src/liblzma/common/alone_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/alone_decoder.h
    vendor/xz/5.2.3/src/liblzma/common/alone_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/auto_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/block_buffer_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/block_buffer_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/block_buffer_encoder.h
    vendor/xz/5.2.3/src/liblzma/common/block_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/block_decoder.h
    vendor/xz/5.2.3/src/liblzma/common/block_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/block_encoder.h
    vendor/xz/5.2.3/src/liblzma/common/block_header_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/block_header_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/block_util.c
    vendor/xz/5.2.3/src/liblzma/common/common.c
    vendor/xz/5.2.3/src/liblzma/common/common.h
    vendor/xz/5.2.3/src/liblzma/common/easy_buffer_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/easy_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/filter_buffer_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/filter_buffer_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/filter_common.c
    vendor/xz/5.2.3/src/liblzma/common/filter_common.h
    vendor/xz/5.2.3/src/liblzma/common/filter_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/filter_decoder.h
    vendor/xz/5.2.3/src/liblzma/common/filter_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/filter_encoder.h
    vendor/xz/5.2.3/src/liblzma/common/filter_flags_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/hardware_cputhreads.c
    vendor/xz/5.2.3/src/liblzma/common/index.c
    vendor/xz/5.2.3/src/liblzma/common/index_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/index_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/index_encoder.h
    vendor/xz/5.2.3/src/liblzma/common/index_hash.c
    vendor/xz/5.2.3/src/liblzma/common/memcmplen.h
    vendor/xz/5.2.3/src/liblzma/common/outqueue.c
    vendor/xz/5.2.3/src/liblzma/common/outqueue.h
    vendor/xz/5.2.3/src/liblzma/common/stream_buffer_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/stream_buffer_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/stream_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/stream_decoder.h
    vendor/xz/5.2.3/src/liblzma/common/stream_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/stream_encoder_mt.c
    vendor/xz/5.2.3/src/liblzma/delta/delta_common.c
    vendor/xz/5.2.3/src/liblzma/delta/delta_decoder.c
    vendor/xz/5.2.3/src/liblzma/delta/delta_decoder.h
    vendor/xz/5.2.3/src/liblzma/delta/delta_encoder.c
    vendor/xz/5.2.3/src/liblzma/delta/delta_encoder.h
    vendor/xz/5.2.3/src/liblzma/delta/delta_private.h
    vendor/xz/5.2.3/src/liblzma/liblzma.map
    vendor/xz/5.2.3/src/liblzma/liblzma.pc.in
    vendor/xz/5.2.3/src/liblzma/lz/lz_decoder.c
    vendor/xz/5.2.3/src/liblzma/lz/lz_decoder.h
    vendor/xz/5.2.3/src/liblzma/lz/lz_encoder.c
    vendor/xz/5.2.3/src/liblzma/lz/lz_encoder.h
    vendor/xz/5.2.3/src/liblzma/lz/lz_encoder_mf.c
    vendor/xz/5.2.3/src/liblzma/lzma/fastpos.h
    vendor/xz/5.2.3/src/liblzma/lzma/lzma2_decoder.c
    vendor/xz/5.2.3/src/liblzma/lzma/lzma2_decoder.h
    vendor/xz/5.2.3/src/liblzma/lzma/lzma2_encoder.c
    vendor/xz/5.2.3/src/liblzma/lzma/lzma2_encoder.h
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_common.h
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_decoder.c
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_decoder.h
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder.c
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder.h
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_optimum_fast.c
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_optimum_normal.c
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_presets.c
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_private.h
    vendor/xz/5.2.3/src/liblzma/rangecoder/range_decoder.h
    vendor/xz/5.2.3/src/liblzma/simple/arm.c
    vendor/xz/5.2.3/src/liblzma/simple/armthumb.c
    vendor/xz/5.2.3/src/liblzma/simple/ia64.c
    vendor/xz/5.2.3/src/liblzma/simple/powerpc.c
    vendor/xz/5.2.3/src/liblzma/simple/simple_coder.c
    vendor/xz/5.2.3/src/liblzma/simple/simple_coder.h
    vendor/xz/5.2.3/src/liblzma/simple/simple_decoder.c
    vendor/xz/5.2.3/src/liblzma/simple/simple_decoder.h
    vendor/xz/5.2.3/src/liblzma/simple/simple_private.h
    vendor/xz/5.2.3/src/liblzma/simple/sparc.c
    vendor/xz/5.2.3/src/liblzma/simple/x86.c
    vendor/xz/5.2.3/src/liblzma/validate_map.sh
    vendor/xz/5.2.3/src/xz/args.c
    vendor/xz/5.2.3/src/xz/args.h
    vendor/xz/5.2.3/src/xz/coder.c
    vendor/xz/5.2.3/src/xz/coder.h
    vendor/xz/5.2.3/src/xz/file_io.c
    vendor/xz/5.2.3/src/xz/file_io.h
    vendor/xz/5.2.3/src/xz/hardware.c
    vendor/xz/5.2.3/src/xz/hardware.h
    vendor/xz/5.2.3/src/xz/list.c
    vendor/xz/5.2.3/src/xz/main.c
    vendor/xz/5.2.3/src/xz/message.c
    vendor/xz/5.2.3/src/xz/mytime.c
    vendor/xz/5.2.3/src/xz/mytime.h
    vendor/xz/5.2.3/src/xz/options.c
    vendor/xz/5.2.3/src/xz/private.h
    vendor/xz/5.2.3/src/xz/signals.c
    vendor/xz/5.2.3/src/xz/suffix.c
    vendor/xz/5.2.3/src/xz/xz.1

Removed Paths:
-------------
    vendor/xz/5.2.3/ABOUT-NLS
    vendor/xz/5.2.3/COPYING.GPLv2
    vendor/xz/5.2.3/COPYING.GPLv3
    vendor/xz/5.2.3/COPYING.LGPLv2.1
    vendor/xz/5.2.3/ChangeLog
    vendor/xz/5.2.3/INSTALL
    vendor/xz/5.2.3/INSTALL.generic
    vendor/xz/5.2.3/NEWS
    vendor/xz/5.2.3/PACKAGERS
    vendor/xz/5.2.3/THANKS
    vendor/xz/5.2.3/TODO
    vendor/xz/5.2.3/doc/
    vendor/xz/5.2.3/lib/
    vendor/xz/5.2.3/po/
    vendor/xz/5.2.3/src/common/common_w32res.rc
    vendor/xz/5.2.3/src/common/mythread.h
    vendor/xz/5.2.3/src/common/sysdefs.h
    vendor/xz/5.2.3/src/common/tuklib_cpucores.c
    vendor/xz/5.2.3/src/common/tuklib_integer.h
    vendor/xz/5.2.3/src/common/tuklib_physmem.c
    vendor/xz/5.2.3/src/liblzma/api/lzma/base.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/block.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/container.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/filter.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/hardware.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/index.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/index_hash.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/lzma.h
    vendor/xz/5.2.3/src/liblzma/api/lzma/version.h
    vendor/xz/5.2.3/src/liblzma/api/lzma.h
    vendor/xz/5.2.3/src/liblzma/check/Makefile.inc
    vendor/xz/5.2.3/src/liblzma/check/check.h
    vendor/xz/5.2.3/src/liblzma/check/sha256.c
    vendor/xz/5.2.3/src/liblzma/common/Makefile.inc
    vendor/xz/5.2.3/src/liblzma/common/alone_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/alone_decoder.h
    vendor/xz/5.2.3/src/liblzma/common/alone_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/auto_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/block_buffer_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/block_buffer_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/block_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/block_decoder.h
    vendor/xz/5.2.3/src/liblzma/common/block_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/block_encoder.h
    vendor/xz/5.2.3/src/liblzma/common/block_header_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/block_header_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/block_util.c
    vendor/xz/5.2.3/src/liblzma/common/common.c
    vendor/xz/5.2.3/src/liblzma/common/common.h
    vendor/xz/5.2.3/src/liblzma/common/easy_buffer_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/easy_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/filter_buffer_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/filter_buffer_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/filter_common.c
    vendor/xz/5.2.3/src/liblzma/common/filter_common.h
    vendor/xz/5.2.3/src/liblzma/common/filter_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/filter_decoder.h
    vendor/xz/5.2.3/src/liblzma/common/filter_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/filter_encoder.h
    vendor/xz/5.2.3/src/liblzma/common/filter_flags_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/index.c
    vendor/xz/5.2.3/src/liblzma/common/index_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/index_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/index_encoder.h
    vendor/xz/5.2.3/src/liblzma/common/index_hash.c
    vendor/xz/5.2.3/src/liblzma/common/stream_buffer_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/stream_buffer_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/stream_decoder.c
    vendor/xz/5.2.3/src/liblzma/common/stream_decoder.h
    vendor/xz/5.2.3/src/liblzma/common/stream_encoder.c
    vendor/xz/5.2.3/src/liblzma/common/stream_encoder.h
    vendor/xz/5.2.3/src/liblzma/delta/Makefile.inc
    vendor/xz/5.2.3/src/liblzma/delta/delta_common.c
    vendor/xz/5.2.3/src/liblzma/delta/delta_decoder.c
    vendor/xz/5.2.3/src/liblzma/delta/delta_decoder.h
    vendor/xz/5.2.3/src/liblzma/delta/delta_encoder.c
    vendor/xz/5.2.3/src/liblzma/delta/delta_encoder.h
    vendor/xz/5.2.3/src/liblzma/delta/delta_private.h
    vendor/xz/5.2.3/src/liblzma/liblzma.pc.in
    vendor/xz/5.2.3/src/liblzma/liblzma_w32res.rc
    vendor/xz/5.2.3/src/liblzma/lz/Makefile.inc
    vendor/xz/5.2.3/src/liblzma/lz/lz_decoder.c
    vendor/xz/5.2.3/src/liblzma/lz/lz_decoder.h
    vendor/xz/5.2.3/src/liblzma/lz/lz_encoder.c
    vendor/xz/5.2.3/src/liblzma/lz/lz_encoder.h
    vendor/xz/5.2.3/src/liblzma/lz/lz_encoder_mf.c
    vendor/xz/5.2.3/src/liblzma/lzma/Makefile.inc
    vendor/xz/5.2.3/src/liblzma/lzma/fastpos.h
    vendor/xz/5.2.3/src/liblzma/lzma/lzma2_decoder.c
    vendor/xz/5.2.3/src/liblzma/lzma/lzma2_decoder.h
    vendor/xz/5.2.3/src/liblzma/lzma/lzma2_encoder.c
    vendor/xz/5.2.3/src/liblzma/lzma/lzma2_encoder.h
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_common.h
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_decoder.c
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_decoder.h
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder.c
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder.h
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_optimum_fast.c
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_optimum_normal.c
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_presets.c
    vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_private.h
    vendor/xz/5.2.3/src/liblzma/rangecoder/Makefile.inc
    vendor/xz/5.2.3/src/liblzma/rangecoder/range_decoder.h
    vendor/xz/5.2.3/src/liblzma/simple/Makefile.inc
    vendor/xz/5.2.3/src/liblzma/simple/arm.c
    vendor/xz/5.2.3/src/liblzma/simple/armthumb.c
    vendor/xz/5.2.3/src/liblzma/simple/ia64.c
    vendor/xz/5.2.3/src/liblzma/simple/powerpc.c
    vendor/xz/5.2.3/src/liblzma/simple/simple_coder.c
    vendor/xz/5.2.3/src/liblzma/simple/simple_coder.h
    vendor/xz/5.2.3/src/liblzma/simple/simple_decoder.c
    vendor/xz/5.2.3/src/liblzma/simple/simple_decoder.h
    vendor/xz/5.2.3/src/liblzma/simple/simple_private.h
    vendor/xz/5.2.3/src/liblzma/simple/sparc.c
    vendor/xz/5.2.3/src/liblzma/simple/x86.c
    vendor/xz/5.2.3/src/lzmainfo/lzmainfo_w32res.rc
    vendor/xz/5.2.3/src/scripts/
    vendor/xz/5.2.3/src/xz/args.c
    vendor/xz/5.2.3/src/xz/args.h
    vendor/xz/5.2.3/src/xz/coder.c
    vendor/xz/5.2.3/src/xz/coder.h
    vendor/xz/5.2.3/src/xz/file_io.c
    vendor/xz/5.2.3/src/xz/file_io.h
    vendor/xz/5.2.3/src/xz/hardware.c
    vendor/xz/5.2.3/src/xz/hardware.h
    vendor/xz/5.2.3/src/xz/list.c
    vendor/xz/5.2.3/src/xz/main.c
    vendor/xz/5.2.3/src/xz/message.c
    vendor/xz/5.2.3/src/xz/options.c
    vendor/xz/5.2.3/src/xz/private.h
    vendor/xz/5.2.3/src/xz/signals.c
    vendor/xz/5.2.3/src/xz/suffix.c
    vendor/xz/5.2.3/src/xz/xz.1
    vendor/xz/5.2.3/src/xz/xz_w32res.rc
    vendor/xz/5.2.3/src/xzdec/lzmadec_w32res.rc
    vendor/xz/5.2.3/src/xzdec/xzdec_w32res.rc

Deleted: vendor/xz/5.2.3/ABOUT-NLS
===================================================================
--- vendor/xz/dist/ABOUT-NLS	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/ABOUT-NLS	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,1327 +0,0 @@
-1 Notes on the Free Translation Project
-***************************************
-
-Free software is going international!  The Free Translation Project is
-a way to get maintainers of free software, translators, and users all
-together, so that free software will gradually become able to speak many
-languages.  A few packages already provide translations for their
-messages.
-
-   If you found this `ABOUT-NLS' file inside a distribution, you may
-assume that the distributed package does use GNU `gettext' internally,
-itself available at your nearest GNU archive site.  But you do _not_
-need to install GNU `gettext' prior to configuring, installing or using
-this package with messages translated.
-
-   Installers will find here some useful hints.  These notes also
-explain how users should proceed for getting the programs to use the
-available translations.  They tell how people wanting to contribute and
-work on translations can contact the appropriate team.
-
-   When reporting bugs in the `intl/' directory or bugs which may be
-related to internationalization, you should tell about the version of
-`gettext' which is used.  The information can be found in the
-`intl/VERSION' file, in internationalized packages.
-
-1.1 Quick configuration advice
-==============================
-
-If you want to exploit the full power of internationalization, you
-should configure it using
-
-     ./configure --with-included-gettext
-
-to force usage of internationalizing routines provided within this
-package, despite the existence of internationalizing capabilities in the
-operating system where this package is being installed.  So far, only
-the `gettext' implementation in the GNU C library version 2 provides as
-many features (such as locale alias, message inheritance, automatic
-charset conversion or plural form handling) as the implementation here.
-It is also not possible to offer this additional functionality on top
-of a `catgets' implementation.  Future versions of GNU `gettext' will
-very likely convey even more functionality.  So it might be a good idea
-to change to GNU `gettext' as soon as possible.
-
-   So you need _not_ provide this option if you are using GNU libc 2 or
-you have installed a recent copy of the GNU gettext package with the
-included `libintl'.
-
-1.2 INSTALL Matters
-===================
-
-Some packages are "localizable" when properly installed; the programs
-they contain can be made to speak your own native language.  Most such
-packages use GNU `gettext'.  Other packages have their own ways to
-internationalization, predating GNU `gettext'.
-
-   By default, this package will be installed to allow translation of
-messages.  It will automatically detect whether the system already
-provides the GNU `gettext' functions.  If not, the included GNU
-`gettext' library will be used.  This library is wholly contained
-within this package, usually in the `intl/' subdirectory, so prior
-installation of the GNU `gettext' package is _not_ required.
-Installers may use special options at configuration time for changing
-the default behaviour.  The commands:
-
-     ./configure --with-included-gettext
-     ./configure --disable-nls
-
-will, respectively, bypass any pre-existing `gettext' to use the
-internationalizing routines provided within this package, or else,
-_totally_ disable translation of messages.
-
-   When you already have GNU `gettext' installed on your system and run
-configure without an option for your new package, `configure' will
-probably detect the previously built and installed `libintl.a' file and
-will decide to use this.  This might not be desirable.  You should use
-the more recent version of the GNU `gettext' library.  I.e. if the file
-`intl/VERSION' shows that the library which comes with this package is
-more recent, you should use
-
-     ./configure --with-included-gettext
-
-to prevent auto-detection.
-
-   The configuration process will not test for the `catgets' function
-and therefore it will not be used.  The reason is that even an
-emulation of `gettext' on top of `catgets' could not provide all the
-extensions of the GNU `gettext' library.
-
-   Internationalized packages usually have many `po/LL.po' files, where
-LL gives an ISO 639 two-letter code identifying the language.  Unless
-translations have been forbidden at `configure' time by using the
-`--disable-nls' switch, all available translations are installed
-together with the package.  However, the environment variable `LINGUAS'
-may be set, prior to configuration, to limit the installed set.
-`LINGUAS' should then contain a space separated list of two-letter
-codes, stating which languages are allowed.
-
-1.3 Using This Package
-======================
-
-As a user, if your language has been installed for this package, you
-only have to set the `LANG' environment variable to the appropriate
-`LL_CC' combination.  If you happen to have the `LC_ALL' or some other
-`LC_xxx' environment variables set, you should unset them before
-setting `LANG', otherwise the setting of `LANG' will not have the
-desired effect.  Here `LL' is an ISO 639 two-letter language code, and
-`CC' is an ISO 3166 two-letter country code.  For example, let's
-suppose that you speak German and live in Germany.  At the shell
-prompt, merely execute `setenv LANG de_DE' (in `csh'),
-`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
-This can be done from your `.login' or `.profile' file, once and for
-all.
-
-   You might think that the country code specification is redundant.
-But in fact, some languages have dialects in different countries.  For
-example, `de_AT' is used for Austria, and `pt_BR' for Brazil.  The
-country code serves to distinguish the dialects.
-
-   The locale naming convention of `LL_CC', with `LL' denoting the
-language and `CC' denoting the country, is the one use on systems based
-on GNU libc.  On other systems, some variations of this scheme are
-used, such as `LL' or `LL_CC.ENCODING'.  You can get the list of
-locales supported by your system for your language by running the
-command `locale -a | grep '^LL''.
-
-   Not all programs have translations for all languages.  By default, an
-English message is shown in place of a nonexistent translation.  If you
-understand other languages, you can set up a priority list of languages.
-This is done through a different environment variable, called
-`LANGUAGE'.  GNU `gettext' gives preference to `LANGUAGE' over `LANG'
-for the purpose of message handling, but you still need to have `LANG'
-set to the primary language; this is required by other parts of the
-system libraries.  For example, some Swedish users who would rather
-read translations in German than English for when Swedish is not
-available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
-
-   Special advice for Norwegian users: The language code for Norwegian
-bokma*l changed from `no' to `nb' recently (in 2003).  During the
-transition period, while some message catalogs for this language are
-installed under `nb' and some older ones under `no', it's recommended
-for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
-older translations are used.
-
-   In the `LANGUAGE' environment variable, but not in the `LANG'
-environment variable, `LL_CC' combinations can be abbreviated as `LL'
-to denote the language's main dialect.  For example, `de' is equivalent
-to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
-(Portuguese as spoken in Portugal) in this context.
-
-1.4 Translating Teams
-=====================
-
-For the Free Translation Project to be a success, we need interested
-people who like their own language and write it well, and who are also
-able to synergize with other translators speaking the same language.
-Each translation team has its own mailing list.  The up-to-date list of
-teams can be found at the Free Translation Project's homepage,
-`http://translationproject.org/', in the "Teams" area.
-
-   If you'd like to volunteer to _work_ at translating messages, you
-should become a member of the translating team for your own language.
-The subscribing address is _not_ the same as the list itself, it has
-`-request' appended.  For example, speakers of Swedish can send a
-message to `sv-request at li.org', having this message body:
-
-     subscribe
-
-   Keep in mind that team members are expected to participate
-_actively_ in translations, or at solving translational difficulties,
-rather than merely lurking around.  If your team does not exist yet and
-you want to start one, or if you are unsure about what to do or how to
-get started, please write to `coordinator at translationproject.org' to
-reach the coordinator for all translator teams.
-
-   The English team is special.  It works at improving and uniformizing
-the terminology in use.  Proven linguistic skills are praised more than
-programming skills, here.
-
-1.5 Available Packages
-======================
-
-Languages are not equally supported in all packages.  The following
-matrix shows the current state of internationalization, as of May 2010.
-The matrix shows, in regard of each package, for which languages PO
-files have been submitted to translation coordination, with a
-translation percentage of at least 50%.
-
-     Ready PO files       af am ar as ast az be be at latin bg bn_IN bs ca crh
-                        +---------------------------------------------------+
-     a2ps               |                    []                      []     |
-     aegis              |                                                   |
-     ant-phone          |                                                   |
-     anubis             |                                                   |
-     aspell             |             []                             []     |
-     bash               |                                                   |
-     bfd                |                                                   |
-     bibshelf           |             []                                    |
-     binutils           |                                                   |
-     bison              |                                                   |
-     bison-runtime      |             []                                    |
-     bluez-pin          | []          []                                    |
-     bombono-dvd        |                                                   |
-     buzztard           |                                                   |
-     cflow              |                                                   |
-     clisp              |                                                   |
-     coreutils          |                                []          []     |
-     cpio               |                                                   |
-     cppi               |                                                   |
-     cpplib             |                                            []     |
-     cryptsetup         |                                                   |
-     dfarc              |                                                   |
-     dialog             |                          []                []     |
-     dico               |                                                   |
-     diffutils          |                                            []     |
-     dink               |                                                   |
-     doodle             |                                                   |
-     e2fsprogs          |                                            []     |
-     enscript           |                                            []     |
-     exif               |                                                   |
-     fetchmail          |                                            []     |
-     findutils          |                                []                 |
-     flex               |                                            []     |
-     freedink           |                                                   |
-     gas                |                                                   |
-     gawk               |             []                             []     |
-     gcal               |                                            []     |
-     gcc                |                                                   |
-     gettext-examples   | []          []                 []          []     |
-     gettext-runtime    |                    []          []          []     |
-     gettext-tools      |                                []          []     |
-     gip                |                                []                 |
-     gjay               |                                                   |
-     gliv               |                                []                 |
-     glunarclock        |             []                 []                 |
-     gnubiff            |                                                   |
-     gnucash            |                                            []     |
-     gnuedu             |                                                   |
-     gnulib             |                                                   |
-     gnunet             |                                                   |
-     gnunet-gtk         |                                                   |
-     gnutls             |                                                   |
-     gold               |                                                   |
-     gpe-aerial         |                                                   |
-     gpe-beam           |                                                   |
-     gpe-bluetooth      |                                                   |
-     gpe-calendar       |                                                   |
-     gpe-clock          |             []                                    |
-     gpe-conf           |                                                   |
-     gpe-contacts       |                                                   |
-     gpe-edit           |                                                   |
-     gpe-filemanager    |                                                   |
-     gpe-go             |                                                   |
-     gpe-login          |                                                   |
-     gpe-ownerinfo      |             []                                    |
-     gpe-package        |                                                   |
-     gpe-sketchbook     |                                                   |
-     gpe-su             |             []                                    |
-     gpe-taskmanager    |             []                                    |
-     gpe-timesheet      |             []                                    |
-     gpe-today          |             []                                    |
-     gpe-todo           |                                                   |
-     gphoto2            |                                                   |
-     gprof              |                                []                 |
-     gpsdrive           |                                                   |
-     gramadoir          |                                                   |
-     grep               |                                                   |
-     grub               |             []                             []     |
-     gsasl              |                                                   |
-     gss                |                                                   |
-     gst-plugins-bad    |                                []                 |
-     gst-plugins-base   |                                []                 |
-     gst-plugins-good   |                                []                 |
-     gst-plugins-ugly   |                                []                 |
-     gstreamer          | []                             []          []     |
-     gtick              |                                                   |
-     gtkam              |                    []                             |
-     gtkorphan          |                                []                 |
-     gtkspell           | []          []     []                             |
-     gutenprint         |                                                   |
-     hello              |                                []                 |
-     help2man           |                                                   |
-     hylafax            |                                                   |
-     idutils            |                                                   |
-     indent             |                                []          []     |
-     iso_15924          |                                                   |
-     iso_3166           | []       []        []          []  []   [] [] []  |
-     iso_3166_2         |                                                   |
-     iso_4217           |                                                   |
-     iso_639            |          [] []     []              []         []  |
-     iso_639_3          |                                               []  |
-     jwhois             |                                                   |
-     kbd                |                                                   |
-     keytouch           |                                            []     |
-     keytouch-editor    |                                                   |
-     keytouch-keyboa... |                                            []     |
-     klavaro            |       []                                          |
-     latrine            |                                                   |
-     ld                 |                                []                 |
-     leafpad            |                                []          []     |
-     libc               |                                []          []     |
-     libexif            |                    ()                             |
-     libextractor       |                                                   |
-     libgnutls          |                                                   |
-     libgpewidget       |                                                   |
-     libgpg-error       |                                                   |
-     libgphoto2         |                                                   |
-     libgphoto2_port    |                                                   |
-     libgsasl           |                                                   |
-     libiconv           |                                []                 |
-     libidn             |                                                   |
-     lifelines          |                                                   |
-     liferea            |                          []                []     |
-     lilypond           |                                                   |
-     linkdr             |       []                                          |
-     lordsawar          |                                                   |
-     lprng              |                                                   |
-     lynx               |                                            []     |
-     m4                 |                                                   |
-     mailfromd          |                                                   |
-     mailutils          |                                                   |
-     make               |                                                   |
-     man-db             |                                                   |
-     man-db-manpages    |                                                   |
-     minicom            |                                                   |
-     mkisofs            |                                                   |
-     myserver           |                                                   |
-     nano               |                                []          []     |
-     opcodes            |                                                   |
-     parted             |                                                   |
-     pies               |                                                   |
-     popt               |                                                   |
-     psmisc             |                                                   |
-     pspp               |                                            []     |
-     pwdutils           |                                                   |
-     radius             |                                            []     |
-     recode             |                    []                      []     |
-     rosegarden         |                                                   |
-     rpm                |                                                   |
-     rush               |                                                   |
-     sarg               |                                                   |
-     screem             |                                                   |
-     scrollkeeper       |                 [] []                      []     |
-     sed                |             []                             []     |
-     sharutils          |                                []          []     |
-     shishi             |                                                   |
-     skencil            |                                                   |
-     solfege            |                                                   |
-     solfege-manual     |                                                   |
-     soundtracker       |                                                   |
-     sp                 |                                                   |
-     sysstat            |                                                   |
-     tar                |                                []                 |
-     texinfo            |                                                   |
-     tin                |                                                   |
-     unicode-han-tra... |                                                   |
-     unicode-transla... |                                                   |
-     util-linux-ng      |                                            []     |
-     vice               |                                                   |
-     vmm                |                                                   |
-     vorbis-tools       |                                                   |
-     wastesedge         |                                                   |
-     wdiff              |                                                   |
-     wget               |                    []                      []     |
-     wyslij-po          |                                                   |
-     xchat              |             []     []          []          []     |
-     xdg-user-dirs      | []       [] []     []    []    []  []      [] []  |
-     xkeyboard-config   |                                []          [] []  |
-                        +---------------------------------------------------+
-                          af am ar as ast az be be at latin bg bn_IN bs ca crh
-                           6  0  2  3 19   1 11     3    28   3    1 38  5
-
-                          cs da  de  el en en_GB en_ZA eo es et eu fa fi
-                        +-------------------------------------------------+
-     a2ps               | [] []  []  []     []            [] []       []  |
-     aegis              |    []  []                       []              |
-     ant-phone          |    []  ()                                       |
-     anubis             |    []  []                                   []  |
-     aspell             | [] []  []         []            []              |
-     bash               | []                           [] []          []  |
-     bfd                |                                 []          []  |
-     bibshelf           |    []  []                       []          []  |
-     binutils           |                                 []          []  |
-     bison              |        []  []                               []  |
-     bison-runtime      |    []  []  []                      []       []  |
-     bluez-pin          | [] []  []  []                [] []          []  |
-     bombono-dvd        |    []                                       []  |
-     buzztard           | [] []  []                                       |
-     cflow              |    []  []                                   []  |
-     clisp              |    []  []     []                []              |
-     coreutils          | [] []  []                          []           |
-     cpio               |                                             []  |
-     cppi               |                                             []  |
-     cpplib             |    []  []                       []              |
-     cryptsetup         |        []                                       |
-     dfarc              |    []  []                       []          []  |
-     dialog             |    []  []                    [] []    []        |
-     dico               |                                                 |
-     diffutils          | [] []  []  []                [] []          []  |
-     dink               |    []  []                       []              |
-     doodle             |        []                                       |
-     e2fsprogs          | []     []                       []              |
-     enscript           |    []  []         []                            |
-     exif               | () []  []                                   []  |
-     fetchmail          | [] []  ()  []     []            []              |
-     findutils          | [] []  []                                   []  |
-     flex               |        []                       []          []  |
-     freedink           |    []  []                       []          []  |
-     gas                |                                 []              |
-     gawk               |    []  []                       []              |
-     gcal               |                                 []              |
-     gcc                |        []                       []              |
-     gettext-examples   |        []  []                [] []          []  |
-     gettext-runtime    |    []  []                    [] []          []  |
-     gettext-tools      |        []                       []    []        |
-     gip                |    []  []                       []    []    []  |
-     gjay               |        []                                   []  |
-     gliv               | [] []  []                                   []  |
-     glunarclock        |    []  []                                   []  |
-     gnubiff            |        ()                                       |
-     gnucash            | []     ()  ()     ()            ()          ()  |
-     gnuedu             |    []                           []              |
-     gnulib             |        []                       []          []  |
-     gnunet             |                                                 |
-     gnunet-gtk         |    []                                           |
-     gnutls             | []     []                                       |
-     gold               |                                 []          []  |
-     gpe-aerial         | [] []  []                       []          []  |
-     gpe-beam           | [] []  []                       []          []  |
-     gpe-bluetooth      |    []  []                                   []  |
-     gpe-calendar       |    []                                       []  |
-     gpe-clock          | [] []  []                       []          []  |
-     gpe-conf           | [] []  []                                   []  |
-     gpe-contacts       |    []  []                       []          []  |
-     gpe-edit           |    []  []                                   []  |
-     gpe-filemanager    |    []  []                       []          []  |
-     gpe-go             | [] []  []                       []          []  |
-     gpe-login          |    []  []                                   []  |
-     gpe-ownerinfo      | [] []  []                       []          []  |
-     gpe-package        |    []  []                       []          []  |
-     gpe-sketchbook     | [] []  []                       []          []  |
-     gpe-su             | [] []  []                       []          []  |
-     gpe-taskmanager    | [] []  []                       []          []  |
-     gpe-timesheet      | [] []  []                       []          []  |
-     gpe-today          | [] []  []                       []          []  |
-     gpe-todo           |    []  []                       []          []  |
-     gphoto2            | [] []  ()         []            []    []    []  |
-     gprof              |    []  []                       []          []  |
-     gpsdrive           |    []                           [] []           |
-     gramadoir          |    []  []                    []                 |
-     grep               | []                                          []  |
-     grub               |    []  []                                   []  |
-     gsasl              |        []                                   []  |
-     gss                |                                             []  |
-     gst-plugins-bad    | [] []  []                       []    []    []  |
-     gst-plugins-base   | [] []  []                       []    []    []  |
-     gst-plugins-good   | [] []  []  []                   []    []    []  |
-     gst-plugins-ugly   | [] []  []  []                   []    []    []  |
-     gstreamer          | [] []  []                       []    []    []  |
-     gtick              |    []  ()                    []             []  |
-     gtkam              | [] []  ()                    [] []              |
-     gtkorphan          | [] []  []                    []                 |
-     gtkspell           | [] []  []  []                [] []    []    []  |
-     gutenprint         |    []  []         []                        []  |
-     hello              |    []  []                    [] []          []  |
-     help2man           |        []                                   []  |
-     hylafax            |        []                       []              |
-     idutils            |    []  []                                   []  |
-     indent             | [] []  []                    [] [] [] []    []  |
-     iso_15924          |    []      ()                [] []          []  |
-     iso_3166           | [] []  []  ()                [] [] [] ()    []  |
-     iso_3166_2         |            ()                                   |
-     iso_4217           | [] []  []  ()                   [] []       []  |
-     iso_639            | [] []  []  ()                [] []          []  |
-     iso_639_3          |                                                 |
-     jwhois             |                                 []          []  |
-     kbd                | [] []  []  []                   []              |
-     keytouch           |    []  []                                   []  |
-     keytouch-editor    |    []  []                                   []  |
-     keytouch-keyboa... |    []                                       []  |
-     klavaro            | [] []  []                    []                 |
-     latrine            |    []  ()                                   []  |
-     ld                 |    []                           []          []  |
-     leafpad            | [] []  []  []                   []    []    []  |
-     libc               | [] []  []                       []          []  |
-     libexif            |    []  []         ()                            |
-     libextractor       |                                                 |
-     libgnutls          | []                                              |
-     libgpewidget       |    []  []                                   []  |
-     libgpg-error       | []     []                                       |
-     libgphoto2         |    []  ()                                       |
-     libgphoto2_port    |    []  ()                             []        |
-     libgsasl           |                                             []  |
-     libiconv           | [] []  []                    []    []       []  |
-     libidn             | []     []                    []             []  |
-     lifelines          |    []  ()                                       |
-     liferea            | []     []  []                   []    []        |
-     lilypond           | []     []                       []          []  |
-     linkdr             |    []  []                       []          []  |
-     lordsawar          |    []                                           |
-     lprng              |                                                 |
-     lynx               | [] []  []                          []           |
-     m4                 | [] []  []  []                               []  |
-     mailfromd          |                                                 |
-     mailutils          |                                 []              |
-     make               |    []  []                       []          []  |
-     man-db             |                                                 |
-     man-db-manpages    |                                                 |
-     minicom            | [] []  []                       []          []  |
-     mkisofs            |                                             []  |
-     myserver           |                                                 |
-     nano               |        []                       []    []    []  |
-     opcodes            |        []                       []          []  |
-     parted             | []     []                                       |
-     pies               |                                                 |
-     popt               | [] []  []                    [] []          []  |
-     psmisc             | []     []                             []    []  |
-     pspp               |                                 []              |
-     pwdutils           |    []                                           |
-     radius             |                                 []              |
-     recode             | [] []  []  []                [] []          []  |
-     rosegarden         | ()     ()                       ()          ()  |
-     rpm                |    []  []                       []              |
-     rush               |                                                 |
-     sarg               |                                                 |
-     screem             |                                                 |
-     scrollkeeper       | [] []  []         []            []          []  |
-     sed                | []     []  []                [] [] []       []  |
-     sharutils          |    []  []                       [] []       []  |
-     shishi             |                                                 |
-     skencil            |    []  ()                       []              |
-     solfege            |        []                    []    []       []  |
-     solfege-manual     |                              []    []           |
-     soundtracker       |    []  []                       []              |
-     sp                 |        []                                       |
-     sysstat            |    []  []                             []    []  |
-     tar                | []     []                          [] []    []  |
-     texinfo            |        []                    [] []              |
-     tin                |        []                          []           |
-     unicode-han-tra... |                                                 |
-     unicode-transla... |                                                 |
-     util-linux-ng      | [] []  []                       []          []  |
-     vice               |    ()  ()                                       |
-     vmm                |        []                                       |
-     vorbis-tools       | []                           []                 |
-     wastesedge         |    []                                           |
-     wdiff              |        []                       []          []  |
-     wget               | []     []                          []       []  |
-     wyslij-po          |                                             []  |
-     xchat              | []     []  []                   [] []       []  |
-     xdg-user-dirs      | [] []  []  []                [] [] [] []    []  |
-     xkeyboard-config   | [] []  []                    [] []          []  |
-                        +-------------------------------------------------+
-                          cs da  de  el en en_GB en_ZA eo es et eu fa fi
-                          64 105 117 18  1   8     0   28 89 18 19  0 104
-
-                          fr  ga gl gu he hi hr hu hy id  is it ja ka kn
-                        +------------------------------------------------+
-     a2ps               | []                          []        []       |
-     aegis              | []                                 []          |
-     ant-phone          | []                                 []          |
-     anubis             | []                          []     []          |
-     aspell             | []  []                      []     []          |
-     bash               | []                          []        []       |
-     bfd                | []                          []                 |
-     bibshelf           | []  []                      []     []          |
-     binutils           | []                          []                 |
-     bison              | []  []                      []                 |
-     bison-runtime      | []  []                      []     [] []       |
-     bluez-pin          | []  []                [] [] []  []    []       |
-     bombono-dvd        |                                                |
-     buzztard           |                             []                 |
-     cflow              |     []                      []                 |
-     clisp              | []                                             |
-     coreutils          | []  []                []    []     []          |
-     cpio               | []  []                      []                 |
-     cppi               | []                                             |
-     cpplib             | []                          []                 |
-     cryptsetup         | []                          []     []          |
-     dfarc              | []                                 []          |
-     dialog             | []  [] []                   []  [] [] []       |
-     dico               |                                                |
-     diffutils          | []  [] []    []       []    []     [] []       |
-     dink               | []                                             |
-     doodle             |     []                             []          |
-     e2fsprogs          | []                          []                 |
-     enscript           | []  []             []       []                 |
-     exif               | []                          []  [] [] []       |
-     fetchmail          | []                          []     [] []       |
-     findutils          | []  []                []    []     []          |
-     flex               | []  []                                         |
-     freedink           | []                          []                 |
-     gas                | []                          []                 |
-     gawk               | []  []       []             []     () []       |
-     gcal               | []                                             |
-     gcc                |                             []                 |
-     gettext-examples   | []  []                []    []     [] []       |
-     gettext-runtime    | []  []                      []     [] []       |
-     gettext-tools      | []                          []     [] []       |
-     gip                | []  [] []                   []        []       |
-     gjay               |                                                |
-     gliv               | ()                                             |
-     glunarclock        |     []                []    []                 |
-     gnubiff            | ()                          []     ()          |
-     gnucash            | ()           ()       ()           () []       |
-     gnuedu             | []                                 []          |
-     gnulib             | []  []                []           [] []       |
-     gnunet             |                                                |
-     gnunet-gtk         | []                                             |
-     gnutls             | []                                 []          |
-     gold               |                             []                 |
-     gpe-aerial         | []                          []                 |
-     gpe-beam           | []                          []        []       |
-     gpe-bluetooth      |                             []     [] []       |
-     gpe-calendar       |                                       []       |
-     gpe-clock          | []                    []    []        []       |
-     gpe-conf           | []                          []        []       |
-     gpe-contacts       | []                          []        []       |
-     gpe-edit           |                             []        []       |
-     gpe-filemanager    |                       []    []        []       |
-     gpe-go             | []                    []    []        []       |
-     gpe-login          |                             []        []       |
-     gpe-ownerinfo      | []                    []    []        []       |
-     gpe-package        |                             []        []       |
-     gpe-sketchbook     | []                          []        []       |
-     gpe-su             | []     []             []    []        []       |
-     gpe-taskmanager    | []                    []    []        []       |
-     gpe-timesheet      | []  []                      []        []       |
-     gpe-today          | []  [] []             []    []        []       |
-     gpe-todo           |                             []        []       |
-     gphoto2            | []                    []    []     [] []       |
-     gprof              | []  []                      []                 |
-     gpsdrive           |        []                   []     []          |
-     gramadoir          | []  []                      []                 |
-     grep               |                                    []          |
-     grub               |                       []    []     []          |
-     gsasl              | []  []                      []     []          |
-     gss                | []  []                      []     []          |
-     gst-plugins-bad    | []                    []    []     []          |
-     gst-plugins-base   | []                    []    []     [] []       |
-     gst-plugins-good   | []                    []    []     [] []       |
-     gst-plugins-ugly   | []                    []    []     [] []       |
-     gstreamer          | []                    []    []     []          |
-     gtick              | []  []                      []     []          |
-     gtkam              | []                    []    []     [] []       |
-     gtkorphan          | []                          []     []          |
-     gtkspell           | []  [] []             [] [] []     [] []       |
-     gutenprint         | []                    []           []          |
-     hello              |     []                      []                 |
-     help2man           | []                                             |
-     hylafax            |                             []                 |
-     idutils            | []  []                []    []     []          |
-     indent             | []  [] []             []    []     [] []       |
-     iso_15924          | ()                          []     []          |
-     iso_3166           | ()  [] [] [] [] [] [] []    []     [] []       |
-     iso_3166_2         | ()                    []    []     []          |
-     iso_4217           | ()                    []    []     [] []       |
-     iso_639            | ()  []    []          []    []     [] []    [] |
-     iso_639_3          | ()                                 []       [] |
-     jwhois             | []                    []    []     []          |
-     kbd                | []                          []                 |
-     keytouch           | []  []                []    []     []          |
-     keytouch-editor    |     []                []    []     []          |
-     keytouch-keyboa... |     []                []    []     []          |
-     klavaro            |        []             []                       |
-     latrine            |                             []     []          |
-     ld                 | []  []                      []                 |
-     leafpad            | []  []       []       []    []     [] ()       |
-     libc               | []     []                   []        []       |
-     libexif            |                                                |
-     libextractor       |                                                |
-     libgnutls          | []                                 []          |
-     libgpewidget       |     []                      []        []       |
-     libgpg-error       | []                                 []          |
-     libgphoto2         | []                                 [] []       |
-     libgphoto2_port    | []                                 [] []       |
-     libgsasl           | []  []                      []     []          |
-     libiconv           | []  []                      []     [] []       |
-     libidn             | []                          []     []          |
-     lifelines          | ()                                             |
-     liferea            | []                    []           [] []       |
-     lilypond           | []                                             |
-     linkdr             |              []    [] []           []          |
-     lordsawar          |                                                |
-     lprng              |                             []                 |
-     lynx               | []                    []    []     [] []       |
-     m4                 | []  [] []                   []        []       |
-     mailfromd          |                                                |
-     mailutils          | []                          []                 |
-     make               | []  [] []    []    []       []     [] []       |
-     man-db             |                             []     []          |
-     man-db-manpages    |                             []                 |
-     minicom            | []                    []    []        []       |
-     mkisofs            | []                          []     []          |
-     myserver           |                                                |
-     nano               | []  [] []             []           []          |
-     opcodes            | []  []                      []                 |
-     parted             | []                          []     [] []       |
-     pies               |                                                |
-     popt               | []  [] []             []    []  [] [] []       |
-     psmisc             | []                          []                 |
-     pspp               |                                                |
-     pwdutils           | []                          []                 |
-     radius             | []                          []                 |
-     recode             | []  [] []    []       []    []     []          |
-     rosegarden         | ()                          ()     () ()       |
-     rpm                |                             []        []       |
-     rush               |                                                |
-     sarg               | []                                             |
-     screem             |                                    [] []       |
-     scrollkeeper       |                       []    []     []          |
-     sed                | []  [] []             []    []     [] []       |
-     sharutils          | []  []                []    []     [] []       |
-     shishi             | []                                             |
-     skencil            | []                                             |
-     solfege            | []     []                          []          |
-     solfege-manual     | []     []                                      |
-     soundtracker       | []                                 []          |
-     sp                 | []                                    ()       |
-     sysstat            | []                          []     [] []       |
-     tar                | []  []                []    []     [] []       |
-     texinfo            | []                          []     [] []       |
-     tin                | []                                             |
-     unicode-han-tra... |                                                |
-     unicode-transla... | []  []                                         |
-     util-linux-ng      | []                    []    []     [] []       |
-     vice               | ()                    ()           ()          |
-     vmm                | []                                             |
-     vorbis-tools       |                             []                 |
-     wastesedge         | ()                                 ()          |
-     wdiff              |                                                |
-     wget               | []  []             [] []    []     [] []       |
-     wyslij-po          | []                          []                 |
-     xchat              | []        []    []    []    []     [] []    [] |
-     xdg-user-dirs      | []  [] [] [] []       []    []  [] [] []    [] |
-     xkeyboard-config   | []                    []    []     []          |
-                        +------------------------------------------------+
-                          fr  ga gl gu he hi hr hu hy id  is it ja ka kn
-                          121 53 20  4  8  2  5 53  2 120  5 83 66  0  4
-
-                          ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne
-                        +-----------------------------------------------+
-     a2ps               |                               []              |
-     aegis              |                                               |
-     ant-phone          |                                               |
-     anubis             |                               []    []        |
-     aspell             |                         []                    |
-     bash               |                                               |
-     bfd                |                                               |
-     bibshelf           |                []             []              |
-     binutils           |                                               |
-     bison              |                               []              |
-     bison-runtime      |       []    [] []             []    []        |
-     bluez-pin          |    [] []    [] []             []              |
-     bombono-dvd        |                                               |
-     buzztard           |                                               |
-     cflow              |                                               |
-     clisp              |                                               |
-     coreutils          |          []                                   |
-     cpio               |                                               |
-     cppi               |                                               |
-     cpplib             |                                               |
-     cryptsetup         |                                               |
-     dfarc              |                   []                          |
-     dialog             |    []       [] []             []    []        |
-     dico               |                                               |
-     diffutils          |                []             []              |
-     dink               |                                               |
-     doodle             |                                               |
-     e2fsprogs          |                                               |
-     enscript           |                                               |
-     exif               |                []                             |
-     fetchmail          |                                               |
-     findutils          |                                               |
-     flex               |                                               |
-     freedink           |                                     []        |
-     gas                |                                               |
-     gawk               |                                               |
-     gcal               |                                               |
-     gcc                |                                               |
-     gettext-examples   |       []       []             [] []           |
-     gettext-runtime    | []                                            |
-     gettext-tools      | []                                            |
-     gip                |                []             []              |
-     gjay               |                                               |
-     gliv               |                                               |
-     glunarclock        |                []                             |
-     gnubiff            |                                               |
-     gnucash            | ()          ()                      ()     () |
-     gnuedu             |                                               |
-     gnulib             |                                               |
-     gnunet             |                                               |
-     gnunet-gtk         |                                               |
-     gnutls             |                               []              |
-     gold               |                                               |
-     gpe-aerial         |                []                             |
-     gpe-beam           |                []                             |
-     gpe-bluetooth      |                []                []           |
-     gpe-calendar       |                []                             |
-     gpe-clock          | []    []       []             [] []           |
-     gpe-conf           | []             []                             |
-     gpe-contacts       | []             []                             |
-     gpe-edit           |                []                             |
-     gpe-filemanager    | []             []                             |
-     gpe-go             | []             []                []           |
-     gpe-login          |                []                             |
-     gpe-ownerinfo      |                []             []              |
-     gpe-package        | []             []                             |
-     gpe-sketchbook     | []             []                             |
-     gpe-su             | []    []       []             [] [] []        |
-     gpe-taskmanager    | [] [] []       []             [] []           |
-     gpe-timesheet      |                []             []              |
-     gpe-today          |       []       []             [] []           |
-     gpe-todo           |                []                   []        |
-     gphoto2            |                                               |
-     gprof              |                               []              |
-     gpsdrive           |                                               |
-     gramadoir          |                                               |
-     grep               |                                               |
-     grub               |                                               |
-     gsasl              |                                               |
-     gss                |                                               |
-     gst-plugins-bad    |                []                []           |
-     gst-plugins-base   |             [] []                             |
-     gst-plugins-good   |                []                []           |
-     gst-plugins-ugly   |             [] []             [] [] []        |
-     gstreamer          |                                               |
-     gtick              |                                               |
-     gtkam              |                                     []        |
-     gtkorphan          |                []                      []     |
-     gtkspell           |       []    [] []       []    []    [] []     |
-     gutenprint         |                                               |
-     hello              | []             []             []              |
-     help2man           |                                               |
-     hylafax            |                                               |
-     idutils            |                                               |
-     indent             |                                               |
-     iso_15924          |             [] []                             |
-     iso_3166           | [] []       () [] [] []    []       []        |
-     iso_3166_2         |                                               |
-     iso_4217           |             []                      []        |
-     iso_639            |                      []    []                 |
-     iso_639_3          |                            []                 |
-     jwhois             |                []                             |
-     kbd                |                                               |
-     keytouch           |                []                             |
-     keytouch-editor    |                []                             |
-     keytouch-keyboa... |                []                             |
-     klavaro            |                                     []        |
-     latrine            |                []                             |
-     ld                 |                                               |
-     leafpad            | []          [] []                             |
-     libc               | []                                            |
-     libexif            |                                               |
-     libextractor       |                                               |
-     libgnutls          |                               []              |
-     libgpewidget       |                []             []              |
-     libgpg-error       |                                               |
-     libgphoto2         |                                               |
-     libgphoto2_port    |                                               |
-     libgsasl           |                                               |
-     libiconv           |                                               |
-     libidn             |                                               |
-     lifelines          |                                               |
-     liferea            |                                               |
-     lilypond           |                                               |
-     linkdr             |                                               |
-     lordsawar          |                                               |
-     lprng              |                                               |
-     lynx               |                                               |
-     m4                 |                                               |
-     mailfromd          |                                               |
-     mailutils          |                                               |
-     make               | []                                            |
-     man-db             |                                               |
-     man-db-manpages    |                                               |
-     minicom            |                                     []        |
-     mkisofs            |                                               |
-     myserver           |                                               |
-     nano               |                               []    []        |
-     opcodes            |                                               |
-     parted             |                                               |
-     pies               |                                               |
-     popt               | []             []                   []        |
-     psmisc             |                                               |
-     pspp               |                                               |
-     pwdutils           |                                               |
-     radius             |                                               |
-     recode             |                                               |
-     rosegarden         |                                               |
-     rpm                |                                               |
-     rush               |                                               |
-     sarg               |                                               |
-     screem             |                                               |
-     scrollkeeper       |                                     []     [] |
-     sed                |                                               |
-     sharutils          |                                               |
-     shishi             |                                               |
-     skencil            |                                               |
-     solfege            |                                     []        |
-     solfege-manual     |                                               |
-     soundtracker       |                                               |
-     sp                 |                                               |
-     sysstat            |                []                             |
-     tar                |       []                                      |
-     texinfo            |                                     []        |
-     tin                |                                               |
-     unicode-han-tra... |                                               |
-     unicode-transla... |                                               |
-     util-linux-ng      |                                               |
-     vice               |                                               |
-     vmm                |                                               |
-     vorbis-tools       |                                               |
-     wastesedge         |                                               |
-     wdiff              |                                               |
-     wget               |             []                                |
-     wyslij-po          |                                               |
-     xchat              | []             [] []                          |
-     xdg-user-dirs      | [] []       [] [] []       []       [] []     |
-     xkeyboard-config   | []    []    []                                |
-                        +-----------------------------------------------+
-                          ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne
-                          20  5 10  1 12 48  4  2  2  4 24 10 19  3   1
-
-                          nl  nn or pa pl  ps pt pt_BR ro ru rw sk sl sq sr
-                        +---------------------------------------------------+
-     a2ps               | []           []     []  []   [] []       []    [] |
-     aegis              | []                      []      []                |
-     ant-phone          |                         []   []                   |
-     anubis             | []           []                 []                |
-     aspell             | []                           [] []    [] []       |
-     bash               | []                                    []          |
-     bfd                |                                 []                |
-     bibshelf           | []  []                                            |
-     binutils           |                                 []    []          |
-     bison              | []           []                 []                |
-     bison-runtime      | []           []     []  []   [] []       []       |
-     bluez-pin          | []           []         []   [] []    [] []    [] |
-     bombono-dvd        |     []                          ()                |
-     buzztard           | []  []                                            |
-     cflow              |              []                                   |
-     clisp              | []                              []                |
-     coreutils          | []           []     []  []      []       []       |
-     cpio               | []           []                 []                |
-     cppi               |              []                                   |
-     cpplib             | []                                                |
-     cryptsetup         | []                                                |
-     dfarc              |              []                                   |
-     dialog             | []           []         []      []                |
-     dico               |              []                                   |
-     diffutils          | []           []         []   [] []             [] |
-     dink               | ()                                                |
-     doodle             | []                                          []    |
-     e2fsprogs          | []           []                                   |
-     enscript           | []                      []   [] []       []       |
-     exif               | []           []              [] ()    []          |
-     fetchmail          | []           []                 []          []    |
-     findutils          | []           []     []          []       []       |
-     flex               | []           []         []   [] []                |
-     freedink           | []           []                                   |
-     gas                |                                                   |
-     gawk               | []           []         []   []                   |
-     gcal               |                                                   |
-     gcc                |                                                [] |
-     gettext-examples   | []           []     []       [] []    [] []    [] |
-     gettext-runtime    | []  []       []     []       [] []    [] []    [] |
-     gettext-tools      |              []              [] []    [] []    [] |
-     gip                | []           []                 []    []       [] |
-     gjay               |                                                   |
-     gliv               | []           []         []   [] []    []          |
-     glunarclock        | []                      []   []       []       [] |
-     gnubiff            | []                           ()                   |
-     gnucash            | []           ()         ()      ()                |
-     gnuedu             | []                                                |
-     gnulib             | []           []                 []       []       |
-     gnunet             |                                                   |
-     gnunet-gtk         |                                                   |
-     gnutls             | []           []                                   |
-     gold               |                                                   |
-     gpe-aerial         | []                  []  []   [] []       []    [] |
-     gpe-beam           | []                  []  []   [] []       []    [] |
-     gpe-bluetooth      | []                      []                        |
-     gpe-calendar       |                         []      []       []    [] |
-     gpe-clock          | []                  []  []   [] []    [] []    [] |
-     gpe-conf           | []                  []  []   [] []    [] []       |
-     gpe-contacts       |                         []   [] []       []    [] |
-     gpe-edit           | []           []                          []       |
-     gpe-filemanager    | []                              []       []       |
-     gpe-go             | []           []         []   [] []    [] []    [] |
-     gpe-login          | []                      []                        |
-     gpe-ownerinfo      | []                  []  []   [] []    [] []    [] |
-     gpe-package        | []                                       []       |
-     gpe-sketchbook     | []                  []  []   [] []       []    [] |
-     gpe-su             | []                  []  []   [] []    [] []    [] |
-     gpe-taskmanager    | []                  []  []   [] []    [] []    [] |
-     gpe-timesheet      | []                  []  []   [] []    [] []    [] |
-     gpe-today          | []                  []  []   [] []    [] []    [] |
-     gpe-todo           | []                      []      []       []    [] |
-     gphoto2            | []        [] []         []   [] []    []       [] |
-     gprof              | []                      []   []                   |
-     gpsdrive           | []                              []                |
-     gramadoir          | []                                    []          |
-     grep               | []           []                 []    []          |
-     grub               | []           []                 []                |
-     gsasl              | []           []                       []       [] |
-     gss                |              []              []       []          |
-     gst-plugins-bad    | []           []         []      []    []          |
-     gst-plugins-base   | []           []         []      []    []          |
-     gst-plugins-good   | []           []         []      []    []          |
-     gst-plugins-ugly   | []           []         []      []    [] []       |
-     gstreamer          | []           []         []      []    []          |
-     gtick              | []                              []    []          |
-     gtkam              | []        [] []         []      []    []          |
-     gtkorphan          | []                                                |
-     gtkspell           | []           []     []  []   [] []    [] [] [] [] |
-     gutenprint         | []                              []                |
-     hello              | []           []                       [] []       |
-     help2man           |              []                 []                |
-     hylafax            | []                                                |
-     idutils            | []           []         []   [] []                |
-     indent             | []           []         []   [] []    []       [] |
-     iso_15924          | []           []                 []       []       |
-     iso_3166           | []  [] [] [] []     ()  []   [] [] [] [] [] [] [] |
-     iso_3166_2         | []           []                          []       |
-     iso_4217           | []  []       []     []          [] []    []    [] |
-     iso_639            | []     [] [] []                 [] [] [] []    [] |
-     iso_639_3          |        [] []                                      |
-     jwhois             | []           []         []   []                   |
-     kbd                | []           []              []                   |
-     keytouch           | []           []                       []          |
-     keytouch-editor    | []           []                       []          |
-     keytouch-keyboa... | []           []                       []          |
-     klavaro            | []                      []                        |
-     latrine            |              []                 []                |
-     ld                 |                                                   |
-     leafpad            | []  []       []     []  []      []    [] []    [] |
-     libc               | []           []                 []    []          |
-     libexif            | []           []         ()            []          |
-     libextractor       |                                                   |
-     libgnutls          | []           []                                   |
-     libgpewidget       | []           []                          []       |
-     libgpg-error       |              []              []                   |
-     libgphoto2         | []           []                                   |
-     libgphoto2_port    | []           []                 []    []          |
-     libgsasl           | []           []              []       []       [] |
-     libiconv           | []           []                       [] []    [] |
-     libidn             | []           []                                   |
-     lifelines          | []           []                                   |
-     liferea            | []           []     []  []   [] ()    ()    []    |
-     lilypond           | []                                                |
-     linkdr             | []                  []          []                |
-     lordsawar          |                                                   |
-     lprng              |              []                                   |
-     lynx               | []                      []      []                |
-     m4                 | []           []         []   [] []                |
-     mailfromd          |              []                                   |
-     mailutils          |              []                                   |
-     make               | []           []         []      []                |
-     man-db             | []           []                 []                |
-     man-db-manpages    | []           []                 []                |
-     minicom            |              []         []   [] []                |
-     mkisofs            | []           []                 []                |
-     myserver           |                                                   |
-     nano               | []           []         []      []                |
-     opcodes            | []                           []                   |
-     parted             | []           []                 []    []          |
-     pies               |              []                                   |
-     popt               | []           []     []          []                |
-     psmisc             | []           []                 []                |
-     pspp               | []                      []                        |
-     pwdutils           |              []                                   |
-     radius             | []           []                 []                |
-     recode             | []           []     []  []   [] []    [] []       |
-     rosegarden         |              ()                 ()                |
-     rpm                | []           []     []                            |
-     rush               | []           []                                   |
-     sarg               |                                                   |
-     screem             |                                                   |
-     scrollkeeper       | []  []       []              [] []    []    [] [] |
-     sed                | []           []     []  []   [] []    [] []    [] |
-     sharutils          | []           []                 []             [] |
-     shishi             |              []                                   |
-     skencil            |                     []  []                        |
-     solfege            | []           []         []      []                |
-     solfege-manual     | []           []         []                        |
-     soundtracker       |                                       []          |
-     sp                 |                                                   |
-     sysstat            | []           []         []      []                |
-     tar                | []           []                 []       []       |
-     texinfo            | []           []              [] []                |
-     tin                |                                 []                |
-     unicode-han-tra... |                                                   |
-     unicode-transla... |                                                   |
-     util-linux-ng      | []           []         []      []       []       |
-     vice               | []                                                |
-     vmm                | []                                                |
-     vorbis-tools       | []           []                                   |
-     wastesedge         | []                                                |
-     wdiff              | []           []                                   |
-     wget               | []           []     []  []      []    [] []       |
-     wyslij-po          | []  []       []                                   |
-     xchat              | []        [] []     []          []    [] [] [] [] |
-     xdg-user-dirs      | []  [] [] [] []  [] []  []   [] []    [] [] [] [] |
-     xkeyboard-config   | []           []                 []    [] []       |
-                        +---------------------------------------------------+
-                          nl  nn or pa pl  ps pt pt_BR ro ru rw sk sl sq sr
-                          135 10  4  7 105  1 29  61   47 91  3 55 47  8 37
-
-                          sv  sw ta te tg th tr uk vi  wa zh_CN zh_HK zh_TW
-                        +---------------------------------------------------+
-     a2ps               | []              [] [] [] []                       | 27
-     aegis              |                          []                       |  9
-     ant-phone          | []                 []    []      []               |  9
-     anubis             | []                 [] [] []                       | 15
-     aspell             |                       [] []  []                   | 20
-     bash               | []                       []                       | 11
-     bfd                |                          []                       |  6
-     bibshelf           | []                       []      []               | 16
-     binutils           |                       [] []                       |  8
-     bison              | []                       []                       | 12
-     bison-runtime      | []              []    [] []      []          []   | 29
-     bluez-pin          | []              [] [] [] []  []  []          []   | 37
-     bombono-dvd        |                          []                       |  4
-     buzztard           |                          []                       |  7
-     cflow              |                       [] []      []               |  9
-     clisp              |                                                   | 10
-     coreutils          | []                    [] []      []               | 22
-     cpio               | []                 [] [] []      []          []   | 13
-     cppi               |                       [] []                       |  5
-     cpplib             | []                 [] [] []      []          []   | 13
-     cryptsetup         | []                       []                       |  7
-     dfarc              |                          []                       |  9
-     dialog             | []  []          []       []  []  []          []   | 30
-     dico               |                       []                          |  2
-     diffutils          | []                 [] [] []      []          []   | 30
-     dink               |                                                   |  4
-     doodle             | []                       []                       |  7
-     e2fsprogs          | []                 []    []                       | 11
-     enscript           | []                 [] [] []                       | 17
-     exif               | []                       []      []               | 16
-     fetchmail          |                    []    []      []               | 17
-     findutils          | []                 [] [] []      []               | 20
-     flex               | []                 []    []                  []   | 15
-     freedink           |                          []                       | 10
-     gas                |                    []                             |  4
-     gawk               | []                 []    []      []               | 18
-     gcal               | []                 []                             |  5
-     gcc                | []                 []            []               |  7
-     gettext-examples   | []                 [] [] []      []    []    []   | 34
-     gettext-runtime    | []                 [] [] []      []    []    []   | 30
-     gettext-tools      | []                 [] [] []      []          []   | 22
-     gip                | []                       []      []          []   | 22
-     gjay               |                          []                       |  3
-     gliv               | []                 []    []                       | 14
-     glunarclock        | []                       []  []  []          []   | 19
-     gnubiff            | []                       []                       |  4
-     gnucash            |                    () [] ()                  ()   |  9
-     gnuedu             |                          []                  []   |  7
-     gnulib             | []                    [] []      []               | 16
-     gnunet             |                          []                       |  1
-     gnunet-gtk         | []                 []    []                       |  5
-     gnutls             | []                       []      []               | 10
-     gold               |                          []                       |  4
-     gpe-aerial         | []                       []      []               | 18
-     gpe-beam           | []                       []      []               | 19
-     gpe-bluetooth      | []                       []      []               | 13
-     gpe-calendar       | []                       []  []  []               | 12
-     gpe-clock          | []                 []    []  []  []               | 28
-     gpe-conf           | []                       []  []  []               | 20
-     gpe-contacts       | []                       []      []               | 17
-     gpe-edit           | []                       []      []               | 12
-     gpe-filemanager    | []                       []  []  []               | 16
-     gpe-go             | []                 []    []  []  []               | 25
-     gpe-login          | []                       []      []               | 11
-     gpe-ownerinfo      | []                 []    []      []          []   | 25
-     gpe-package        | []                       []      []               | 13
-     gpe-sketchbook     | []                       []      []               | 20
-     gpe-su             | []                 []    []  []  []               | 30
-     gpe-taskmanager    | []                 []    []  []  []               | 29
-     gpe-timesheet      | []                 []    []      []          []   | 25
-     gpe-today          | []                 []    []  []  []          []   | 30
-     gpe-todo           | []                       []  []  []               | 17
-     gphoto2            | []                    [] []      []          []   | 24
-     gprof              | []                 []    []                       | 15
-     gpsdrive           | []                       []      []               | 11
-     gramadoir          | []                       []      []               | 11
-     grep               |                 []       []      []               | 10
-     grub               | []                       []      []               | 14
-     gsasl              | []                       []      []          []   | 14
-     gss                | []                       []      []               | 11
-     gst-plugins-bad    | []                 []    []      []               | 22
-     gst-plugins-base   | []                 [] [] []      []               | 24
-     gst-plugins-good   | []                 [] [] []      []               | 25
-     gst-plugins-ugly   | []                 [] [] []      []               | 29
-     gstreamer          | []                    [] []      []               | 22
-     gtick              |                       [] []      []               | 13
-     gtkam              | []                       []      []               | 20
-     gtkorphan          | []                       []      []               | 14
-     gtkspell           | []              [] [] [] []  []  []    []    []   | 45
-     gutenprint         | []                                                | 10
-     hello              | []              [] []    []      []          []   | 21
-     help2man           | []                       []                       |  7
-     hylafax            |                          []                       |  5
-     idutils            | []                 []    []      []               | 17
-     indent             | []                 [] [] []      []          []   | 30
-     iso_15924          |                 ()    [] ()      []          []   | 16
-     iso_3166           | []        []    () [] [] ()  []  []    []    ()   | 53
-     iso_3166_2         |                 ()    [] ()      []               |  9
-     iso_4217           | []              () [] [] ()      []    []         | 26
-     iso_639            | []     [] []    ()    [] ()  []  []    []    []   | 38
-     iso_639_3          |        []                ()                       |  8
-     jwhois             | []                 []    []      []          []   | 16
-     kbd                | []                 [] [] []      []               | 15
-     keytouch           | []                       []      []               | 16
-     keytouch-editor    | []                       []      []               | 14
-     keytouch-keyboa... | []                       []      []               | 14
-     klavaro            |                          []                       | 11
-     latrine            |                    []    []      []               | 10
-     ld                 | []                 []    []                  []   | 11
-     leafpad            | []                 [] [] []      []          []   | 33
-     libc               | []                 []    []      []          []   | 21
-     libexif            |                          []      ()               |  6
-     libextractor       |                          []                       |  1
-     libgnutls          | []                       []      []               |  9
-     libgpewidget       | []                       []      []               | 14
-     libgpg-error       | []                       []      []               |  9
-     libgphoto2         |                       [] []                       |  8
-     libgphoto2_port    | []                    [] []                  []   | 13
-     libgsasl           | []                       []      []               | 13
-     libiconv           | []                       []  []  []               | 21
-     libidn             | ()                       []      []               | 11
-     lifelines          | []                                                |  4
-     liferea            | []                 []            []               | 21
-     lilypond           |                          []                       |  7
-     linkdr             | []                 []    []      []          []   | 17
-     lordsawar          |                                                   |  1
-     lprng              |                          []                       |  3
-     lynx               | []                 [] [] []                       | 17
-     m4                 | []                       []      []          []   | 19
-     mailfromd          |                       [] []                       |  3
-     mailutils          |                          []                       |  5
-     make               | []                 []    []      []               | 21
-     man-db             | []                       []      []               |  8
-     man-db-manpages    |                                                   |  4
-     minicom            | []                       []                       | 16
-     mkisofs            |                          []      []               |  9
-     myserver           |                                                   |  0
-     nano               | []                       []      []          []   | 21
-     opcodes            | []                 []    []                       | 11
-     parted             | []                 [] [] []                  []   | 15
-     pies               |                       [] []                       |  3
-     popt               | []              [] []    []      []          []   | 27
-     psmisc             | []                       []                       | 11
-     pspp               |                                                   |  4
-     pwdutils           | []                       []                       |  6
-     radius             |                       [] []                       |  9
-     recode             | []                 []    []      []               | 28
-     rosegarden         | ()                                                |  0
-     rpm                | []                       []                  []   | 11
-     rush               |                       [] []                       |  4
-     sarg               |                                                   |  1
-     screem             |                          []                       |  3
-     scrollkeeper       | []                 [] [] []                  []   | 27
-     sed                | []                 []    []      []          []   | 30
-     sharutils          | []                 []    []      []          []   | 22
-     shishi             |                          []                       |  3
-     skencil            | []                       []                       |  7
-     solfege            | []                 []    []      []               | 16
-     solfege-manual     |                    []                             |  8
-     soundtracker       | []                 []    []                       |  9
-     sp                 |                    []                             |  3
-     sysstat            |                          []      []               | 15
-     tar                | []                 [] [] []      []          []   | 23
-     texinfo            | []                 []    []      []               | 16
-     tin                |                                                   |  4
-     unicode-han-tra... |                                                   |  0
-     unicode-transla... |                                                   |  2
-     util-linux-ng      | []                 [] [] []                       | 20
-     vice               | ()                 ()                             |  1
-     vmm                |                          []                       |  4
-     vorbis-tools       |                          []                       |  6
-     wastesedge         |                                                   |  2
-     wdiff              | []                       []                       |  7
-     wget               | []                 []    []      []          []   | 26
-     wyslij-po          |                       [] []                       |  8
-     xchat              | []              []    [] []      []          []   | 36
-     xdg-user-dirs      | []     []       [] [] [] []      []    []    []   | 60
-     xkeyboard-config   | []                 [] [] []                       | 25
-                        +---------------------------------------------------+
-       84 teams           sv  sw ta te tg th tr uk vi  wa zh_CN zh_HK zh_TW
-      178 domains         119  1  3  2  0 10 66 50 155 17  97     7    41    2610
-
-   Some counters in the preceding matrix are higher than the number of
-visible blocks let us expect.  This is because a few extra PO files are
-used for implementing regional variants of languages, or language
-dialects.
-
-   For a PO file in the matrix above to be effective, the package to
-which it applies should also have been internationalized and
-distributed as such by its maintainer.  There might be an observable
-lag between the mere existence a PO file and its wide availability in a
-distribution.
-
-   If May 2010 seems to be old, you may fetch a more recent copy of
-this `ABOUT-NLS' file on most GNU archive sites.  The most up-to-date
-matrix with full percentage details can be found at
-`http://translationproject.org/extra/matrix.html'.
-
-1.6 Using `gettext' in new packages
-===================================
-
-If you are writing a freely available program and want to
-internationalize it you are welcome to use GNU `gettext' in your
-package.  Of course you have to respect the GNU Library General Public
-License which covers the use of the GNU `gettext' library.  This means
-in particular that even non-free programs can use `libintl' as a shared
-library, whereas only free software can use `libintl' as a static
-library or use modified versions of `libintl'.
-
-   Once the sources are changed appropriately and the setup can handle
-the use of `gettext' the only thing missing are the translations.  The
-Free Translation Project is also available for packages which are not
-developed inside the GNU project.  Therefore the information given above
-applies also for every other Free Software Project.  Contact
-`coordinator at translationproject.org' to make the `.pot' files available
-to the translation teams.
-

Deleted: vendor/xz/5.2.3/COPYING.GPLv2
===================================================================
--- vendor/xz/dist/COPYING.GPLv2	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/COPYING.GPLv2	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,339 +0,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    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 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, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.

Deleted: vendor/xz/5.2.3/COPYING.GPLv3
===================================================================
--- vendor/xz/dist/COPYING.GPLv3	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/COPYING.GPLv3	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    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 <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.

Deleted: vendor/xz/5.2.3/COPYING.LGPLv2.1
===================================================================
--- vendor/xz/dist/COPYING.LGPLv2.1	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/COPYING.LGPLv2.1	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,504 +0,0 @@
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-

-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-

-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-

-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-

-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-

-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-

-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-

-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-

-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-

-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library 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 of the License, or (at your option) any later version.
-
-    This library 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 library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-

Deleted: vendor/xz/5.2.3/ChangeLog
===================================================================
--- vendor/xz/dist/ChangeLog	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/ChangeLog	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,12286 +0,0 @@
-commit 265e5ffb70d9c175b424621576294d28807efd9b
-Author: Adrien Nader <adrien at notk.org>
-Date:   2014-12-21 15:56:15 +0100
-
-    po/fr: improve wording for help for --lzma1/--lzma2.
-
- po/fr.po | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 3dfa915cd16c638ef077d216fd8b6d95340b15a8
-Author: Adrien Nader <adrien at notk.org>
-Date:   2014-12-21 15:55:48 +0100
-
-    po/fr: missing line in translation of --extreme.
-
- po/fr.po | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 6b65e84bd4d5e51918772df539923e64860f0097
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-12-21 14:07:54 +0200
-
-    xz: Fix a comment.
-
- src/xz/options.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-commit 4da8e1d83388f419258e328563e69b9bf215a789
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-12-21 13:50:08 +0200
-
-    Bump version and soname for 5.0.8.
-
- src/liblzma/Makefile.am        | 2 +-
- src/liblzma/api/lzma/version.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-commit f6dc9996b0f3e4d20b138285e5e8829a7a1dbd78
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-12-21 13:48:45 +0200
-
-    Update NEWS for 5.0.8.
-
- NEWS | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-commit 67d62a375aa0ea70e826f7aadad818041394222d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-12-20 20:49:49 +0200
-
-    Translations: Update the French translation.
-    
-    Thanks to Adrien Nader.
-
- po/fr.po | 209 ++++++++++++++++++++++++++++-----------------------------------
- 1 file changed, 93 insertions(+), 116 deletions(-)
-
-commit 283c03fe5b991a6d2ab912c522044c63c2ea2d05
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-12-18 21:33:33 +0200
-
-    Update THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 0c7fe9f227719dcfef0394a94002f20a73dde50e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-11-28 20:07:18 +0200
-
-    Update INSTALL about a "make check" failure in test_scripts.sh.
-
- INSTALL | 24 +++++++++++++++++-------
- 1 file changed, 17 insertions(+), 7 deletions(-)
-
-commit b46fe3ced9889bc79ed272b106a8a454eba9a40e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-11-17 19:11:49 +0200
-
-    Build: Update m4/ax_pthread.m4 from Autoconf Archive.
-
- m4/ax_pthread.m4 | 71 +++++++++++++++++++++++++++++++++++++-------------------
- 1 file changed, 47 insertions(+), 24 deletions(-)
-
-commit 6ed0554a154b6314531cfb75aeff6b621035423f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-12-18 21:27:35 +0200
-
-    Build: Replace obsolete AC_HELP_STRING with AS_HELP_STRING.
-
- configure.ac | 34 +++++++++++++++++-----------------
- 1 file changed, 17 insertions(+), 17 deletions(-)
-
-commit 0ab300ec5240862c025dc3d313e10e69dbc69279
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-12-18 21:26:20 +0200
-
-    Build: Fix Autoconf warnings about escaped backquotes.
-
- configure.ac | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-commit b274ad02c4b8c45d3707a148a73b520b77519840
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-10-09 19:42:26 +0300
-
-    Update THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 4fdcccd85e140acd99a1ef4684cd3a1957380376
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-10-09 19:41:51 +0300
-
-    Add support for AmigaOS/AROS to tuklib_physmem().
-    
-    Thanks to Fredrik Wikstrom.
-
- m4/tuklib_physmem.m4        | 3 ++-
- src/common/tuklib_physmem.c | 7 +++++++
- 2 files changed, 9 insertions(+), 1 deletion(-)
-
-commit f229fa32bf70bf9b109864d216719371af108364
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-10-09 18:42:14 +0300
-
-    xzgrep: Avoid passing both -q and -l to grep.
-    
-    The behavior of grep -ql varies:
-      - GNU grep behaves like grep -q.
-      - OpenBSD grep behaves like grep -l.
-    
-    POSIX doesn't make it 100 % clear what behavior is expected.
-    Anyway, using both -q and -l at the same time makes no sense
-    so both options simply should never be used at the same time.
-    
-    Thanks to Christian Weisgerber.
-
- src/scripts/xzgrep.in | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-commit 94a1a869ee1b8b854592327e04decd6f8441aaf5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-09-25 18:38:48 +0300
-
-    Build: Detect supported compiler warning flags better.
-    
-    Clang and nowadays also GCC accept any -Wfoobar option
-    but then may give a warning that an unknown warning option
-    was specified. To avoid adding unsupported warning options,
-    the options are now tested with -Werror.
-    
-    Thanks to Charles Diza.
-
- configure.ac | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-commit 0e50ad7129910f9a4c16d0c447eb9e073f367917
-Author: Andre Noll <maan at tuebingen.mpg.de>
-Date:   2014-10-14 17:30:30 +0200
-
-    l10n: de.po: Change translator email address.
-    
-    Although the old address is still working, the new one should
-    be preferred. So this commit changes all three places in de.po
-    accordingly.
-    
-    Signed-off-by: Andre Noll <maan at tuebingen.mpg.de>
-
- po/de.po | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-commit 9fd333d742427d5067ae6a77ac4b2f69546dc31b
-Author: Andre Noll <maan at tuebingen.mpg.de>
-Date:   2014-10-14 17:30:28 +0200
-
-    l10n: de.po: Fix typo: Schießen -> Schließen.
-    
-    That's a funny one since "schießen" means to shoot :)
-    
-    Signed-off-by: Andre Noll <maan at systemlinux.org>
-
- po/de.po | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 495aaf3a5b7200a5d2bf449bbbcc0e18834607af
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-09-20 20:44:32 +0300
-
-    Bump version and soname for 5.0.7.
-
- src/liblzma/Makefile.am        | 2 +-
- src/liblzma/api/lzma/version.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-commit ac6c8921d1d8d2d749d5c97f9a0b0594cc863cea
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-09-20 20:43:29 +0300
-
-    Update NEWS for 5.0.7.
-
- NEWS | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-commit d1b0276aafd441a3d4db9dfd5dd9880e9f834d49
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-09-20 20:21:18 +0300
-
-    liblzma: Fix invalid Libs.private value in liblzma.pc.
-
- src/liblzma/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit cac72956b1e56788182ac14bfb25519636afd503
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-09-20 19:42:56 +0300
-
-    liblzma: Fix a portability problem in Makefile.am.
-    
-    POSIX supports $< only in inference rules (suffix rules).
-    Using it elsewhere is a GNU make extension and doesn't
-    work e.g. with OpenBSD make.
-    
-    Thanks to Christian Weisgerber for the patch.
-
- src/liblzma/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 2cdf0875dedca3e89b02ad5ac8aa1109f902ae11
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-09-14 19:35:45 +0300
-
-    Bump version and soname for 5.0.6.
-
- src/liblzma/Makefile.am        | 2 +-
- src/liblzma/api/lzma/version.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-commit 0168b6c8fbc88cae61b1f5fb41d6c33c9e127967
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-09-14 19:33:46 +0300
-
-    Update NEWS for 5.0.6.
-
- NEWS | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-commit 13337714e89d002af7af48d6853f977de985d7de
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-06-13 19:21:54 +0300
-
-    xzgrep: List xzgrep_expected_output in tests/Makefile.am.
-
- tests/Makefile.am | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-commit ccc728d8290c0464c7af62790b1c5528eceaae35
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-06-13 18:58:22 +0300
-
-    xzgrep: Improve the test script.
-    
-    Now it should be close to the functionality of the original
-    version by Pavel Raiskup.
-
- tests/Makefile.am            |  3 ++-
- tests/test_scripts.sh        | 24 ++++++++++++++----------
- tests/xzgrep_expected_output | 39 +++++++++++++++++++++++++++++++++++++++
- 3 files changed, 55 insertions(+), 11 deletions(-)
-
-commit 948f5865fe65061e215baa8ed63be570bae152ea
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-06-11 21:03:25 +0300
-
-    xzgrep: Add a test for the previous fix.
-    
-    This is a simplified version of Pavel Raiskup's
-    original patch.
-
- tests/test_scripts.sh | 26 ++++++++++++++++++++++----
- 1 file changed, 22 insertions(+), 4 deletions(-)
-
-commit 64228d0d5cd75af31e5c330cc3a792016413fabf
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-06-11 20:43:28 +0300
-
-    xzgrep: exit 0 when at least one file matches.
-    
-    Mimic the original grep behavior and return exit_success when
-    at least one xz compressed file matches given pattern.
-    
-    Original bugreport:
-    https://bugzilla.redhat.com/show_bug.cgi?id=1108085
-    
-    Thanks to Pavel Raiskup for the patch.
-
- src/scripts/xzgrep.in | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-commit 98d3368ef4bff0face78d6932f2156730c8cb658
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-04-25 17:53:42 +0300
-
-    Build: Fix the combination of --disable-xzdec --enable-lzmadec.
-    
-    In this case "make install" could fail if the man page directory
-    didn't already exist at the destination. If it did exist, a
-    dangling symlink was created there. Now the link is omitted
-    instead. This isn't the best fix but it's better than the old
-    behavior.
-
- src/xzdec/Makefile.am | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-commit ba3b5dd082db2cb5973e877a74221d739c663fb4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-04-25 17:44:26 +0300
-
-    Build: Add --disable-doc to configure.
-
- INSTALL      | 6 ++++++
- Makefile.am  | 2 ++
- configure.ac | 6 ++++++
- 3 files changed, 14 insertions(+)
-
-commit 3d4575f2367fe8f1f2dcacba014e6c0aef388535
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-04-24 18:06:24 +0300
-
-    Update INSTALL.
-    
-    Add a note about failing "make check". The source of
-    the problem should be fixed in libtool (if it really is
-    a libtool bug and not mine) but I'm unable to spend time
-    on that for now. Thanks to Nelson H. F. Beebe for reporting
-    the issue.
-    
-    Add a note about a possible need to run "ldconfig" after
-    "make install".
-
- INSTALL | 25 +++++++++++++++++++++++++
- 1 file changed, 25 insertions(+)
-
-commit b9f0584e3eff421eadbb6604de0b0b40bf87e129
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-04-09 17:26:10 +0300
-
-    xz: Rename a variable to avoid a namespace collision on Solaris.
-    
-    I don't know the details but I have an impression that there's
-    no problem in practice if using GCC since people have built xz
-    with GCC (without patching xz), but renaming the variable cannot
-    hurt either.
-    
-    Thanks to Mark Ashley.
-
- src/xz/signals.c | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-commit cc41bcaf77c9c27ec09ef033fb3300e994e828e6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-04-26 08:45:49 +0300
-
-    xz: Fix a comment.
-
- src/xz/coder.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-commit e34025d666852839388f997d076e3577847dd10f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-01-12 16:44:52 +0200
-
-    liblzma: Avoid C99 compound literal arrays.
-    
-    MSVC 2013 doesn't like them. Maybe they aren't so good
-    for readability either since many aren't used to them.
-
- src/liblzma/lzma/lzma_encoder_presets.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-commit 0b6168974f1fac3a06157039235b66e4161b9b42
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-01-12 12:50:30 +0200
-
-    liblzma: Remove a useless C99ism from sha256.c.
-    
-    Unsurprisingly it makes no difference in compiled output.
-
- src/liblzma/check/sha256.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 41e436076cfdcccc7e853de73b0d56b3d6d42053
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-01-12 12:17:08 +0200
-
-    xz: Fix use of wrong variable.
-    
-    Since the only call to suffix_set() uses optarg
-    as the argument, fixing this bug doesn't change
-    the behavior of the program.
-
- src/xz/suffix.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit c33efefd4ef0931e5795e13725d4bd2203571ce0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2014-04-26 08:37:00 +0300
-
-    Fix typos in comments.
-
- src/liblzma/check/crc32_fast.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit e560c82f1f5693d88db9dc71f656436135f17595
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-11-26 18:20:16 +0200
-
-    Update THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 05192b32e553eac5dfbd646b6102d10187f29a05
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-11-26 18:20:09 +0200
-
-    liblzma: Document the need for block->check for lzma_block_header_decode().
-    
-    Thanks to Tomer Chachamu.
-
- src/liblzma/api/lzma/block.h | 3 +++
- 1 file changed, 3 insertions(+)
-
-commit 0f35eafe51db7b1eb0711bc8cc829ea6896b34f4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-10-26 12:47:04 +0300
-
-    Update TODO.
-
- TODO | 4 ----
- 1 file changed, 4 deletions(-)
-
-commit fc9eaf81d718488b052e5c65f9d6f08acc858873
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-09-11 14:40:35 +0300
-
-    Build: Remove a comment about Automake 1.10 from configure.ac.
-    
-    The previous commit supports silent rules and that requires
-    Automake 1.11.
-
- configure.ac | 2 --
- 1 file changed, 2 deletions(-)
-
-commit 090c69dda59e00fc86d0792879bd921bb1156029
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-09-09 20:37:03 +0300
-
-    Build: Create liblzma.pc in a src/liblzma/Makefile.am.
-    
-    Previously it was done in configure, but doing that goes
-    against the Autoconf manual. Autoconf requires that it is
-    possible to override e.g. prefix after running configure
-    and that doesn't work correctly if liblzma.pc is created
-    by configure.
-    
-    A potential downside of this change is that now e.g.
-    libdir in liblzma.pc is a standalone string instead of
-    being defined via ${prefix}, so if one overrides prefix
-    when running pkg-config the libdir won't get the new value.
-    I don't know if this matters in practice.
-    
-    Thanks to Vincent Torri.
-
- configure.ac            |  1 -
- src/liblzma/Makefile.am | 20 ++++++++++++++++++++
- 2 files changed, 20 insertions(+), 1 deletion(-)
-
-commit 1f35331332273de01c46897cafdb37f8e6e285db
-Author: Anders F Bjorklund <afb at users.sourceforge.net>
-Date:   2013-08-02 15:59:46 +0200
-
-    macosx: separate liblzma package
-
- macosx/build.sh | 23 +++++++++++++++--------
- 1 file changed, 15 insertions(+), 8 deletions(-)
-
-commit 1415f1d94644f28e07d544bc1e06b0636081abee
-Author: Anders F Bjorklund <afb at users.sourceforge.net>
-Date:   2013-08-02 15:58:44 +0200
-
-    macosx: set minimum to leopard
-
- macosx/build.sh | 13 ++++++++-----
- 1 file changed, 8 insertions(+), 5 deletions(-)
-
-commit 41913949b93414a21ae9fb1a8e9b7cdde8b37f98
-Author: Anders F Bjorklund <afb at users.sourceforge.net>
-Date:   2011-08-07 13:13:30 +0200
-
-    move configurables into variables
-
- macosx/build.sh | 25 ++++++++++++++++++-------
- 1 file changed, 18 insertions(+), 7 deletions(-)
-
-commit 3dffda33f47dc220bb1738564fe02effa9da4c8e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-07-15 14:08:02 +0300
-
-    Build: Fix the detection of missing CRC32.
-    
-    Thanks to Vincent Torri.
-
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit b69900ed0b2f914fc6c0a180dcb522dbe5b80ea7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-06-30 18:02:27 +0300
-
-    Man pages: Use similar syntax for synopsis as in xz.
-    
-    The man pages of lzmainfo, xzmore, and xzdec had similar
-    constructs as the man page of xz had before the commit
-    eb6ca9854b8eb9fbf72497c1cf608d6b19d2d494. Eric S. Raymond
-    didn't mention these man pages in his bug report, but
-    it's nice to be consistent.
-
- src/lzmainfo/lzmainfo.1 |  4 ++--
- src/scripts/xzmore.1    |  6 +++---
- src/xzdec/xzdec.1       | 10 +++++-----
- 3 files changed, 10 insertions(+), 10 deletions(-)
-
-commit cf4a1e1879d89be314ef3c064bd2656ea452f87e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-06-30 15:55:09 +0300
-
-    Update NEWS for 5.0.5.
-
- NEWS | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 52 insertions(+)
-
-commit cb94bb6d1f34e1e93c2d634ea9c3b7dfb3981d05
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-06-30 15:54:38 +0300
-
-    Bump version and soname for 5.0.5.
-
- src/liblzma/Makefile.am        | 2 +-
- src/liblzma/api/lzma/version.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-commit b7dee202d5b041ccae028d0c5433b83cecbe9e5d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-06-28 23:56:17 +0300
-
-    xz: Fix return value type in io_write_buf().
-    
-    It didn't affect the behavior of the code since -1
-    becomes true anyway.
-
- src/xz/file_io.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 265e7b44d804b47373f10b7da28350db7611cea6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-06-28 18:46:13 +0300
-
-    xz: Remove an outdated NetBSD-specific comment.
-    
-    Nowadays errno == EFTYPE is documented in open(2).
-
- src/xz/file_io.c | 4 ----
- 1 file changed, 4 deletions(-)
-
-commit 78c2f8db902195468b8249c432252a6b281db836
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-06-28 18:09:47 +0300
-
-    xz: Fix error detection of fcntl(fd, F_SETFL, flags) calls.
-    
-    POSIX says that fcntl(fd, F_SETFL, flags) returns -1 on
-    error and "other than -1" on success. This is how it is
-    documented e.g. on OpenBSD too. On Linux, success with
-    F_SETFL is always 0 (at least accorinding to fcntl(2)
-    from man-pages 3.51).
-
- src/xz/file_io.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-commit 91750dff8f2c654ff636f12a2acdffe5492374b3
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-06-28 17:36:47 +0300
-
-    xz: Fix use of wrong variable in a fcntl() call.
-    
-    Due to a wrong variable name, when writing a sparse file
-    to standard output, *all* file status flags were cleared
-    (to the extent the operating system allowed it) instead of
-    only clearing the O_APPEND flag. In practice this worked
-    fine in the common situations on GNU/Linux, but I didn't
-    check how it behaved elsewhere.
-    
-    The original flags were still restored correctly. I still
-    changed the code to use a separate boolean variable to
-    indicate when the flags should be restored instead of
-    relying on a special value in stdout_flags.
-
- src/xz/file_io.c | 24 +++++++++++++-----------
- 1 file changed, 13 insertions(+), 11 deletions(-)
-
-commit e11888a79a4a77a69afde60445880d44f63d01aa
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-06-26 13:30:57 +0300
-
-    xz: Check the value of lzma_stream_flags.version in --list.
-    
-    It is a no-op for now, but if an old xz version is used
-    together with a newer liblzma that supports something new,
-    then this check becomes important and will stop the old xz
-    from trying to parse files that it won't understand.
-
- src/xz/list.c | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-commit f39ddd88f3222219ada88998cf30abfdd3e0e96c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-06-26 12:17:00 +0300
-
-    Build: Require Automake 1.12 and use serial-tests option.
-    
-    It should actually still work with Automake 1.10 if
-    the serial-tests option is removed. Automake 1.13 started
-    using parallel tests by default and the option to get
-    the old behavior isn't supported before 1.12.
-    
-    At least for now, parallel tests don't improve anything
-    in XZ Utils but they hide the progress output from
-    test_compress.sh.
-
- configure.ac | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-commit cb84e278027a90e9827a6f4d3bb0b4d4744a2fbb
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-06-23 17:36:47 +0300
-
-    xz: Validate Uncompressed Size from Block Header in list.c.
-    
-    This affects only "xz -lvv". Normal decompression with xz
-    already detected if Block Header and Index had mismatched
-    Uncompressed Size fields. So this just makes "xz -lvv"
-    show such files as corrupt instead of showing the
-    Uncompressed Size from Index.
-
- src/xz/list.c | 14 +++++++++++++-
- 1 file changed, 13 insertions(+), 1 deletion(-)
-
-commit f01780fce454c7489f7dcbf806299b50da5f51b7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-06-26 10:58:58 +0300
-
-    Update THANKS.
-
- THANKS | 2 ++
- 1 file changed, 2 insertions(+)
-
-commit d98ede7d700b892e32d9c2f46563b6ebc566786d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-06-21 22:04:45 +0300
-
-    xz: Make the man page more friendly to doclifter.
-    
-    Thanks to Eric S. Raymond.
-
- src/xz/xz.1 | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-commit 19b447b64b3f520cd5b11429000b092f7c76709b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-06-21 21:54:59 +0300
-
-    xz: A couple of man page fixes.
-    
-    Now the interaction of presets and custom filter chains
-    is described correctly. Earlier it contradicted itself.
-    
-    Thanks to DevHC who reported these issues on IRC to me
-    on 2012-12-14.
-
- src/xz/xz.1 | 35 +++++++++++++++++++++++------------
- 1 file changed, 23 insertions(+), 12 deletions(-)
-
-commit 45edf2966fc9a4d2eae8f84b2fa027fb4fa1df8b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-06-21 21:50:26 +0300
-
-    xz: Fix interaction between preset and custom filter chains.
-    
-    There was somewhat illogical behavior when --extreme was
-    specified and mixed with custom filter chains.
-    
-    Before this commit, "xz -9 --lzma2 -e" was equivalent
-    to "xz --lzma2". After it is equivalent to "xz -6e"
-    (all earlier preset options get forgotten when a custom
-    filter chain is specified and the default preset is 6
-    to which -e is applied). I find this less illogical.
-    
-    This also affects the meaning of "xz -9e --lzma2 -7".
-    Earlier it was equivalent to "xz -7e" (the -e specified
-    before a custom filter chain wasn't forgotten). Now it
-    is "xz -7". Note that "xz -7e" still is the same as "xz -e7".
-    
-    Hopefully very few cared about this in the first place,
-    so pretty much no one should even notice this change.
-    
-    Thanks to Conley Moorhous.
-
- src/xz/coder.c | 35 +++++++++++++++++++++--------------
- 1 file changed, 21 insertions(+), 14 deletions(-)
-
-commit b065984e5a9272eb50bc0c6d3731e6199c0ae8a8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 32be621f52f2e1686db88baa7b01dc1ae338f426
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-04-27 22:07:46 +0300
-
-    Build: Use -Wvla with GCC if supported.
-    
-    Variable-length arrays are mandatory in C99 but optional in C11.
-    The code doesn't currently use any VLAs and it shouldn't in the
-    future either to stay compatible with C11 without requiring any
-    optional C11 features.
-
- configure.ac | 1 +
- 1 file changed, 1 insertion(+)
-
-commit efb07cfba65e9e05984c02cd796c1b0338ce04dc
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-04-15 19:29:09 +0300
-
-    xzdec: Improve the --help message.
-    
-    The options are now ordered in the same order as in xz's help
-    message.
-    
-    Descriptions were added to the options that are ignored.
-    I left them in parenthesis even if it looks a bit weird
-    because I find it easier to spot the ignored vs. non-ignored
-    options from the list that way.
-
- src/xzdec/xzdec.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-commit e3c8be13699e2813f5e2879d8187444b46d82d89
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-04-05 19:25:40 +0300
-
-    Update THANKS.
-
- THANKS | 2 ++
- 1 file changed, 2 insertions(+)
-
-commit ad8282efe483612f6b5544f9a0d2e4914fb2532a
-Author: Jeff Bastian <jbastian at redhat.com>
-Date:   2013-04-03 13:59:17 +0200
-
-    xzgrep: make the '-h' option to be --no-filename equivalent
-    
-    * src/scripts/xzgrep.in: Accept the '-h' option in argument parsing.
-
- src/scripts/xzgrep.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 9271a3eb0e022b23e8712154be851d0afe4c02e4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-04-05 19:34:09 +0300
-
-    liblzma: Be less picky in lzma_alone_decoder().
-    
-    To avoid false positives when detecting .lzma files,
-    rare values in dictionary size and uncompressed size fields
-    were rejected. They will still be rejected if .lzma files
-    are decoded with lzma_auto_decoder(), but when using
-    lzma_alone_decoder() directly, such files will now be accepted.
-    Hopefully this is an OK compromise.
-    
-    This doesn't affect xz because xz still has its own file
-    format detection code. This does affect lzmadec though.
-    So after this commit lzmadec will accept files that xz or
-    xz-emulating-lzma doesn't.
-    
-    NOTE: lzma_alone_decoder() still won't decode all .lzma files
-    because liblzma's LZMA decoder doesn't support lc + lp > 4.
-    
-    Reported here:
-    http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/7068827
-    
-    Conflicts:
-    	src/liblzma/common/alone_decoder.c
-    	src/liblzma/common/alone_decoder.h
-
- src/liblzma/common/alone_decoder.c | 22 ++++++++++++++--------
- src/liblzma/common/alone_decoder.h |  5 +++--
- src/liblzma/common/auto_decoder.c  |  2 +-
- 3 files changed, 18 insertions(+), 11 deletions(-)
-
-commit 211b931cee58626c1d2e021810cb108cb5cbc10f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2013-03-05 19:14:50 +0200
-
-    Avoid unneeded use of awk in xzless.
-    
-    Use "read" instead of "awk" in xzless to get the version
-    number of "less". The need for awk was introduced in
-    the commit db5c1817fabf7cbb9e4087b1576eb26f0747338e.
-    
-    Thanks to Ariel P for the patch.
-
- src/scripts/xzless.in | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-commit 9f62fd9605eade23b62b07a235d1f02156f7a5c6
-Author: Jonathan Nieder <jrnieder at gmail.com>
-Date:   2012-11-19 00:10:10 -0800
-
-    xzless: Make "less -V" parsing more robust
-    
-    In v4.999.9beta~30 (xzless: Support compressed standard input,
-    2009-08-09), xzless learned to parse ‘less -V’ output to figure out
-    whether less is new enough to handle $LESSOPEN settings starting
-    with “|-”.  That worked well for a while, but the version string from
-    ‘less’ versions 448 (June, 2012) is misparsed, producing a warning:
-    
-    	$ xzless /tmp/test.xz; echo $?
-    	/usr/bin/xzless: line 49: test: 456 (GNU regular expressions): \
-    	integer expression expected
-    	0
-    
-    More precisely, modern ‘less’ lists the regexp implementation along
-    with its version number, and xzless passes the entire version number
-    with attached parenthetical phrase as a number to "test $a -gt $b",
-    producing the above confusing message.
-    
-    	$ less-444 -V | head -1
-    	less 444
-    	$ less -V | head -1
-    	less 456 (no regular expressions)
-    
-    So relax the pattern matched --- instead of expecting "less <number>",
-    look for a line of the form "less <number>[ (extra parenthetical)]".
-    While at it, improve the behavior when no matching line is found ---
-    instead of producing a cryptic message, we can fall back on a LESSPIPE
-    setting that is supported by all versions of ‘less’.
-    
-    The implementation uses "awk" for simplicity.  Hopefully that’s
-    portable enough.
-    
-    Reported-by: Jörg-Volker Peetz <jvpeetz at web.de>
-    Signed-off-by: Jonathan Nieder <jrnieder at gmail.com>
-
- src/scripts/xzless.in | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-commit 1d05980f5b5c2c94d833001daccacce4a466876e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-10-03 15:54:24 +0300
-
-    xz: Fix the note about --rsyncable on the man page.
-
- src/xz/xz.1 | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
-
-commit fb68497333598688d309a92838d91fd560f7e9f0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-09-28 20:11:09 +0300
-
-    xz: Improve handling of failed realloc in xrealloc.
-    
-    Thanks to Jim Meyering.
-
- src/xz/util.c | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
-
-commit 75013db6d4d63c195bd8b8d45729b4be0665a812
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-12-15 20:01:02 +0200
-
-    A few typo fixes to comments and the xz man page.
-    
-    Thanks to Jim Meyering.
-
- configure.ac               | 2 +-
- src/liblzma/check/sha256.c | 1 -
- src/xz/xz.1                | 4 ++--
- 3 files changed, 3 insertions(+), 4 deletions(-)
-
-commit e44b21839b1dcbac5097be39b87dd2ddb6e114fd
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-08-02 17:13:30 +0300
-
-    Build: Bump gettext version requirement to 0.18.
-    
-    Otherwise too old version of m4/lib-link.m4 gets included
-    when autoreconf -fi is run.
-
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit fd3dbb23ca7e75a7a888d7e897c381dc06308307
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-07-05 07:36:28 +0300
-
-    Tests: Remove tests/test_block.c that had gotten committed accidentally.
-
- tests/test_block.c | 52 ----------------------------------------------------
- 1 file changed, 52 deletions(-)
-
-commit 05a735d279d74af437c31f25f69aded4713c1a3d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-07-05 07:33:35 +0300
-
-    Build: Include macosx/build.sh in the distribution.
-    
-    It has been in the Git repository since 2010 but probably
-    few people have seen it since it hasn't been included in
-    the release tarballs. :-(
-
- Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 4e6d62793b5e7b87edcc93c7ded072c1ecd94173
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-07-05 07:24:45 +0300
-
-    Docs: Fix the name LZMA Utils -> XZ Utils in debug/README.
-
- debug/README | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit dd95b5e7614baf1f07a1316b5106bd616a9efa79
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-07-05 07:23:17 +0300
-
-    Include debug/translation.bash in the distribution.
-    
-    Also fix the script name mentioned in README.
-
- README            | 4 ++--
- debug/Makefile.am | 3 +++
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-commit 20778053a07eb90c159c1377ca8dc05a90fd530b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-06-22 14:36:16 +0300
-
-    xz: Update man page date to match the latest update.
-
- src/xz/xz.1 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 2cefa84af676da37d7e9c466d55d46c67ab00c22
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-06-22 10:25:43 +0300
-
-    Bump version and soname for 5.0.4.
-
- src/liblzma/Makefile.am        | 2 +-
- src/liblzma/api/lzma/version.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-commit 433fec191a17e45690809e54146ea7a773f54cff
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-06-22 10:25:09 +0300
-
-    Update NEWS for 5.0.4.
-
- NEWS | 25 +++++++++++++++++++------
- 1 file changed, 19 insertions(+), 6 deletions(-)
-
-commit 711fa680f552a4003df73b37e6dc4d6e00b47bcd
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-06-18 21:27:47 +0300
-
-    Docs: Language fix to 01_compress_easy.c.
-    
-    Thanks to Jonathan Nieder.
-
- doc/examples/01_compress_easy.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 3d7ab1dc61a75c560828be5df96598388b771456
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-06-14 20:15:30 +0300
-
-    Fix the top-level Makefile.am for the new example programs.
-
- Makefile.am | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-commit ef8b8e5f111469b5bc005975f7abb9abbd372b25
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 75c149bc8045a26f8bc719cb8ed20668dab79091
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 456307ebf947a5f50bd995d617b99c1215572308
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 9 insertions(+), 1 deletion(-)
-
-commit 4c310b8a29bc257e6ccbd2310f12f258678f3fef
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-05-31 15:53:25 +0300
-
-    Translations: Update the Italian translation.
-    
-    Thanks to Milo Casagrande.
-
- po/it.po | 311 ++++++++++++++++++++++++++++++---------------------------------
- 1 file changed, 146 insertions(+), 165 deletions(-)
-
-commit ec32b79366dc47a55ea877589df9e8509ba113a7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-05-30 23:15:07 +0300
-
-    Translations: Update the French translation.
-    
-    Thanks to Adrien Nader.
-
- po/fr.po | 237 +++++++++++++++++++++++++++++++--------------------------------
- 1 file changed, 118 insertions(+), 119 deletions(-)
-
-commit dd06f40e4dd7649525e4f28d890dc238a3aa37e5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-05-29 22:26:27 +0300
-
-    Translations: Update the German translation.
-
- po/de.po | 169 ++++++++++++++++++++++++++++++++++-----------------------------
- 1 file changed, 91 insertions(+), 78 deletions(-)
-
-commit c66808d1f55d0149ed57c536cc9b52e9c8b583bc
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-05-29 22:12:57 +0300
-
-    Translations: Update Polish translation.
-
- po/pl.po | 150 ++++++++++++++++++++++++++++++++++-----------------------------
- 1 file changed, 82 insertions(+), 68 deletions(-)
-
-commit 556c22dfed195c1466b298183b850d6c28544900
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-05-29 13:10:36 +0300
-
-    Preliminary NEWS for 5.0.4.
-
- NEWS | 24 ++++++++++++++++++++++++
- 1 file changed, 24 insertions(+)
-
-commit dd13b66bf582f49d3aec36e3410ff8541b7506da
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 a0223bf796fdaad51a11ad02c4195c694849cc78
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-05-28 15:38:32 +0300
-
-    Update THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 86e57e4bfefe3fd8e13615c41604165bb2359501
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 11 insertions(+), 1 deletion(-)
-
-commit 13e44a94da19d1ef14832ff12d3877a6fd2c54c0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 19 insertions(+)
-
-commit 2f90345e13ab8fea4de45a4f1caa73ebc63a62e7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 8d4864f53ffae5d862c691a0b334a6b69bc5366e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-05-10 21:15:17 +0300
-
-    Update THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 35e9c58abb0ce3993da844aaeaa3e7231cd2be8f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 532b3e4c568a228309b56f95c13435fd078dbe02
-Author: Benno Schulenberg <bensberg at justemail.net>
-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 <bensberg at justemail.net>
-
- AUTHORS         |  6 +++---
- README          | 42 ++++++++++++++++++++---------------------
- doc/faq.txt     | 24 ++++++++++++------------
- doc/history.txt | 58 ++++++++++++++++++++++++++++-----------------------------
- 4 files changed, 65 insertions(+), 65 deletions(-)
-
-commit afb6ce8c82ffef8f2505a3759da72a733c7b0b8f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-04-29 11:51:25 +0300
-
-    Windows: Update notes about static linking with MSVC.
-
- windows/README-Windows.txt | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-commit 7c3ba2ed5c3c878d4a14ca549b46dbff60c6d565
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 insertion(+), 5 deletions(-)
-
-commit f55db9c187651094f43881c49db2b2d9ffee6b80
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 203edff4c761dbd7cac76ea66e4eed501c23e7a3
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-04-19 13:58:55 +0300
-
-    Docs: Update MINIX 3 information in INSTALL.
-
- INSTALL | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-commit f0a8f95c215628967b7cf9bd9b0a9e4172f50bb4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-02-22 14:23:13 +0200
-
-    Update THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit b7ad23fa78646036c0290cd91eada939c9a31526
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+), 1 deletion(-)
-
-commit 4e19fbb04a0035030406482319e264426459eb24
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-02-22 12:08:43 +0200
-
-    Update THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit c6fa03a427e3d1320794102cee3ff4f5ae00eb36
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-05-24 18:47:52 +0300
-
-    Fix compiling with IBM XL C on AIX.
-
- INSTALL      | 36 ++++++++++++++++++++++--------------
- configure.ac |  6 +++++-
- 2 files changed, 27 insertions(+), 15 deletions(-)
-
-commit 7b6ffc98645e1b3b302b6680be0a901d1ebf7358
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2012-05-24 18:37:08 +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  | 309 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 310 insertions(+), 280 deletions(-)
-
-commit bfac2be5023994fcc53de2844e7dd3af61910dc2
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+), 1 deletion(-)
-
-commit df85e156716a4eecb7e2978691f03f729444d998
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-12-19 21:21:29 +0200
-
-    Docs: Explain the stable releases better in README.
-
- README | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-commit d06d32f108c8278c25c24b2e8666bda7b2ec23b5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 636fdcfbf542f1e84db2c4736004d84be4b12c84
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-11-03 17:08:02 +0200
-
-    Update THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 55fd02f83ecd6cbd6925a3e8a3d43b8d4ef2a17c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-11-03 17:07:22 +0200
-
-    xz: Fix xz on EBCDIC systems.
-    
-    Thanks to Chris Donawa.
-
- src/xz/coder.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-commit 4052f36053b931bad847a36aabf1a07d0034e297
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(-)
-
-commit 0f25758459c74c366a73f35d47ee12b75890bb79
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-08-09 21:19:13 +0300
-
-    Update THANKS.
-
- THANKS | 2 ++
- 1 file changed, 2 insertions(+)
-
-commit 70f03b51ffcb783646b20de8d97b6986c4280eec
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-08-09 21:16:44 +0300
-
-    Workaround unusual SIZE_MAX on SCO OpenServer.
-
- src/common/sysdefs.h | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-commit f138bdf76a70029e8360062a0b227936b83b24c9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 2c144a0365c84dbf1b6722466746d42f2563a319
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 deletion(-)
-
-commit edf339227a966f24aebe1845fcca9429b8f6e318
-Author: Anders F Bjorklund <afb at users.sourceforge.net>
-Date:   2010-11-05 12:56:11 +0100
-
-    add build script for macosx universal
-
- macosx/build.sh | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 92 insertions(+)
-
-commit 7fcc6334ea8923550ba6b5347ff99dc8432234b0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-06-16 12:15:29 +0300
-
-    liblzma: Remove unneeded semicolon.
-
- src/liblzma/lz/lz_encoder_hash.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 631f4d3ae6adfda84d1a110781d9402c12e16cfc
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 3 insertions(+), 1 deletion(-)
-
-commit c89faf4c9e5970e7f7f8a25521ed9aa62d1a2d9a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-05-28 09:47:56 +0300
-
-    Translations: Update Italian translation.
-    
-    Thanks to Milo Casagrande.
-
- po/it.po | 333 +++++++++++++++++++++++++++++++++++----------------------------
- 1 file changed, 184 insertions(+), 149 deletions(-)
-
-commit 6fe2fc9b6ab5bf6848140823e9536370834f42fb
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 6c4d4db2bc8d8b682bd927144d37daa2ab21a6d6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 6 insertions(+), 15 deletions(-)
-
-commit 844f84fcad9670c543550edf7c7e42630c8f7715
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 5 insertions(+), 2 deletions(-)
-
-commit 240e8b9791df597063a3b68d04ffcb3aa4f2de6a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-05-23 18:30:30 +0300
-
-    Build: Set GZIP_ENV=-9n in top-level Makefile.am.
-
- Makefile.am | 3 +++
- 1 file changed, 3 insertions(+)
-
-commit e32cb264ea72a4459810f30abad70dae5a4fa17d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-05-21 16:59:22 +0300
-
-    Bump version and soname for 5.0.3.
-
- src/liblzma/Makefile.am        | 2 +-
- src/liblzma/api/lzma/version.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-commit 65cff45f8fd1c250491557157cce0f5f38481082
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-05-21 16:56:53 +0300
-
-    Update NEWS for 5.0.3.
-
- NEWS | 36 ++++++++++++++++++++++++++++++++++--
- 1 file changed, 34 insertions(+), 2 deletions(-)
-
-commit 316c67ffdae1f811ac95e838d5290a013bff4ca7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 1931175eea6d09c0845d6e8e334a7333647f11c0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 5 insertions(+), 1 deletion(-)
-
-commit 841dc1f891b48b23f84c0f0e0c86c7c4e4bdcdf5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-05-17 12:26:28 +0300
-
-    Update THANKS.
-
- THANKS | 3 +++
- 1 file changed, 3 insertions(+)
-
-commit 0f7e2d36240ebf1159d5fb85d8cd7422337a0d3f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-05-17 12:21:33 +0300
-
-    Update INSTALL with a note about linker problem on OpenSolaris x86.
-
- INSTALL | 23 +++++++++++++++++------
- 1 file changed, 17 insertions(+), 6 deletions(-)
-
-commit 793d857e01e1725f16fc0c8af8172c91a9e38617
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit afcff45cee04c5c7d9c333504046ffb63d1418b5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 22159c6ba2300a006f2e46ce85ae132e2d2f7d57
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-04-18 19:35:49 +0300
-
-    Update THANKS.
-
- THANKS | 2 ++
- 1 file changed, 2 insertions(+)
-
-commit 5e3499059515033d1ce44b6fb0fa49183c7ac633
-Author: Martin Väth <vaeth at mathematik.uni-wuerzburg.de>
-Date:   2011-04-15 04:54:49 -0400
-
-    xzgrep: fix typo in $0 parsing
-    
-    Reported-by: Diego Elio Pettenò <flameeyes at gentoo.org>
-    Signed-off-by: Martin Väth <vaeth at mathematik.uni-wuerzburg.de>
-    Signed-off-by: Mike Frysinger <vapier at gentoo.org>
-
- src/scripts/xzgrep.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-commit 1125611b9b8d4a209b6a73d2c76e1b39c065972a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 3f8fa53837bae8b44f3addf19923e26401336c3d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 9 insertions(+)
-
-commit 320d734c20d0776e3eb80f6b5984ddeb494715b5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 6 insertions(+), 2 deletions(-)
-
-commit 2ee4edeffc8d9734bf68230df31b20ac6a94c9b5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 13 insertions(+), 7 deletions(-)
-
-commit 73f56fb87d54091d0c4fd22d70e6f042902e3b63
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 4ce1cf97a88ae1640a380dd19cbc255d729f966b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 972f05d7a4268dbe42573701f83faa45d03249eb
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-04-09 18:29:30 +0300
-
-    Update THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 28154eeaf6e3442cd1e174f4e81266d60c4dac60
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 3 insertions(+), 3 deletions(-)
-
-commit aa95516d3d509c6b7895ee519004afcf500a0759
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 58f52c72f49562a08042da9a2f4bbdf4dd162d0c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-04-01 08:47:46 +0300
-
-    Bumped version and liblzma soname to 5.0.2.
-
- src/liblzma/Makefile.am        | 2 +-
- src/liblzma/api/lzma/version.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-commit 162779682e01d15f0ce386ef7f40d1be05ad0053
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-04-01 08:47:20 +0300
-
-    Updated NEWS for 5.0.2.
-
- NEWS | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-commit 45553f9b4b0175c292023010dc41520347004852
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-03-31 15:06:58 +0300
-
-    Update INSTALL with another note about IRIX.
-
- INSTALL | 4 ++++
- 1 file changed, 4 insertions(+)
-
-commit af9d48d5515eadef689b1ce9ffb91e4dbcbc7f35
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit d099ef9f517b59ab8e3b6f6aa0543c3643983470
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+), 4 deletions(-)
-
-commit df87249b26e79a75fd91041e85512944fc247b57
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 6 insertions(+), 2 deletions(-)
-
-commit 68c453e1c7b09dc9c7d2ef9d994c46f5b367f5d3
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-03-24 01:22:18 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit b441d39855516ae618faffd5156261b8b413394f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+), 2 deletions(-)
-
-commit 82d5164839517f55daeadd9ee88c76425db30224
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 20 insertions(+), 24 deletions(-)
-
-commit 6decc8b41882c2250f0450eb87b83c9fbf495e95
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 9 insertions(+)
-
-commit ecda90061df8d39399e707e5c76c2ec0a0f400e5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-02-02 23:01:51 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 0fda1ae5b1aa0a5c629a09e5228db8ba1cd0dd5f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 00be32978fedc5038748438bf685ac1713d1db83
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-02-02 22:24:00 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 7232fcf96bf4bd5f9cd4fc6c93ca2912c665e004
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-01-28 20:26:38 +0200
-
-    Bump package version and liblzma soname to 5.0.1.
-
- src/liblzma/Makefile.am        | 2 +-
- src/liblzma/api/lzma/version.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-commit 5fbce0b8d96dc96775aa0215e3581addc830e23d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-01-28 20:16:57 +0200
-
-    Update NEWS for 5.0.1.
-
- NEWS | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-commit 03ebd1bbb314f9f204940219a835c883bf442475
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 7 insertions(+), 8 deletions(-)
-
-commit 7bd0a5e7ccc354f7c2e95c8bc27569c820f6a136
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2011-01-18 21:25:24 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit f71c4e16e913f660977526f0ef8d2acdf458d7c9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-12-13 16:36:33 +0200
-
-    Scripts: Fix gzip and bzip2 support in xzdiff.
-
- src/scripts/xzdiff.in | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-commit 9311774c493c19deab51ded919dcd2e9c4aa2829
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-12-12 21:23:55 +0200
-
-    Build: Enable ASM on DJGPP by default.
-
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 4a42aaee282fc73b482581684d65110506d5efdd
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-12-12 16:09:42 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit ce56f63c41ee210e6308090eb6d49221fdf67d6c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 9 insertions(+)
-
-commit e6baedddcf54e7da049ebc49183565b99facd4c7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 29 insertions(+), 4 deletions(-)
-
-commit b7afd3e22a8fac115b75c738d40d3eb1de7e286f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 44 insertions(+), 44 deletions(-)
-
-commit 3e564704bc6f463cb2db11e3f3f0dbd71d85992e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 3 insertions(+)
-
-commit 2964d8d691ed92abdcf214888d79ad6d79774735
-Author: Jonathan Nieder <jrnieder at gmail.com>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 37c25658efd25b034266daf87cd381d20d1df776
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 deletion(-)
-
-commit e45929260cd902036efd40c5610a8d0a50d5712b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-10-23 17:25:52 +0300
-
-    Build: Fix mydist rule when .git doesn't exist.
-
- Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 6e1326fcdf6b6209949be57cfe3ad4b781b65168
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-10-23 14:15:35 +0300
-
-    Add NEWS for 5.0.0.
-
- NEWS | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 62 insertions(+)
-
-commit b667a3ef6338a2c1db7b7706b1f6c99ea392221c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 14 insertions(+)
-
-commit e61d85e082743ebd2dd0ff28fc0a82482ede0538
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 5 insertions(+)
-
-commit 23e23f1dc029146714c9a98313ab3ea93d71a2fc
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 613939fc82603b75b59eee840871a05bc8dd08e0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-10-21 23:16:11 +0300
-
-    xz: Make sure that message_strm() can never return NULL.
-
- src/xz/message.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-commit d09c5753e33ff96ee57edb6d1e98e34041203695
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-10-19 12:08:30 +0300
-
-    Update INSTALL.generic.
-
- INSTALL.generic | 99 ++++++++++++++++++++++++++++++++++++++++++++++-----------
- 1 file changed, 81 insertions(+), 18 deletions(-)
-
-commit 0076e03641f201c4b77dddd5a6db5880be19a78c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit ac462b1c47c451f5c62e428306314c4bdad8ae7f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-10-10 17:58:58 +0300
-
-    xz: Use "%"PRIu32 instead of "%d" in a format string.
-
- src/xz/message.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit ae74d1bdeb075c3beefe76e1136c5741804e7e91
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit d492b80ddd6f9a13419de6d102df7374d8f448e8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-10-10 16:49:01 +0300
-
-    lzmainfo: Use "%"PRIu32 instead of "%u" for uint32_t.
-
- src/lzmainfo/lzmainfo.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 825e859a9054bd91202e5723c41a17e72f63040a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-10-10 16:47:01 +0300
-
-    lzmainfo: Use fileno(stdin) instead of STDIN_FILENO.
-
- src/lzmainfo/lzmainfo.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit acbc4cdecbeec2a4dfaac04f185ece49b2ff17c8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-10-09 23:20:51 +0300
-
-    lzmainfo: Use setmode() on DOS-like systems.
-
- src/lzmainfo/lzmainfo.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-commit ef364d3abc5647111c5424ea0d83a567e184a23b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 7 insertions(+)
-
-commit 5629c4be07b6c67e79842b2569da1cedc9c0d69a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-10-09 18:57:55 +0300
-
-    Windows: Put some license info into README-Windows.txt.
-
- windows/README-Windows.txt | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-commit e75100f549f85d231df25c07aa94d63e78e2d668
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-10-09 18:57:04 +0300
-
-    Windows: Fix a diagnostics bug in build.bash.
-
- windows/build.bash | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit efeb998a2b1025df1c1d202cc7d21d866cd1c336
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 389d418445f1623593dfdbba55d52fbb6d1205f5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-10-09 12:57:25 +0300
-
-    Add missing public domain notice to lzmadec_w32res.rc.
-
- src/xzdec/lzmadec_w32res.rc | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-commit 6389c773a4912dd9f111256d74ba1605230a7957
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-10-09 12:52:12 +0300
-
-    Windows: Update common_w32res.rc.
-
- src/common/common_w32res.rc | 9 +++------
- 1 file changed, 3 insertions(+), 6 deletions(-)
-
-commit 71275457ca24c9b01721f5cfc3638cf094daf454
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <http://marc.info/?l=mingw-users&m=126489506214078>.
-
- windows/build.bash | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-commit 3ac35719d8433af937af6491383d4a50e343099b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 12 insertions(+), 2 deletions(-)
-
-commit 7b5db576fd7a4a67813b8437a9ccd4dbc94bbaae
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-10-08 21:42:37 +0300
-
-    Windows: Fix build.bash again.
-    
-    630a8beda34af0ac153c8051b1bf01230558e422 wasn't good.
-
- windows/build.bash | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-commit d3cd7abe85ec7c2f46cf198b15c00d5d119df3dd
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 084c60d318f2dbaef4078d9b100b4a373d0c3a7f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-10-08 15:59:25 +0300
-
-    configure.ac: Remove two unused defines.
-
- configure.ac | 4 ----
- 1 file changed, 4 deletions(-)
-
-commit 11f51b6714357cb67ec7e56ed9575c199b5581fe
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-10-08 15:32:29 +0300
-
-    Make tests accommodate missing xz or xzdec.
-
- tests/test_compress.sh | 47 ++++++++++++++++++++++++++++++-----------------
- tests/test_files.sh    | 28 ++++++++++++++++++++++++++--
- 2 files changed, 56 insertions(+), 19 deletions(-)
-
-commit b1c7368f95e93ccdefdd0748e04398c26766f47f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-10-07 00:44:53 +0300
-
-    Windows: Make build.bash work without --enable-dynamic=no.
-
- windows/build.bash | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-commit f9907503f882a745dce9d84c2968f6c175ba966a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-10-05 12:18:58 +0300
-
-    configure.ac: Silence a warning from Autoconf 2.68.
-
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 80b5675fa62c87426fe86f8fcd20feeabc4361b9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 24 insertions(+), 21 deletions(-)
-
-commit f9722dbeca4dc4c43cfd15d122dafaac50b0a0bb
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-10-02 12:07:33 +0300
-
-    Update the FAQ.
-
- doc/faq.txt | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
- 1 file changed, 100 insertions(+), 4 deletions(-)
-
-commit 61ae593661e8dc402394e84d567ca2044a51572b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 7 insertions(+), 3 deletions(-)
-
-commit 9166682dc601fd42c1b9510572e3f917d18de504
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-09-28 10:53:02 +0300
-
-    Update .gitignore.
-
- .gitignore | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-commit 31575a449ac64c523da3bab8d0c0b522cdc7c780
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-09-28 01:17:14 +0300
-
-    Fix accomodate -> accommodate on the xz man page.
-
- src/xz/xz.1 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit cec0ddc8ec4ce81685a51998b978e22167e461f9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+)
-
-commit 2577da9ebdba13fbe99ae5ee8bde35f7ed60f6d1
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-09-17 22:14:30 +0300
-
-    xz: Update the Czech translation.
-    
-    Thanks to Marek Černocký.
-
- po/cs.po | 202 +++++++++++++++++++++++++++++++++++++++++----------------------
- 1 file changed, 131 insertions(+), 71 deletions(-)
-
-commit a1766af582dc23fddd9da1eeb4b9d61e3eb4c2e6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 21088018554e2b0e02914205377ceb6e34a090bd
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-09-15 00:34:13 +0300
-
-    xz: Edit a translators comment.
-
- src/xz/list.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit be16e28ece1b492b8f93382b7fa1cc4da23c6ff6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit e23ea74f3240e6b69683f9e69d1716e0f9e9092b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-09-10 14:30:25 +0300
-
-    Updated README.
-
- README | 2 --
- 1 file changed, 2 deletions(-)
-
-commit 8dad2fd69336985adb9f774fa96dc9c0efcb5a71
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-09-10 14:30:07 +0300
-
-    Updated INSTALL.
-
- INSTALL | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-commit 0b5f07fe3728c27cce416ddc40f7e4803ae96ac2
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-09-10 14:26:20 +0300
-
-    Updated the git repository address in ChangeLog.
-
- ChangeLog | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit a8760203f93a69bc39fd14520a6e9e7b7d70be06
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-09-10 14:09:33 +0300
-
-    xz: Add a comment to translators about "literal context bits".
-
- src/xz/message.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-commit bb0b1004f83cdc4d309e1471c2ecaf9f95ce60c5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-09-08 08:49:22 +0300
-
-    Update the Czech translation.
-    
-    Thanks to Marek Černocký.
-
- po/cs.po | 655 +++++++++++++++++++++++++++++++++++++++++++--------------------
- 1 file changed, 454 insertions(+), 201 deletions(-)
-
-commit 41bc9956ebfd7c86777d33676acf34c45e7ca7c7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-09-07 12:31:40 +0300
-
-    xz: Add a note to translators.
-
- src/xz/hardware.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-commit 77a7746616e555fc08028e883a56d06bf0088b81
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-09-06 19:43:12 +0300
-
-    Add missing files to POTFILES.in.
-
- po/POTFILES.in | 3 +++
- 1 file changed, 3 insertions(+)
-
-commit 58f55131820d2e08a1a6beb9ec0ee2378044eb30
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-09-06 10:16:24 +0300
-
-    xz: Improve a comment.
-
- src/xz/file_io.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-commit bcb1b898341f7073f51660d7052d7ed6c5461a66
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+), 4 deletions(-)
-
-commit da014d55972f5addbf6b4360d3d8ed2ef4282170
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-09-05 12:16:17 +0300
-
-    xz: Hopefully ease translating the messages in list.c.
-
- src/xz/list.c | 33 +++++++++++++++++++++++----------
- 1 file changed, 23 insertions(+), 10 deletions(-)
-
-commit ef840950ad99cf2955c754875af0e01acf125079
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-09-04 23:14:44 +0300
-
-    xz: Fix grammar.
-
- src/xz/options.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-commit c46afd6edc04ea140db6c59e8486f5707c810c13
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-09-04 23:12:20 +0300
-
-    xz: Use lzma_lzma_preset() to initialize the options structure.
-
- src/xz/options.c | 14 ++------------
- 1 file changed, 2 insertions(+), 12 deletions(-)
-
-commit 8fd3ac046d0b1416a2094fecc456d9e0f4d5d065
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 deletion(-)
-
-commit 474bac0c33e94aeaca8ada17ab19972b1424bc2b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-09-04 22:10:32 +0300
-
-    xz: Minor improvements to --help and --long-help.
-
- src/xz/message.c | 24 ++++++++++++------------
- 1 file changed, 12 insertions(+), 12 deletions(-)
-
-commit 373ee26f955617295c5c537b04a153a1969140d2
-Author: Jonathan Nieder <jrnieder at gmail.com>
-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 <jrnieder at gmail.com>
-
- tests/test_compress.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 2fce9312f36727ea82f3430cc5d3a7d243c5f087
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-09-03 15:54:40 +0300
-
-    xz: Make -vv show also decompressor memory usage.
-
- src/xz/coder.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-commit b4b1cbcb53624ab832f8b3189c74450dc7ea29b6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 19 insertions(+), 10 deletions(-)
-
-commit 77fe5954cd3d10fb1837372684cbc133b56b6a87
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+), 3 deletions(-)
-
-commit fce69059cf901ce8075a78c7607d591f144a3b5a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 5 insertions(+), 2 deletions(-)
-
-commit a848e47ced6e5e2a564b5c454b2f5a19c2f40298
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 9 insertions(+)
-
-commit b3ff7ba044eaeab3e424d7b51fe914daf681b1a3
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-09-02 19:09:57 +0300
-
-    xz: Always warn if adjusting dictionary size due to memlimit.
-
- src/xz/coder.c | 28 +++++++++-------------------
- 1 file changed, 9 insertions(+), 19 deletions(-)
-
-commit d5653ba8a1ea9c00de4fddc617aba3c51e18139d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 3 insertions(+), 3 deletions(-)
-
-commit 792331bdee706aa852a78b171040ebf814c6f3ae
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-07-27 20:47:12 +0300
-
-    Windows: Add a note about building a Git repository snapshot
-
- windows/INSTALL-Windows.txt | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-commit 507a4a4dea1e5462f12f7ed4b076c34e02054a38
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-07-27 20:27:32 +0300
-
-    Windows: Don't strip liblzma.a too much.
-
- windows/build.sh | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-commit a540198ffb25fad36380c5e92ac20c2d28eec46a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-07-13 20:07:26 +0300
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit bab0f01ed931f606b4675aa9f9331a17cec09bad
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit c15c42abb3c8c6e77c778ef06c97a4a10b8b5d00
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-06-11 21:51:32 +0300
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit bc612d0e0c9e4504c59d49168e87a7ae3e458443
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+), 2 deletions(-)
-
-commit e1b6935d60a00405e6b5b455a3426d2248cc926c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-06-11 10:40:28 +0300
-
-    Put the git commit to the filename in mydist rule.
-
- Makefile.am | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-commit d8b41eedce486d400f701b757b7b5e4e32276618
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-06-02 23:13:55 +0300
-
-    Fix compiling with -Werror.
-
- src/xz/message.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-commit b5fbab6123a39c9a55cd5d7af410e9aae067d5f8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 5 insertions(+), 1 deletion(-)
-
-commit 29a7b250e685852f2f97615493ec49acaf528623
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 7 insertions(+), 7 deletions(-)
-
-commit e243145c84ab5c3be8259fd486ead0de5235b3f0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 366 insertions(+), 19 deletions(-)
-
-commit ce6dc3c0a891f23a862f80ec08d3b6f0beb2a562
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-06-01 15:51:44 +0300
-
-    Major update to xz --list.
-
- src/xz/list.c | 652 ++++++++++++++++++++++++++++++++++++++++++----------------
- 1 file changed, 471 insertions(+), 181 deletions(-)
-
-commit 905e54804a899e4ad526d38fdba7e803ab9b71bd
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-06-01 14:09:12 +0300
-
-    Fix a comment.
-
- src/liblzma/api/lzma/index.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 07dc34f6da45c9ab757dad7fd5eef522ad27d296
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-05-27 16:17:42 +0300
-
-    Fix lzma_block_compressed_size().
-
- src/liblzma/common/block_util.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-commit 44d70cb154225e47eebf15a3cfbdf3794cbb4593
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(-)
-
-commit a334348dc02803241cf4e0a539eecdc0e7ad2cc7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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, 32 deletions(-)
-
-commit 70e5e2f6a7084e6af909deee88ceac2f6efa7893
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 67 deletions(-)
-
-commit 01a414eaf4be6352c06b48001b041b47e8202faa
-Author: Jonathan Nieder <jrnieder at gmail.com>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 920a69a8d8e4203c5edddd829d932130eac188ea
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-05-26 10:30:20 +0300
-
-    Fix compilation of debug/known_sizes.c.
-
- debug/known_sizes.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 98a4856a6ea84f79c790057a6eb89a25bc45b074
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-05-26 10:28:54 +0300
-
-    Remove references to Subblock filter in debug/sync_flush.c.
-
- debug/sync_flush.c | 13 -------------
- 1 file changed, 13 deletions(-)
-
-commit 703d2c33c095c41ae0693ee8c27c45e3847e4535
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-05-26 10:16:57 +0300
-
-    Better #error message.
-
- src/common/sysdefs.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-commit d8a55c48b39703dd83f11089ad01e1ff2ac102e0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-05-10 19:57:24 +0300
-
-    Updated INSTALL.
-
- INSTALL | 5 -----
- 1 file changed, 5 deletions(-)
-
-commit 3fb3d594a2b53886adee161b6261e92277f05f7c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-05-10 19:54:52 +0300
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 6548e304657e77d3a972053db3c41c5daf591113
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <http://bugs.debian.org/574583>
-    and Jonathan Nieder for suggestions how to fix it.
-
- THANKS           |  1 +
- src/xz/message.c | 86 +++++++++++++++++++++++++-------------------------------
- 2 files changed, 39 insertions(+), 48 deletions(-)
-
-commit a1f7a986b8d708f9290da9799ca1b8d7082fad3e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit c737eec91d200d730aa82662affd6b06ebb0bff0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-03-22 21:03:03 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit f4b2b52624b802c786e4e2a8eb6895794dd93b24
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit cf38da00a140bd3bd65b192390ae5553380fd774
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-03-06 21:36:19 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit d0d1c51aea4351288a7e533cce28cb7f852f6b05
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <http://bugs.gentoo.org/show_bug.cgi?id=305591>.
-    Thanks to Rafał Mużyło for helping to debug it on IRC.
-
- src/liblzma/common/common.c | 1 +
- 1 file changed, 1 insertion(+)
-
-commit eb7d51a3faf9298c0c7aa9aaeae1023dcf9e37ea
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-02-02 11:50:11 +0200
-
-    Fix wrong assertion.
-    
-    This was added in 455e68c030fde8a8c2f5e254c3b3ab9489bf3735.
-
- src/xz/main.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-commit 9d67588c1597849504a3e5ac8bf6f06e7d2ee8be
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-02-01 22:48:42 +0200
-
-    Updated TODO.
-
- TODO | 4 ----
- 1 file changed, 4 deletions(-)
-
-commit fef6333f52c8801308c3b78acb7942988541d137
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-02-01 22:46:56 +0200
-
-    Fix signal handling for --list.
-
- src/xz/main.c | 19 ++++++++++++++-----
- 1 file changed, 14 insertions(+), 5 deletions(-)
-
-commit 82220a149015616f75641ee8bbea415137535b9b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 13 insertions(+), 1 deletion(-)
-
-commit d4da177d5ba3d2ef7323a6f1e06ca16e0478810e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-02-01 10:20:57 +0200
-
-    Fix a comment.
-
- windows/build.sh | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-commit f9dd797a423a148903cf345b4146cb1fe1eab11d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-01-31 23:43:54 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit ee5ddb8b28419fe4923ded5c18a50570a762dcab
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-01-31 23:41:29 +0200
-
-    Updated TODO.
-
- TODO | 17 +++++++++++------
- 1 file changed, 11 insertions(+), 6 deletions(-)
-
-commit 11936ad3f5a2e97bda3463c7a56a2f4bb9265ea6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-01-31 23:35:04 +0200
-
-    Mention TODO in README.
-
- README | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 2901a8e7e82af05675b8cd8758a8ceddb111359f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-01-31 23:31:14 +0200
-
-    Updated INSTALL.
-
- INSTALL | 52 ++++++++++++++++++++++++++--------------------------
- 1 file changed, 26 insertions(+), 26 deletions(-)
-
-commit 8884e16864ba53fb4b58623d7537d7ef30c28e11
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 14 insertions(+), 5 deletions(-)
-
-commit 96a4f840e3b9ca5c81e5711ff9c267b194f93ef1
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 24 insertions(+), 10 deletions(-)
-
-commit 231c3c7098f1099a56abb8afece76fc9b8699f05
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+)
-
-commit b4b1a56e0cbd597157858264f5c7189201ac9018
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-01-29 13:24:27 +0200
-
-    Add lzmainfo.1 to manfiles list to convert to .txt and .pdf.
-
- Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 5574d64e03ad3a3d6e00e4b0d3e81c7b5529ec95
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 deletion(-)
-
-commit b063cc34a30a4edf109343ff373b2b62b8ca72d3
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit e5496f9628ff5979392a80421d0b63a4de8015b4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+), 5 deletions(-)
-
-commit d0b4bbf5da068503c099cd456e294d7673548cc0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-01-26 14:46:43 +0200
-
-    Minor comment fix.
-
- src/xz/main.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-commit 0bc9eab243dee3be764b3530433a7fcdc3f7c6a1
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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(+)
-
-commit ef68dd4a92976276304de2aedfbe34ae91a86abb
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+)
-
-commit 0dd6d007669b946543ca939a44243833c79e08f4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2010-01-20 22:02:35 +0200
-
-    Fix a typo in README.
-    
-    Thanks to R. Bijker.
-
- README | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 07a11dad44e041b01dcfc73e8d4e00731158c06d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 3 insertions(+), 6 deletions(-)
-
-commit 3ffd5d81a43210c8da56da5c5b3637d3f8bc63c7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 10 insertions(+), 5 deletions(-)
-
-commit cee12aa852ec0902983dc1f153346ef750157fb9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2010-01-12 16:30:33 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 153c7740c54b3c90129dbd3d6153ac1303c4d605
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 deletion(-)
-
-commit 097bad000363e0bf29f8274ad2d7ab59f7dbf644
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-12-31 21:11:05 +0200
-
-    Add missing lzma_nothrow in filter.h.
-
- src/liblzma/api/lzma/filter.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-commit b56cb1fc31fa2381f92eefc040df85667048d626
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-12-09 18:13:44 +0200
-
-    Remove redefinition of _(msgid) macro from lzmainfo.c.
-
- src/lzmainfo/lzmainfo.c | 7 -------
- 1 file changed, 7 deletions(-)
-
-commit 171b03febfe09d9fae6ac8be6aa4518bcaf427d2
-Author: Jonathan Nieder <jrnieder at gmail.com>
-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 <jrnieder at gmail.com>
-
- po/.gitignore | 28 ++++++++++++++++++++++------
- 1 file changed, 22 insertions(+), 6 deletions(-)
-
-commit f7e44c6c11f630519072971b8b07a5729c096c36
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 9 insertions(+), 7 deletions(-)
-
-commit 7b76a3e2336f25088957cba92b0dbd854d9caa3c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+)
-
-commit 0696f5d268362221380e039bad48a86e29067c6a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 5e817a50d276f0a3607638c1c1d449d50b9aa4e5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+)
-
-commit 6db1c35be9e1e364cdacff6878910e1b7aac2a37
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit e0c2776b6ffbd2b1900fde353aceac734edc93d7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 8 deletions(-)
-
-commit f057a33c6f7c5992389479f2d4feabf2900ba7ee
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-11-26 10:11:23 +0200
-
-    Typo fix to sysdefs.h.
-    
-    Thanks to Jonathan Nieder.
-
- src/common/sysdefs.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 8767b41534eafdf5e742e12190646bf5740b0cdb
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+)
-
-commit 919fbaff860acdaa4bcd216500a0b1c960a6db92
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 11 insertions(+), 9 deletions(-)
-
-commit bd13b04e202b6f495a68eb0766f97085b7c50a06
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-11-22 12:43:06 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit f1a28b96c900c658fe016852ff62f6c24d1f50fa
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 12 insertions(+), 14 deletions(-)
-
-commit 0733f4c9994db696420a405810d5f02c79ebc404
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 insertion(+), 65 deletions(-)
-
-commit 7ac3985d891dcc5773543f84cc5bce6c14841b12
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 181 insertions(+), 8 deletions(-)
-
-commit c74c132f7f79a842c073c66575a4fdb985e4c2e3
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(-)
-
-commit d315ca4930ff96e1428c6021c96f209e1abdd83e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-11-14 20:21:19 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 2ddcae247c284cc2f396b6cfdab57790c7588b5f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-11-14 20:20:03 +0200
-
-    Some updates to xz man page.
-
- src/xz/xz.1 | 54 +++++++++++++++++++++++++++++++++++++++++++++++++-----
- 1 file changed, 49 insertions(+), 5 deletions(-)
-
-commit 19b2674f07f8b588dfaf6638396b4b42866d7e23
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-11-14 19:51:03 +0200
-
-    Fix description of --memory in --long-help.
-
- src/xz/message.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-commit 2291346f0cccf88e605d84b75c9c5aaaaddb5df8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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(+)
-
-commit 78e92c18470483e161388e679c1ee556adb3a691
-Author: Jonathan Nieder <jrnieder at gmail.com>
-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 file changed, 2 insertions(+), 2 deletions(-)
-
-commit 7b7fe902d98da28e5769e2aa1e0c08c92384f7ee
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit ebfb2c5e1f344e5c6e549b9dedaa49b0749a4a24
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <byteswap.h> on GNU,
-    <sys/endian.h> on *BSDs and <sys/byteorder.h>
-    on Solaris, which may contain optimized code
-    like inline assembly.
-
- configure.ac                              |  54 +----
- m4/tuklib_integer.m4                      |  74 +++++++
- src/common/bswap.h                        |  52 -----
- src/common/integer.h                      | 170 ---------------
- src/common/tuklib_config.h                |   8 +-
- src/common/tuklib_integer.h               | 350 ++++++++++++++++++++++++++++++
- src/liblzma/check/check.c                 |   4 +-
- src/liblzma/check/crc32_fast.c            |   4 +-
- src/liblzma/check/crc32_tablegen.c        |   8 +-
- src/liblzma/check/crc64_fast.c            |   4 +-
- src/liblzma/check/crc64_tablegen.c        |   8 +-
- src/liblzma/check/crc_macros.h            |   2 -
- src/liblzma/check/sha256.c                |  18 +-
- src/liblzma/common/alone_encoder.c        |   2 +-
- src/liblzma/common/block_header_decoder.c |   2 +-
- src/liblzma/common/block_header_encoder.c |   2 +-
- src/liblzma/common/common.h               |   2 +-
- src/liblzma/common/stream_flags_decoder.c |   6 +-
- src/liblzma/common/stream_flags_encoder.c |   6 +-
- src/liblzma/lz/lz_encoder_hash.h          |   2 +-
- src/liblzma/lzma/lzma_decoder.c           |   2 +-
- src/liblzma/lzma/lzma_encoder.c           |   2 +-
- src/liblzma/lzma/lzma_encoder_private.h   |   2 +-
- src/liblzma/simple/simple_decoder.c       |   2 +-
- src/liblzma/simple/simple_encoder.c       |   2 +-
- tests/test_block_header.c                 |   4 +-
- tests/test_stream_flags.c                 |   6 +-
- tests/tests.h                             |   2 +-
- 28 files changed, 467 insertions(+), 333 deletions(-)
-
-commit 29fd321033276261b87da7be5223db33d879a4c7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+), 2 deletions(-)
-
-commit c5f68b5cc79085a87f950fea53843e27f328068e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <vapier at gentoo.org>
-Date:   2009-09-26 12:51:50 -0400
-
-    add lzmainfo to gitignore
-    
-    Signed-off-by: Mike Frysinger <vapier at gentoo.org>
-
- .gitignore | 2 ++
- 1 file changed, 2 insertions(+)
-
-commit 188a1dcd0cc7867810ed3a55c598d0680922c63b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-09-27 11:53:36 +0300
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit db9119b9181b307e7ac5d2bae82444d04b902b59
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 6 insertions(+)
-
-commit b3d105e69786a45963176fd2193abe75e05ba738
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 5e000ff00d4d01e559397b49eb648ad3f159d496
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-09-22 18:59:56 +0300
-
-    Added OpenVMS-specific information to INSTALL.
-
- INSTALL | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-commit 932b2e204463d70f3eee5b8a1ea5a23bf9d001a4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-09-22 14:03:02 +0300
-
-    Better fixes for OpenVMS support.
-    
-    Thanks to Jouk Jansen.
-
- src/xz/file_io.c | 19 ++++++++++++++++---
- 1 file changed, 16 insertions(+), 3 deletions(-)
-
-commit 4c3630ec4179fe9265407a35c4db1374ffc82372
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-09-22 13:40:19 +0300
-
-    Avoid non-standard preprocessor construct.
-    
-    Thanks to Jouk Jansen.
-
- src/common/tuklib_common.h | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-commit 0deb1bb60addd1306b525e0ac0ad2a84eb0390d9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+), 1 deletion(-)
-
-commit e599bba4216c0edb8cc8f40adad3a6dba88685f4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-09-12 14:09:17 +0300
-
-    Fix GCC version check for nothrow attribute.
-
- src/liblzma/api/lzma.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 6bfdd3a88a819f04c8f202e7d3c6f88a01c7d224
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-09-12 14:08:15 +0300
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 4ab7b16b9573bdfa32279e4adadff684d5cd58ac
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-09-11 17:08:15 +0300
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 68059334ff435300ab1ce2c616b0eee1b0d88dd9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 221be761f467da76875247bc02d7a1716682075d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 21 insertions(+), 11 deletions(-)
-
-commit 7aca7b3174bcbba4a4915682ff0cd405d63f5740
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-09-05 01:21:15 +0300
-
-    Updated THANKS.
-
- THANKS | 2 ++
- 1 file changed, 2 insertions(+)
-
-commit 60ccb80c9c4a0d771acc5b7d9d6f32b17fed1071
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-09-02 09:43:51 +0300
-
-    Mention in INSTALL that --enable-small doesn't modify CFLAGS.
-
- INSTALL | 4 ++++
- 1 file changed, 4 insertions(+)
-
-commit 319a0fd7d7e9ebbb71ca6930abfc20777cb4aacc
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-09-01 20:40:01 +0300
-
-    Refactored option parsing.
-
- src/xz/options.c | 70 ++++++++++++++++++++++++++++----------------------------
- 1 file changed, 35 insertions(+), 35 deletions(-)
-
-commit 25adaaa56e2e51a47a910a8d73452414619a2e53
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+), 4 deletions(-)
-
-commit 5f6dddc6c911df02ba660564e78e6de80947c947
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-09-01 20:20:19 +0300
-
-    Updated TODO.
-
- TODO | 3 +++
- 1 file changed, 3 insertions(+)
-
-commit 655457b9ada5ec7db398c5392e41290f3f332ea8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-08-30 17:29:19 +0300
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 2331f5f97af3e5897e23da45d9df3d664099c7f8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-30 17:28:52 +0300
-
-    Add more OS/2 specific info to INSTALL.
-
- INSTALL | 5 +++++
- 1 file changed, 5 insertions(+)
-
-commit 94c66b3297b3ad307eee93cf6b160e3c43997f11
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 25 insertions(+), 11 deletions(-)
-
-commit 3432e9c6aab851da1227b63dce645d7f190c04d8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-29 13:42:56 +0300
-
-    Updated THANKS.
-
- THANKS | 3 +++
- 1 file changed, 3 insertions(+)
-
-commit 27414daadf5727e8ab942374b5ec1c8990122878
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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(-)
-
-commit 682efdc1f9492fdd76c9ce82e7c00ca0768067e8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-27 18:36:59 +0300
-
-    "make dist" fixes
-
- Makefile.am | 13 ++++++-------
- 1 file changed, 6 insertions(+), 7 deletions(-)
-
-commit c8c184db1c95bf70f78256ec6237845a57f342af
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-27 17:08:33 +0300
-
-    Update xz man page date.
-
- src/xz/xz.1 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 9756fce565e98b8fa5fe6ead296d84e7601ec254
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-08-27 16:36:40 +0300
-
-    Add missing files to EXTRA_DIST.
-
- Makefile.am | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-commit 04dcbfdeb921e5f361a4487134e91e23fffbe09d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-27 16:21:22 +0300
-
-    Bumped version to 4.999.9beta.
-
- src/liblzma/api/lzma/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit fd7618611a22f42a6913bc8d518c9bbc9252d6b4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-27 16:17:47 +0300
-
-    Updated THANKS.
-
- THANKS | 2 ++
- 1 file changed, 2 insertions(+)
-
-commit c29e76c0f910fca0a90a50b78d337f6c32623e9d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 15 insertions(+), 11 deletions(-)
-
-commit 696d7ee3953beaf4f0ed18e78917ccf300431966
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-27 15:43:54 +0300
-
-    Require GNU libtool 2.2.
-
- configure.ac | 13 +++----------
- 1 file changed, 3 insertions(+), 10 deletions(-)
-
-commit 4c3558aa8305a8f8b6c43b8569eb539717ca9e8d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-27 15:34:45 +0300
-
-    Add "dos" to EXTRA_DIST.
-
- Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 35b29e4424ced5a3ababf132283e519080c7b298
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-27 15:23:27 +0300
-
-    Updated TODO.
-
- TODO | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-commit 23414377192c21f3f34c84cdfe0ef0fbd06a1dea
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-27 15:17:00 +0300
-
-    Some xz man page improvements.
-
- src/xz/xz.1 | 78 ++++++++++++++++++++++++++++++++++++++++++++++++-------------
- 1 file changed, 62 insertions(+), 16 deletions(-)
-
-commit 371b04e19fc9051dbaeec51ec0badec6a1f0699d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-27 10:41:01 +0300
-
-    Removed doc/bugs.txt.
-
- doc/bugs.txt | 46 ----------------------------------------------
- 1 file changed, 46 deletions(-)
-
-commit d88c4072b36d3a76f839185799fb1d91037a1b81
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-27 10:40:25 +0300
-
-    Updated README.
-    
-    It now includes bug reporting instructions/tips.
-
- README | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
- 1 file changed, 55 insertions(+), 10 deletions(-)
-
-commit 92e536d8b8d33a6b12d0802bcd7be4437046f13e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 3e2ba8b58585743e59251e69ad2783eb08357079
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-08-18 00:30:09 +0300
-
-    Install faq.txt.
-
- Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-commit b198e770a146e4a41f91a93f0b233713f2515848
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 73 insertions(+), 166 deletions(-)
-
-commit fe111a25cd788d31b581996e4533910388a7f0a9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-17 22:45:50 +0300
-
-    Some xz man changes.
-
- src/xz/xz.1 | 88 ++++++++++++++++++++++++++++++-------------------------------
- 1 file changed, 43 insertions(+), 45 deletions(-)
-
-commit 10242a21e9abda0c5c6a03501703cc40b8a699a5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-16 22:15:42 +0300
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 3ce1916c83041113b9cad9ead5c97a527cf8aa1d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 66da129c8ec33dd66acc92f113f7c1ca740ca81a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-08-13 15:03:46 +0300
-
-    Link lzmainfo against shared liblzma by default.
-
- src/lzmainfo/Makefile.am | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-commit 71f18e8a066a01dda0c8e5508b135ef104e43e4c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 57 insertions(+), 20 deletions(-)
-
-commit 5aa4678b2342dcfc1d2b31aa9fa4f39c539e4b61
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+)
-
-commit e51b4e49e800bd84e6d589dca2964d3985e88139
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 deletion(-)
-
-commit a4165d0584376d948c213ec93c6065d24ff6a5e7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-08-13 09:37:21 +0300
-
-    Add xz man page to manfiles in toplevel Makefile.am.
-
- Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 180bdf58ea5bb07941e0a99b304d9aa832198748
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-13 09:37:01 +0300
-
-    Fix first line of xz man page.
-
- src/xz/xz.1 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit e1ce2291e759b50ebfcf7cbbcc04cd098f1705a4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit e71903fc6101f1c039d702e335b08aad1e1b4100
-Author: Jonathan Nieder <jrnieder at gmail.com>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 1d314b81aa5b0c4530638ffabd4e0edb52e5362c
-Author: Jonathan Nieder <jrnieder at gmail.com>
-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 file changed, 7 insertions(+), 1 deletion(-)
-
-commit a7f5d2fe4826ac68839d00059f05004fb81d5c69
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-09 20:57:46 +0300
-
-    GPLv2+ not GPLv2 for Doxyfile.in is probably OK.
-
- Doxyfile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit b735cde20cc14857136ae65a0e5d336ed7ddc862
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 3 insertions(+)
-
-commit 0fd157cc008446adfc8f91394f5503868025a642
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-02 00:11:37 +0300
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit b198da96ff9ac8c89b466b4d196c5f3fe1c7904f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-08-02 00:10:22 +0300
-
-    Updated TODO.
-
- TODO | 4 ++++
- 1 file changed, 4 insertions(+)
-
-commit 669413bb2db954bbfde3c4542fddbbab53891eb4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-07-30 12:25:55 +0300
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit dbbd8fb870ae789d96497911006c869d37148c15
-Author: Jonathan Nieder <jrnieder at gmail.com>
-Date:   2009-07-28 17:37:24 -0500
-
-    xzdiff: add missing ;; to case statement
-
- src/scripts/xzdiff.in | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-commit adbad2d16cb5909f85d4a429011005613ea62ffe
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-07-24 13:15:06 +0300
-
-    Added history.txt to doc_DATA.
-
- Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-commit e0236f12569eb36f9b81ce7a1e52e0f73698ac27
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-07-24 11:34:02 +0300
-
-    Minor improvements to COPYING.
-
- COPYING | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-commit 0db1befcfbc120377df4b89923762f16d25f548a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 deletion(-)
-
-commit 8f8ec942d6d21ada2096eaf063411bc8bc7e2d48
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-07-20 15:43:32 +0300
-
-    Avoid internal error with --format=xz --lzma1.
-
- src/xz/coder.c | 16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
-
-commit 99f9e879a6a8bb54a65da99c12e0f390216c152a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-07-19 11:09:31 +0300
-
-    Added missing author notice to xzless.in.
-
- src/scripts/xzless.in | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 4c9c989d45b188667799a7a1d6c728ed43f7bf77
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-07-18 14:34:08 +0300
-
-    Updated the totally outdated TODO file.
-
- TODO | 117 ++++++++++++++++---------------------------------------------------
- 1 file changed, 27 insertions(+), 90 deletions(-)
-
-commit 64e498c89d8b9966e8663f43bf64d47c26c55c62
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 deletion(-)
-
-commit a35755c5de808df027675688855d1b621a4fb428
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 7 insertions(+)
-
-commit 98f3cac1ad31191c5160a7e48398bf85141e941c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 59 insertions(+), 21 deletions(-)
-
-commit d873a09e956363e54bf58c577c8f7e487b6fb464
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 31 insertions(+)
-
-commit cd69a5a6c16c289f6f8e2823b03c72289472270f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 13 insertions(+), 9 deletions(-)
-
-commit 6f62fa88f4ff7ba78565c314c0e6e71c498fa658
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-07-08 23:06:46 +0300
-
-    Updated THANKS.
-
- THANKS | 2 ++
- 1 file changed, 2 insertions(+)
-
-commit 1754b7e03e2aa7e2e0196807fe8b0f3f5a637b0e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-07-08 23:05:29 +0300
-
-    Portability improvement to version.sh.
-
- version.sh | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-commit 3bdb53792c0e3e3febe9370e56eda5b08f89410f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 insertion(+), 9 deletions(-)
-
-commit 5f16ef4abf220028a9ddbcb138217597a9455f62
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-07-05 19:26:53 +0300
-
-    Use @PACKAGE_HOMEPAGE@ in liblzma.pc.in.
-
- src/liblzma/liblzma.pc.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 18c10c30d2833f394cd7bce0e6a821044b15832f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 178 insertions(+), 35 deletions(-)
-
-commit 0a289c01ac821ea9c4250aa906b0ae3cfa953633
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-07-01 12:21:24 +0300
-
-    Avoid visibility related compiler warnings on Windows.
-
- configure.ac | 20 +++++++++-----------
- 1 file changed, 9 insertions(+), 11 deletions(-)
-
-commit 7653d1cf48080e63b189ed9d58dea0e82b6b1c5e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-06-30 17:14:39 +0300
-
-    Use static liblzma by default also for tests.
-
- tests/Makefile.am | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-commit f42ee981668b545ab6d06c6072e262c29605273c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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
-    <http://lists.gnu.org/archive/html/libtool/2009-06/msg00070.html>
-    but the problem is significant also e.g. on GNU/Linux.
-    
-    Unless --disable-shared is passed to configure, static
-    library built from a set of convenience libraries will
-    contain PIC objects. That is, while libtool builds non-PIC
-    objects too, only PIC objects will be used from the
-    convenience libraries. On 32-bit x86 (tested on mobile XP2400+),
-    using PIC instead of non-PIC makes the decompressor 10 % slower
-    with the default CFLAGS.
-    
-    So while xz was linked against static liblzma by default,
-    it got the slower PIC objects unless --disable-shared was
-    used. I tend develop and benchmark with --disable-shared
-    due to faster build time, so I hadn't noticed the problem
-    in benchmarks earlier.
-    
-    This commit also adds support for building Windows resources
-    into liblzma and executables.
-
- configure.ac                        | 34 ++++++++++------
- src/liblzma/Makefile.am             | 79 +++++++++++++++++++++++++++++--------
- src/liblzma/check/Makefile.am       | 47 ----------------------
- src/liblzma/check/Makefile.inc      | 51 ++++++++++++++++++++++++
- src/liblzma/common/Makefile.am      | 78 ------------------------------------
- src/liblzma/common/Makefile.inc     | 67 +++++++++++++++++++++++++++++++
- src/liblzma/common/common.h         | 16 +++++---
- src/liblzma/delta/Makefile.am       | 28 -------------
- src/liblzma/delta/Makefile.inc      | 23 +++++++++++
- src/liblzma/lz/Makefile.am          | 29 --------------
- src/liblzma/lz/Makefile.inc         | 21 ++++++++++
- src/liblzma/lzma/Makefile.am        | 51 ------------------------
- src/liblzma/lzma/Makefile.inc       | 43 ++++++++++++++++++++
- src/liblzma/rangecoder/Makefile.am  | 26 ------------
- src/liblzma/rangecoder/Makefile.inc | 21 ++++++++++
- src/liblzma/simple/Makefile.am      | 51 ------------------------
- src/liblzma/simple/Makefile.inc     | 47 ++++++++++++++++++++++
- src/liblzma/subblock/Makefile.am    | 26 ------------
- src/liblzma/subblock/Makefile.inc   | 20 ++++++++++
- src/xz/Makefile.am                  | 11 +++++-
- src/xzdec/Makefile.am               | 20 +++++++++-
- 21 files changed, 417 insertions(+), 372 deletions(-)
-
-commit 89dac1db6f168d7469cfbc4432651d4724c5c0de
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-06-29 22:19:51 +0300
-
-    Added a comment about "autoconf -fi" to autogen.sh.
-
- autogen.sh | 3 +++
- 1 file changed, 3 insertions(+)
-
-commit 6e685aae4594bc0af1b5032e01bb37d0edaa3ebd
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-06-28 10:04:24 +0300
-
-    Add -no-undefined to get shared liblzma on Windows.
-
- src/liblzma/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 73f560ee5fa064992b76688d9472baf139432540
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-06-27 22:57:15 +0300
-
-    Make physmem() work on Cygwin 1.5 and older.
-
- src/common/physmem.h | 77 +++++++++++++++++++++++++++-------------------------
- 1 file changed, 40 insertions(+), 37 deletions(-)
-
-commit 7ff0004fbce24ae72eddfe392828ffd7d4639ed1
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-06-27 13:05:03 +0300
-
-    Added missing $(EXEEXT).
-
- src/xz/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 792db79f27ad9ab1fb977e23be65c7761f545752
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-06-27 10:02:24 +0300
-
-    Silence a compiler warning on DOS-like systems.
-
- src/xz/file_io.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-commit ad12edc95254ede3f0cb8dec8645e8789e984c4f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-06-27 09:35:15 +0300
-
-    Updated the filenames in POTFILES.in too.
-
- po/POTFILES.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-commit b2b1f867532732fe9969131f8713bdd6b0731763
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+)
-
-commit da0af22e4b4139b8a10710945f8b245b3a77c97d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-06-26 15:40:40 +0300
-
-    Added missing source files to windows/Makefile.
-
- windows/Makefile | 2 ++
- 1 file changed, 2 insertions(+)
-
-commit 390a6408563067613b29de895cb40e4d0386d62c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-06-26 14:20:02 +0300
-
-    Allow to explicitly specify autotool versions in autogen.sh.
-
- autogen.sh | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-commit eaf8367368a329afa48785380f9dca6b681f3397
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-06-26 14:18:32 +0300
-
-    Add version.sh to EXTRA_DIST.
-
- Makefile.am | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-commit b317b218e2d383dd27a700094c0de4510540ea18
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-06-24 20:14:10 +0300
-
-    Support HW_PHYSMEM64
-
- src/common/physmem.h | 30 +++++++++++++++++++-----------
- 1 file changed, 19 insertions(+), 11 deletions(-)
-
-commit ae82dde5d9cc60c80cc89601b6c51cc1611d48e7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-06-24 13:01:59 +0300
-
-    Cast a char argument to isspace() to unsigned char.
-
- src/xz/args.c | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-commit 1735d31ea347210e914df038eeea4b2626e76e42
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 7 insertions(+), 5 deletions(-)
-
-commit 8ed156ce894966103e895aa08f2a9fb912f6fad5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit f6df39afaa84f71439507178a49b2a5dda6e824c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-06-04 23:26:47 +0300
-
-    Harmonized xzdec --memory with xz --memory and made
-    minor cleanups.
-
- src/xzdec/xzdec.c | 74 +++++++++++++++++++++++++++++++++++++++----------------
- 1 file changed, 53 insertions(+), 21 deletions(-)
-
-commit 1774f27c61ce294a56712ca2f4785f90a62441bc
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-06-01 14:53:57 +0300
-
-    The .xz file format version 1.0.1
-
- doc/xz-file-format.txt | 29 ++++++++++++++++++++++-------
- 1 file changed, 22 insertions(+), 7 deletions(-)
-
-commit 083c23c680ff844846d177cfc58bb7a874e7e6b9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-05-23 16:57:21 +0300
-
-    Remove undocumented alternative option names --bcj, --ppc,
-    and --itanium.
-
- src/xz/args.c | 3 ---
- 1 file changed, 3 deletions(-)
-
-commit b1edee2cdc7ef4411b1a21c07094ec763f071281
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-05-23 14:51:09 +0300
-
-    Updated THANKS.
-
- THANKS | 2 ++
- 1 file changed, 2 insertions(+)
-
-commit dcedb6998cefeca6597dd1219328a3abf5acf66d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 49 insertions(+), 27 deletions(-)
-
-commit 5f735dae80aa629853f4831d7b84ec1c614979eb
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 5 insertions(+), 5 deletions(-)
-
-commit b60376249e0c586910c4121fab4f791820cc1289
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 deletion(-)
-
-commit b4f92f522d4b854c0adb7c38be7531e1a6a7b008
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-05-22 14:27:40 +0300
-
-    Fix a comment.
-
- src/xz/main.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 4dd21d23f22569285ae706b58b0e5904b8db1839
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-05-22 14:21:20 +0300
-
-    Remove the --info option, which was an alias for --list.
-
- src/xz/args.c | 1 -
- 1 file changed, 1 deletion(-)
-
-commit 8836139b63ce774bdd62abf17ab69b290e08229e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 6 insertions(+), 11 deletions(-)
-
-commit b0063023f8adb06ea735ec4af5c6f5b7bdb8e84d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 deletion(-)
-
-commit 03ca67fd37dd43fa7f590de340899cd497c10802
-Author: ABCD <en.abcd at gmail.com>
-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 file changed, 14 insertions(+), 2 deletions(-)
-
-commit a6f43e64128a6da5cd641de1e1e527433b3e5638
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 8 insertions(+), 40 deletions(-)
-
-commit be06858d5cf8ba46557395035d821dc332f3f830
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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, 956 deletions(-)
-
-commit 0255401e57c96af87c6b159eca28974e79430a82
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-05-01 11:21:46 +0300
-
-    Added documentation about the legacy .lzma file format.
-
- doc/lzma-file-format.txt | 166 +++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 166 insertions(+)
-
-commit 1496ff437c46f38303e0e94c511ca604b3a11f85
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-04-14 11:48:46 +0300
-
-    Minor fixes to test files' README.
-
- tests/files/README | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
-
-commit 4787d654434891c7df5b43959b0d2873718f06e0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-04-13 16:36:41 +0300
-
-    Updated history.txt.
-
- doc/history.txt | 123 ++++++++++++++++++++++++++++++--------------------------
- 1 file changed, 66 insertions(+), 57 deletions(-)
-
-commit 2f0bc9cd40f709152a0177c8e585c0757e9af9c9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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                     | 46 ++++++++----------
- src/liblzma/check/Makefile.am                  |  8 ++-
- src/liblzma/check/check.c                      |  7 ++-
- src/liblzma/check/check.h                      |  7 ++-
- src/liblzma/check/crc32_fast.c                 | 30 +++++-------
- src/liblzma/check/crc32_small.c                |  7 ++-
- src/liblzma/check/crc32_table.c                |  7 ++-
- src/liblzma/check/crc32_tablegen.c             |  7 ++-
- src/liblzma/check/crc32_x86.S                  | 21 +++++---
- src/liblzma/check/crc64_fast.c                 | 20 +++-----
- src/liblzma/check/crc64_small.c                |  7 ++-
- src/liblzma/check/crc64_table.c                |  7 ++-
- src/liblzma/check/crc64_tablegen.c             |  7 ++-
- src/liblzma/check/crc64_x86.S                  | 14 ++++--
- src/liblzma/check/crc_macros.h                 |  9 ++--
- src/liblzma/check/sha256.c                     | 23 +++++----
- src/liblzma/common/Makefile.am                 | 13 ++---
- src/liblzma/common/alone_decoder.c             | 13 ++---
- src/liblzma/common/alone_decoder.h             | 13 ++---
- src/liblzma/common/alone_encoder.c             | 13 ++---
- src/liblzma/common/auto_decoder.c              | 13 ++---
- src/liblzma/common/block_buffer_decoder.c      | 13 ++---
- src/liblzma/common/block_buffer_encoder.c      | 13 ++---
- src/liblzma/common/block_decoder.c             | 13 ++---
- src/liblzma/common/block_decoder.h             | 13 ++---
- src/liblzma/common/block_encoder.c             | 13 ++---
- src/liblzma/common/block_encoder.h             | 13 ++---
- src/liblzma/common/block_header_decoder.c      | 13 ++---
- src/liblzma/common/block_header_encoder.c      | 13 ++---
- src/liblzma/common/block_util.c                | 13 ++---
- src/liblzma/common/bsr.h                       |  7 ++-
- src/liblzma/common/chunk_size.c                | 13 ++---
- src/liblzma/common/common.c                    | 13 ++---
- src/liblzma/common/common.h                    | 13 ++---
- src/liblzma/common/easy_buffer_encoder.c       | 13 ++---
- src/liblzma/common/easy_decoder_memusage.c     | 13 ++---
- src/liblzma/common/easy_encoder.c              | 13 ++---
- src/liblzma/common/easy_encoder_memusage.c     | 13 ++---
- src/liblzma/common/easy_preset.c               | 13 ++---
- src/liblzma/common/easy_preset.h               | 13 ++---
- src/liblzma/common/filter_buffer_decoder.c     | 13 ++---
- src/liblzma/common/filter_buffer_encoder.c     | 13 ++---
- src/liblzma/common/filter_common.c             | 13 ++---
- src/liblzma/common/filter_common.h             | 13 ++---
- src/liblzma/common/filter_decoder.c            | 13 ++---
- src/liblzma/common/filter_decoder.h            | 13 ++---
- src/liblzma/common/filter_encoder.c            | 13 ++---
- src/liblzma/common/filter_encoder.h            | 13 ++---
- src/liblzma/common/filter_flags_decoder.c      | 13 ++---
- src/liblzma/common/filter_flags_encoder.c      | 13 ++---
- src/liblzma/common/index.c                     | 13 ++---
- src/liblzma/common/index.h                     | 13 ++---
- src/liblzma/common/index_decoder.c             | 13 ++---
- src/liblzma/common/index_encoder.c             | 13 ++---
- src/liblzma/common/index_encoder.h             | 13 ++---
- src/liblzma/common/index_hash.c                | 13 ++---
- src/liblzma/common/stream_buffer_decoder.c     | 13 ++---
- src/liblzma/common/stream_buffer_encoder.c     | 13 ++---
- src/liblzma/common/stream_decoder.c            | 13 ++---
- src/liblzma/common/stream_decoder.h            | 13 ++---
- src/liblzma/common/stream_encoder.c            | 13 ++---
- src/liblzma/common/stream_encoder.h            | 13 ++---
- src/liblzma/common/stream_flags_common.c       | 13 ++---
- src/liblzma/common/stream_flags_common.h       | 13 ++---
- src/liblzma/common/stream_flags_decoder.c      | 13 ++---
- src/liblzma/common/stream_flags_encoder.c      | 13 ++---
- src/liblzma/common/vli_decoder.c               | 13 ++---
- src/liblzma/common/vli_encoder.c               | 13 ++---
- src/liblzma/common/vli_size.c                  | 13 ++---
- src/liblzma/delta/Makefile.am                  | 13 ++---
- src/liblzma/delta/delta_common.c               | 13 ++---
- src/liblzma/delta/delta_common.h               | 13 ++---
- src/liblzma/delta/delta_decoder.c              | 13 ++---
- src/liblzma/delta/delta_decoder.h              | 13 ++---
- src/liblzma/delta/delta_encoder.c              | 13 ++---
- src/liblzma/delta/delta_encoder.h              | 13 ++---
- src/liblzma/delta/delta_private.h              | 13 ++---
- src/liblzma/lz/Makefile.am                     | 13 ++---
- src/liblzma/lz/lz_decoder.c                    | 17 ++-----
- src/liblzma/lz/lz_decoder.h                    | 17 ++-----
- src/liblzma/lz/lz_encoder.c                    | 17 ++-----
- src/liblzma/lz/lz_encoder.h                    | 17 ++-----
- src/liblzma/lz/lz_encoder_hash.h               | 13 ++---
- src/liblzma/lz/lz_encoder_mf.c                 | 17 ++-----
- src/liblzma/lzma/Makefile.am                   | 13 ++---
- src/liblzma/lzma/fastpos.h                     | 17 ++-----
- src/liblzma/lzma/fastpos_tablegen.c            | 17 ++-----
- src/liblzma/lzma/lzma2_decoder.c               | 17 ++-----
- src/liblzma/lzma/lzma2_decoder.h               | 17 ++-----
- src/liblzma/lzma/lzma2_encoder.c               | 17 ++-----
- src/liblzma/lzma/lzma2_encoder.h               | 17 ++-----
- src/liblzma/lzma/lzma_common.h                 | 17 ++-----
- src/liblzma/lzma/lzma_decoder.c                | 17 ++-----
- src/liblzma/lzma/lzma_decoder.h                | 17 ++-----
- src/liblzma/lzma/lzma_encoder.c                | 17 ++-----
- src/liblzma/lzma/lzma_encoder.h                | 17 ++-----
- src/liblzma/lzma/lzma_encoder_optimum_fast.c   | 13 ++---
- src/liblzma/lzma/lzma_encoder_optimum_normal.c | 13 ++---
- src/liblzma/lzma/lzma_encoder_presets.c        | 13 ++---
- src/liblzma/lzma/lzma_encoder_private.h        | 17 ++-----
- src/liblzma/rangecoder/Makefile.am             | 13 ++---
- src/liblzma/rangecoder/price.h                 | 13 ++---
- src/liblzma/rangecoder/price_tablegen.c        | 16 ++----
- src/liblzma/rangecoder/range_common.h          | 17 ++-----
- src/liblzma/rangecoder/range_decoder.h         | 17 ++-----
- src/liblzma/rangecoder/range_encoder.h         | 17 ++-----
- src/liblzma/simple/Makefile.am                 | 13 ++---
- src/liblzma/simple/arm.c                       | 17 ++-----
- src/liblzma/simple/armthumb.c                  | 17 ++-----
- src/liblzma/simple/ia64.c                      | 17 ++-----
- src/liblzma/simple/powerpc.c                   | 17 ++-----
- src/liblzma/simple/simple_coder.c              | 13 ++---
- src/liblzma/simple/simple_coder.h              | 14 ++----
- src/liblzma/simple/simple_decoder.c            | 13 ++---
- src/liblzma/simple/simple_decoder.h            | 13 ++---
- src/liblzma/simple/simple_encoder.c            | 13 ++---
- src/liblzma/simple/simple_encoder.h            | 13 ++---
- src/liblzma/simple/simple_private.h            | 13 ++---
- src/liblzma/simple/sparc.c                     | 17 ++-----
- src/liblzma/simple/x86.c                       | 17 ++-----
- src/liblzma/subblock/Makefile.am               | 13 ++---
- src/liblzma/subblock/subblock_decoder.c        | 13 ++---
- src/liblzma/subblock/subblock_decoder.h        | 13 ++---
- src/liblzma/subblock/subblock_decoder_helper.c | 13 ++---
- src/liblzma/subblock/subblock_decoder_helper.h | 13 ++---
- src/liblzma/subblock/subblock_encoder.c        | 13 ++---
- src/liblzma/subblock/subblock_encoder.h        | 13 ++---
- src/scripts/Makefile.am                        |  7 +++
- src/xz/Makefile.am                             | 13 ++---
- src/xz/args.c                                  | 13 ++---
- src/xz/args.h                                  | 13 ++---
- src/xz/hardware.c                              | 13 ++---
- src/xz/hardware.h                              | 13 ++---
- src/xz/io.c                                    | 13 ++---
- src/xz/io.h                                    | 13 ++---
- src/xz/list.c                                  | 13 ++---
- src/xz/main.c                                  | 13 ++---
- src/xz/main.h                                  | 13 ++---
- src/xz/message.c                               | 13 ++---
- src/xz/message.h                               | 13 ++---
- src/xz/options.c                               | 13 ++---
- src/xz/options.h                               | 13 ++---
- src/xz/private.h                               | 13 ++---
- src/xz/process.c                               | 13 ++---
- src/xz/process.h                               | 13 ++---
- src/xz/signals.c                               | 13 ++---
- src/xz/signals.h                               | 13 ++---
- src/xz/suffix.c                                | 13 ++---
- src/xz/suffix.h                                | 13 ++---
- src/xz/util.c                                  | 13 ++---
- src/xz/util.h                                  | 13 ++---
- src/xzdec/Makefile.am                          | 13 ++---
- src/xzdec/xzdec.c                              | 13 ++---
- tests/Makefile.am                              | 13 ++---
- tests/bcj_test.c                               |  7 ++-
- tests/create_compress_files.c                  | 13 ++---
- tests/test_block.c                             | 13 ++---
- tests/test_block_header.c                      | 13 ++---
- tests/test_check.c                             | 13 ++---
- tests/test_compress.sh                         | 13 ++---
- tests/test_files.sh                            | 13 ++---
- tests/test_filter_flags.c                      | 13 ++---
- tests/test_index.c                             | 13 ++---
- tests/test_stream_flags.c                      | 13 ++---
- tests/tests.h                                  | 13 ++---
- windows/common.rc                              |  2 +-
- 206 files changed, 868 insertions(+), 2023 deletions(-)
-
-commit e79c42d854657ae7f75613bd80c1a35ff7c525cb
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 94eb9ad46f1fded6d8369cf3d38bb9754c1375af
-Author: Pavel Roskin <proski at gnu.org>
-Date:   2009-03-31 12:15:01 -0400
-
-    Fix minor typos in README
-
- README | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-commit 9bab5336ebd765ec4e12252f416eefdf04eba750
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 11 insertions(+)
-
-commit a0497ff7a06f9350349264fe9b52dfefc6d53ead
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-03-18 16:54:38 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 390e69887fc5e0a108eb41203bed9acd100a3d76
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 19 insertions(+), 9 deletions(-)
-
-commit cf751edfde3ad6e088dc18e0522d31ae38405933
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-03-01 09:00:06 +0200
-
-    Added AC_CONFIG_MACRO_DIR to configure.ac.
-
- configure.ac | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 63df14c57dee7c461717784287056688482a7eb9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+)
-
-commit fd6a380f4eda4f00be5f2aa8d222992cd74a714f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-02-22 19:07:54 +0200
-
-    Add a rough explanation of --extreme to output of --help.
-
- src/xz/message.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-commit 68bf7ac2984d3627369a240ef0491934d53f7899
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 deletion(-)
-
-commit 489a3dbaa0465f04400804e956a1cfbbee3654a2
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 27 insertions(+), 4 deletions(-)
-
-commit 11ae4ae35fd70182c713f2d914b7cb1143bc76f0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-02-14 20:44:52 +0200
-
-    Fix microsecond vs. nanosecond confusion in my_time().
-
- src/xz/message.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 3084d662d2646ab7eb58daf0dc32cf3f9a74eec7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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(+)
-
-commit 0dae8b7751d09e9c5a482d5519daaee4800ce203
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 deletion(-)
-
-commit 96c46df7deb231ea68a03d8d1da9de4c774e36d8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-02-11 20:02:32 +0200
-
-    Remove dead directories from .gitignore.
-
- .gitignore | 2 --
- 1 file changed, 2 deletions(-)
-
-commit 1ec5b0027911d94cb6f98892cbc690f818d8a861
-Author: Jim Meyering <jim at meyering.net>
-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 file changed, 22 insertions(+)
-
-commit 154f5aec2de201c674841de4fcc9804c2a87af07
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 deletion(-)
-
-commit e605c2663691b0a4c307786aa368d124ea081daa
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-02-08 21:35:11 +0200
-
-    Fix aliasing issue in physmem.h.
-
- src/common/physmem.h | 19 ++++++++++---------
- 1 file changed, 10 insertions(+), 9 deletions(-)
-
-commit 0e27028d74c5c7a8e036ae2a9b8cecb0ac79d3a6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 79e25eded48d2fe33f31441ab7a034f902e335f8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 9 insertions(+)
-
-commit bc7c7109cc4410055a888c1c70cbd1c9445c4361
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 28 deletions(-)
-
-commit edfc2031e56f8a2ccda063f02936b3a848d88723
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-02-07 21:41:52 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 880c3309386aac58fc4f3d7ca99bd31bcb1526a3
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <vapier at gentoo.org>
-Date:   2009-02-06 23:38:39 -0500
-
-    add gitignore files
-    
-    Signed-off-by: Mike Frysinger <vapier at gentoo.org>
-
- .gitignore    | 32 ++++++++++++++++++++++++++++++++
- m4/.gitignore | 35 +++++++++++++++++++++++++++++++++++
- po/.gitignore | 12 ++++++++++++
- 3 files changed, 79 insertions(+)
-
-commit bd7ca1dad5c146b6217799ffaa230c32d207a3e5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit d0ab8c1c73ae712adb0d26fbb9da762d99a63618
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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(+)
-
-commit 3306cf3883492720b3c34baa02f4eb4227d91c73
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-02-06 16:55:45 +0200
-
-    Another grammar fix
-
- README | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit fe5434f940f75fec3611cf9d9edf78c4da8ac760
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-02-06 12:30:23 +0200
-
-    Grammar fix in README.
-
- README | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 3dfa58a9eedf5a0e566452b078801c9cbcf7a245
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 insertion(+), 1 deletion(-)
-
-commit 094b1b09a531f0d201ec81f2b07346a995fd80b9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-02-05 21:21:27 +0200
-
-    Add the "windows" directory to EXTRA_DIST.
-
- Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-commit e1c3412eec7acec7ca3b32c9c828f3147dc65b49
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 75905a9afc0ee89954ede7d08af70d1148bf0fd9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-02-03 12:15:17 +0200
-
-    Another utime() fix.
-
- src/xz/io.c | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-commit ccf92a29e8c7234284f1568c1ec0fd7cb98356ca
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+), 2 deletions(-)
-
-commit 99c1c2abfae2e87f3c17e929783e6d1bb7a3f302
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+), 4 deletions(-)
-
-commit 55fd41431e61fb8178858283d636b6781e33e847
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-02-01 00:11:20 +0200
-
-    Fix missing newlines in xzdec.c.
-
- src/xzdec/xzdec.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-commit d64ca34f1b6f34e86adefc7f735b4eff8e6d4a35
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+), 2 deletions(-)
-
-commit 2dbdc5befb33c3703e4609809101047c67caf343
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+), 2 deletions(-)
-
-commit 4ab760109106dc04f39dd81c97d50f528d1b51c1
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 46 insertions(+), 24 deletions(-)
-
-commit b2172cf823d3be34cb0246cb4cb32d105e2a34c9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-01-31 08:49:54 +0200
-
-    Fix # -> ## in a macro in lzma.h.
-
- src/liblzma/api/lzma.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 1aae8698746d3c87a93f8398cdde2de9ba1f7208
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-01-30 18:50:16 +0200
-
-    Updated README.
-
- README | 30 ++++++++++++++++++++----------
- 1 file changed, 20 insertions(+), 10 deletions(-)
-
-commit f54bcf6f80d585236bc03ce49f7c73e1abaa17eb
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-01-30 00:29:58 +0200
-
-    Remove dangling crc64_init.c.
-
- src/liblzma/check/crc64_init.c | 55 ------------------------------------------
- 1 file changed, 55 deletions(-)
-
-commit 982da7ed314398420c38bf154a8f759d5f18b480
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 49 insertions(+), 35 deletions(-)
-
-commit c4683a660b4372156bdaf92f0cdc54a58f95ee6f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-01-28 08:45:59 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 3241317093595db9f79104faafe93cb989c9f858
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+)
-
-commit f76e39cf930f888d460b443d18f977ebedea8b2a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <meyering at redhat.com>
-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 <lasse.collin at tukaani.org>
-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(+)
-
-commit 5fb34d8324d3e7e0061df25d0086b64c8726b19d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 7 insertions(+)
-
-commit c129748675a5daa8838df92bde32cc04f6ce61ba
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-01-26 14:33:13 +0200
-
-    Avoid hardcoded constant in easy.c.
-
- src/liblzma/common/easy.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 1859d22d75e072463db74c25bc3f5a7992e5fdf6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 2c5fe958e4bbe9b147b10c255955dfe2827fb8e7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 3 insertions(+), 3 deletions(-)
-
-commit c81f13ff29271de7293f8af3d81848b1dcae3d19
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-01-22 12:53:33 +0200
-
-    Fix a comment.
-
- src/liblzma/common/common.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 9ec80355a7212a0a2f8c89d98e51b1d8b4e34eec
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 8 insertions(+), 16 deletions(-)
-
-commit 2f1a8e8eb898f6c036cde55d153ad348bfab3c00
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2009-01-19 22:53:18 +0200
-
-    Fix handling of non-fatal errors in lzma_code().
-
- src/liblzma/common/common.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-commit 4810b6bc25087be872960b9dd1d11ff07735dc88
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-01-19 13:52:36 +0200
-
-    Remove dead code.
-
- src/liblzma/lzma/lzma_encoder.h | 8 --------
- 1 file changed, 8 deletions(-)
-
-commit 128586213f77c9bd82b7e9a62927f6d0c3769d85
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2009-01-15 14:29:22 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit dc8f3be06d54ef6e6cfb5134dd3d25edd08cef89
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 24 insertions(+), 23 deletions(-)
-
-commit 8286a60b8f4bd5accfbc9d229d2204bac31994f2
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 13 insertions(+), 9 deletions(-)
-
-commit 9c45658ddc8bd4a7819ef8547d3e7ccf73203e78
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit b59f1e98f50694cf6a8f1b342fd878feebdb2f88
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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, 6 deletions(-)
-
-commit d1d17a40d33a9682424ca37282813492f2cba6d0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-12-31 00:57:27 +0200
-
-    Fixed missing quoting in configure.ac.
-
- configure.ac | 38 +++++++++++++++++++-------------------
- 1 file changed, 19 insertions(+), 19 deletions(-)
-
-commit 28e75f7086dbe9501d926c370375c69dfb1236ce
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+), 2 deletions(-)
-
-commit 7ed9d943b31d3ee9c5fb2387e84a241ba33afe90
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 050eb14d29e2537c014662e83599fd8a77f13c45
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 8 insertions(+), 15 deletions(-)
-
-commit 4820f10d0f173864f6a2ea7479663b509ac53358
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 deletion(-)
-
-commit 634636fa56ccee6e744f78b0abed76c8940f2f8f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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, 176 deletions(-)
-
-commit 4fed98417d1687f5eccccb42a133fde3ec81216a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 14 insertions(+), 15 deletions(-)
-
-commit 671a5adf1e844bfdd6fd327016c3c28694493158
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 23 insertions(+), 10 deletions(-)
-
-commit f9f2d1e74398500724041f7fb3c38db35ad8c8d8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit ff7fb2c605bccc411069e07b9f11fb957aea2ddf
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-12-13 00:54:11 +0200
-
-    Name the package "xz" in configure.ac.
-
- configure.ac | 11 ++++-------
- 1 file changed, 4 insertions(+), 7 deletions(-)
-
-commit a94bf00d0af9b423851905b031be5a645a657820
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 5 insertions(+), 3 deletions(-)
-
-commit 8582d392baacd2cdac07ca60041f8c661323676d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-12-10 01:31:00 +0200
-
-    Remove obsolete comment.
-
- src/xz/message.c | 1 -
- 1 file changed, 1 deletion(-)
-
-commit b1ae6dd731ea3636c3c2bfc7aefa71457d3328f1
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-12-10 01:27:15 +0200
-
-    Use "decompression" consistently in --long-help.
-
- src/xz/message.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 1ea9e7f15afd5d3981e2432710e932320597bca9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit bceb3918dbb21f34976bfdd4c171a81319de71f7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 9 insertions(+), 15 deletions(-)
-
-commit 6efa2d80d46a38861016f41f0eb6fa2ec9260fe6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-12-09 10:36:24 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit ef7890d56453dca1aeb2e12db29b7e418d93dde4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+), 4 deletions(-)
-
-commit ccd57afa09e332d664d6d6a7498702791ea5f659
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 10 insertions(+), 4 deletions(-)
-
-commit c596fda40b62fe1683d0ac34d0c673dcaae2aa15
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 41 insertions(+), 54 deletions(-)
-
-commit 656ec87882ee74b192c4ea4a233a235eca7b04d4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 insertion(+), 1 deletion(-)
-
-commit c7007ddf06ac2b0e018d71d281c21b99f16e7ae0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 9 insertions(+), 5 deletions(-)
-
-commit ae65dcfde27014e4d811e1a1308aa5d0fe8debbd
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-11-27 19:28:59 +0200
-
-    Cleanups to message.c.
-
- src/xz/message.c | 47 ++++++++++++++++++-----------------------------
- 1 file changed, 18 insertions(+), 29 deletions(-)
-
-commit a8368b75cdcd5427299001cc42839287f27b244d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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, 614 deletions(-)
-
-commit 69472ee5f055a2bb6f28106f0923e1461fd1d080
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-11-22 17:44:33 +0200
-
-    Typo fix
-
- src/xz/process.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 6d1d6f4598d121253dbe1084c6866b66e95c361b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-11-20 22:59:10 +0200
-
-    Support NetBSD's errno for O_NOFOLLOW.
-
- src/xz/io.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-commit f901a290eef67b8ea4720ccdf5f46edf775ed9d7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-11-20 11:01:29 +0200
-
-    Minor cleanups to xzdec.
-
- src/xzdec/xzdec.c | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-commit 54f716ba8905d09752dcd1519455a40bd21d5317
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-11-19 23:55:22 +0200
-
-    Added missing check for uint16_t.
-
- configure.ac | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 1880a3927b23f265f63b2adb86fbdb81ea09eb06
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 0f295bf7a3ece01f667caae318cc3e3424085886
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-10-07 16:42:18 +0300
-
-    Fixed some help messages.
-
- src/lzma/help.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-commit 1e8e4fd1f3e50129b4541406ad765d2aa1233943
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-10-03 19:36:09 +0300
-
-    Removed fi from po/LINGUAS.
-
- po/LINGUAS | 1 -
- 1 file changed, 1 deletion(-)
-
-commit fcfb86c7770328cfffa2e83b176af9a1ba2d9128
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-10-03 07:06:48 +0300
-
-    Fixed suffix handling with --format=raw.
-
- src/lzma/suffix.c | 28 +++++++++++++++++++---------
- 1 file changed, 19 insertions(+), 9 deletions(-)
-
-commit bd137524f2f50e30ba054f42f1f6536cd3cee920
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 5 insertions(+)
-
-commit 3bdbc12c054d1961133ee19802af7dd3c3494543
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-09-30 13:34:07 +0300
-
-    Fixed uninitialized variable in Stream decoder.
-
- src/liblzma/common/stream_decoder.c | 1 +
- 1 file changed, 1 insertion(+)
-
-commit ed3709000a3f17ecefab29b2235d7e2221b00003
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit ea560b0ea80525752bdcd0074d24f8dc170bbe29
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-09-27 23:49:24 +0300
-
-    Fix conflicting Subblock helper filter's ID.
-
- src/liblzma/common/common.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit ad97483b6e55142fd8d5c041db057017a891cd95
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 446 deletions(-)
-
-commit 018ae09df8f2fee5a7374f307df4cb42fad0b81e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-09-27 23:13:54 +0300
-
-    Fix also test_compress.sh.
-
- tests/test_compress.sh | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-commit 3a62a5fb85d2eebd8666e64ed5d364d095062858
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 8 insertions(+), 8 deletions(-)
-
-commit c6ca26eef7cd07eba449035514e2b8f9ac3111c0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 32 insertions(+), 93 deletions(-)
-
-commit 1dcecfb09b55157b8653d747963069c8bed74f04
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-09-27 11:28:49 +0300
-
-    Added 7z2lzma.bash.
-
- extra/7z2lzma/7z2lzma.bash | 114 +++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 114 insertions(+)
-
-commit f147666a5cd15542d4e427da58629f4a71cc38e1
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-09-13 13:54:00 +0300
-
-    LZ decoder cleanup
-
- src/liblzma/lz/lz_decoder.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-commit 13a74b78e37f16c9096ba5fe1859cc04eaa2f9f7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 5 insertions(+), 9 deletions(-)
-
-commit 16e8b98f2659347edfa74afdbbb9e73311153cb9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 5 deletions(-)
-
-commit 5a710c3805bdf6d7e3c92e954e4e4565b27bcb13
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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, 36 deletions(-)
-
-commit 01892b2ca5f69bed0ea746e04b604030d57806bb
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-09-11 10:49:14 +0300
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 962f2231d49409fe6852e44ffe8c5dbabb04bc7d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 18 insertions(+), 14 deletions(-)
-
-commit fa3ab0df8ae7a8a1ad55b52266dc0fd387458671
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-09-11 10:46:14 +0300
-
-    Silence a compiler warning.
-
- src/lzma/process.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 9373e81e18822db4972819442ea4c2cb9955470b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+), 3 deletions(-)
-
-commit 123ab0acec435c9e9866a99e30482116cfbd9ba5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-09-10 00:33:00 +0300
-
-    Comments
-
- src/liblzma/common/stream_encoder.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-commit 2ba01bfa755e47ff6af84a978e3c8d63d7d2775e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-09-03 17:06:25 +0300
-
-    Minor updates to the file format specification.
-
- doc/file-format.txt | 105 ++++++++++++++++++++++++++++++++++++++++++----------
- 1 file changed, 85 insertions(+), 20 deletions(-)
-
-commit 9c75b089b4a9e0edcf4cf7970a4383768707d6c8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-09-02 19:33:32 +0300
-
-    Command line tool fixes
-
- src/lzma/process.c | 21 +++++++++++++--------
- 1 file changed, 13 insertions(+), 8 deletions(-)
-
-commit bab0590504b5aeff460ab4ca8c964dd7c1bad9e4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-09-02 19:31:42 +0300
-
-    Auto decoder cleanup
-
- src/liblzma/common/auto_decoder.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 689602336d126a46b60d791a67decab65e1e81f5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 71 insertions(+), 16 deletions(-)
-
-commit 80c4158f19904026433eb6f5d5ca98a0ecd4f66c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-09-02 14:56:52 +0300
-
-    Stream decoder cleanups
-
- src/liblzma/common/stream_decoder.c | 57 +++++++++++++++++++++----------------
- 1 file changed, 32 insertions(+), 25 deletions(-)
-
-commit fc681657450ce57be1fe08f7a15d31dcc705e514
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-08-31 11:47:01 +0300
-
-    Fix wrong pointer calculation in LZMA encoder.
-
- src/liblzma/lzma/lzma_encoder.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-commit 3b34851de1eaf358cf9268922fa0eeed8278d680
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 3 insertions(+)
-
-commit eaafc4367c77ec1d910e16d11b4da293969d97a3
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-06-20 16:19:54 +0300
-
-    Remove some redundant code from LZMA encoder.
-
- src/liblzma/lzma/lzma_encoder.c | 15 +--------------
- 1 file changed, 1 insertion(+), 14 deletions(-)
-
-commit 0809c46534fa5664fe35d9e98d95e87312ed130e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-06-18 21:45:19 +0300
-
-    Comments
-
- src/liblzma/lzma/lzma_encoder.c | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
-commit 6368a2fa5901c75864be5171dd57a50af7adbb41
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 30 deletions(-)
-
-commit 7d17818cec8597f847b0a2537fde991bbc3d9e96
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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                   | 306 +++-------
- src/liblzma/api/lzma/check.h                   |  18 +-
- src/liblzma/api/lzma/copy.h                    |  29 -
- src/liblzma/api/lzma/easy.h                    |  61 +-
- src/liblzma/api/lzma/extra.h                   | 114 ----
- src/liblzma/api/lzma/filter.h                  |   5 +-
- src/liblzma/api/lzma/index.h                   | 204 ++++++-
- src/liblzma/api/lzma/index_hash.h              |  94 +++
- src/liblzma/api/lzma/info.h                    | 315 ----------
- src/liblzma/api/lzma/lzma.h                    |   2 +-
- src/liblzma/api/lzma/metadata.h                | 100 ---
- src/liblzma/api/lzma/raw.h                     |  20 +-
- src/liblzma/api/lzma/stream.h                  | 157 +----
- src/liblzma/api/lzma/stream_flags.h            | 146 +++--
- src/liblzma/api/lzma/version.h                 |   2 +-
- src/liblzma/api/lzma/vli.h                     |  83 ++-
- src/liblzma/check/Makefile.am                  |   1 -
- src/liblzma/check/check.c                      |  55 +-
- src/liblzma/check/check.h                      |  47 +-
- src/liblzma/check/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, 4846 insertions(+), 8156 deletions(-)
-
-commit bf6348d1a3ff09fdc06940468f318f75ffa6af11
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 508 insertions(+), 1286 deletions(-)
-
-commit 803194ddd26f01ff60ba4e9924c6087a56b29827
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+)
-
-commit 0ea98e52ba87453497b1355c51f13bad55c8924a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 369f72fd656f537a9a8e06f13e6d0d4c242be22f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 12 insertions(+), 12 deletions(-)
-
-commit 11de5d5267f7a0a7f0a4d34eec147e65eaf9f9cf
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-05-06 13:41:05 +0300
-
-    Typo fix
-
- src/liblzma/api/lzma/init.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 944b62b93239b27b338d117f2668c0e95849659b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 14 insertions(+), 1 deletion(-)
-
-commit 8e074349e47ea6832b8fdf9244e581d453733433
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 9 insertions(+)
-
-commit 2f361ac19b7fd3abcd362de4d470e6a9eb495b73
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-04-28 17:08:27 +0300
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 3be21fb12f4cec2cf07799e8960382f4cb375369
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 7 insertions(+), 2 deletions(-)
-
-commit c324325f9f13cdeb92153c5d00962341ba070ca2
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 deletion(-)
-
-commit 8f804c29aa8471ccd6438ddca254092b8869ca52
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+)
-
-commit 22ba3b0b5043fa481903482ce85015fe775939e5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-04-24 20:23:05 +0300
-
-    Make unlzma and lzcat symlinks.
-
- src/lzma/Makefile.am | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-commit 17c36422d4cbc2c70d5c83ec389406f92cd9e85e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-04-24 20:20:27 +0300
-
-    Fixed a bug in command line option parsing.
-
- src/lzma/options.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 283f939974c32c47f05d495e8dea455ec646ed64
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-04-24 20:19:20 +0300
-
-    Added two assert()s.
-
- src/liblzma/lzma/lzma_encoder.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-commit eb348a60b6e19a7c093f892434f23c4756973ffd
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 19 insertions(+), 6 deletions(-)
-
-commit 6c5306e312bcfd254cf654f88c04e34ba786df3d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+), 1 deletion(-)
-
-commit 7ab493924e0ed590a5121a15ee54038d238880d3
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 641998c3e1ecc8b598fe0eb051fab8b9535c291b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 37 insertions(+), 15 deletions(-)
-
-commit 03e0e8a0d7228b6ff1f0af39e2c040a4e425973d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 7521bbdc83acab834594a22bec50c8e1bd836298
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 63b74d000eedaebb8485f623e56864ff5ab71064
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+)
-
-commit 7d516f5129e4373a6d57249d7f608c634c66bf12
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-03-14 21:32:37 +0200
-
-    Fix a comment API header.
-
- src/liblzma/api/lzma/lzma.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 748d6e4274921a350bd0a317380309717441ef9c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit bfde3b24a5ae25ce53c854762b6148952386b025
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-03-11 15:35:34 +0200
-
-    Apply a minor speed optimization to LZMA decoder.
-
- src/liblzma/lzma/lzma_decoder.c | 85 +++++++++++++++++++++--------------------
- 1 file changed, 43 insertions(+), 42 deletions(-)
-
-commit f310c50286d9e4e9c6170bb65348c9bb430a65b4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+)
-
-commit 5ead36cf7f823093672a4e43c3180b38c9abbaff
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-03-10 15:57:55 +0200
-
-    Really fix the price count initialization.
-
- src/liblzma/lzma/lzma_encoder_init.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-commit d4d7feb83d1a1ded8f662a82e21e053841ca726c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-03-10 13:47:17 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 0541c5ea63ef3c0ff85eeddb0a420e56b0c65258
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+)
-
-commit 596fa1fac72823e4ef5bc26bb53f9090445bf748
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 6 insertions(+), 5 deletions(-)
-
-commit 45e43e169527e7a98a8c8a821d37bf25822b764d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+), 3 deletions(-)
-
-commit c0e19e0662205f81a86da8903cdc325d50635870
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+), 19 deletions(-)
-
-commit de7485806284d1614095ae8cb2ebbb5d74c9ac45
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-02-06 13:25:32 +0200
-
-    Tiny clean up to file-format.txt.
-
- doc/file-format.txt | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-commit 1a3b21859818e4d8e89a1da99699233c1bfd197d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 3 insertions(+), 4 deletions(-)
-
-commit 7e796e312bf644ea95aea0ff85480f47cfa30fc0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 73 insertions(+), 17 deletions(-)
-
-commit 7dd48578a3853e0cfab9f1830bc30927173ec4bc
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-02-01 08:32:05 +0200
-
-    Avoid unneeded function call in raw_common.c.
-
- src/liblzma/common/raw_common.c | 20 +++++++++++---------
- 1 file changed, 11 insertions(+), 9 deletions(-)
-
-commit b596fac963c3ff96f615d4d9b427a213ec341211
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-26 21:42:38 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit e9f6e9c075ad93141a568d94f7d4eb0f2edbd6c2
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 4c7ad179c78f97f68ad548cb40a9dfa6871655ae
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 174 insertions(+)
-
-commit 288b232f54c3692cd36f471d4042f51daf3ea79f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit c467b0defccf233d0c79234407bc38d7d09574d3
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit f9842f712732c482f2def9f24437851e57dd83f8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit e988ea1d1a286dd0f27af0657f9665d5cd8573aa
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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(+)
-
-commit 7b8fc7e6b501a32a36636dac79ecb57099269005
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-01-25 13:55:52 +0200
-
-    Use more parenthesis in succeed() macro in tests/tests.h.
-
- tests/tests.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 1fd76d488179580d37f31ee11948f4932aed31fd
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 6e27b1098a28f4ce09bfa6df68ad94182dfc2936
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit db9df0a9609c01a00a227329fb96e983971040f5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 3 insertions(+), 1 deletion(-)
-
-commit 765f0b05f6e95ed9194fb90819cee189ebbac36b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 7 insertions(+), 6 deletions(-)
-
-commit 3a7cc5c3dec7b078941f961b0393b86c418883b6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 12 insertions(+), 1 deletion(-)
-
-commit e5fdec93e273855c1bcc2579b83cfb481a9a1492
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 3 insertions(+), 1 deletion(-)
-
-commit ed40dc5a2c28a8dfccab8c165b3780738eeef93e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 deletion(-)
-
-commit ae0cd09a666a1682da8fc09487322227679e218d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 5 insertions(+), 1 deletion(-)
-
-commit 0e80ded13dfceb98f9494cbb5381a95eb44d03db
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 +++++
- tests/files/bad-single-none-footer_filter_flags.lzma | Bin 0 -> 30 bytes
- tests/files/bad-single-none-too_long_vli.lzma        | Bin 0 -> 39 bytes
- 3 files changed, 5 insertions(+)
-
-commit 8c8eb14055d8dd536b1b1c58fb284d34bb8ed1dd
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-23 13:42:35 +0200
-
-    Fixed a typo.
-
- src/liblzma/subblock/subblock_decoder_helper.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 980f65a9a10160c4d105767871e3002b9aaba3e0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-23 13:40:45 +0200
-
-    Fix a memory leak in the Subblock encoder.
-
- src/liblzma/subblock/subblock_encoder.c | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 99e12af4e2b866c011fe0106cd1e0bfdcc8fe9c6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-01-23 13:15:55 +0200
-
-    Fix a memory leak in metadata_decoder.c.
-
- src/liblzma/common/metadata_decoder.c | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 4d8cdbdab44400fd98f0f18a0f701e27cd1acdae
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+), 1 deletion(-)
-
-commit 67321de963ccf69410b3868b8e31534fe18a90de
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 8 insertions(+), 16 deletions(-)
-
-commit 863028cb7ad6d8d0455fa69348f56b376d7b908f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-23 00:18:32 +0200
-
-    Fixed a dangling pointer that caused invalid free().
-
- src/liblzma/common/info.c | 1 +
- 1 file changed, 1 insertion(+)
-
-commit cf49f42a6bd40143f54a6b10d6e605599e958c0b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 0ed6f1adcea540fb9593ca115d36de537f7f0dc6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-01-20 20:15:21 +0200
-
-    Updated debug/sync_flush.c.
-
- debug/sync_flush.c | 26 ++++++++++++++++++++++++--
- 1 file changed, 24 insertions(+), 2 deletions(-)
-
-commit d53e9b77054cfade6a643e77d085273a348b189c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 107259e306bcfc2336a0fb870fb58034c28faa52
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 119 insertions(+), 51 deletions(-)
-
-commit e141fe18950400faaa3503ff88ac20eacd73e88c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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(+)
-
-commit 0ae3208db94585eb8294b97ded387de0a3a07646
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit ab5feaf1fcc146ef9fd39360c53c290bec39524e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 deletion(-)
-
-commit 61d1784d8f1761d979a6da6e223e279ca33815e6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 9 insertions(+)
-
-commit c9cba976913e55ff9aac8a8133cc94416c7c1c9c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 139 insertions(+), 133 deletions(-)
-
-commit b254bd97b1cdb68d127523d91ca9e054ed89c4fd
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 8f5794c8f1a30e8e3b524b415bbe81af2e04c64a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-17 17:27:45 +0200
-
-    Added --delta to the output of "lzma --help".
-
- src/lzma/help.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-commit f88590e0014b38d40465937c19f25f05f16c79ae
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 6 insertions(+)
-
-commit bc0b945ca376e333077644d2f7fd54c2848aab8a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-16 16:33:37 +0200
-
-    Tiny non-technical edits to file-format.txt.
-
- doc/file-format.txt | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-commit 7599bb7064ccf007f054595dedda7927af868252
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-16 14:48:04 +0200
-
-    Plugged a memory leak in stream_decoder.c.
-
- src/liblzma/common/stream_decoder.c | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-commit 0b581539311f3712946e81e747839f8fb5f441a7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-16 14:47:27 +0200
-
-    Added memory leak detection to lzmadec.c.
-
- src/lzmadec/lzmadec.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-commit 5b5b13c7bb8fde6331064d21f3ebde41072480c4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 19389f2b82ec54fd4c847a18f16482e7be4c9887
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-16 14:31:44 +0200
-
-    Added ARRAY_SIZE(array) macro.
-
- src/common/sysdefs.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-commit 9bc33a54cbf83952130adbcb1be32c6882485416
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+), 1 deletion(-)
-
-commit 01d71d60b79027e1ce3eb9c79ae5191e1407c883
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 7 insertions(+)
-
-commit 8235e6e5b2878f76633afcda9a334640db503ef5
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-15 16:25:38 +0200
-
-    Fix memory leaks from test_block_header.c.
-
- tests/test_block_header.c | 19 +++++++++++++++++--
- 1 file changed, 17 insertions(+), 2 deletions(-)
-
-commit f10fc6a69d40b6d5c9cfbf8d3746f49869c2e2f6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 19 insertions(+), 21 deletions(-)
-
-commit e5728142a2048979f5c0c2149ce71ae952a092e1
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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(+)
-
-commit f3c88e8b8d8dd57f4bba5f0921eebf276437c244
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-15 13:29:14 +0200
-
-    Fixed assembler detection in configure.ac, and added
-    detection for x86_64.
-
- configure.ac | 32 ++++++++++++++++----------------
- 1 file changed, 16 insertions(+), 16 deletions(-)
-
-commit 54ec204f58287f50d3976288295da4188a19192b
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 01b4b19f49f00e17a0f9cb8754c672ac0847b6e1
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 insertions(+), 6 deletions(-)
-
-commit 19bd7f3cf25e4ff8487ef7098ca4a7b58681961d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-15 08:37:42 +0200
-
-    Fix a typo in lzma_encoder.c.
-
- src/liblzma/lzma/lzma_encoder.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 9f9b1983013048f2142e8bc7e240149d2687bedc
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-01-15 07:41:39 +0200
-
-    Fix typo in test_index.c.
-
- tests/test_index.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit d13d693155c176fc9e9ad5c50d48ccba27c2d9c6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+), 2 deletions(-)
-
-commit e22b37968d153683fec61ad37b6b160cb7ca4ddc
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+)
-
-commit 9547e734a00ddb64c851fa3f116e4f9e7d763ea7
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 2 deletions(-)
-
-commit 3e09e1c05871f3757f759b801890ccccc9286608
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 3 insertions(+), 3 deletions(-)
-
-commit a670fec8021e5962429689c194148a04c3418872
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 30 insertions(+), 22 deletions(-)
-
-commit f73c2ab6079ed5675a42b39d584a567befbd4624
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 4 insertions(+), 1 deletion(-)
-
-commit 0e70fbe4032351aab13a1cd8e5deced105c0b276
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 379fbbe84d922c7cc00afa65c6f0c095da596b19
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 7 insertions(+), 16 deletions(-)
-
-commit 97d5fa82077e57815dfad995dc393c2809a78539
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-08 23:10:57 +0200
-
-    Updated tests/files/README.
-
- tests/files/README | 15 +++++++++------
- 1 file changed, 9 insertions(+), 6 deletions(-)
-
-commit 3bb9bb310936cba6a743b4f06739a397dec7c28f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit 7054c5f5888ac6a7178cd43dc9583ce6c7e78c9f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 14 insertions(+), 23 deletions(-)
-
-commit 753e4d95cd1cf29c632dfe1a670af7c67aeffbf4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(+)
-
-commit faeac7b7aca75f86afed1e7cc06279d9d497c627
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit a751126dbb656767ed4666cf0e5d3e17349d93d1
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 9080267603b1006c4867c823307dca9df8be0d20
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 3 insertions(+), 1 deletion(-)
-
-commit e2417b2b9134f3f65e14b61e23cd3644d8954353
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-01-07 23:25:32 +0200
-
-    Updated fi.po although it's currently pretty much crap.
-
- po/fi.po | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-commit c7189d981a1b27c63da0c1ee80d9b5cd8ce1733d
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 3dbbea82b74bb841c995ad332a3aeca613015e10
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 2fd2d181543feab1b4003f3ac6e85625fbee04f0
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-07 18:22:24 +0200
-
-    Cosmetic edit to test_files.sh.
-
- tests/test_files.sh | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-commit 9a71d573100a990ceb30ce0bec6a9a15d795605f
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-07 18:09:44 +0200
-
-    Added tests/files/README.
-
- tests/files/README | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 108 insertions(+)
-
-commit 47f48fe9936ed72617a60fbd015df7e0e47a1e43
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-07 14:20:57 +0200
-
-    Tell in COPYING that everything in tests/files is
-    public domain.
-
- COPYING | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-commit 3502b3e1d00251d3c8dda96079440705c28d8225
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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
- tests/files/malicious-single-subblock1023-slow.lzma | Bin 7886 -> 0 bytes
- 5 files changed, 0 insertions(+), 0 deletions(-)
-
-commit 908b2ac604b9940369d7fe8a45e9eb6da5d2a24c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 deletion(-)
-
-commit ecb2a6548f5978022a8fa931719dc575f5fd3bf6
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-07 11:23:13 +0200
-
-    Updated README regarding the assembler optimizations.
-
- README | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-commit eacb8050438d3e6146c86eb9732d3fb1ef1825cb
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-07 10:58:00 +0200
-
-    Updated THANKS.
-
- THANKS | 1 +
- 1 file changed, 1 insertion(+)
-
-commit 1239649f96132b18e3b7e2dd152ecf53a195caa8
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-06 21:47:17 +0200
-
-    Cosmetic changes to configure.ac.
-
- configure.ac | 14 ++++++--------
- 1 file changed, 6 insertions(+), 8 deletions(-)
-
-commit 88ee301ec2e4506a30ec7ac9aaa2288e2dcadd0e
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 15 insertions(+), 2 deletions(-)
-
-commit c15a7abf66e3a70792f7444115e484c7981c8284
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2008-01-05 19:57:00 +0200
-
-    Fix typo in comment (INT64_MAX -> UINT64_MAX).
-
- src/liblzma/api/lzma/vli.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 072927905a3b66281c6311b4b351caa501d8b73a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-05 19:42:04 +0200
-
-    Rearranged testing of GCC-specific flags.
-
- configure.ac | 33 +++++++++++++++++++++++----------
- 1 file changed, 23 insertions(+), 10 deletions(-)
-
-commit d160ee32598c6d1cd9054ef019e8c9331208b188
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-05 01:20:24 +0200
-
-    Another bug fix for flush marker detection.
-
- src/liblzma/lzma/lzma_decoder.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-commit fc67f79f607cbfa78c6f47a69dec098d8659b162
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2008-01-04 21:37:01 +0200
-
-    Fix stupid bugs in flush marker detection.
-
- src/liblzma/lzma/lzma_decoder.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-commit 0029cbbabe87d491fc046a55a629a6d556010baa
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2007-12-14 11:15:21 +0200
-
-    Added a note to README that --disable-assembler
-    must be used on Darwin.
-
- README | 4 ++++
- 1 file changed, 4 insertions(+)
-
-commit 44b333d4615b5aabc557a0e1b6bb0096da3fae24
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-Date:   2007-12-14 09:59:05 +0200
-
-    Fixed wrong symbol name in crc64_x86.s.
-
- src/liblzma/check/crc64_x86.s | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 2881570df6803eed2fe550af34574e8e61794804
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 918bcb0e0728d2d976621e9f35b56f224f11d989
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2007-12-11 17:08:04 +0200
-
-    Removed uncompressed size tracking from Delta encoder too.
-
- src/liblzma/common/delta_coder.c | 21 +++------------------
- 1 file changed, 3 insertions(+), 18 deletions(-)
-
-commit 3e16d51dd645667b05ff826665b1fc353aa41cd9
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit 7c1ad41eb611ed89e5bb8792a3beb533b7aa59f4
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 1 insertion(+), 1 deletion(-)
-
-commit ce64df716243fdc40359090d1f6541f3a4f5f21a
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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 file changed, 57 insertions(+), 35 deletions(-)
-
-commit 329c272d501e88793dda5540358d55c12428d194
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <meyering at redhat.com>
-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 insertion(+), 2 deletions(-)
-
-commit 07ac881779a8477f2c1ab112b91a129e24aa743c
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 <lasse.collin at tukaani.org>
-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
- tests/files/malicious-single-subblock1023-slow.lzma | Bin 0 -> 7886 bytes
- tests/files/malicious-single-subblock31-slow.lzma   | Bin 0 -> 1233 bytes
- 17 files changed, 0 insertions(+), 0 deletions(-)
-
-commit ff946ceb7975d4f11950afd33f6315b4d20d1a03
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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 file changed, 3 insertions(+), 3 deletions(-)
-
-commit 2bf36d22d2c24ac3f488e63b35564fa2f6dab8d1
-Author: Lasse Collin <lasse.collin at tukaani.org>
-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(-)
-
-commit 5d018dc03549c1ee4958364712fb0c94e1bf2741
-Author: Lasse Collin <lasse.collin at tukaani.org>
-Date:   2007-12-09 00:42:33 +0200
-
-    Imported to git.
-
- AUTHORS                                        |   18 +
- COPYING                                        |   24 +
- COPYING.GPLv2                                  |  339 +++++
- COPYING.GPLv3                                  |  674 +++++++++
- COPYING.LGPLv2.1                               |  504 +++++++
- ChangeLog                                      |    2 +
- Doxyfile.in                                    | 1229 ++++++++++++++++
- Makefile.am                                    |   38 +
- NEWS                                           |    0
- README                                         |  151 ++
- THANKS                                         |   23 +
- TODO                                           |  109 ++
- autogen.sh                                     |   38 +
- configure.ac                                   |  611 ++++++++
- doc/bugs.txt                                   |   46 +
- doc/faq.txt                                    |  247 ++++
- doc/file-format.txt                            | 1861 ++++++++++++++++++++++++
- doc/history.txt                                |  140 ++
- doc/liblzma-advanced.txt                       |  324 +++++
- doc/liblzma-hacking.txt                        |  112 ++
- doc/liblzma-intro.txt                          |  188 +++
- doc/liblzma-security.txt                       |  219 +++
- doc/lzma-intro.txt                             |  107 ++
- extra/scanlzma/scanlzma.c                      |   85 ++
- lib/Makefile.am                                |   40 +
- lib/getopt.c                                   | 1191 +++++++++++++++
- lib/getopt1.c                                  |  171 +++
- lib/getopt_.h                                  |  226 +++
- lib/getopt_int.h                               |  131 ++
- lib/gettext.h                                  |  240 +++
- m4/acx_pthread.m4                              |  279 ++++
- m4/getopt.m4                                   |   83 ++
- po/LINGUAS                                     |    1 +
- po/Makevars                                    |   46 +
- po/POTFILES.in                                 |   13 +
- po/fi.po                                       |  445 ++++++
- src/Makefile.am                                |   16 +
- src/common/open_stdxxx.h                       |   50 +
- src/common/physmem.h                           |   77 +
- src/common/sysdefs.h                           |  100 ++
- src/liblzma/Makefile.am                        |   47 +
- src/liblzma/api/Makefile.am                    |   39 +
- src/liblzma/api/lzma.h                         |  122 ++
- src/liblzma/api/lzma/alignment.h               |   60 +
- src/liblzma/api/lzma/alone.h                   |   82 ++
- src/liblzma/api/lzma/auto.h                    |   41 +
- src/liblzma/api/lzma/base.h                    |  410 ++++++
- src/liblzma/api/lzma/block.h                   |  409 ++++++
- src/liblzma/api/lzma/check.h                   |  128 ++
- src/liblzma/api/lzma/copy.h                    |   29 +
- src/liblzma/api/lzma/delta.h                   |   49 +
- src/liblzma/api/lzma/extra.h                   |  114 ++
- src/liblzma/api/lzma/filter.h                  |  166 +++
- src/liblzma/api/lzma/index.h                   |   84 ++
- src/liblzma/api/lzma/info.h                    |  315 ++++
- src/liblzma/api/lzma/init.h                    |   85 ++
- src/liblzma/api/lzma/lzma.h                    |  312 ++++
- src/liblzma/api/lzma/memlimit.h                |  157 ++
- src/liblzma/api/lzma/metadata.h                |  100 ++
- src/liblzma/api/lzma/raw.h                     |   72 +
- src/liblzma/api/lzma/simple.h                  |   85 ++
- src/liblzma/api/lzma/stream.h                  |  178 +++
- src/liblzma/api/lzma/stream_flags.h            |  142 ++
- src/liblzma/api/lzma/subblock.h                |  197 +++
- src/liblzma/api/lzma/version.h                 |   59 +
- src/liblzma/api/lzma/vli.h                     |  244 ++++
- src/liblzma/check/Makefile.am                  |   64 +
- src/liblzma/check/check.c                      |  160 ++
- src/liblzma/check/check.h                      |  102 ++
- src/liblzma/check/check_byteswap.h             |   43 +
- src/liblzma/check/check_init.c                 |   37 +
- src/liblzma/check/crc32.c                      |   88 ++
- src/liblzma/check/crc32_init.c                 |   58 +
- src/liblzma/check/crc32_table.c                |   22 +
- src/liblzma/check/crc32_table_be.h             |  527 +++++++
- src/liblzma/check/crc32_table_le.h             |  527 +++++++
- src/liblzma/check/crc32_tablegen.c             |   55 +
- src/liblzma/check/crc32_x86.s                  |  217 +++
- src/liblzma/check/crc64.c                      |   75 +
- src/liblzma/check/crc64_init.c                 |   58 +
- src/liblzma/check/crc64_table.c                |   22 +
- src/liblzma/check/crc64_table_be.h             |  523 +++++++
- src/liblzma/check/crc64_table_le.h             |  523 +++++++
- src/liblzma/check/crc64_tablegen.c             |   56 +
- src/liblzma/check/crc64_x86.s                  |  203 +++
- src/liblzma/check/crc_macros.h                 |   33 +
- src/liblzma/check/sha256.c                     |  203 +++
- src/liblzma/common/Makefile.am                 |   94 ++
- src/liblzma/common/alignment.c                 |  118 ++
- src/liblzma/common/allocator.c                 |   57 +
- src/liblzma/common/alone_decoder.c             |  197 +++
- src/liblzma/common/alone_decoder.h             |   24 +
- src/liblzma/common/alone_encoder.c             |  167 +++
- src/liblzma/common/auto_decoder.c              |  113 ++
- src/liblzma/common/block_decoder.c             |  405 ++++++
- src/liblzma/common/block_decoder.h             |   29 +
- src/liblzma/common/block_encoder.c             |  375 +++++
- src/liblzma/common/block_encoder.h             |   29 +
- src/liblzma/common/block_header_decoder.c      |  373 +++++
- src/liblzma/common/block_header_encoder.c      |  211 +++
- src/liblzma/common/block_private.h             |   46 +
- src/liblzma/common/chunk_size.c                |   74 +
- src/liblzma/common/code.c                      |  203 +++
- src/liblzma/common/common.h                    |  271 ++++
- src/liblzma/common/copy_coder.c                |  143 ++
- src/liblzma/common/copy_coder.h                |   31 +
- src/liblzma/common/delta_coder.c               |  210 +++
- src/liblzma/common/delta_coder.h               |   31 +
- src/liblzma/common/extra.c                     |   33 +
- src/liblzma/common/features.c                  |   70 +
- src/liblzma/common/filter_flags_decoder.c      |  382 +++++
- src/liblzma/common/filter_flags_encoder.c      |  359 +++++
- src/liblzma/common/index.c                     |  140 ++
- src/liblzma/common/info.c                      |  823 +++++++++++
- src/liblzma/common/init.c                      |   39 +
- src/liblzma/common/init_decoder.c              |   33 +
- src/liblzma/common/init_encoder.c              |   44 +
- src/liblzma/common/memory_limitter.c           |  200 +++
- src/liblzma/common/memory_usage.c              |  113 ++
- src/liblzma/common/metadata_decoder.c          |  555 +++++++
- src/liblzma/common/metadata_decoder.h          |   31 +
- src/liblzma/common/metadata_encoder.c          |  436 ++++++
- src/liblzma/common/metadata_encoder.h          |   30 +
- src/liblzma/common/next_coder.c                |   65 +
- src/liblzma/common/raw_common.c                |  175 +++
- src/liblzma/common/raw_common.h                |   31 +
- src/liblzma/common/raw_decoder.c               |  127 ++
- src/liblzma/common/raw_decoder.h               |   30 +
- src/liblzma/common/raw_encoder.c               |  124 ++
- src/liblzma/common/raw_encoder.h               |   30 +
- src/liblzma/common/stream_common.c             |   23 +
- src/liblzma/common/stream_common.h             |   28 +
- src/liblzma/common/stream_decoder.c            |  454 ++++++
- src/liblzma/common/stream_encoder_multi.c      |  460 ++++++
- src/liblzma/common/stream_encoder_single.c     |  220 +++
- src/liblzma/common/stream_flags_decoder.c      |  258 ++++
- src/liblzma/common/stream_flags_decoder.h      |   31 +
- src/liblzma/common/stream_flags_encoder.c      |   75 +
- src/liblzma/common/sysdefs.h                   |    1 +
- src/liblzma/common/version.c                   |   25 +
- src/liblzma/common/vli_decoder.c               |   69 +
- src/liblzma/common/vli_encoder.c               |   81 ++
- src/liblzma/common/vli_reverse_decoder.c       |   55 +
- src/liblzma/lz/Makefile.am                     |   63 +
- src/liblzma/lz/bt2.c                           |   27 +
- src/liblzma/lz/bt2.h                           |   31 +
- src/liblzma/lz/bt3.c                           |   29 +
- src/liblzma/lz/bt3.h                           |   31 +
- src/liblzma/lz/bt4.c                           |   30 +
- src/liblzma/lz/bt4.h                           |   31 +
- src/liblzma/lz/hc3.c                           |   30 +
- src/liblzma/lz/hc3.h                           |   31 +
- src/liblzma/lz/hc4.c                           |   31 +
- src/liblzma/lz/hc4.h                           |   31 +
- src/liblzma/lz/lz_decoder.c                    |  462 ++++++
- src/liblzma/lz/lz_decoder.h                    |  214 +++
- src/liblzma/lz/lz_encoder.c                    |  481 ++++++
- src/liblzma/lz/lz_encoder.h                    |  161 ++
- src/liblzma/lz/lz_encoder_private.h            |   40 +
- src/liblzma/lz/match_c.h                       |  401 +++++
- src/liblzma/lz/match_h.h                       |   69 +
- src/liblzma/lzma.pc.in                         |   11 +
- src/liblzma/lzma/Makefile.am                   |   43 +
- src/liblzma/lzma/lzma_common.h                 |  128 ++
- src/liblzma/lzma/lzma_decoder.c                |  844 +++++++++++
- src/liblzma/lzma/lzma_decoder.h                |   41 +
- src/liblzma/lzma/lzma_encoder.c                |  413 ++++++
- src/liblzma/lzma/lzma_encoder.h                |   35 +
- src/liblzma/lzma/lzma_encoder_features.c       |   59 +
- src/liblzma/lzma/lzma_encoder_getoptimum.c     |  893 ++++++++++++
- src/liblzma/lzma/lzma_encoder_getoptimumfast.c |  201 +++
- src/liblzma/lzma/lzma_encoder_init.c           |  245 ++++
- src/liblzma/lzma/lzma_encoder_presets.c        |   34 +
- src/liblzma/lzma/lzma_encoder_private.h        |  225 +++
- src/liblzma/lzma/lzma_literal.c                |   74 +
- src/liblzma/lzma/lzma_literal.h                |   74 +
- src/liblzma/rangecoder/Makefile.am             |   28 +
- src/liblzma/rangecoder/range_common.h          |   68 +
- src/liblzma/rangecoder/range_decoder.h         |  189 +++
- src/liblzma/rangecoder/range_encoder.c         |   46 +
- src/liblzma/rangecoder/range_encoder.h         |  317 ++++
- src/liblzma/simple/Makefile.am                 |   46 +
- src/liblzma/simple/arm.c                       |   76 +
- src/liblzma/simple/armthumb.c                  |   81 ++
- src/liblzma/simple/ia64.c                      |  117 ++
- src/liblzma/simple/powerpc.c                   |   80 +
- src/liblzma/simple/simple_coder.c              |  306 ++++
- src/liblzma/simple/simple_coder.h              |   68 +
- src/liblzma/simple/simple_private.h            |   86 ++
- src/liblzma/simple/sparc.c                     |   88 ++
- src/liblzma/simple/x86.c                       |  161 ++
- src/liblzma/subblock/Makefile.am               |   33 +
- src/liblzma/subblock/subblock_decoder.c        |  681 +++++++++
- src/liblzma/subblock/subblock_decoder.h        |   29 +
- src/liblzma/subblock/subblock_decoder_helper.c |   80 +
- src/liblzma/subblock/subblock_decoder_helper.h |   36 +
- src/liblzma/subblock/subblock_encoder.c        |  841 +++++++++++
- src/liblzma/subblock/subblock_encoder.h        |   28 +
- src/lzma/Makefile.am                           |   63 +
- src/lzma/alloc.c                               |  106 ++
- src/lzma/alloc.h                               |   42 +
- src/lzma/args.c                                |  566 +++++++
- src/lzma/args.h                                |   64 +
- src/lzma/error.c                               |  156 ++
- src/lzma/error.h                               |   67 +
- src/lzma/hardware.c                            |   99 ++
- src/lzma/hardware.h                            |   31 +
- src/lzma/help.c                                |  178 +++
- src/lzma/help.h                                |   32 +
- src/lzma/io.c                                  |  664 +++++++++
- src/lzma/io.h                                  |   60 +
- src/lzma/list.c                                |  477 ++++++
- src/lzma/main.c                                |  254 ++++
- src/lzma/options.c                             |  346 +++++
- src/lzma/options.h                             |   46 +
- src/lzma/private.h                             |   55 +
- src/lzma/process.c                             |  458 ++++++
- src/lzma/process.h                             |   30 +
- src/lzma/suffix.c                              |  145 ++
- src/lzma/suffix.h                              |   25 +
- src/lzma/util.c                                |  182 +++
- src/lzma/util.h                                |   32 +
- src/lzmadec/Makefile.am                        |   27 +
- src/lzmadec/lzmadec.c                          |  515 +++++++
- src/scripts/Makefile.am                        |   24 +
- src/scripts/lzdiff                             |   67 +
- src/scripts/lzdiff.1                           |   51 +
- src/scripts/lzgrep                             |  123 ++
- src/scripts/lzgrep.1                           |   61 +
- src/scripts/lzmore                             |   74 +
- src/scripts/lzmore.1                           |   55 +
- tests/Makefile.am                              |   43 +
- tests/test_block.c                             |   59 +
- tests/test_block_header.c                      |  352 +++++
- tests/test_check.c                             |   90 ++
- tests/test_filter_flags.c                      |  326 +++++
- tests/test_index.c                             |   43 +
- tests/test_info.c                              |  717 +++++++++
- tests/test_stream_flags.c                      |  191 +++
- tests/tests.h                                  |  148 ++
- 240 files changed, 42513 insertions(+)

Copied: vendor/xz/5.2.3/ChangeLog (from rev 11013, vendor/xz/dist/ChangeLog)
===================================================================
--- vendor/xz/5.2.3/ChangeLog	                        (rev 0)
+++ vendor/xz/5.2.3/ChangeLog	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,15368 @@
+commit 3d566cd519017eee1a400e7961ff14058dfaf33c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2016-12-30 13:26:36 +0200
+
+    Bump version and soname for 5.2.3.
+
+ src/liblzma/Makefile.am        | 2 +-
+ src/liblzma/api/lzma/version.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 053e624fe33795e779ff736f16ce44a129c829b5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2016-12-30 13:25:10 +0200
+
+    Update NEWS for 5.2.3.
+
+ NEWS | 39 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 39 insertions(+)
+
+commit cae412b2b77d7fd88d187ed7659331709311f80d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-04-01 14:45:25 +0300
+
+    xz: Fix the Capsicum rights on user_abort_pipe.
+
+ src/xz/file_io.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit 9ccbae41000572193b9a09e7102f9e84dc6d96de
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2016-12-28 21:05:22 +0200
+
+    Mention potential sandboxing bugs in INSTALL.
+
+ INSTALL | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+commit e013a337d3de77cce24360dffe956ea2339489b6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2016-11-21 20:24:50 +0200
+
+    liblzma: Avoid multiple definitions of lzma_coder structures.
+    
+    Only one definition was visible in a translation unit.
+    It avoided a few casts and temp variables but seems that
+    this hack doesn't work with link-time optimizations in compilers
+    as it's not C99/C11 compliant.
+    
+    Fixes:
+    http://www.mail-archive.com/xz-devel@tukaani.org/msg00279.html
+
+ src/liblzma/common/alone_decoder.c             |  44 +++++----
+ src/liblzma/common/alone_encoder.c             |  34 ++++---
+ src/liblzma/common/auto_decoder.c              |  35 ++++---
+ src/liblzma/common/block_decoder.c             |  41 ++++----
+ src/liblzma/common/block_encoder.c             |  40 ++++----
+ src/liblzma/common/common.h                    |  18 ++--
+ src/liblzma/common/index_decoder.c             |  33 ++++---
+ src/liblzma/common/index_encoder.c             |  16 ++--
+ src/liblzma/common/stream_decoder.c            |  50 +++++-----
+ src/liblzma/common/stream_encoder.c            |  56 ++++++-----
+ src/liblzma/common/stream_encoder_mt.c         | 124 ++++++++++++++-----------
+ src/liblzma/delta/delta_common.c               |  25 ++---
+ src/liblzma/delta/delta_decoder.c              |   6 +-
+ src/liblzma/delta/delta_encoder.c              |  12 ++-
+ src/liblzma/delta/delta_private.h              |   4 +-
+ src/liblzma/lz/lz_decoder.c                    |  60 ++++++------
+ src/liblzma/lz/lz_decoder.h                    |  13 ++-
+ src/liblzma/lz/lz_encoder.c                    |  57 +++++++-----
+ src/liblzma/lz/lz_encoder.h                    |   9 +-
+ src/liblzma/lzma/lzma2_decoder.c               |  32 ++++---
+ src/liblzma/lzma/lzma2_encoder.c               |  51 +++++-----
+ src/liblzma/lzma/lzma_decoder.c                |  27 +++---
+ src/liblzma/lzma/lzma_encoder.c                |  29 +++---
+ src/liblzma/lzma/lzma_encoder.h                |   9 +-
+ src/liblzma/lzma/lzma_encoder_optimum_fast.c   |   3 +-
+ src/liblzma/lzma/lzma_encoder_optimum_normal.c |  23 ++---
+ src/liblzma/lzma/lzma_encoder_private.h        |   6 +-
+ src/liblzma/simple/arm.c                       |   2 +-
+ src/liblzma/simple/armthumb.c                  |   2 +-
+ src/liblzma/simple/ia64.c                      |   2 +-
+ src/liblzma/simple/powerpc.c                   |   2 +-
+ src/liblzma/simple/simple_coder.c              |  61 ++++++------
+ src/liblzma/simple/simple_private.h            |  12 +--
+ src/liblzma/simple/sparc.c                     |   2 +-
+ src/liblzma/simple/x86.c                       |  15 +--
+ 35 files changed, 532 insertions(+), 423 deletions(-)
+
+commit 8e0f1af3dcaec00a3879cce8ad7441edc6359d1c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2016-12-26 20:50:25 +0200
+
+    Document --enable-sandbox configure option in INSTALL.
+
+ INSTALL | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+commit ce2542d220de06acd618fd9f5c0a6683029fb4eb
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-03-31 22:19:34 +0300
+
+    xz: Add support for sandboxing with Capsicum (disabled by default).
+    
+    In the v5.2 branch this feature is considered experimental
+    and thus disabled by default.
+    
+    The sandboxing is used conditionally as described in main.c.
+    This isn't optimal but it was much easier to implement than
+    a full sandboxing solution and it still covers the most common
+    use cases where xz is writing to standard output. This should
+    have practically no effect on performance even with small files
+    as fork() isn't needed.
+    
+    C and locale libraries can open files as needed. This has been
+    fine in the past, but it's a problem with things like Capsicum.
+    io_sandbox_enter() tries to ensure that various locale-related
+    files have been loaded before cap_enter() is called, but it's
+    possible that there are other similar problems which haven't
+    been seen yet.
+    
+    Currently Capsicum is available on FreeBSD 10 and later
+    and there is a port to Linux too.
+    
+    Thanks to Loganaden Velvindron for help.
+
+ configure.ac       | 41 +++++++++++++++++++++++++++
+ src/xz/Makefile.am |  2 +-
+ src/xz/file_io.c   | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/xz/file_io.h   |  6 ++++
+ src/xz/main.c      | 18 ++++++++++++
+ src/xz/private.h   |  4 +++
+ 6 files changed, 151 insertions(+), 1 deletion(-)
+
+commit 3ca1d5e6320111043e19434da881065fadafa0e4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-03-31 21:12:30 +0300
+
+    Fix bugs and otherwise improve ax_check_capsicum.m4.
+    
+    AU_ALIAS was removed because the new version is incompatible
+    with the old version.
+    
+    It no longer checks for <sys/capability.h> separately.
+    It's enough to test for it as part of AC_CHECK_DECL.
+    The defines HAVE_CAPSICUM_SYS_CAPSICUM_H and
+    HAVE_CAPSICUM_SYS_CAPABILITY_H were removed as unneeded.
+    HAVE_SYS_CAPSICUM_H from AC_CHECK_HEADERS is enough.
+    
+    It no longer does a useless search for the Capsicum library
+    if the header wasn't found.
+    
+    Fixed a bug in ACTION-IF-FOUND (the first argument). Specifying
+    the argument omitted the default action but the given action
+    wasn't used instead.
+    
+    AC_DEFINE([HAVE_CAPSICUM]) is now always called when Capsicum
+    support is found. Previously it was part of the default
+    ACTION-IF-FOUND which a custom action would override. Now
+    the default action only prepends ${CAPSICUM_LIB} to LIBS.
+    
+    The documentation was updated.
+    
+    Since there as no serial number, "#serial 2" was added.
+
+ m4/ax_check_capsicum.m4 | 103 ++++++++++++++++++++++++------------------------
+ 1 file changed, 51 insertions(+), 52 deletions(-)
+
+commit 5f3a742b64197fe8bedb6f05fc6ce5d177d11145
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-03-31 19:20:24 +0300
+
+    Add m4/ax_check_capsicum.m4 for detecting Capsicum support.
+    
+    The file was loaded from this web page:
+    https://github.com/google/capsicum-test/blob/dev/autoconf/m4/ax_check_capsicum.m4
+    
+    Thanks to Loganaden Velvindron for pointing it out for me.
+
+ m4/ax_check_capsicum.m4 | 86 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 86 insertions(+)
+
+commit d74377e62b4c649e40294dd441de72c0f092e67c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-10-12 20:29:09 +0300
+
+    liblzma: Fix a memory leak in error path of lzma_index_dup().
+    
+    lzma_index_dup() calls index_dup_stream() which, in case of
+    an error, calls index_stream_end() to free memory allocated
+    by index_stream_init(). However, it illogically didn't
+    actually free the memory. To make it logical, the tree
+    handling code was modified a bit in addition to changing
+    index_stream_end().
+    
+    Thanks to Evan Nemerson for the bug report.
+
+ src/liblzma/common/index.c | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+commit f580732216dcf971f3f006fe8e01cd4979e1d964
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2016-10-24 18:53:25 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 88d7a7fd153bf1355cdf798ffdac7443d0169afc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2016-10-24 18:51:36 +0300
+
+    tuklib_cpucores: Add support for sched_getaffinity().
+    
+    It's available in glibc (GNU/Linux, GNU/kFreeBSD). It's better
+    than sysconf(_SC_NPROCESSORS_ONLN) because sched_getaffinity()
+    gives the number of cores available to the process instead of
+    the total number of cores online.
+    
+    As a side effect, this commit fixes a bug on GNU/kFreeBSD where
+    configure would detect the FreeBSD-specific cpuset_getaffinity()
+    but it wouldn't actually work because on GNU/kFreeBSD it requires
+    using -lfreebsd-glue when linking. Now the glibc-specific function
+    will be used instead.
+    
+    Thanks to Sebastian Andrzej Siewior for the original patch
+    and testing.
+
+ m4/tuklib_cpucores.m4        | 30 +++++++++++++++++++++++++++++-
+ src/common/tuklib_cpucores.c |  9 +++++++++
+ 2 files changed, 38 insertions(+), 1 deletion(-)
+
+commit 51baf684376903dbeddd840582bfdf9fa91b311b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2016-06-30 20:27:36 +0300
+
+    xz: Fix copying of timestamps on Windows.
+    
+    xz used to call utime() on Windows, but its result gets lost
+    on close(). Using _futime() seems to work.
+    
+    Thanks to Martok for reporting the bug:
+    http://www.mail-archive.com/xz-devel@tukaani.org/msg00261.html
+
+ configure.ac     |  2 +-
+ src/xz/file_io.c | 18 ++++++++++++++++++
+ 2 files changed, 19 insertions(+), 1 deletion(-)
+
+commit 1ddc479851139d6e8202e5835421bfe6578d9e07
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2016-06-16 22:46:02 +0300
+
+    xz: Silence warnings from -Wlogical-op.
+    
+    Thanks to Evan Nemerson.
+
+ src/xz/file_io.c | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+commit be647ff5ed5a1c244a65722af6ce250259f3b14a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2016-04-10 20:55:49 +0300
+
+    Build: Fix = to += for xz_SOURCES in src/xz/Makefile.am.
+    
+    Thanks to Christian Kujau.
+
+ src/xz/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit fb6d50c15343831f35305982cefa82053099191d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2016-04-10 20:54:17 +0300
+
+    Build: Bump GNU Gettext version requirement to 0.19.
+    
+    It silences a few warnings and most people probably have
+    0.19 even on stable distributions.
+    
+    Thanks to Christian Kujau.
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 74f8dad9f912a2993768d93d108ea2b0b2c196e0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2016-03-13 20:21:49 +0200
+
+    liblzma: Disable external SHA-256 by default.
+    
+    This is the sane thing to do. The conflict with OpenSSL
+    on some OSes and especially that the OS-provided versions
+    can be significantly slower makes it clear that it was
+    a mistake to have the external SHA-256 support enabled by
+    default.
+    
+    Those who want it can now pass --enable-external-sha256 to
+    configure. INSTALL was updated with notes about OSes where
+    this can be a bad idea.
+    
+    The SHA-256 detection code in configure.ac had some bugs that
+    could lead to a build failure in some situations. These were
+    fixed, although it doesn't matter that much now that the
+    external SHA-256 is disabled by default.
+    
+    MINIX >= 3.2.0 uses NetBSD's libc and thus has SHA256_Init
+    in libc instead of libutil. Support for the libutil version
+    was removed.
+
+ INSTALL                   | 36 ++++++++++++++++++++++
+ configure.ac              | 76 +++++++++++++++++++++++------------------------
+ src/liblzma/check/check.h | 16 ++++------
+ 3 files changed, 79 insertions(+), 49 deletions(-)
+
+commit ea7f6ff04cb5bb1498088eb09960a4c3f13dfe39
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2016-03-10 20:27:05 +0200
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit d0e018016b311232e82d9a98dc68f1e3dabce794
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2016-03-10 20:26:49 +0200
+
+    Build: Avoid SHA256_Init on FreeBSD and MINIX 3.
+    
+    On FreeBSD 10 and older, SHA256_Init from libmd conflicts
+    with libcrypto from OpenSSL. The OpenSSL version has
+    different sizeof(SHA256_CTX) and it can cause weird
+    problems if wrong SHA256_Init gets used.
+    
+    Looking at the source, MINIX 3 seems to have a similar issue but
+    I'm not sure. To be safe, I disabled SHA256_Init on MINIX 3 too.
+    
+    NetBSD has SHA256_Init in libc and they had a similar problem,
+    but they already fixed it in 2009.
+    
+    Thanks to Jim Wilcoxson for the bug report that helped
+    in finding the problem.
+
+ configure.ac | 27 +++++++++++++++++++++------
+ 1 file changed, 21 insertions(+), 6 deletions(-)
+
+commit 5daae123915f32a4ed6dc948b831533c2d1beec3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-11-08 20:16:10 +0200
+
+    tuklib_physmem: Hopefully silence a warning on Windows.
+
+ src/common/tuklib_physmem.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 491acc406e098167ccb7fce0728b94c2f32cff9f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-11-04 23:17:43 +0200
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 8173ff8790ad3502d04e1c07d014cb84a3b8187b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-11-04 23:14:00 +0200
+
+    liblzma: Make Valgrind happier with optimized (gcc -O2) liblzma.
+    
+    When optimizing, GCC can reorder code so that an uninitialized
+    value gets used in a comparison, which makes Valgrind unhappy.
+    It doesn't happen when compiled with -O0, which I tend to use
+    when running Valgrind.
+    
+    Thanks to Rich Prohaska. I remember this being mentioned long
+    ago by someone else but nothing was done back then.
+
+ src/liblzma/lz/lz_encoder.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 013de2b5ab8094d2c82a2771f3d143eeb656eda9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-11-03 20:55:45 +0200
+
+    liblzma: Rename lzma_presets.c back to lzma_encoder_presets.c.
+    
+    It would be too annoying to update other build systems
+    just because of this.
+
+ src/liblzma/lzma/Makefile.inc                               | 2 +-
+ src/liblzma/lzma/{lzma_presets.c => lzma_encoder_presets.c} | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit a322f70ad96de88968c2c36e6a36bc08ae30bd20
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-11-03 20:47:07 +0200
+
+    Build: Disable xzdec, lzmadec, and lzmainfo when they cannot be built.
+    
+    They all need decoder support and if that isn't available,
+    there's no point trying to build them.
+
+ configure.ac | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 8ea49606cf6427e32319de7693eca9e43f1c8ad6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-11-03 20:35:19 +0200
+
+    Build: Simplify $enable_{encoders,decoders} usage a bit.
+
+ configure.ac | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+commit 42131a25e52bfe400acfa7df93469a96bb78bb78
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-11-03 20:31:31 +0200
+
+    Windows/MSVC: Update config.h.
+
+ windows/config.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit e9184e87cc989d14c7413e6adb3eca98f6ae0290
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-11-03 20:29:58 +0200
+
+    DOS: Update config.h.
+
+ dos/config.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit 2296778f3c9a1e3a8699973b09dd3610b8baa402
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-11-03 20:29:33 +0200
+
+    xz: Make xz buildable even when encoders or decoders are disabled.
+    
+    The patch is quite long but it's mostly about adding new #ifdefs
+    to omit code when encoders or decoders have been disabled.
+    
+    This adds two new #defines to config.h: HAVE_ENCODERS and
+    HAVE_DECODERS.
+
+ configure.ac       |  4 ++++
+ src/xz/Makefile.am |  8 ++++++--
+ src/xz/args.c      | 16 ++++++++++++++++
+ src/xz/coder.c     | 33 +++++++++++++++++++++++++--------
+ src/xz/main.c      |  9 +++++++--
+ src/xz/private.h   |  5 ++++-
+ 6 files changed, 62 insertions(+), 13 deletions(-)
+
+commit 97a3109281e475d9cf1b5095237d672fa0ad25e5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-11-03 18:06:40 +0200
+
+    Build: Build LZMA1/2 presets also when only decoder is wanted.
+    
+    People shouldn't rely on the presets when decoding raw streams,
+    but xz uses the presets as the starting point for raw decoder
+    options anyway.
+    
+    lzma_encocder_presets.c was renamed to lzma_presets.c to
+    make it clear it's not used solely by the encoder code.
+
+ src/liblzma/lzma/Makefile.inc                               | 6 +++++-
+ src/liblzma/lzma/{lzma_encoder_presets.c => lzma_presets.c} | 3 ++-
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+commit dc6b78d7f0f6fe43e9d4215146e8581feb8090e7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-11-03 17:54:48 +0200
+
+    Build: Fix configure to handle LZMA1 dependency with LZMA2.
+    
+    Now it gives an error if LZMA1 encoder/decoder is missing
+    when LZMA2 encoder/decoder was requested. Even better would
+    be LZMA2 implicitly enabling LZMA1 but it would need more code.
+
+ configure.ac | 5 -----
+ 1 file changed, 5 deletions(-)
+
+commit 46d76c9cd3cb26a31f5ae6c3a8bbcf38e6da1add
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-11-03 17:41:54 +0200
+
+    Build: Don't omit lzma_cputhreads() unless using --disable-threads.
+    
+    Previously it was omitted if encoders were disabled
+    with --disable-encoders. It didn't make sense and
+    it also broke the build.
+
+ src/liblzma/common/Makefile.inc | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+commit 16d68f874d89f1e4a1919786a35bbaef7d71a077
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-11-02 18:16:51 +0200
+
+    liblzma: Fix a build failure related to external SHA-256 support.
+    
+    If an appropriate header and structure were found by configure,
+    but a library with a usable SHA-256 functions wasn't, the build
+    failed.
+
+ src/liblzma/check/check.h | 32 +++++++++++++++++++++++---------
+ 1 file changed, 23 insertions(+), 9 deletions(-)
+
+commit d9311647fc1ab512a3394596221ab8039c00af6b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-11-02 15:19:10 +0200
+
+    xz: Always close the file before trying to delete it.
+    
+    unlink() can return EBUSY in errno for open files on some
+    operating systems and file systems.
+
+ src/xz/file_io.c | 25 ++++++++++++-------------
+ 1 file changed, 12 insertions(+), 13 deletions(-)
+
+commit f59c4183f3c9066626ce45dc3db4642fa603fa21
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-10-12 21:08:42 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 35f189673e280c12e4c5129f9f97e54eef3bbc04
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-10-12 21:07:41 +0300
+
+    Tests: Add tests for the two bugs fixed in index.c.
+
+ tests/test_index.c | 30 ++++++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+
+commit e10bfdb0fcaff12f3a6dadee51e0a022aadccb51
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-10-12 20:45:15 +0300
+
+    liblzma: Fix lzma_index_dup() for empty Streams.
+    
+    Stream Flags and Stream Padding weren't copied from
+    empty Streams.
+
+ src/liblzma/common/index.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+commit 06f434bd8980f25ca23232eb7bb7df7e37dc8448
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-10-12 20:31:44 +0300
+
+    liblzma: Add a note to index.c for those using static analyzers.
+
+ src/liblzma/common/index.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 9815cdf6987ef91a85493bfcfd1ce2aaf3b47a0a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-09-29 13:59:35 +0300
+
+    Bump version and soname for 5.2.2.
+
+ src/liblzma/Makefile.am        | 2 +-
+ src/liblzma/api/lzma/version.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit cbe0cec8476bdd0416c7ca9bc83895c9bea1cf78
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-09-29 13:57:28 +0300
+
+    Update NEWS for 5.2.2.
+
+ NEWS | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+commit 49427ce7eececdd18bbd35dab23c81910d083e1c
+Author: Andre Noll <maan at tuebingen.mpg.de>
+Date:   2015-05-28 15:50:00 +0200
+
+    Fix typo in German translation.
+    
+    As pointed out by Robert Pollak, there's a typo in the German
+    translation of the compression preset option (-0 ... -9) help text.
+    "The compressor" translates to "der Komprimierer", and the genitive
+    form is "des Komprimierers". The old word makes no sense at all.
+
+ po/de.po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 608d6f06c940e7f28c25de005e8b99bdff42d27c
+Author: Hauke Henningsen <sqrt at entless.org>
+Date:   2015-08-17 04:59:54 +0200
+
+    Update German translation, mostly wrt orthography
+    
+    Provide an update of the German translation.
+    * A lot of compound words were previously written with spaces, while
+      German orthography is relatively clear in that the components
+      should not be separated.
+    * When referring to the actual process of (de)compression rather than the
+      concept, replace “(De-)Kompression” with “(De-)Komprimierung”.
+      Previously, both forms were used in this context and are now used in a
+      manner consistent with “Komprimierung” being more likely to refer to
+      a process.
+    * Consistently translate “standard input”/“output”
+    * Use “Zeichen” instead of false friend “Charakter” for “character”
+    * Insert commas around relative clauses (as required in German)
+    * Some other minor corrections
+    * Capitalize “ß” as “ẞ”
+    * Consistently start option descriptions in --help with capital letters
+    
+    Acked-By: Andre Noll <maan at tuebingen.mpg.de>
+    
+    * Update after msgmerge
+
+ po/de.po | 383 ++++++++++++++++++++++++++++++++-------------------------------
+ 1 file changed, 196 insertions(+), 187 deletions(-)
+
+commit c8988414e5b67b8ef2fe0ba7b1ccdd0ec73c60d3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-08-11 13:23:04 +0300
+
+    Build: Minor Cygwin cleanup.
+    
+    Some tests used "cygwin*" and some used "cygwin". I changed
+    them all to use "cygwin". Shouldn't affect anything in practice.
+
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 85a6dfed53477906bfe9a7c0123dd412e391cb48
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-08-11 13:21:52 +0300
+
+    Build: Support building of MSYS2 binaries.
+
+ configure.ac | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+commit 77f270be8432df2e4516a0c48814b6976d6618c5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-08-09 21:06:26 +0300
+
+    Windows: Define DLL_EXPORT when building liblzma.dll with MSVC.
+    
+    src/liblzma/common/common.h uses it to set __declspec(dllexport)
+    for the API symbols.
+    
+    Thanks to Adam Walling.
+
+ windows/liblzma_dll.vcxproj | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+commit 8c975446c5903090a5a8493b5b96b71003056a88
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-08-09 21:02:20 +0300
+
+    Windows: Omit unneeded header files from MSVC project files.
+
+ windows/liblzma.vcxproj     | 5 -----
+ windows/liblzma_dll.vcxproj | 5 -----
+ 2 files changed, 10 deletions(-)
+
+commit 119a00434954726ca58e4a578e6469f530fca30e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-07-12 20:48:19 +0300
+
+    liblzma: A MSVC-specific hack isn't needed with MSVC 2013 and newer.
+
+ src/liblzma/api/lzma.h | 18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
+
+commit d4e7c557fcab353539c9481a8d95cb04bcb15c7c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-06-19 20:38:55 +0300
+
+    Update THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 98001740ca56c894a7bd32eb47e9857a8a7d878d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-06-19 20:21:30 +0300
+
+    Windows: Update the docs.
+
+ INSTALL                                            | 29 ++++++++-----
+ windows/INSTALL-MSVC.txt                           | 47 ++++++++++++++++++++++
+ windows/{INSTALL-Windows.txt => INSTALL-MinGW.txt} |  2 +-
+ 3 files changed, 67 insertions(+), 11 deletions(-)
+
+commit 28195e4c877007cc760ecea1d17f740693d66873
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-06-19 17:25:31 +0300
+
+    Windows: Add MSVC project files for building liblzma.
+    
+    Thanks to Adam Walling for creating these files.
+
+ windows/liblzma.vcxproj     | 359 ++++++++++++++++++++++++++++++++++++++++
+ windows/liblzma_dll.vcxproj | 388 ++++++++++++++++++++++++++++++++++++++++++++
+ windows/xz_win.sln          |  48 ++++++
+ 3 files changed, 795 insertions(+)
+
+commit 960440f3230dc628f6966d9f7614fc1b28baf44e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-05-13 20:57:55 +0300
+
+    Tests: Fix a memory leak in test_bcj_exact_size.
+    
+    Thanks to Cristian Rodríguez.
+
+ tests/test_bcj_exact_size.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 68cd35acafbdcdf4e8ea8b5bb843c736939d6f8b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-05-12 18:08:24 +0300
+
+    Fix NEWS about threading in 5.2.0.
+    
+    Thanks to Andy Hochhaus.
+
+ NEWS | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit ff96ed6d25786728356017a13baf8c14731b4f1e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-05-11 21:26:16 +0300
+
+    xz: Document that threaded decompression hasn't been implemented yet.
+
+ src/xz/xz.1 | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+commit 00d37b64a64ea8597fd2422d5187afd761ab9531
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-04-20 20:20:29 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit db190a832c49ca3aed6d69cc992fa5583cae7b11
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-04-20 19:59:18 +0300
+
+    Revert "xz: Use pipe2() if available."
+    
+    This reverts commit 7a11c4a8e5e15f13d5fa59233b3172e65428efdd.
+    It is a problem when libc has pipe2() but the kernel is too
+    old to have pipe2() and thus pipe2() fails. In xz it's pointless
+    to have a fallback for non-functioning pipe2(); it's better to
+    avoid pipe2() completely.
+    
+    Thanks to Michael Fox for the bug report.
+
+ configure.ac     | 4 ++--
+ src/xz/file_io.c | 9 +--------
+ 2 files changed, 3 insertions(+), 10 deletions(-)
+
+commit eccd8155e107c5ada03d13e7730675cdf1a44ddc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-03-29 22:14:47 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 25263fd9e7a8a913395cb93d7c104cd48c2b4a00
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-03-29 22:13:48 +0300
+
+    Fix the detection of installed RAM on QNX.
+    
+    The earlier version compiled but didn't actually work
+    since sysconf(_SC_PHYS_PAGES) always fails (or so I was told).
+    
+    Thanks to Ole André Vadla Ravnås for the patch and testing.
+
+ m4/tuklib_physmem.m4        |  6 +++---
+ src/common/tuklib_physmem.c | 14 +++++++++++++-
+ 2 files changed, 16 insertions(+), 4 deletions(-)
+
+commit 4c544d2410903d38402221cb783ed85585b6a007
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-03-27 22:39:07 +0200
+
+    Fix CPU core count detection on QNX.
+    
+    It tried to use sysctl() on QNX but
+      - it broke the build because sysctl() needs -lsocket on QNX;
+      - sysctl() doesn't work for detecting the core count on QNX
+        even if it compiled.
+    
+    sysconf() works. An alternative would have been to use
+    QNX-specific SYSPAGE_ENTRY(num_cpu) from <sys/syspage.h>.
+    
+    Thanks to Ole André Vadla Ravnås.
+
+ m4/tuklib_cpucores.m4 | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+commit e0ea6737b03e83ccaff4514d00e31bb926f8f0f3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-03-07 22:05:57 +0200
+
+    xz: size_t/uint32_t cleanup in options.c.
+
+ src/xz/options.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+commit 8bcca29a65335fd679c13814b70b35b68fa5daed
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-03-07 22:04:23 +0200
+
+    xz: Fix a comment and silence a warning in message.c.
+
+ src/xz/message.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit f243f5f44c6b19a7c289a0ec73a03ee08364cb5b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-03-07 22:01:00 +0200
+
+    liblzma: Silence more uint32_t vs. size_t warnings.
+
+ src/liblzma/lz/lz_encoder.c     | 2 +-
+ src/liblzma/lzma/lzma_encoder.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 7f0a4c50f4a374c40acf4b86848f301ad1e82d34
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-03-07 19:54:00 +0200
+
+    xz: Make arg_count an unsigned int to silence a warning.
+    
+    Actually the value of arg_count cannot exceed INT_MAX
+    but it's nicer as an unsigned int.
+
+ src/xz/args.h | 2 +-
+ src/xz/main.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit f6ec46801588b1be29c07c9db98558b521304002
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-03-07 19:33:17 +0200
+
+    liblzma: Fix a warning in index.c.
+
+ src/liblzma/common/index.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit a24518971cc621315af142dd3bb7614fab04ad27
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-02-26 20:46:14 +0200
+
+    Build: Fix a CR+LF problem when running autoreconf -fi on OS/2.
+
+ build-aux/version.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit dec11497a71518423b5ff0e759100cf8aadf6c7b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-02-26 16:53:44 +0200
+
+    Bump version and soname for 5.2.1.
+
+ src/liblzma/Makefile.am        | 2 +-
+ src/liblzma/api/lzma/version.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 29e39c79975ab89ee5dd671e97064534a9f3a649
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-02-26 13:01:09 +0200
+
+    Update NEWS for 5.2.1.
+
+ NEWS | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+commit 7a11c4a8e5e15f13d5fa59233b3172e65428efdd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-02-22 19:38:48 +0200
+
+    xz: Use pipe2() if available.
+
+ configure.ac     | 4 ++--
+ src/xz/file_io.c | 9 ++++++++-
+ 2 files changed, 10 insertions(+), 3 deletions(-)
+
+commit 117d962685c72682c63edc9bb765367189800202
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-02-21 23:40:26 +0200
+
+    liblzma: Fix a compression-ratio regression in LZMA1/2 in fast mode.
+    
+    The bug was added in the commit
+    f48fce093b07aeda95c18850f5e086d9f2383380 and thus
+    affected 5.1.4beta and 5.2.0. Luckily the bug cannot
+    cause data corruption or other nasty things.
+
+ src/liblzma/lzma/lzma_encoder_optimum_fast.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ae984e31c167d3bc52972ec422dd1ebd5f5d5719
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-02-21 23:00:19 +0200
+
+    xz: Fix the fcntl() usage when creating a pipe for the self-pipe trick.
+    
+    Now it reads the old flags instead of blindly setting O_NONBLOCK.
+    The old code may have worked correctly, but this is better.
+
+ src/xz/file_io.c | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+commit 2205bb5853098aea36a56df6f5747037175f66b4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-02-10 15:29:34 +0200
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit d935b0cdf3db440269b9d952b2b281b18f8c7b08
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-02-10 15:28:30 +0200
+
+    tuklib_cpucores: Use cpuset_getaffinity() on FreeBSD if available.
+    
+    In FreeBSD, cpuset_getaffinity() is the preferred way to get
+    the number of available cores.
+    
+    Thanks to Rui Paulo for the patch. I edited it slightly, but
+    hopefully I didn't break anything.
+
+ m4/tuklib_cpucores.m4        | 23 ++++++++++++++++++++++-
+ src/common/tuklib_cpucores.c | 18 ++++++++++++++++++
+ 2 files changed, 40 insertions(+), 1 deletion(-)
+
+commit eb61bc58c20769cac4d05f363b9c0e8c9c71a560
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-02-09 22:08:37 +0200
+
+    xzdiff: Make the mktemp usage compatible with FreeBSD's mktemp.
+    
+    Thanks to Rui Paulo for the fix.
+
+ src/scripts/xzdiff.in | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+commit b9a5b6b7a29029680af733082b6a46e0fc01623a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-02-03 21:45:53 +0200
+
+    Add a few casts to tuklib_integer.h to silence possible warnings.
+    
+    I heard that Visual Studio 2013 gave warnings without the casts.
+    
+    Thanks to Gabi Davar.
+
+ src/common/tuklib_integer.h | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+commit c45757135f40e4a0de730ba5fff0100219493982
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-01-26 21:24:39 +0200
+
+    liblzma: Set LZMA_MEMCMPLEN_EXTRA depending on the compare method.
+
+ src/liblzma/common/memcmplen.h | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+commit 3c500174ed5485f550972a2a6109c361e875f069
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-01-26 20:40:16 +0200
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit fec88d41e672d9e197c9442aecf02bd0dfa6d516
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-01-26 20:39:28 +0200
+
+    liblzma: Silence harmless Valgrind errors.
+    
+    Thanks to Torsten Rupp for reporting this. I had
+    forgotten to run Valgrind before the 5.2.0 release.
+
+ src/liblzma/lz/lz_encoder.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit a9b45badfec0928d20a27c7176c005fa637f7d1e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-01-09 21:50:19 +0200
+
+    xz: Fix comments.
+
+ src/xz/file_io.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+commit 541aee6dd4aa97a809aba281475a21b641bb89e2
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-01-09 21:35:06 +0200
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 4170edc914655310d2363baccf5e615e09b04911
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-01-09 21:34:06 +0200
+
+    xz: Don't fail if stdout doesn't support O_NONBLOCK.
+    
+    This is similar to the case with stdin.
+    
+    Thanks to Brad Smith for the bug report and testing
+    on OpenBSD.
+
+ src/xz/file_io.c | 36 +++++++++++++++---------------------
+ 1 file changed, 15 insertions(+), 21 deletions(-)
+
+commit 04bbc0c2843c50c8ad1cba42b937118e38b0508d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-01-07 19:18:20 +0200
+
+    xz: Fix a memory leak in DOS-specific code.
+
+ src/xz/file_io.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit f0f1f6c7235ffa901cf76fe18e33749e200b3eea
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-01-07 19:08:06 +0200
+
+    xz: Don't fail if stdin doesn't support O_NONBLOCK.
+    
+    It's a problem at least on OpenBSD which doesn't support
+    O_NONBLOCK on e.g. /dev/null. I'm not surprised if it's
+    a problem on other OSes too since this behavior is allowed
+    in POSIX-1.2008.
+    
+    The code relying on this behavior was committed in June 2013
+    and included in 5.1.3alpha released on 2013-10-26. Clearly
+    the development releases only get limited testing.
+
+ src/xz/file_io.c | 18 +++++++-----------
+ 1 file changed, 7 insertions(+), 11 deletions(-)
+
+commit d2d484647d9d9d679f03c75abb0404f67069271c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2015-01-06 20:30:15 +0200
+
+    Tests: Don't hide unexpected error messages in test_files.sh.
+    
+    Hiding them makes no sense since normally there's no error
+    when testing the "good" files. With "bad" files errors are
+    expected and then it makes sense to keep the messages hidden.
+
+ tests/test_files.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit aae6a6aeda51cf94a47e39ad624728f9bee75e30
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-30 11:17:16 +0200
+
+    Update Solaris notes in INSTALL.
+    
+    Mention the possible "make check" failure on Solaris in the
+    Solaris-specific section of INSTALL. It was already in
+    section 4.5 but it is better mention it in the OS-specific
+    section too.
+
+ INSTALL | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 7815112153178800a3521b9f31960e7cdc26cfba
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-26 12:00:05 +0200
+
+    Build: POSIX shell isn't required if scripts are disabled.
+
+ INSTALL      | 3 ++-
+ configure.ac | 2 +-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+commit a0cd05ee71d330b79ead6eb9222e1b24e1559d3a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-21 20:48:37 +0200
+
+    DOS: Update Makefile.
+
+ dos/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit b85ee0905ec4ab7656d22e63519fdd3bedb21f2e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-21 19:50:38 +0200
+
+    Windows: Fix bin_i486 to bin_i686 in build.bash.
+
+ windows/build.bash | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit cbafa710918195dbba3db02c3fab4f0538235206
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-21 18:58:44 +0200
+
+    Docs: Use lzma_cputhreads() in 04_compress_easy_mt.c.
+
+ doc/examples/04_compress_easy_mt.c | 30 ++++++++++++++++++++++++++----
+ 1 file changed, 26 insertions(+), 4 deletions(-)
+
+commit 8dbb57238d372c7263cfeb3e7f7fd9a73173156a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-21 18:56:44 +0200
+
+    Docs: Update docs/examples/00_README.txt.
+
+ doc/examples/00_README.txt | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 6060f7dc76fd6c2a8a1f8e85d0e4d86bb78273e6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-21 18:11:17 +0200
+
+    Bump version and soname for 5.2.0.
+    
+    I know that soname != app version, but I skip AGE=1
+    in -version-info to make the soname match the liblzma
+    version anyway. It doesn't hurt anything as long as
+    it doesn't conflict with library versioning rules.
+
+ src/liblzma/Makefile.am        | 2 +-
+ src/liblzma/api/lzma/version.h | 6 +++---
+ src/liblzma/liblzma.map        | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 3e8bd1d15e417f2d588e9be50ce027ee3d48b2da
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-21 18:05:03 +0200
+
+    Avoid variable-length arrays in the debug programs.
+
+ debug/full_flush.c | 3 ++-
+ debug/sync_flush.c | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 72f7307cfdceb941aeb2bf30d424cc0d13621786
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-21 18:01:45 +0200
+
+    Build: Include 04_compress_easy_mt.c in the tarball.
+
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 2cb82ff21c62def11f3683a8bb0aaf363102aaa0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-21 18:00:38 +0200
+
+    Fix build when --disable-threads is used.
+
+ src/common/mythread.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 9b9e3536e458ef958f66b0e8982efc9d36de4d17
+Author: Adrien Nader <adrien at notk.org>
+Date:   2014-12-21 15:56:15 +0100
+
+    po/fr: improve wording for help for --lzma1/--lzma2.
+
+ po/fr.po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit a8b6b569e7fadbf5b5b9139d53bc764015c15027
+Author: Adrien Nader <adrien at notk.org>
+Date:   2014-12-21 15:55:48 +0100
+
+    po/fr: missing line in translation of --extreme.
+
+ po/fr.po | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit f168a6fd1a888cf4f0caaddcafcb21dadc6ab6e9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-21 14:32:33 +0200
+
+    Update NEWS for 5.2.0.
+
+ NEWS | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 65 insertions(+)
+
+commit cec2ee863b3a88f4bf039cb00f73c4a4fc93a429
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-21 14:32:22 +0200
+
+    Update NEWS for 5.0.8.
+
+ NEWS | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+commit 42e97a32649bf53ce43be2258b902a417c6e7fa1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-21 14:07:54 +0200
+
+    xz: Fix a comment.
+
+ src/xz/options.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 29b95d5d6665cedffa6a9d6d3d914f981e852182
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-20 20:43:14 +0200
+
+    Update INSTALL about the dependencies of the scripts.
+
+ INSTALL | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+commit 3af91040bb42c21afbb81f5568c3313125e61192
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-20 20:42:33 +0200
+
+    Windows: Update build instructions.
+
+ INSTALL                     | 15 +++++++++------
+ windows/INSTALL-Windows.txt | 44 +++++++++++++++++++++-----------------------
+ 2 files changed, 30 insertions(+), 29 deletions(-)
+
+commit 0152f72bf6289d744823dc6c849538f3a139ad70
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-20 20:41:48 +0200
+
+    Windows: Update the build script and README-Windows.txt.
+    
+    The 32-bit build is now for i686 or newer because the
+    prebuilt MinGW-w64 toolchains include i686 code in the
+    executables even if one uses -march=i486.
+    
+    The build script builds 32-bit SSE2 enabled version too.
+    Run-time detection of SSE2 support would be nice (on any OS)
+    but it's not implemented in XZ Utils yet.
+
+ windows/README-Windows.txt | 30 ++++++++++++++++--------------
+ windows/build.bash         | 23 ++++++++++++++---------
+ 2 files changed, 30 insertions(+), 23 deletions(-)
+
+commit 4a1f6133ee5533cee8d91e06fcc22443e5f1881a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-19 15:51:50 +0200
+
+    Windows: Define TUKLIB_SYMBOL_PREFIX in config.h.
+    
+    It is to keep all symbols in the lzma_ namespace.
+
+ windows/config.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 7f7d093de79eee0c7dbfd7433647e46302f19f82
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-16 21:00:09 +0200
+
+    xz: Update the man page about --threads.
+
+ src/xz/xz.1 | 5 -----
+ 1 file changed, 5 deletions(-)
+
+commit 009823448b82aa5f465668878a544c5842885407
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-16 20:57:43 +0200
+
+    xz: Update the man page about --block-size.
+
+ src/xz/xz.1 | 41 +++++++++++++++++++++++++++++++++--------
+ 1 file changed, 33 insertions(+), 8 deletions(-)
+
+commit 7dddfbeb499e528940bc12047355c184644aafe9
+Author: Adrien Nader <adrien at notk.org>
+Date:   2014-12-10 22:26:57 +0100
+
+    po/fr: several more translation updates: reword and handle --ignore-check.
+
+ po/fr.po | 50 ++++++++++++++++++++++++++------------------------
+ 1 file changed, 26 insertions(+), 24 deletions(-)
+
+commit 6eca5be40e04ddc4b738d493e4e56835956d8b69
+Author: Adrien Nader <adrien at notk.org>
+Date:   2014-12-10 22:23:01 +0100
+
+    po/fr: yet another place where my email address had to be updated.
+
+ po/fr.po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit d1003673e92ba47edd6aeeb3dbea05c18269d0e7
+Author: Adrien Nader <adrien at notk.org>
+Date:   2014-12-10 22:22:20 +0100
+
+    po/fr: fix several typos that have been around since the beginning.
+
+ po/fr.po | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+commit 4c5aa911a0df027e46171e368debc543d2fa72b2
+Author: Adrien Nader <adrien at notk.org>
+Date:   2014-12-03 20:02:31 +0100
+
+    po/fr: last batch of new translations for now.
+    
+    Four new error messages.
+
+ po/fr.po | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+commit 3e3099e36d27059499e7996fb38a62e8ab01d356
+Author: Adrien Nader <adrien at notk.org>
+Date:   2014-12-03 20:01:32 +0100
+
+    po/fr: translations for --threads, --block-size and --block-list.
+
+ po/fr.po | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+commit e7d96a5933eec4e9d4a62569ee88df0ebb0f1d53
+Author: Adrien Nader <adrien at notk.org>
+Date:   2014-12-03 20:00:53 +0100
+
+    po/fr: remove fuzzy marker for error messages that will be kept in English.
+    
+    The following is a copy of a comment inside fr.po:
+    
+    Note from translator on "file status flags".
+    The following entry is kept un-translated on purpose. It is difficult to
+    translate and should only happen in exceptional circumstances which means
+    that translating would:
+    - lose some of the meaning
+    - make it more difficult to look up in search engines; it might happen one
+    in
+    a million times, if we dilute the error message in 20 languages, it will be
+    almost impossible to find an explanation and support for the error.
+
+ po/fr.po | 22 ++++++++++++++++------
+ 1 file changed, 16 insertions(+), 6 deletions(-)
+
+commit 46cbb9033af8a21fafe543302d6919746e0d72af
+Author: Adrien Nader <adrien at notk.org>
+Date:   2014-12-03 19:58:25 +0100
+
+    po/fr: several minor updates and better wording.
+    
+    Meaning doesn't change at all: it's only for better wording and/or
+    formatting of a few strings.
+
+ po/fr.po | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+commit 7ce49d444f04e73145f79c832eb4d510594b074a
+Author: Adrien Nader <adrien at notk.org>
+Date:   2014-12-03 19:56:12 +0100
+
+    po/fr: update my email address and copyright years.
+
+ po/fr.po | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 214c553ebc3047cd720da1ce5c80cf7c38118d3c
+Author: Adrien Nader <adrien at notk.org>
+Date:   2014-11-26 10:08:26 +0100
+
+    fr.po: commit file after only "update-po" so actual is readable.
+
+ po/fr.po | 311 ++++++++++++++++++++++++++++++++++++++++-----------------------
+ 1 file changed, 199 insertions(+), 112 deletions(-)
+
+commit 1190c641af09cde85f8bd0fbe5c4906f4a29431b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-12-02 20:04:07 +0200
+
+    liblzma: Document how lzma_mt.block_size affects memory usage.
+
+ src/liblzma/api/lzma/container.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit e4fc1d2f9571fba79ce383595be2ea2a9257def0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-11-28 20:07:18 +0200
+
+    Update INSTALL about a "make check" failure in test_scripts.sh.
+
+ INSTALL | 24 +++++++++++++++++-------
+ 1 file changed, 17 insertions(+), 7 deletions(-)
+
+commit 34f9e40a0a0c3bd2c2730cdb9cd550bbb8a3f2fe
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-11-26 20:12:27 +0200
+
+    Remove LZMA_UNSTABLE macro.
+
+ src/liblzma/api/lzma/container.h | 4 ----
+ src/liblzma/common/common.h      | 2 --
+ src/xz/private.h                 | 1 -
+ 3 files changed, 7 deletions(-)
+
+commit 6d9c0ce9f2677b159e32b224aba5b535b304a705
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-11-26 20:10:33 +0200
+
+    liblzma: Update lzma_stream_encoder_mt() API docs.
+
+ src/liblzma/api/lzma/container.h | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit 2301f3f05dd9742f42cda8f0f318864f5dc39ab3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-11-25 12:32:05 +0200
+
+    liblzma: Verify the filter chain in threaded encoder initialization.
+    
+    This way an invalid filter chain is detected at the Stream
+    encoder initialization instead of delaying it to the first
+    call to lzma_code() which triggers the initialization of
+    the actual filter encoder(s).
+
+ src/liblzma/common/stream_encoder_mt.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+commit 107a263d5bb63cd3593fd6a5c938706539f84523
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-11-17 19:11:49 +0200
+
+    Build: Update m4/ax_pthread.m4 from Autoconf Archive.
+
+ m4/ax_pthread.m4 | 71 +++++++++++++++++++++++++++++++++++++-------------------
+ 1 file changed, 47 insertions(+), 24 deletions(-)
+
+commit b13a781833399ff5726cfc997f3cb2f0acbdbf31
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-11-17 18:52:21 +0200
+
+    Build: Replace obsolete AC_HELP_STRING with AS_HELP_STRING.
+
+ configure.ac         | 36 ++++++++++++++++++------------------
+ m4/tuklib_integer.m4 |  2 +-
+ 2 files changed, 19 insertions(+), 19 deletions(-)
+
+commit 542cac122ed3550148a2af0033af22b757491378
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-11-17 18:43:19 +0200
+
+    Build: Fix Autoconf warnings about escaped backquotes.
+    
+    Thanks to Daniel Richard G. for pointing out that it's
+    good to sometimes run autoreconf -fi with -Wall.
+
+ configure.ac | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+commit 7b03a15cea8cd4f19ed680b51c4bcbae3ce4142f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-11-10 18:54:40 +0200
+
+    xzdiff: Use mkdir if mktemp isn't available.
+
+ src/scripts/xzdiff.in | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+commit f8c13e5e3609581d5dd9f8777985ca07f2390ad7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-11-10 18:45:01 +0200
+
+    xzdiff: Create a temporary directory to hold a temporary file.
+    
+    This avoids the possibility of "File name too long" when
+    creating a temp file when the input file name is very long.
+    
+    This also means that other users on the system can no longer
+    see the input file names in /tmp (or whatever $TMPDIR is)
+    since the temporary directory will have a generic name. This
+    usually doesn't matter since on many systems one can see
+    the arguments given to all processes anyway.
+    
+    The number X chars to mktemp where increased from 6 to 10.
+    
+    Note that with some shells temp files or dirs won't be used at all.
+
+ src/scripts/xzdiff.in | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+commit 7716dcf9df7f457500cb657314e7a9aea5fedb06
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-11-10 15:38:47 +0200
+
+    liblzma: Fix lzma_mt.preset in lzma_stream_encoder_mt_memusage().
+    
+    It read the filter chain from a wrong variable. This is a similar
+    bug that was fixed in 9494fb6d0ff41c585326f00aa8f7fe58f8106a5e.
+
+ src/liblzma/common/stream_encoder_mt.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+commit 230fa4a605542c84b4178a57381695a0af4e779b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-11-10 14:49:55 +0200
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 4e4ae08bc7c1711e399c9f2d26eb375d39d08101
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-10-29 21:28:25 +0200
+
+    Update .gitignore files.
+
+ .gitignore    | 2 ++
+ m4/.gitignore | 3 +++
+ 2 files changed, 5 insertions(+)
+
+commit c923b140b27d1a055db6284e10fd546ad1a7fcdb
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-10-29 21:15:35 +0200
+
+    Build: Prepare to support Automake's subdir-objects.
+    
+    Due to a bug in Automake, subdir-objects won't be enabled
+    for now.
+    
+    http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17354
+    
+    Thanks to Daniel Richard G. for the original patches.
+
+ configure.ac             |  7 ++++++-
+ src/Makefile.am          | 22 +++++++++++++++++++++-
+ src/liblzma/Makefile.am  |  4 ++--
+ src/lzmainfo/Makefile.am |  4 ++--
+ src/xz/Makefile.am       | 10 +++++-----
+ src/xzdec/Makefile.am    |  8 ++++----
+ 6 files changed, 40 insertions(+), 15 deletions(-)
+
+commit 08c2aa16bea0df82828f665d51fba2e0a5e8997f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-10-24 20:09:29 +0300
+
+    Translations: Update the Italian translation.
+    
+    Thanks to Milo Casagrande.
+
+ po/it.po | 452 ++++++++++++++++++++++++++++++++++++++-------------------------
+ 1 file changed, 275 insertions(+), 177 deletions(-)
+
+commit 2f9f61aa83539c54ff6c118a2693890f0519b3dd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-10-18 18:51:45 +0300
+
+    Translations: Update the Polish translation.
+    
+    Thanks to Jakub Bogusz.
+
+ po/pl.po | 332 ++++++++++++++++++++++++++++++++++++++++-----------------------
+ 1 file changed, 214 insertions(+), 118 deletions(-)
+
+commit 4f9d233f67aea25e532824d11b7642cf7dee7a76
+Author: Andre Noll <maan at tuebingen.mpg.de>
+Date:   2014-10-14 17:30:30 +0200
+
+    l10n: de.po: Change translator email address.
+    
+    Although the old address is still working, the new one should
+    be preferred. So this commit changes all three places in de.po
+    accordingly.
+    
+    Signed-off-by: Andre Noll <maan at tuebingen.mpg.de>
+
+ po/de.po | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 00502b2bedad43f0cc167ac17ae0608837ee196b
+Author: Andre Noll <maan at tuebingen.mpg.de>
+Date:   2014-10-14 17:30:29 +0200
+
+    l10n: de.po: Update German translation
+    
+    Signed-off-by: Andre Noll <maan at systemlinux.org>
+
+ po/de.po | 531 +++++++++++++++++++++++++++++++++------------------------------
+ 1 file changed, 281 insertions(+), 250 deletions(-)
+
+commit 706b0496753fb609e69f1570ec603f11162189d1
+Author: Andre Noll <maan at tuebingen.mpg.de>
+Date:   2014-10-14 17:30:28 +0200
+
+    l10n: de.po: Fix typo: Schießen -> Schließen.
+    
+    That's a funny one since "schießen" means to shoot :)
+    
+    Signed-off-by: Andre Noll <maan at systemlinux.org>
+
+ po/de.po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 7c32e6a935c3d7ee366abad1679bd5f322f0c7d4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-10-09 19:42:26 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 076258cc458f1e705041ac7a729b15ffe8c5214a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-10-09 19:41:51 +0300
+
+    Add support for AmigaOS/AROS to tuklib_physmem().
+    
+    Thanks to Fredrik Wikstrom.
+
+ m4/tuklib_physmem.m4        | 3 ++-
+ src/common/tuklib_physmem.c | 7 +++++++
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+commit efa7b0a210e1baa8e128fc98c5443a944c39ad24
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-10-09 18:42:14 +0300
+
+    xzgrep: Avoid passing both -q and -l to grep.
+    
+    The behavior of grep -ql varies:
+      - GNU grep behaves like grep -q.
+      - OpenBSD grep behaves like grep -l.
+    
+    POSIX doesn't make it 100 % clear what behavior is expected.
+    Anyway, using both -q and -l at the same time makes no sense
+    so both options simply should never be used at the same time.
+    
+    Thanks to Christian Weisgerber.
+
+ src/scripts/xzgrep.in | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+commit 9c5f76098c9986b48d2fc574a0b764f4cde0c538
+Author: Trần Ngọc Quân <vnwildman at gmail.com>
+Date:   2014-09-25 09:22:45 +0700
+
+    l10n: vi.po: Update Vietnamese translation
+    
+    Signed-off-by: Trần Ngọc Quân <vnwildman at gmail.com>
+
+ po/vi.po | 136 +++++++++++++++++++++++++++++++++++++++------------------------
+ 1 file changed, 84 insertions(+), 52 deletions(-)
+
+commit c4911f2db36d811896c73c008b4218d8fa9a4730
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-09-25 18:38:48 +0300
+
+    Build: Detect supported compiler warning flags better.
+    
+    Clang and nowadays also GCC accept any -Wfoobar option
+    but then may give a warning that an unknown warning option
+    was specified. To avoid adding unsupported warning options,
+    the options are now tested with -Werror.
+    
+    Thanks to Charles Diza.
+
+ configure.ac | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit 76e75522ed6f5c228d55587dee5a997893f6e474
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-09-20 21:01:21 +0300
+
+    Update NEWS for 5.0.7.
+
+ NEWS | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+commit d62028b4c1174fc67b6929f126f5eb24c018c700
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-09-20 19:42:56 +0300
+
+    liblzma: Fix a portability problem in Makefile.am.
+    
+    POSIX supports $< only in inference rules (suffix rules).
+    Using it elsewhere is a GNU make extension and doesn't
+    work e.g. with OpenBSD make.
+    
+    Thanks to Christian Weisgerber for the patch.
+
+ src/liblzma/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit c35de31d4283edad3e57d37ffe939406542cb7bb
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-09-14 21:54:09 +0300
+
+    Bump the version number to 5.1.4beta.
+
+ src/liblzma/api/lzma/version.h | 4 ++--
+ src/liblzma/liblzma.map        | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit e9e097e22cacdaa23e5414fea7913535449cb340
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-09-14 21:50:13 +0300
+
+    Update NEWS for 5.0.6 and 5.1.4beta.
+
+ NEWS | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 50 insertions(+)
+
+commit 642f856bb8562ab66704b1e01ac7bc08b6d0a663
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-09-14 21:02:41 +0300
+
+    Update TODO.
+
+ TODO | 38 ++++++++++++++++++++++++++++++++++----
+ 1 file changed, 34 insertions(+), 4 deletions(-)
+
+commit 6b5e3b9eff5b8cedb2aac5f524d4d60fc8a48124
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-08-05 22:32:36 +0300
+
+    xz: Add --ignore-check.
+
+ src/xz/args.c    |  7 +++++++
+ src/xz/args.h    |  1 +
+ src/xz/coder.c   | 10 +++++++++-
+ src/xz/message.c |  2 ++
+ src/xz/xz.1      | 19 +++++++++++++++++++
+ 5 files changed, 38 insertions(+), 1 deletion(-)
+
+commit 9adbc2ff373f979c917cdfd3679ce0ebd59f1040
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-08-05 22:15:07 +0300
+
+    liblzma: Add support for LZMA_IGNORE_CHECK.
+
+ src/liblzma/api/lzma/container.h    | 24 ++++++++++++++++++++++++
+ src/liblzma/common/common.h         |  1 +
+ src/liblzma/common/stream_decoder.c | 14 ++++++++++++--
+ 3 files changed, 37 insertions(+), 2 deletions(-)
+
+commit 0e0f34b8e4f1c60ecaec15c2105982381cc9c3e6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-08-05 22:03:30 +0300
+
+    liblzma: Add support for lzma_block.ignore_check.
+    
+    Note that this slightly changes how lzma_block_header_decode()
+    has been documented. Earlier it said that the .version is set
+    to the lowest required value, but now it says that the .version
+    field is kept unchanged if possible. In practice this doesn't
+    affect any old code, because before this commit the only
+    possible .version was 0.
+
+ src/liblzma/api/lzma/block.h              | 50 ++++++++++++++++++++++++-------
+ src/liblzma/common/block_buffer_encoder.c |  2 +-
+ src/liblzma/common/block_decoder.c        | 18 ++++++++---
+ src/liblzma/common/block_encoder.c        |  2 +-
+ src/liblzma/common/block_header_decoder.c | 12 ++++++--
+ src/liblzma/common/block_header_encoder.c |  2 +-
+ src/liblzma/common/block_util.c           |  2 +-
+ 7 files changed, 68 insertions(+), 20 deletions(-)
+
+commit 71e1437ab585b46f7a25f5a131557d3d1c0cbaa2
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-08-04 19:25:58 +0300
+
+    liblzma: Use lzma_memcmplen() in the BT3 match finder.
+    
+    I had missed this when writing the commit
+    5db75054e900fa06ef5ade5f2c21dffdd5d16141.
+    
+    Thanks to Jun I Jin.
+
+ src/liblzma/lz/lz_encoder_mf.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+commit 41dc9ea06e1414ebe8ef52afc8fc15b6e3282b04
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-08-04 00:25:44 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 5dcffdbcc23a68abc3ac3539b30be71bc9b5af84
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-08-03 21:32:25 +0300
+
+    liblzma: SHA-256: Optimize the Maj macro slightly.
+    
+    The Maj macro is used where multiple things are added
+    together, so making Maj a sum of two expressions allows
+    some extra freedom for the compiler to schedule the
+    instructions.
+    
+    I learned this trick from
+    <http://www.hackersdelight.org/corres.txt>.
+
+ src/liblzma/check/sha256.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit a9477d1e0c6fd0e47e637d051e7b9e2a5d9af517
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-08-03 21:08:12 +0300
+
+    liblzma: SHA-256: Optimize the way rotations are done.
+    
+    This looks weird because the rotations become sequential,
+    but it helps quite a bit on both 32-bit and 64-bit x86:
+    
+      - It requires fewer instructions on two-operand
+        instruction sets like x86.
+    
+      - It requires one register less which matters especially
+        on 32-bit x86.
+    
+    I hope this doesn't hurt other archs.
+    
+    I didn't invent this idea myself, but I don't remember where
+    I saw it first.
+
+ src/liblzma/check/sha256.c | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+commit 5a76c7c8ee9a0afbeedb1c211db9224260404347
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-08-03 20:38:13 +0300
+
+    liblzma: SHA-256: Remove the GCC #pragma that became unneeded.
+    
+    The unrolling in the previous commit should avoid the
+    situation where a compiler may think that an uninitialized
+    variable might be accessed.
+
+ src/liblzma/check/sha256.c | 5 -----
+ 1 file changed, 5 deletions(-)
+
+commit 9a096f8e57509775c331950b8351bbca77bdcfa8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-08-03 20:33:38 +0300
+
+    liblzma: SHA-256: Unroll a little more.
+    
+    This way a branch isn't needed for each operation
+    to choose between blk0 and blk2, and still the code
+    doesn't grow as much as it would with full unrolling.
+
+ src/liblzma/check/sha256.c | 25 ++++++++++++++++---------
+ 1 file changed, 16 insertions(+), 9 deletions(-)
+
+commit bc7650d87bf27f85f1a2a806dc2db1780e09e6a5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-08-03 19:56:43 +0300
+
+    liblzma: SHA-256: Do the byteswapping without a temporary buffer.
+
+ src/liblzma/check/sha256.c | 13 +------------
+ 1 file changed, 1 insertion(+), 12 deletions(-)
+
+commit 544aaa3d13554e8640f9caf7db717a96360ec0f6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-07-25 22:38:28 +0300
+
+    liblzma: Use lzma_memcmplen() in normal mode of LZMA.
+    
+    Two locations were not changed yet because the simplest change
+    assumes that the initial "len" may be greater than "limit".
+
+ src/liblzma/lzma/lzma_encoder_optimum_normal.c | 20 +++++---------------
+ 1 file changed, 5 insertions(+), 15 deletions(-)
+
+commit f48fce093b07aeda95c18850f5e086d9f2383380
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-07-25 22:30:38 +0300
+
+    liblzma: Simplify LZMA fast mode code by using memcmp().
+
+ src/liblzma/lzma/lzma_encoder_optimum_fast.c | 11 +----------
+ 1 file changed, 1 insertion(+), 10 deletions(-)
+
+commit 6bf5308e34e23dede5b301b1b9b4f131dacd9218
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-07-25 22:29:49 +0300
+
+    liblzma: Use lzma_memcmplen() in fast mode of LZMA.
+
+ src/liblzma/lzma/lzma_encoder_optimum_fast.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 353212137e51e45b105a3a3fc2e6879f1cf0d492
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-07-25 21:16:23 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 5db75054e900fa06ef5ade5f2c21dffdd5d16141
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-07-25 21:15:07 +0300
+
+    liblzma: Use lzma_memcmplen() in the match finders.
+    
+    This doesn't change the match finder output.
+
+ src/liblzma/lz/lz_encoder.c    | 13 ++++++++++++-
+ src/liblzma/lz/lz_encoder_mf.c | 33 +++++++++++----------------------
+ 2 files changed, 23 insertions(+), 23 deletions(-)
+
+commit e1c8f1d01f4a4e2136173edab2dc63c71ef038f4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-07-25 20:57:20 +0300
+
+    liblzma: Add lzma_memcmplen() for fast memory comparison.
+    
+    This commit just adds the function. Its uses will be in
+    separate commits.
+    
+    This hasn't been tested much yet and it's perhaps a bit early
+    to commit it but if there are bugs they should get found quite
+    quickly.
+    
+    Thanks to Jun I Jin from Intel for help and for pointing out
+    that string comparison needs to be optimized in liblzma.
+
+ configure.ac                    |  13 +++
+ src/liblzma/common/Makefile.inc |   1 +
+ src/liblzma/common/memcmplen.h  | 170 ++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 184 insertions(+)
+
+commit 765735cf52e5123586e74a51b9c073b5257f631f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-07-12 21:10:09 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 59da01785ef66c7e62f36e70ca808fd2824bb995
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-07-12 20:06:08 +0300
+
+    Translations: Add Vietnamese translation.
+    
+    Thanks to Trần Ngọc Quân.
+
+ po/LINGUAS |    1 +
+ po/vi.po   | 1007 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 1008 insertions(+)
+
+commit 17215f751c354852700e7f8592ccf319570a0721
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-06-29 20:54:14 +0300
+
+    xz: Update the help message of a few options.
+    
+    Updated: --threads, --block-size, and --block-list
+    Added: --flush-timeout
+
+ src/xz/message.c | 18 +++++++++++-------
+ 1 file changed, 11 insertions(+), 7 deletions(-)
+
+commit 96864a6ddf91ad693d102ea165f3d7918744d582
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-06-18 22:07:06 +0300
+
+    xz: Use lzma_cputhreads() instead of own copy of tuklib_cpucores().
+
+ src/xz/Makefile.am |  1 -
+ src/xz/hardware.c  | 12 +++++++++---
+ 2 files changed, 9 insertions(+), 4 deletions(-)
+
+commit a115cc3748482e277f42a968baa3cd266f031dba
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-06-18 22:04:24 +0300
+
+    liblzma: Add lzma_cputhreads().
+
+ src/liblzma/Makefile.am                  |  8 +++++++-
+ src/liblzma/api/lzma/hardware.h          | 14 ++++++++++++++
+ src/liblzma/common/Makefile.inc          |  1 +
+ src/liblzma/common/hardware_cputhreads.c | 22 ++++++++++++++++++++++
+ src/liblzma/liblzma.map                  |  1 +
+ 5 files changed, 45 insertions(+), 1 deletion(-)
+
+commit 3ce3e7976904fbab4e6482bafa442856f77a51fa
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-06-18 19:11:52 +0300
+
+    xz: Check for filter chain compatibility for --flush-timeout.
+    
+    This avoids LZMA_PROG_ERROR from lzma_code() with filter chains
+    that don't support LZMA_SYNC_FLUSH.
+
+ src/xz/coder.c | 30 +++++++++++++++++++++---------
+ 1 file changed, 21 insertions(+), 9 deletions(-)
+
+commit 381ac14ed79e5d38809f251705be8b3193bba417
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-06-13 19:21:54 +0300
+
+    xzgrep: List xzgrep_expected_output in tests/Makefile.am.
+
+ tests/Makefile.am | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 4244b65b06d5ecaf6f9dd0387ac7e3166bd2364e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-06-13 18:58:22 +0300
+
+    xzgrep: Improve the test script.
+    
+    Now it should be close to the functionality of the original
+    version by Pavel Raiskup.
+
+ tests/Makefile.am            |  3 ++-
+ tests/test_scripts.sh        | 24 ++++++++++++++----------
+ tests/xzgrep_expected_output | 39 +++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 55 insertions(+), 11 deletions(-)
+
+commit 1e60f2c0a0ee6c18b02943ce56214799a70aac26
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-06-11 21:03:25 +0300
+
+    xzgrep: Add a test for the previous fix.
+    
+    This is a simplified version of Pavel Raiskup's
+    original patch.
+
+ tests/test_scripts.sh | 26 ++++++++++++++++++++++----
+ 1 file changed, 22 insertions(+), 4 deletions(-)
+
+commit ceca37901783988204caaf40dff4623d535cc789
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-06-11 20:43:28 +0300
+
+    xzgrep: exit 0 when at least one file matches.
+    
+    Mimic the original grep behavior and return exit_success when
+    at least one xz compressed file matches given pattern.
+    
+    Original bugreport:
+    https://bugzilla.redhat.com/show_bug.cgi?id=1108085
+    
+    Thanks to Pavel Raiskup for the patch.
+
+ src/scripts/xzgrep.in | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+commit 8c19216baccb92d011694590df8a1262da2e980c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-06-09 21:21:24 +0300
+
+    xz: Force single-threaded mode when --flush-timeout is used.
+
+ src/xz/coder.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+commit 87f1a24810805187d7bbc8ac5512e7eec307ddf5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-05-25 22:05:39 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit da1718f266fcfc091e7bf08aae1bc986d0e6cc6b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-05-25 21:45:56 +0300
+
+    liblzma: Use lzma_alloc_zero() in LZ encoder initialization.
+    
+    This avoids a memzero() call for a newly-allocated memory,
+    which can be expensive when encoding small streams with
+    an over-sized dictionary.
+    
+    To avoid using lzma_alloc_zero() for memory that doesn't
+    need to be zeroed, lzma_mf.son is now allocated separately,
+    which requires handling it separately in normalize() too.
+    
+    Thanks to Vincenzo Innocente for reporting the problem.
+
+ src/liblzma/lz/lz_encoder.c    | 84 ++++++++++++++++++++++--------------------
+ src/liblzma/lz/lz_encoder.h    |  2 +-
+ src/liblzma/lz/lz_encoder_mf.c | 31 +++++++++-------
+ 3 files changed, 62 insertions(+), 55 deletions(-)
+
+commit 28af24e9cf2eb259997c85dce13d4c97b3daa47a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-05-25 19:25:57 +0300
+
+    liblzma: Add the internal function lzma_alloc_zero().
+
+ src/liblzma/common/common.c | 21 +++++++++++++++++++++
+ src/liblzma/common/common.h |  6 ++++++
+ 2 files changed, 27 insertions(+)
+
+commit ed9ac85822c490e34b68c259afa0b385d21d1c40
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-05-08 18:03:09 +0300
+
+    xz: Fix uint64_t vs. size_t which broke 32-bit build.
+    
+    Thanks to Christian Hesse.
+
+ src/xz/coder.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit d716acdae3fa7996f9e68a7bac012e6d8d13dd02
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-05-04 11:09:11 +0300
+
+    Docs: Update comments to refer to lzma/lzma12.h in example programs.
+
+ doc/examples/03_compress_custom.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 4d5b7b3fda31241ca86ed35e08e73f776ee916e0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-05-04 11:07:17 +0300
+
+    liblzma: Rename the private API header lzma/lzma.h to lzma/lzma12.h.
+    
+    It can be confusing that two header files have the same name.
+    The public API file is still lzma.h.
+
+ src/liblzma/api/Makefile.am               | 2 +-
+ src/liblzma/api/lzma.h                    | 2 +-
+ src/liblzma/api/lzma/{lzma.h => lzma12.h} | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 1555a9c5664afc7893a2b75e9970105437f01ef1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-04-25 17:53:42 +0300
+
+    Build: Fix the combination of --disable-xzdec --enable-lzmadec.
+    
+    In this case "make install" could fail if the man page directory
+    didn't already exist at the destination. If it did exist, a
+    dangling symlink was created there. Now the link is omitted
+    instead. This isn't the best fix but it's better than the old
+    behavior.
+
+ src/xzdec/Makefile.am | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+commit 56056571df3377eaa6ae6233b3ccc5d72e81d43d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-04-25 17:44:26 +0300
+
+    Build: Add --disable-doc to configure.
+
+ INSTALL      | 6 ++++++
+ Makefile.am  | 2 ++
+ configure.ac | 6 ++++++
+ 3 files changed, 14 insertions(+)
+
+commit 6de61d8721097a6214810841aa85b08e303ac538
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-04-24 18:06:24 +0300
+
+    Update INSTALL.
+    
+    Add a note about failing "make check". The source of
+    the problem should be fixed in libtool (if it really is
+    a libtool bug and not mine) but I'm unable to spend time
+    on that for now. Thanks to Nelson H. F. Beebe for reporting
+    the issue.
+    
+    Add a note about a possible need to run "ldconfig" after
+    "make install".
+
+ INSTALL | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+commit 54df428799a8d853639b753d0e6784694d73eb3e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-04-09 17:26:10 +0300
+
+    xz: Rename a variable to avoid a namespace collision on Solaris.
+    
+    I don't know the details but I have an impression that there's
+    no problem in practice if using GCC since people have built xz
+    with GCC (without patching xz), but renaming the variable cannot
+    hurt either.
+    
+    Thanks to Mark Ashley.
+
+ src/xz/signals.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+commit 5876ca27daa1429676b1160007d9688266907f00
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-01-29 20:19:41 +0200
+
+    Docs: Add example program for threaded encoding.
+    
+    I didn't add -DLZMA_UNSTABLE to Makefile so one has to
+    specify it manually as long as LZMA_UNSTABLE is needed.
+
+ doc/examples/04_compress_easy_mt.c | 184 +++++++++++++++++++++++++++++++++++++
+ doc/examples/Makefile              |   3 +-
+ 2 files changed, 186 insertions(+), 1 deletion(-)
+
+commit 9494fb6d0ff41c585326f00aa8f7fe58f8106a5e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-01-29 20:13:51 +0200
+
+    liblzma: Fix lzma_mt.preset not working with lzma_stream_encoder_mt().
+    
+    It read the filter chain from a wrong variable.
+
+ src/liblzma/common/stream_encoder_mt.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 673a4cb53de3a715685cb1b836da57a3c7dcd43c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-01-20 11:20:40 +0200
+
+    liblzma: Fix typo in a comment.
+
+ src/liblzma/api/lzma/block.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ad96a871a1470eb76d6233d3890ce9338047b7a3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-01-12 19:38:43 +0200
+
+    Windows: Add config.h for building liblzma with MSVC 2013.
+    
+    This is for building liblzma. Building xz tool too requires
+    a little more work. Maybe it will be supported, but for most
+    MSVC users it's enough to be able to build liblzma.
+    
+    C99 support in MSVC 2013 is almost usable which is a big
+    improvement over earlier versions. It's "almost" because
+    there's a dumb bug that breaks mixed declarations after
+    an "if" statements unless the "if" statement uses braces:
+    
+    https://connect.microsoft.com/VisualStudio/feedback/details/808650/visual-studio-2013-c99-compiler-bug
+    https://connect.microsoft.com/VisualStudio/feedback/details/808472/c99-support-of-mixed-declarations-and-statements-fails-with-certain-types-and-constructs
+    
+    Hopefully it will get fixed. Then liblzma should be
+    compilable with MSVC 2013 without patching.
+
+ windows/config.h | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 139 insertions(+)
+
+commit 3d5c090872fab4212b57c290e8ed4d02c78c1737
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-01-12 17:41:14 +0200
+
+    xz: Fix a comment.
+
+ src/xz/coder.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 69fd4e1c932c7975476a0143c86e45d81b60d3f9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-01-12 17:04:33 +0200
+
+    Windows: Add MSVC defines for inline and restrict keywords.
+
+ src/common/sysdefs.h | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+commit a19d9e8575ee6647cd9154cf1f20203f1330485f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-01-12 16:44:52 +0200
+
+    liblzma: Avoid C99 compound literal arrays.
+    
+    MSVC 2013 doesn't like them. Maybe they aren't so good
+    for readability either since many aren't used to them.
+
+ src/liblzma/lzma/lzma_encoder_presets.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+commit e28528f1c867b2ed4ac91195ad08efb9bb8a6263
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-01-12 12:50:30 +0200
+
+    liblzma: Remove a useless C99ism from sha256.c.
+    
+    Unsurprisingly it makes no difference in compiled output.
+
+ src/liblzma/check/sha256.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 5ad1effc45adfb7dabc9a98e79736077e6b7e2d5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-01-12 12:17:08 +0200
+
+    xz: Fix use of wrong variable.
+    
+    Since the only call to suffix_set() uses optarg
+    as the argument, fixing this bug doesn't change
+    the behavior of the program.
+
+ src/xz/suffix.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 3e62c68d75b5a3fdd46dbb34bb335d73289860d5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2014-01-12 12:11:36 +0200
+
+    Fix typos in comments.
+
+ src/common/mythread.h          | 2 +-
+ src/liblzma/check/crc32_fast.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit e90ea601fb72867ec04adf456cbe4bf9520fd412
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-11-26 18:20:16 +0200
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit b22e94d8d15764416354e04729382a7371ae2c30
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-11-26 18:20:09 +0200
+
+    liblzma: Document the need for block->check for lzma_block_header_decode().
+    
+    Thanks to Tomer Chachamu.
+
+ src/liblzma/api/lzma/block.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit d1cd8b1cb824b72421d1ee370e628024d2fcbec4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-11-12 16:38:57 +0200
+
+    xz: Update the man page about --block-size and --block-list.
+
+ src/xz/xz.1 | 24 +++++++++++++++---------
+ 1 file changed, 15 insertions(+), 9 deletions(-)
+
+commit 76be7c612e6bcc38724488ccc3b8bcb1cfec9f0a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-11-12 16:30:53 +0200
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit dd750acbe2259d75444ef0f8da2d4bacc90d7afc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-11-12 16:29:48 +0200
+
+    xz: Make --block-list and --block-size work together in single-threaded.
+    
+    Previously, --block-list and --block-size only worked together
+    in threaded mode. Boundaries are specified by --block-list, but
+    --block-size specifies the maximum size for a Block. Now this
+    works in single-threaded mode too.
+    
+    Thanks to James M Leddy for the original patch.
+
+ src/xz/coder.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 75 insertions(+), 15 deletions(-)
+
+commit ae222fe9805d0161d022d75ba8485dab8bf6d7d5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-10-26 13:26:14 +0300
+
+    Bump the version number to 5.1.3alpha.
+
+ src/liblzma/api/lzma/version.h | 2 +-
+ src/liblzma/liblzma.map        | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 2193837a6a597cd3bf4e9ddf49421a5697d8e155
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-10-26 13:25:02 +0300
+
+    Update NEWS for 5.1.3alpha.
+
+ NEWS | 35 +++++++++++++++++++++++++++++++++++
+ 1 file changed, 35 insertions(+)
+
+commit ed48e75e2763876173aef8902da407a8eb28854b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-10-26 12:47:04 +0300
+
+    Update TODO.
+
+ TODO | 4 ----
+ 1 file changed, 4 deletions(-)
+
+commit 841da0352d79a56a44796a4c39163429c9f039a3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-10-25 22:41:28 +0300
+
+    xz: Document behavior of --block-list with threads.
+    
+    This needs to be updated before 5.2.0.
+
+ src/xz/xz.1 | 24 +++++++++++++++++++++---
+ 1 file changed, 21 insertions(+), 3 deletions(-)
+
+commit 56feb8665b78c1032aabd53c619c62af51defe64
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-10-22 20:03:12 +0300
+
+    xz: Document --flush-timeout=TIMEOUT on the man page.
+
+ src/xz/xz.1 | 37 ++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 36 insertions(+), 1 deletion(-)
+
+commit ba413da1d5bb3324287cf3174922acd921165971
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-10-22 19:51:55 +0300
+
+    xz: Take advantage of LZMA_FULL_BARRIER with --block-list.
+    
+    Now if --block-list is used in threaded mode, the encoder
+    won't need to flush at each Block boundary specified via
+    --block-list. This improves performance a lot, making
+    threading helpful with --block-list.
+    
+    The flush timer was reset after LZMA_FULL_FLUSH but since
+    LZMA_FULL_BARRIER doesn't flush, resetting the timer is
+    no longer done.
+
+ src/xz/coder.c | 32 +++++++++++++++-----------------
+ 1 file changed, 15 insertions(+), 17 deletions(-)
+
+commit 0cd45fc2bc5537de287a0bc005e2d67467a92148
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-10-02 20:05:23 +0300
+
+    liblzma: Support LZMA_FULL_FLUSH and _BARRIER in threaded encoder.
+    
+    Now --block-list=SIZES works with in the threaded mode too,
+    although the performance is still bad due to the use of
+    LZMA_FULL_FLUSH instead of the new LZMA_FULL_BARRIER.
+
+ src/liblzma/common/stream_encoder_mt.c | 55 ++++++++++++++++++++++++----------
+ 1 file changed, 39 insertions(+), 16 deletions(-)
+
+commit 97bb38712f414fabecca908af2e38a12570293fd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-10-02 12:55:11 +0300
+
+    liblzma: Add LZMA_FULL_BARRIER support to single-threaded encoder.
+    
+    In the single-threaded encoder LZMA_FULL_BARRIER is simply
+    an alias for LZMA_FULL_FLUSH.
+
+ src/liblzma/api/lzma/base.h         | 37 ++++++++++++++++++++++++++++++-------
+ src/liblzma/common/common.c         | 17 +++++++++++++++--
+ src/liblzma/common/common.h         |  7 ++++++-
+ src/liblzma/common/stream_encoder.c |  4 +++-
+ 4 files changed, 54 insertions(+), 11 deletions(-)
+
+commit fef0c6b410c08e581c9178700a4e7599f0895ff9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-09-17 11:57:51 +0300
+
+    liblzma: Add block_buffer_encoder.h into Makefile.inc.
+    
+    This should have been in b465da5988dd59ad98fda10c2e4ea13d0b9c73bc.
+
+ src/liblzma/common/Makefile.inc | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 8083e03291b6d21c0f538163e187b4e8cd5594e4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-09-17 11:55:38 +0300
+
+    xz: Add a missing test for TUKLIB_DOSLIKE.
+
+ src/xz/file_io.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 6b44b4a775fe29ecc7bcb7996e086e3bc09e5fd0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-09-17 11:52:28 +0300
+
+    Add native threading support on Windows.
+    
+    Now liblzma only uses "mythread" functions and types
+    which are defined in mythread.h matching the desired
+    threading method.
+    
+    Before Windows Vista, there is no direct equivalent to
+    pthread condition variables. Since this package doesn't
+    use pthread_cond_broadcast(), pre-Vista threading can
+    still be kept quite simple. The pre-Vista code doesn't
+    use anything that wasn't already available in Windows 95,
+    so the binaries should run even on Windows 95 if someone
+    happens to care.
+
+ INSTALL                                |  41 ++-
+ configure.ac                           | 118 ++++++--
+ src/common/mythread.h                  | 513 ++++++++++++++++++++++++++-------
+ src/liblzma/common/stream_encoder_mt.c |  83 +++---
+ src/xz/coder.c                         |   8 +-
+ windows/README-Windows.txt             |   2 +-
+ windows/build.bash                     |  23 +-
+ 7 files changed, 573 insertions(+), 215 deletions(-)
+
+commit ae0ab74a88d5b9b15845f1d9a24ade4349a54f9f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-09-11 14:40:35 +0300
+
+    Build: Remove a comment about Automake 1.10 from configure.ac.
+    
+    The previous commit supports silent rules and that requires
+    Automake 1.11.
+
+ configure.ac | 2 --
+ 1 file changed, 2 deletions(-)
+
+commit 72975df6c8c59aaf849138ab3606e8fb6970596a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-09-09 20:37:03 +0300
+
+    Build: Create liblzma.pc in a src/liblzma/Makefile.am.
+    
+    Previously it was done in configure, but doing that goes
+    against the Autoconf manual. Autoconf requires that it is
+    possible to override e.g. prefix after running configure
+    and that doesn't work correctly if liblzma.pc is created
+    by configure.
+    
+    A potential downside of this change is that now e.g.
+    libdir in liblzma.pc is a standalone string instead of
+    being defined via ${prefix}, so if one overrides prefix
+    when running pkg-config the libdir won't get the new value.
+    I don't know if this matters in practice.
+    
+    Thanks to Vincent Torri.
+
+ configure.ac            |  1 -
+ src/liblzma/Makefile.am | 20 ++++++++++++++++++++
+ 2 files changed, 20 insertions(+), 1 deletion(-)
+
+commit 1c2b6e7e8382ed390f53e140f160488bb2205ecc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-08-04 15:24:09 +0300
+
+    Fix the previous commit which broke the build.
+    
+    Apparently I didn't even compile-test the previous commit.
+    
+    Thanks to Christian Hesse.
+
+ src/common/tuklib_cpucores.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 124eb69c7857f618b4807588c51bc9ba21bf8691
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-08-03 13:52:58 +0300
+
+    Windows: Add Windows support to tuklib_cpucores().
+    
+    It is used for Cygwin too. I'm not sure if that is
+    a good or bad idea.
+    
+    Thanks to Vincent Torri.
+
+ m4/tuklib_cpucores.m4        | 19 +++++++++++++++++--
+ src/common/tuklib_cpucores.c | 13 ++++++++++++-
+ 2 files changed, 29 insertions(+), 3 deletions(-)
+
+commit eada8a875ce3fd521cb42e4ace2624d3d49c5f35
+Author: Anders F Bjorklund <afb at users.sourceforge.net>
+Date:   2013-08-02 15:59:46 +0200
+
+    macosx: separate liblzma package
+
+ macosx/build.sh | 23 +++++++++++++++--------
+ 1 file changed, 15 insertions(+), 8 deletions(-)
+
+commit be0100d01ca6a75899d051bee00acf17e6dc0c15
+Author: Anders F Bjorklund <afb at users.sourceforge.net>
+Date:   2013-08-02 15:58:44 +0200
+
+    macosx: set minimum to leopard
+
+ macosx/build.sh | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+commit 416729e2d743f4b2fe9fd438eedeb98adce033c3
+Author: Anders F Bjorklund <afb at users.sourceforge.net>
+Date:   2011-08-07 13:13:30 +0200
+
+    move configurables into variables
+
+ macosx/build.sh | 25 ++++++++++++++++++-------
+ 1 file changed, 18 insertions(+), 7 deletions(-)
+
+commit 16581080e5f29f9a4e49efece21c5bf572323acc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-07-15 14:08:41 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 3e2b198ba37b624efd9c7caee2a435dc986b46c6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-07-15 14:08:02 +0300
+
+    Build: Fix the detection of missing CRC32.
+    
+    Thanks to Vincent Torri.
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit dee6ad3d5915422bc30a6821efeacaeb8ca8ef00
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-07-04 14:18:46 +0300
+
+    xz: Add preliminary support for --flush-timeout=TIMEOUT.
+    
+    When --flush-timeout=TIMEOUT is used, xz will use
+    LZMA_SYNC_FLUSH if read() would block and at least
+    TIMEOUT milliseconds has elapsed since the previous flush.
+    
+    This can be useful in realtime-like use cases where the
+    data is simultanously decompressed by another process
+    (possibly on a different computer). If new uncompressed
+    input data is produced slowly, without this option xz could
+    buffer the data for a long time until it would become
+    decompressible from the output.
+    
+    If TIMEOUT is 0, the feature is disabled. This is the default.
+    
+    This commit affects the compression side. Using xz for
+    the decompression side for the above purpose doesn't work
+    yet so well because there is quite a bit of input and
+    output buffering when decompressing.
+    
+    The --long-help or man page were not updated yet.
+    The details of this feature may change.
+
+ src/xz/args.c    |  7 +++++++
+ src/xz/coder.c   | 46 +++++++++++++++++++++++++++++++++++-----------
+ src/xz/file_io.c | 46 ++++++++++++++++++++++++++++++++++++----------
+ 3 files changed, 78 insertions(+), 21 deletions(-)
+
+commit fa381acaf9a29a8114e1c0a97de99bab9adb014e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-07-04 13:41:03 +0300
+
+    xz: Don't set src_eof=true after an I/O error because it's useless.
+
+ src/xz/file_io.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+commit ea00545beace5b950f709ec21e46878e0f448678
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-07-04 13:25:11 +0300
+
+    xz: Fix the test when to read more input.
+    
+    Testing for end of file was no longer correct after full flushing
+    became possible with --block-size=SIZE and --block-list=SIZES.
+    There was no bug in practice though because xz just made a few
+    unneeded zero-byte reads.
+
+ src/xz/coder.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 736903c64bef394c06685d79908e397bcb08b88f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-07-04 12:51:57 +0300
+
+    xz: Move some of the timing code into mytime.[hc].
+    
+    This switches units from microseconds to milliseconds.
+    
+    New clock_gettime(CLOCK_MONOTONIC) will be used if available.
+    There is still a fallback to gettimeofday().
+
+ src/xz/Makefile.am |  2 ++
+ src/xz/coder.c     |  5 +++
+ src/xz/message.c   | 54 +++++++++------------------------
+ src/xz/mytime.c    | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/xz/mytime.h    | 47 ++++++++++++++++++++++++++++
+ src/xz/private.h   |  1 +
+ 6 files changed, 158 insertions(+), 40 deletions(-)
+
+commit 24edf8d807e24ffaa1e793114d94cca3b970027d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-07-01 14:35:03 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit c0627b3fceacfa1ed162f5f55235360ea26f569a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-07-01 14:34:11 +0300
+
+    xz: Silence a warning seen with _FORTIFY_SOURCE=2.
+    
+    Thanks to Christian Hesse.
+
+ src/xz/file_io.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+commit 1936718bb38ee394bd89836fdd4eabc0beb02443
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-30 19:40:11 +0300
+
+    Update NEWS for 5.0.5.
+
+ NEWS | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 52 insertions(+)
+
+commit a37ae8b5eb6093a530198f109c6f7a538c80ecf0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-30 18:02:27 +0300
+
+    Man pages: Use similar syntax for synopsis as in xz.
+    
+    The man pages of lzmainfo, xzmore, and xzdec had similar
+    constructs as the man page of xz had before the commit
+    eb6ca9854b8eb9fbf72497c1cf608d6b19d2d494. Eric S. Raymond
+    didn't mention these man pages in his bug report, but
+    it's nice to be consistent.
+
+ src/lzmainfo/lzmainfo.1 |  4 ++--
+ src/scripts/xzmore.1    |  6 +++---
+ src/xzdec/xzdec.1       | 10 +++++-----
+ 3 files changed, 10 insertions(+), 10 deletions(-)
+
+commit cdba9ddd870ae72fd6219a125662c20ec997f86c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-29 15:59:13 +0300
+
+    xz: Use non-blocking I/O for the output file.
+    
+    Now both reading and writing should be without
+    race conditions with signals.
+    
+    They might still be signal handling issues left.
+    Signals are blocked during many operations to avoid
+    EINTR but it may cause problems e.g. if writing to
+    stderr blocks when trying to display an error message.
+
+ src/xz/file_io.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++--------
+ 1 file changed, 49 insertions(+), 8 deletions(-)
+
+commit e61a5c95da3fe31281d959e5e842885a8ba2b5bd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-28 23:56:17 +0300
+
+    xz: Fix return value type in io_write_buf().
+    
+    It didn't affect the behavior of the code since -1
+    becomes true anyway.
+
+ src/xz/file_io.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 9dc319eabb34a826f4945f91c71620f14a60e9e2
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-28 23:48:05 +0300
+
+    xz: Use the self-pipe trick to avoid a race condition with signals.
+    
+    It is possible that a signal to set user_abort arrives right
+    before a blocking system call is made. In this case the call
+    may block until another signal arrives, while the wanted
+    behavior is to make xz clean up and exit as soon as possible.
+    
+    After this commit, the race condition is avoided with the
+    input side which already uses non-blocking I/O. The output
+    side still uses blocking I/O and thus has the race condition.
+
+ src/xz/file_io.c | 56 ++++++++++++++++++++++++++++++++++++++++++++------------
+ src/xz/file_io.h |  8 ++++++++
+ src/xz/signals.c |  5 +++++
+ 3 files changed, 57 insertions(+), 12 deletions(-)
+
+commit 3541bc79d0cfabc0ad155c99bfdad1289f17fec3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-28 22:51:02 +0300
+
+    xz: Use non-blocking I/O for the input file.
+
+ src/xz/file_io.c | 156 +++++++++++++++++++++++++++++++++++++++----------------
+ 1 file changed, 111 insertions(+), 45 deletions(-)
+
+commit 78673a08bed5066c81e8a8e90d20e670c28ecfd5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-28 18:46:13 +0300
+
+    xz: Remove an outdated NetBSD-specific comment.
+    
+    Nowadays errno == EFTYPE is documented in open(2).
+
+ src/xz/file_io.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+commit a616fdad34b48b2932ef03fb87309dcc8b829527
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-28 18:09:47 +0300
+
+    xz: Fix error detection of fcntl(fd, F_SETFL, flags) calls.
+    
+    POSIX says that fcntl(fd, F_SETFL, flags) returns -1 on
+    error and "other than -1" on success. This is how it is
+    documented e.g. on OpenBSD too. On Linux, success with
+    F_SETFL is always 0 (at least accorinding to fcntl(2)
+    from man-pages 3.51).
+
+ src/xz/file_io.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+commit 4a08a6e4c61c65ab763ab314100a6d7a3bb89298
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-28 17:36:47 +0300
+
+    xz: Fix use of wrong variable in a fcntl() call.
+    
+    Due to a wrong variable name, when writing a sparse file
+    to standard output, *all* file status flags were cleared
+    (to the extent the operating system allowed it) instead of
+    only clearing the O_APPEND flag. In practice this worked
+    fine in the common situations on GNU/Linux, but I didn't
+    check how it behaved elsewhere.
+    
+    The original flags were still restored correctly. I still
+    changed the code to use a separate boolean variable to
+    indicate when the flags should be restored instead of
+    relying on a special value in stdout_flags.
+
+ src/xz/file_io.c | 24 +++++++++++++-----------
+ 1 file changed, 13 insertions(+), 11 deletions(-)
+
+commit b790b435daa3351067f80a5973b647f8d55367a2
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-28 14:55:37 +0300
+
+    xz: Fix assertion related to posix_fadvise().
+    
+    Input file can be a FIFO or something else that doesn't
+    support posix_fadvise() so don't check the return value
+    even with an assertion. Nothing bad happens if the call
+    to posix_fadvise() fails.
+
+ src/xz/file_io.c | 10 ++--------
+ 1 file changed, 2 insertions(+), 8 deletions(-)
+
+commit 84d2da6c9dc252f441deb7626c2522202b005d4d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-26 13:30:57 +0300
+
+    xz: Check the value of lzma_stream_flags.version in --list.
+    
+    It is a no-op for now, but if an old xz version is used
+    together with a newer liblzma that supports something new,
+    then this check becomes important and will stop the old xz
+    from trying to parse files that it won't understand.
+
+ src/xz/list.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+commit 9376f5f8f762296f2173d61af9101112c36f38c0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-26 12:17:00 +0300
+
+    Build: Require Automake 1.12 and use serial-tests option.
+    
+    It should actually still work with Automake 1.10 if
+    the serial-tests option is removed. Automake 1.13 started
+    using parallel tests by default and the option to get
+    the old behavior isn't supported before 1.12.
+    
+    At least for now, parallel tests don't improve anything
+    in XZ Utils but they hide the progress output from
+    test_compress.sh.
+
+ configure.ac | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit b7e200d7bd0a3c7c171c13ad37d68296d6f73374
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-23 18:59:13 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 46540e4c10923e363741ff5aab99e79fc0ce6ee8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-23 18:57:23 +0300
+
+    liblzma: Avoid a warning about a shadowed variable.
+    
+    On Mac OS X wait() is declared in <sys/wait.h> that
+    we include one way or other so don't use "wait" as
+    a variable name.
+    
+    Thanks to Christian Kujau.
+
+ src/liblzma/common/stream_encoder_mt.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit ebb501ec73cecc546c67117dd01b5e33c90bfb4a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-23 17:36:47 +0300
+
+    xz: Validate Uncompressed Size from Block Header in list.c.
+    
+    This affects only "xz -lvv". Normal decompression with xz
+    already detected if Block Header and Index had mismatched
+    Uncompressed Size fields. So this just makes "xz -lvv"
+    show such files as corrupt instead of showing the
+    Uncompressed Size from Index.
+
+ src/xz/list.c | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+commit c09e91dd236d3cabee0fc48312b3dc8cceae41ab
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-21 22:08:11 +0300
+
+    Update THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit eb6ca9854b8eb9fbf72497c1cf608d6b19d2d494
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-21 22:04:45 +0300
+
+    xz: Make the man page more friendly to doclifter.
+    
+    Thanks to Eric S. Raymond.
+
+ src/xz/xz.1 | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+commit 0c0a1947e6ad90a0a10b7a5c39f6ab99a0aa5c93
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-21 21:54:59 +0300
+
+    xz: A couple of man page fixes.
+    
+    Now the interaction of presets and custom filter chains
+    is described correctly. Earlier it contradicted itself.
+    
+    Thanks to DevHC who reported these issues on IRC to me
+    on 2012-12-14.
+
+ src/xz/xz.1 | 35 +++++++++++++++++++++++------------
+ 1 file changed, 23 insertions(+), 12 deletions(-)
+
+commit 2fcda89939c903106c429e109083d43d894049e0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-06-21 21:50:26 +0300
+
+    xz: Fix interaction between preset and custom filter chains.
+    
+    There was somewhat illogical behavior when --extreme was
+    specified and mixed with custom filter chains.
+    
+    Before this commit, "xz -9 --lzma2 -e" was equivalent
+    to "xz --lzma2". After it is equivalent to "xz -6e"
+    (all earlier preset options get forgotten when a custom
+    filter chain is specified and the default preset is 6
+    to which -e is applied). I find this less illogical.
+    
+    This also affects the meaning of "xz -9e --lzma2 -7".
+    Earlier it was equivalent to "xz -7e" (the -e specified
+    before a custom filter chain wasn't forgotten). Now it
+    is "xz -7". Note that "xz -7e" still is the same as "xz -e7".
+    
+    Hopefully very few cared about this in the first place,
+    so pretty much no one should even notice this change.
+    
+    Thanks to Conley Moorhous.
+
+ src/xz/coder.c | 35 +++++++++++++++++++++--------------
+ 1 file changed, 21 insertions(+), 14 deletions(-)
+
+commit 97379c5ea758da3f8b0bc444d5f7fa43753ce610
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-04-27 22:07:46 +0300
+
+    Build: Use -Wvla with GCC if supported.
+    
+    Variable-length arrays are mandatory in C99 but optional in C11.
+    The code doesn't currently use any VLAs and it shouldn't in the
+    future either to stay compatible with C11 without requiring any
+    optional C11 features.
+
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 8957c58609d3987c58aa72b96c436cf565cc4917
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-04-15 19:29:09 +0300
+
+    xzdec: Improve the --help message.
+    
+    The options are now ordered in the same order as in xz's help
+    message.
+    
+    Descriptions were added to the options that are ignored.
+    I left them in parenthesis even if it looks a bit weird
+    because I find it easier to spot the ignored vs. non-ignored
+    options from the list that way.
+
+ src/xzdec/xzdec.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+commit ed886e1a92534a24401d0e99c11f1dcff3b5220a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-04-05 19:25:40 +0300
+
+    Update THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 5019413a055ce29e660dbbf15e02443cb5a26c59
+Author: Jeff Bastian <jbastian at redhat.com>
+Date:   2013-04-03 13:59:17 +0200
+
+    xzgrep: make the '-h' option to be --no-filename equivalent
+    
+    * src/scripts/xzgrep.in: Accept the '-h' option in argument parsing.
+
+ src/scripts/xzgrep.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 5ea900cb5ad862bca81316729f92357c1fc040ce
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-03-23 22:25:15 +0200
+
+    liblzma: Be less picky in lzma_alone_decoder().
+    
+    To avoid false positives when detecting .lzma files,
+    rare values in dictionary size and uncompressed size fields
+    were rejected. They will still be rejected if .lzma files
+    are decoded with lzma_auto_decoder(), but when using
+    lzma_alone_decoder() directly, such files will now be accepted.
+    Hopefully this is an OK compromise.
+    
+    This doesn't affect xz because xz still has its own file
+    format detection code. This does affect lzmadec though.
+    So after this commit lzmadec will accept files that xz or
+    xz-emulating-lzma doesn't.
+    
+    NOTE: lzma_alone_decoder() still won't decode all .lzma files
+    because liblzma's LZMA decoder doesn't support lc + lp > 4.
+    
+    Reported here:
+    http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/7068827
+
+ src/liblzma/common/alone_decoder.c | 22 ++++++++++++++--------
+ src/liblzma/common/alone_decoder.h |  5 +++--
+ src/liblzma/common/auto_decoder.c  |  2 +-
+ 3 files changed, 18 insertions(+), 11 deletions(-)
+
+commit bb117fffa84604b6e3811b068c80db82bf7f7b05
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-03-23 21:55:13 +0200
+
+    liblzma: Use lzma_block_buffer_bound64() in threaded encoder.
+    
+    Now it uses lzma_block_uncomp_encode() if the data doesn't
+    fit into the space calculated by lzma_block_buffer_bound64().
+
+ src/liblzma/common/stream_encoder_mt.c | 66 +++++++++++++++++++++++++---------
+ 1 file changed, 50 insertions(+), 16 deletions(-)
+
+commit e572e123b55b29527e54ce5f0807f115481d78b9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-03-23 21:51:38 +0200
+
+    liblzma: Fix another deadlock in the threaded encoder.
+    
+    This race condition could cause a deadlock if lzma_end() was
+    called before finishing the encoding. This can happen with
+    xz with debugging enabled (non-debugging version doesn't
+    call lzma_end() before exiting).
+
+ src/liblzma/common/stream_encoder_mt.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+commit b465da5988dd59ad98fda10c2e4ea13d0b9c73bc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-03-23 19:17:33 +0200
+
+    liblzma: Add lzma_block_uncomp_encode().
+    
+    This also adds a new internal function
+    lzma_block_buffer_bound64() which is similar to
+    lzma_block_buffer_bound() but uses uint64_t instead
+    of size_t.
+
+ src/liblzma/api/lzma/block.h              | 18 ++++++
+ src/liblzma/common/block_buffer_encoder.c | 94 +++++++++++++++++++++----------
+ src/liblzma/common/block_buffer_encoder.h | 24 ++++++++
+ src/liblzma/liblzma.map                   |  1 +
+ 4 files changed, 106 insertions(+), 31 deletions(-)
+
+commit 9e6dabcf22ef4679f4faaae15ebd5b137ae2fad1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2013-03-05 19:14:50 +0200
+
+    Avoid unneeded use of awk in xzless.
+    
+    Use "read" instead of "awk" in xzless to get the version
+    number of "less". The need for awk was introduced in
+    the commit db5c1817fabf7cbb9e4087b1576eb26f0747338e.
+    
+    Thanks to Ariel P for the patch.
+
+ src/scripts/xzless.in | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+commit e7b424d267a34803db8d92a3515528be2ed45abd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-12-14 20:13:32 +0200
+
+    Make the progress indicator smooth in threaded mode.
+    
+    This adds lzma_get_progress() to liblzma and takes advantage
+    of it in xz.
+    
+    lzma_get_progress() collects progress information from
+    the thread-specific structures so that fairly accurate
+    progress information is available to applications. Adding
+    a new function seemed to be a better way than making the
+    information directly available in lzma_stream (like total_in
+    and total_out are) because collecting the information requires
+    locking mutexes. It's waste of time to do it more often than
+    the up to date information is actually needed by an application.
+
+ src/liblzma/api/lzma/base.h            | 22 +++++++++-
+ src/liblzma/common/common.c            | 16 +++++++
+ src/liblzma/common/common.h            |  6 +++
+ src/liblzma/common/stream_encoder_mt.c | 77 +++++++++++++++++++++++++++++++---
+ src/liblzma/liblzma.map                |  1 +
+ src/xz/message.c                       | 20 +++++----
+ 6 files changed, 129 insertions(+), 13 deletions(-)
+
+commit 2ebbb994e367f55f2561aa7c9e7451703c171f2f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-12-14 11:01:41 +0200
+
+    liblzma: Fix mythread_sync for nested locking.
+
+ src/common/mythread.h | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit 4c7e28705f6de418d19cc77324ef301f996e01ff
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-12-13 21:05:36 +0200
+
+    xz: Mention --threads in --help.
+    
+    Thanks to Olivier Delhomme for pointing out that this
+    was still missing.
+
+ src/xz/message.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit db5c1817fabf7cbb9e4087b1576eb26f0747338e
+Author: Jonathan Nieder <jrnieder at gmail.com>
+Date:   2012-11-19 00:10:10 -0800
+
+    xzless: Make "less -V" parsing more robust
+    
+    In v4.999.9beta~30 (xzless: Support compressed standard input,
+    2009-08-09), xzless learned to parse ‘less -V’ output to figure out
+    whether less is new enough to handle $LESSOPEN settings starting
+    with “|-”.  That worked well for a while, but the version string from
+    ‘less’ versions 448 (June, 2012) is misparsed, producing a warning:
+    
+            $ xzless /tmp/test.xz; echo $?
+            /usr/bin/xzless: line 49: test: 456 (GNU regular expressions): \
+            integer expression expected
+            0
+    
+    More precisely, modern ‘less’ lists the regexp implementation along
+    with its version number, and xzless passes the entire version number
+    with attached parenthetical phrase as a number to "test $a -gt $b",
+    producing the above confusing message.
+    
+            $ less-444 -V | head -1
+            less 444
+            $ less -V | head -1
+            less 456 (no regular expressions)
+    
+    So relax the pattern matched --- instead of expecting "less <number>",
+    look for a line of the form "less <number>[ (extra parenthetical)]".
+    While at it, improve the behavior when no matching line is found ---
+    instead of producing a cryptic message, we can fall back on a LESSPIPE
+    setting that is supported by all versions of ‘less’.
+    
+    The implementation uses "awk" for simplicity.  Hopefully that’s
+    portable enough.
+    
+    Reported-by: Jörg-Volker Peetz <jvpeetz at web.de>
+    Signed-off-by: Jonathan Nieder <jrnieder at gmail.com>
+
+ src/scripts/xzless.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 65536214a31ecd33b6b03b68a351fb597d3703d6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-10-03 15:54:24 +0300
+
+    xz: Fix the note about --rsyncable on the man page.
+
+ src/xz/xz.1 | 17 +++++++++--------
+ 1 file changed, 9 insertions(+), 8 deletions(-)
+
+commit 3d93b6354927247a1569caf22ad27b07e97ee904
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-09-28 20:11:09 +0300
+
+    xz: Improve handling of failed realloc in xrealloc.
+    
+    Thanks to Jim Meyering.
+
+ src/xz/util.c | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+commit ab225620664e235637833be2329935f9d290ba80
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-08-24 16:27:31 +0300
+
+    A few typo fixes to comments and the xz man page.
+    
+    Thanks to Jim Meyering.
+
+ configure.ac               | 2 +-
+ src/liblzma/check/sha256.c | 1 -
+ src/xz/xz.1                | 4 ++--
+ 3 files changed, 3 insertions(+), 4 deletions(-)
+
+commit f3c1ec69d910175ffd431fd82968dd35cec806ed
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-08-13 21:40:09 +0300
+
+    xz: Add a warning to --help about alpha and beta versions.
+
+ src/xz/message.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+commit d8eaf9d8278c23c2cf2b7ca5562d4de570d3b5db
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-08-02 17:13:30 +0300
+
+    Build: Bump gettext version requirement to 0.18.
+    
+    Otherwise too old version of m4/lib-link.m4 gets included
+    when autoreconf -fi is run.
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 96e08902b09f0f304d4ff80c6e83ef7fff883f34
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-17 18:29:08 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 3778db1be53e61ff285c573af5ee468803008456
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-17 18:19:59 +0300
+
+    liblzma: Make the use of lzma_allocator const-correct.
+    
+    There is a tiny risk of causing breakage: If an application
+    assigns lzma_stream.allocator to a non-const pointer, such
+    code won't compile anymore. I don't know why anyone would do
+    such a thing though, so in practice this shouldn't cause trouble.
+    
+    Thanks to Jan Kratochvil for the patch.
+
+ src/liblzma/api/lzma/base.h                |  4 +++-
+ src/liblzma/api/lzma/block.h               |  6 ++---
+ src/liblzma/api/lzma/container.h           |  9 +++++---
+ src/liblzma/api/lzma/filter.h              | 13 ++++++-----
+ src/liblzma/api/lzma/index.h               | 16 ++++++-------
+ src/liblzma/api/lzma/index_hash.h          |  4 ++--
+ src/liblzma/common/alone_decoder.c         |  6 ++---
+ src/liblzma/common/alone_decoder.h         |  2 +-
+ src/liblzma/common/alone_encoder.c         |  8 +++----
+ src/liblzma/common/auto_decoder.c          |  6 ++---
+ src/liblzma/common/block_buffer_decoder.c  |  2 +-
+ src/liblzma/common/block_buffer_encoder.c  |  4 ++--
+ src/liblzma/common/block_decoder.c         |  6 ++---
+ src/liblzma/common/block_decoder.h         |  2 +-
+ src/liblzma/common/block_encoder.c         |  8 +++----
+ src/liblzma/common/block_encoder.h         |  2 +-
+ src/liblzma/common/block_header_decoder.c  |  4 ++--
+ src/liblzma/common/common.c                | 10 ++++-----
+ src/liblzma/common/common.h                | 20 +++++++++--------
+ src/liblzma/common/easy_buffer_encoder.c   |  4 ++--
+ src/liblzma/common/filter_buffer_decoder.c |  3 ++-
+ src/liblzma/common/filter_buffer_encoder.c |  7 +++---
+ src/liblzma/common/filter_common.c         |  4 ++--
+ src/liblzma/common/filter_common.h         |  2 +-
+ src/liblzma/common/filter_decoder.c        |  7 +++---
+ src/liblzma/common/filter_decoder.h        |  2 +-
+ src/liblzma/common/filter_encoder.c        |  2 +-
+ src/liblzma/common/filter_encoder.h        |  2 +-
+ src/liblzma/common/filter_flags_decoder.c  |  2 +-
+ src/liblzma/common/index.c                 | 26 ++++++++++-----------
+ src/liblzma/common/index_decoder.c         | 12 +++++-----
+ src/liblzma/common/index_encoder.c         |  6 ++---
+ src/liblzma/common/index_encoder.h         |  2 +-
+ src/liblzma/common/index_hash.c            |  6 +++--
+ src/liblzma/common/outqueue.c              |  4 ++--
+ src/liblzma/common/outqueue.h              |  5 +++--
+ src/liblzma/common/stream_buffer_decoder.c |  2 +-
+ src/liblzma/common/stream_buffer_encoder.c |  3 ++-
+ src/liblzma/common/stream_decoder.c        |  9 ++++----
+ src/liblzma/common/stream_decoder.h        |  5 +++--
+ src/liblzma/common/stream_encoder.c        | 10 ++++-----
+ src/liblzma/common/stream_encoder_mt.c     | 16 ++++++-------
+ src/liblzma/delta/delta_common.c           |  4 ++--
+ src/liblzma/delta/delta_decoder.c          |  6 ++---
+ src/liblzma/delta/delta_decoder.h          |  5 +++--
+ src/liblzma/delta/delta_encoder.c          |  6 ++---
+ src/liblzma/delta/delta_encoder.h          |  3 ++-
+ src/liblzma/delta/delta_private.h          |  2 +-
+ src/liblzma/lz/lz_decoder.c                |  8 +++----
+ src/liblzma/lz/lz_decoder.h                |  7 +++---
+ src/liblzma/lz/lz_encoder.c                | 19 ++++++++--------
+ src/liblzma/lz/lz_encoder.h                |  6 ++---
+ src/liblzma/lzma/lzma2_decoder.c           |  8 +++----
+ src/liblzma/lzma/lzma2_decoder.h           |  5 +++--
+ src/liblzma/lzma/lzma2_encoder.c           |  6 ++---
+ src/liblzma/lzma/lzma2_encoder.h           |  2 +-
+ src/liblzma/lzma/lzma_decoder.c            |  8 +++----
+ src/liblzma/lzma/lzma_decoder.h            |  7 +++---
+ src/liblzma/lzma/lzma_encoder.c            |  7 +++---
+ src/liblzma/lzma/lzma_encoder.h            |  5 +++--
+ src/liblzma/simple/arm.c                   |  8 ++++---
+ src/liblzma/simple/armthumb.c              |  8 ++++---
+ src/liblzma/simple/ia64.c                  |  8 ++++---
+ src/liblzma/simple/powerpc.c               |  8 ++++---
+ src/liblzma/simple/simple_coder.c          | 10 ++++-----
+ src/liblzma/simple/simple_coder.h          | 36 ++++++++++++++++++++----------
+ src/liblzma/simple/simple_decoder.c        |  2 +-
+ src/liblzma/simple/simple_decoder.h        |  2 +-
+ src/liblzma/simple/simple_private.h        |  3 ++-
+ src/liblzma/simple/sparc.c                 |  8 ++++---
+ src/liblzma/simple/x86.c                   |  8 ++++---
+ 71 files changed, 269 insertions(+), 219 deletions(-)
+
+commit d625c7cf824fd3b61c6da84f56179e94917ff603
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-05 07:36:28 +0300
+
+    Tests: Remove tests/test_block.c that had gotten committed accidentally.
+
+ tests/test_block.c | 52 ----------------------------------------------------
+ 1 file changed, 52 deletions(-)
+
+commit 0b09d266cce72bc4841933b171e79551e488927c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-05 07:33:35 +0300
+
+    Build: Include macosx/build.sh in the distribution.
+    
+    It has been in the Git repository since 2010 but probably
+    few people have seen it since it hasn't been included in
+    the release tarballs. :-(
+
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit d6e0b23d4613b9f417893dd96cc168c8005ece3d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-05 07:28:53 +0300
+
+    Build: Include validate_map.sh in the distribution.
+    
+    It's required by "make mydist".
+    
+    Fix also the location of EXTRA_DIST+= so that those files
+    get distributed also if symbol versioning isn't enabled.
+
+ src/liblzma/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 19de545d86097c3954d69ab5d12820387f6a09bc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-05 07:24:45 +0300
+
+    Docs: Fix the name LZMA Utils -> XZ Utils in debug/README.
+
+ debug/README | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 672eccf57c31a40dfb956b7662db06d43e18618e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-05 07:23:17 +0300
+
+    Include debug/translation.bash in the distribution.
+    
+    Also fix the script name mentioned in README.
+
+ README            | 4 ++--
+ debug/Makefile.am | 3 +++
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+commit cafb523adac1caf305e70a04bc37f25602bf990c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-04 22:31:58 +0300
+
+    xz: Document --block-list better.
+    
+    Thanks to Jonathan Nieder.
+
+ src/xz/xz.1 | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+commit c7ff218528bc8f7c65e7ef73c6515777346c6794
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-04 20:01:49 +0300
+
+    Bump the version number to 5.1.2alpha.
+
+ src/liblzma/api/lzma/version.h | 2 +-
+ src/liblzma/liblzma.map        | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 8f3c1d886f93e6478ad509ff52102b2ce7faa999
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-04 20:01:19 +0300
+
+    Update NEWS for 5.1.2alpha.
+
+ NEWS | 41 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 41 insertions(+)
+
+commit 0d5fa05466e580fbc458820f87013ae7644e20e5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-04 19:58:23 +0300
+
+    xz: Fix the version number printed by xz -lvv.
+    
+    The decoder bug was fixed in 5.0.2 instead of 5.0.3.
+
+ src/xz/list.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit df11317985a4165731dde12bb0f0028da0e7b77f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-04 17:11:31 +0300
+
+    Build: Add a comment to configure.ac about symbol versioning.
+
+ configure.ac | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit bd9cc179e8be3ef515201d3ed9c7dd79ae88869d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-04 17:06:49 +0300
+
+    Update TODO.
+
+ TODO | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+commit 4a238dd9b22f462cac5e199828bf1beb0df05884
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-04 17:05:46 +0300
+
+    Document --enable-symbol-versions in INSTALL.
+
+ INSTALL | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+commit 88ccf47205d7f3aa314d358c72ef214f10f68b43
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-03 21:16:39 +0300
+
+    xz: Add incomplete support for --block-list.
+    
+    It's broken with threads and when also --block-size is used.
+
+ src/xz/args.c    | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/xz/args.h    |  1 +
+ src/xz/coder.c   | 48 ++++++++++++++++++++++++++++------
+ src/xz/coder.h   |  4 +++
+ src/xz/main.c    |  1 +
+ src/xz/message.c |  6 +++++
+ src/xz/xz.1      | 23 +++++++++++++++--
+ 7 files changed, 151 insertions(+), 10 deletions(-)
+
+commit 972179cdcdf5d8949c48ee31737d87d3050b44af
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-07-01 18:44:33 +0300
+
+    xz: Update the man page about the new field in --robot -lvv.
+
+ src/xz/xz.1 | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+commit 1403707fc64a70976aebe66f8d9a9bd12f73a2c5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-06-28 10:47:49 +0300
+
+    liblzma: Check that the first byte of range encoded data is 0x00.
+    
+    It is just to be more pedantic and thus perhaps catch broken
+    files slightly earlier.
+
+ src/liblzma/lzma/lzma_decoder.c        |  8 ++++++--
+ src/liblzma/rangecoder/range_decoder.h | 12 +++++++++---
+ 2 files changed, 15 insertions(+), 5 deletions(-)
+
+commit eccd8017ffe2c5de473222c4963ec53c62f7fda2
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-06-22 19:00:23 +0300
+
+    Update NEWS from 5.0.4.
+
+ NEWS | 37 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 37 insertions(+)
+
+commit 2e6754eac26a431e8d340c28906f63bcd1e177e8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-06-22 14:34:03 +0300
+
+    xz: Update man page date to match the latest update.
+
+ src/xz/xz.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit b3235a0b1af45d5e1244cbe3191516966c076fa0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-06-18 21:27:47 +0300
+
+    Docs: Language fix to 01_compress_easy.c.
+    
+    Thanks to Jonathan Nieder.
+
+ doc/examples/01_compress_easy.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit f1675f765fe228cb5a5f904f853445a03e33cfe9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-06-14 20:15:30 +0300
+
+    Fix the top-level Makefile.am for the new example programs.
+
+ Makefile.am | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+commit 3a0c5378abefaf86aa39a62a7c9682bdb21568a1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 1bd2c2c553e30c4a73cfb82abc6908efd6be6b8d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 => examples_old}/xz_pipe_comp.c   | 0
+ doc/{examples => examples_old}/xz_pipe_decomp.c | 0
+ 2 files changed, 0 insertions(+), 0 deletions(-)
+
+commit 905f0ab5b5ce544d4b68a2ed6077df0f3d021292
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 9 insertions(+), 1 deletion(-)
+
+commit 4bd1a3bd5fdf4870b2f96dd0b8a21657c8a58ad8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-05-30 23:14:33 +0300
+
+    Translations: Update the French translation.
+    
+    Thanks to Adrien Nader.
+
+ po/fr.po | 148 ++++++++++++++++++++++++++++++++++-----------------------------
+ 1 file changed, 79 insertions(+), 69 deletions(-)
+
+commit d2e836f2f3a87df6fe6bb0589b037db51205d910
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 133 insertions(+), 96 deletions(-)
+
+commit c9a16151577ba459afd6e3528df23bc0ddb95171
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-05-29 22:26:27 +0300
+
+    Translations: Update the German translation.
+
+ po/de.po | 169 ++++++++++++++++++++++++++++++++++-----------------------------
+ 1 file changed, 91 insertions(+), 78 deletions(-)
+
+commit 1530a74fd48f8493372edad137a24541efe24713
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-05-29 22:14:21 +0300
+
+    Translations: Update Polish translation.
+
+ po/pl.po | 283 +++++++++++++++++++++++++++++++++++++--------------------------
+ 1 file changed, 165 insertions(+), 118 deletions(-)
+
+commit d8db706acb8316f9861abd432cfbe001dd6d0c5c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2012-05-28 15:38:32 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 7769ea051d739a38a1640fd448cf5eb83cb119c6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 11 insertions(+), 1 deletion(-)
+
+commit ec921105725e4d3ef0a683dd83eee6f24ab60ccd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 19 insertions(+)
+
+commit 27d24eb0a9f6eed96d6a4594c2b0bf7a91d29f9a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ab25b82a91754d9388c89abddf806424671d9431
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-05-24 18:33:54 +0300
+
+    Build: Upgrade m4/acx_pthread.m4 to the latest version.
+
+ m4/ax_pthread.m4 | 98 +++++++++++++++++++++++++++++++++++---------------------
+ 1 file changed, 62 insertions(+), 36 deletions(-)
+
+commit d05d6d65c41a4bc83f162fa3d67c5d84e8751634
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-05-10 21:15:17 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit e077391982f9f28dbfe542bba8800e7c5b916666
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <bensberg at justemail.net>
+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 <bensberg at justemail.net>
+
+ AUTHORS         |  6 +++---
+ README          | 42 ++++++++++++++++++++---------------------
+ doc/faq.txt     | 24 ++++++++++++------------
+ doc/history.txt | 58 ++++++++++++++++++++++++++++-----------------------------
+ 4 files changed, 65 insertions(+), 65 deletions(-)
+
+commit 29fa0566d5df199cb9acb2d17bf7eea61acc7fa1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-04-29 11:51:25 +0300
+
+    Windows: Update notes about static linking with MSVC.
+
+ windows/README-Windows.txt | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+commit aac1b31ea4e66cf5a7a8c116bdaa15aa45e6c56e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 insertion(+), 5 deletions(-)
+
+commit df14a46013bea70c0bd35be7821b0b9108f97de7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 03ed742a3a4931bb5c821357832083b26f577b13
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 8c5b13ad59df70f49429bfdfd6ac120b8f892fda
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-04-19 13:58:55 +0300
+
+    Docs: Update MINIX 3 information in INSTALL.
+
+ INSTALL | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+commit c7376fc415a1566f38b2de4b516a17013d516a8b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-02-22 14:23:13 +0200
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit cff070aba6281ba743d29a62b8c0c66e5da4b2a6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 41cafb2bf9beea915710ee68f05fe929cd17759c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2012-02-22 12:08:43 +0200
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 2dcea03712fa881930d69ec9eff70855c3d126d9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 694952d545b6cf056547893ced69486eff9ece55
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-12-19 21:21:29 +0200
+
+    Docs: Explain the stable releases better in README.
+
+ README | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit 418fe668b3c53a9a20020b6cc652aaf25c734b29
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 57 insertions(+), 6 deletions(-)
+
+commit 7081d82c37326bac97184e338345fa1c327e3580
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 232fe7cd70ad258d6a37f17e860e0f1b1891eeb5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-11-03 17:08:02 +0200
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 74d2bae4d3449c68453b0473dd3430ce91fd90c1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-11-03 17:07:22 +0200
+
+    xz: Fix xz on EBCDIC systems.
+    
+    Thanks to Chris Donawa.
+
+ src/xz/coder.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+commit 4ac4923f47cc0ef97dd9ca5cfcc44fc53eeab34a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-10-23 17:09:10 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit ab50ae3ef40c81e5bf613905ca3fd636548b75e7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+)
+
+commit 6b620a0f0813d28c3c544b4ff8cb595b38a6e908
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+), 1 deletion(-)
+
+commit bd52cf150ecd51e3ab63a9cc1a3cff6a77500178
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(-)
+
+commit 5c5b2256969ac473001b7d67615ed3bd0a54cc82
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-08-09 21:19:13 +0300
+
+    Update THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 5b1e1f10741af9e4bbe4cfc3261fb7c7b04f7809
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-08-09 21:16:44 +0300
+
+    Workaround unusual SIZE_MAX on SCO OpenServer.
+
+ src/common/sysdefs.h | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+commit e9ed88126eee86e2511fa42681a5c7104820cf0a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 deletion(-)
+
+commit 324cde7a864f4506c32ae7846d688c359a83fe65
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-06-16 12:15:29 +0300
+
+    liblzma: Remove unneeded semicolon.
+
+ src/liblzma/lz/lz_encoder_hash.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 492c86345551a51a29bf18e55fe55a5e86f169ce
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-05-28 19:24:56 +0300
+
+    Build: Make configure print if symbol versioning is enabled or not.
+
+ configure.ac | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit fc4d4436969bd4d71b704d400a165875e596034a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+), 1 deletion(-)
+
+commit bd35d903a04c4d388adb4065b0fa271302380895
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit afbb244362c9426a37ce4eb9d54aab768da3adad
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-05-28 09:46:46 +0300
+
+    Translations: Update the Italian translation.
+    
+    Thanks to Milo Casagrande.
+
+ po/it.po | 365 +++++++++++++++++++++++++++++++++++++--------------------------
+ 1 file changed, 216 insertions(+), 149 deletions(-)
+
+commit 79bef85e0543c0c3723281c3c817616c6cec343b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit c0297445064951807803457dca1611b3c47e7f0f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 6 insertions(+), 15 deletions(-)
+
+commit 8bd91918ac50731f00b1a2a48072980572eb2ff9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 5 insertions(+), 2 deletions(-)
+
+commit fe00f95828ef5627721b57e054f7eb2d42a2c961
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-05-24 00:23:46 +0300
+
+    Build: Fix checking for system-provided SHA-256.
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 21b45b9bab541f419712cbfd473ccc31802e0397
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-05-23 18:30:30 +0300
+
+    Build: Set GZIP_ENV=-9n in top-level Makefile.am.
+
+ Makefile.am | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 48053e8a4550233af46359024538bff90c870ab1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-05-22 16:42:11 +0300
+
+    Update NEWS for 5.0.3.
+
+ NEWS | 32 ++++++++++++++++++++++++++++++++
+ 1 file changed, 32 insertions(+)
+
+commit bba37df2c9e54ad773e15ff00a09d2d6989fb3b2
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 4161d7634965a7a287bf208dcd79f6185f448fe8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 5 insertions(+), 1 deletion(-)
+
+commit b94aa0c8380cdb18cddb33440d625474c16643cf
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+)
+
+commit f779516f42ebd2db47a5b7d6143459bf7737cf2f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-05-17 12:26:28 +0300
+
+    Update THANKS.
+
+ THANKS | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 830ba587775bb562f6eaf05cad61bf669d1f8892
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-05-17 12:21:33 +0300
+
+    Update INSTALL with a note about linker problem on OpenSolaris x86.
+
+ INSTALL | 23 +++++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
+
+commit ec7106309c8060e9c646dba20c4f15689a0bbb04
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 4c6e146df99696920f12410fb17754412797ef36
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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(+)
+
+commit c29e6630c1450c630c4e7b783bdd76515db9004c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+)
+
+commit 0b77c4a75158ccc416b07d6e81df8ee0abaea720
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 5 insertions(+), 6 deletions(-)
+
+commit e4622df9ab4982f8faa53d85b17be66216175a58
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-04-19 09:55:06 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 9c1b05828a88eff54409760b92162c7cc2c7cff6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2011-04-18 19:35:49 +0300
+
+    Update THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit bd5002f5821e3d1b04f2f56989e4a19318e73633
+Author: Martin Väth <vaeth at mathematik.uni-wuerzburg.de>
+Date:   2011-04-15 04:54:49 -0400
+
+    xzgrep: fix typo in $0 parsing
+    
+    Reported-by: Diego Elio Pettenò <flameeyes at gentoo.org>
+    Signed-off-by: Martin Väth <vaeth at mathematik.uni-wuerzburg.de>
+    Signed-off-by: Mike Frysinger <vapier at gentoo.org>
+
+ src/scripts/xzgrep.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 6ef4eabc0acc49e1bb9dc68064706e19fa9fcf48
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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(+)
+
+commit 3e321a3acd50002cf6fdfd259e910f56d3389bc3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2011-04-12 11:46:01 +0300
+
+    Update NEWS.
+
+ NEWS | 47 +++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 45 insertions(+), 2 deletions(-)
+
+commit 14e6ad8cfe0165c1a8beeb5b2a1536558b29b0a1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-04-12 11:45:40 +0300
+
+    Update TODO.
+
+ TODO | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+commit 70e750f59793f9b5cd306a5adce9b8e427739e04
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-04-12 11:08:55 +0300
+
+    xz: Update the man page about threading.
+
+ src/xz/xz.1 | 34 ++++++++++++++++++++--------------
+ 1 file changed, 20 insertions(+), 14 deletions(-)
+
+commit 24e0406c0fb7494d2037dec033686faf1bf67068
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-04-11 22:06:03 +0300
+
+    xz: Add support for threaded compression.
+
+ src/xz/args.c  |   3 +-
+ src/xz/coder.c | 202 +++++++++++++++++++++++++++++++++++----------------------
+ 2 files changed, 125 insertions(+), 80 deletions(-)
+
+commit de678e0c924aa79a19293a8a6ed82e8cb6572a42
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 deletion(-)
+
+commit 25fe729532cdf4b8fed56a4519b73cf31efaec50
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 91afb785a1dee34862078d9bf844ef12b8cc3e35
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 9 insertions(+)
+
+commit 4a9905302a9e4a1601ae09d650d3f08ce98ae9ee
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 6 insertions(+), 2 deletions(-)
+
+commit 0badb0b1bd649163322783b0bd9e590b4bc7a93d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+), 4 deletions(-)
+
+commit a7934c446a58e20268689899d2a39f50e571f251
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 13 insertions(+), 5 deletions(-)
+
+commit 5eefc0086d24a65e136352f8c1d19cefb0cbac7a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 13 insertions(+), 7 deletions(-)
+
+commit 3b22fc2c87ec85fcdd385c163b68fc49c97aa848
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 71b9380145dccf001f22e66a06b9d508905c25ce
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2011-04-11 09:57:30 +0300
+
+    xz: Move the description of --block-size in --long-help.
+
+ src/xz/message.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+commit cd3086ff443bb282bdf556919c28b3e3cbed8169
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-04-11 09:55:35 +0300
+
+    Docs: Document --single-stream and --block-size.
+
+ src/xz/xz.1 | 38 ++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 36 insertions(+), 2 deletions(-)
+
+commit fb64a4924334e3c440865710990fe08090f2fed0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2011-04-10 14:58:10 +0300
+
+    DOS: Update the docs and include notes about 8.3 filenames.
+
+ dos/{README => INSTALL.txt} |  13 +----
+ dos/README.txt              | 123 ++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 125 insertions(+), 11 deletions(-)
+
+commit ebd54dbd6e481d31e80757f900ac8109ad1423c6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 167 insertions(+), 9 deletions(-)
+
+commit cd4fe97852bcaeffe674ee51b4613709292a0972
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 33 insertions(+), 2 deletions(-)
+
+commit 607f9f98ae5ef6d49f4c21c806d462bf6b3d6796
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-04-09 18:29:30 +0300
+
+    Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit fca396b37410d272b754843a5dc13847be443a3a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+), 3 deletions(-)
+
+commit b03f6cd3ebadd675f2cc9d518cb26fa860269447
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-04-09 15:24:59 +0300
+
+    xz: Avoid unneeded fstat() on DOS-like systems.
+
+ src/xz/file_io.c | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+commit 335fe260a81f61ec99ff5940df733b4c50aedb7c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2011-04-08 17:48:41 +0300
+
+    xz: Fix a typo in a comment.
+
+ src/xz/coder.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit b34c5ce4b22e8d7b81f9895d15054af41d17f805
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+), 3 deletions(-)
+
+commit db33117cc85c17e0b897b5312bd5eb43aac41c03
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 => ax_pthread.m4} | 170 ++++++++++++++++++-----------------
+ 2 files changed, 88 insertions(+), 84 deletions(-)
+
+commit 1039bfcfc098b69d56ecb39d198a092552eacf6d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 1ef3cf44a8eb9512480af4482a5232ea08363b14
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit bd432015d33dcade611d297bc01eb0700088ef6c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 16889013214e7620d204b6e6c1bf9f3103a13655
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-04-01 08:47:20 +0300
+
+    Updated NEWS for 5.0.2.
+
+ NEWS | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+commit 85cdf7dd4e97b078e7b929e47f55a7f1da36010f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-03-31 15:06:58 +0300
+
+    Update INSTALL with another note about IRIX.
+
+ INSTALL | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit c3f4995586873d6a4fb7e451010a128571a9a370
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 0d21f49a809dc2088da6cc0da7f948404df7ecfa
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+), 4 deletions(-)
+
+commit 40277998cb9bad564ce4827aff152e6e1c904dfa
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 6 insertions(+), 2 deletions(-)
+
+commit 2118733045ad0ca183a3f181a0399baf876983a6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-03-24 01:22:18 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit c7210d9a3fca6f31a57208bfddfc9ab20a2e097a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 4eb83e32046a6d670862bc91c3d82530963b455e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 20 insertions(+), 24 deletions(-)
+
+commit 8930c7ae3f82bdae15aa129f01de08be23d7e8d7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 9 insertions(+)
+
+commit 940d5852c6cf08abccc6befd9d1b5411c9076a58
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-02-02 23:01:51 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 4ebe65f839613f27f127bab7b8c347d982330ee3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit fc1d292dca1925dfd17174f443f91a696ecd5bf8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-02-02 22:24:00 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 6dd061adfd2775428b079eb03d6fd47d7c0f1ffe
+Merge: 9d542ce 5fbce0b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-02-06 20:13:01 +0200
+
+    Merge commit '5fbce0b8d96dc96775aa0215e3581addc830e23d'
+
+commit 5fbce0b8d96dc96775aa0215e3581addc830e23d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-01-28 20:16:57 +0200
+
+    Update NEWS for 5.0.1.
+
+ NEWS | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+commit 03ebd1bbb314f9f204940219a835c883bf442475
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 7 insertions(+), 8 deletions(-)
+
+commit 9d542ceebcbe40b174169c132ccfcdc720ca7089
+Merge: 4f2c69a 7bd0a5e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-01-19 11:45:35 +0200
+
+    Merge branch 'v5.0'
+
+commit 7bd0a5e7ccc354f7c2e95c8bc27569c820f6a136
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2011-01-18 21:25:24 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit f71c4e16e913f660977526f0ef8d2acdf458d7c9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-12-13 16:36:33 +0200
+
+    Scripts: Fix gzip and bzip2 support in xzdiff.
+
+ src/scripts/xzdiff.in | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+commit 4f2c69a4e3e0aee2e37b0b1671d34086e20c8ac6
+Merge: adb89e6 9311774
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-12-12 23:13:22 +0200
+
+    Merge branch 'v5.0'
+
+commit 9311774c493c19deab51ded919dcd2e9c4aa2829
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-12-12 21:23:55 +0200
+
+    Build: Enable ASM on DJGPP by default.
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 4a42aaee282fc73b482581684d65110506d5efdd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-12-12 16:09:42 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit ce56f63c41ee210e6308090eb6d49221fdf67d6c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 9 insertions(+)
+
+commit e6baedddcf54e7da049ebc49183565b99facd4c7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 29 insertions(+), 4 deletions(-)
+
+commit adb89e68d43a4cadb0c215b45ef7a75737c9c3ec
+Merge: 7c24e0d b7afd3e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-12-07 18:53:04 +0200
+
+    Merge branch 'v5.0'
+
+commit b7afd3e22a8fac115b75c738d40d3eb1de7e286f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 44 insertions(+), 44 deletions(-)
+
+commit 7c24e0d1b8a2e86e9263b0d56d39621e01aed7af
+Merge: b4d42f1 3e56470
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-11-15 14:33:01 +0200
+
+    Merge branch 'v5.0'
+
+commit 3e564704bc6f463cb2db11e3f3f0dbd71d85992e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+)
+
+commit 2964d8d691ed92abdcf214888d79ad6d79774735
+Author: Jonathan Nieder <jrnieder at gmail.com>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit b4d42f1a7120e2cefeb2f14425efe2ca6db85416
+Author: Anders F Bjorklund <afb at users.sourceforge.net>
+Date:   2010-11-05 12:56:11 +0100
+
+    add build script for macosx universal
+
+ macosx/build.sh | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 92 insertions(+)
+
+commit 15ee6935abe4a2fc76639ee342ca2e69af3e0ad6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 8e355f7fdbeee6fe394eb02a28f267ce99a882a2
+Merge: 974ebe6 37c2565
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-10-26 15:53:06 +0300
+
+    Merge branch 'v5.0'
+
+commit 37c25658efd25b034266daf87cd381d20d1df776
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 deletion(-)
+
+commit 974ebe63497bdf0d262e06474f0dd5a70b1dd000
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-10-25 12:59:25 +0300
+
+    Bump version 5.1.0alpha.
+
+ src/liblzma/api/lzma/version.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit e45929260cd902036efd40c5610a8d0a50d5712b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-10-23 17:25:52 +0300
+
+    Build: Fix mydist rule when .git doesn't exist.
+
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 6e1326fcdf6b6209949be57cfe3ad4b781b65168
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-10-23 14:15:35 +0300
+
+    Add NEWS for 5.0.0.
+
+ NEWS | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 62 insertions(+)
+
+commit b667a3ef6338a2c1db7b7706b1f6c99ea392221c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 14 insertions(+)
+
+commit e61d85e082743ebd2dd0ff28fc0a82482ede0538
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 5 insertions(+)
+
+commit 23e23f1dc029146714c9a98313ab3ea93d71a2fc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 613939fc82603b75b59eee840871a05bc8dd08e0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-10-21 23:16:11 +0300
+
+    xz: Make sure that message_strm() can never return NULL.
+
+ src/xz/message.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+commit d09c5753e33ff96ee57edb6d1e98e34041203695
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-10-19 12:08:30 +0300
+
+    Update INSTALL.generic.
+
+ INSTALL.generic | 99 ++++++++++++++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 81 insertions(+), 18 deletions(-)
+
+commit 0076e03641f201c4b77dddd5a6db5880be19a78c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ac462b1c47c451f5c62e428306314c4bdad8ae7f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-10-10 17:58:58 +0300
+
+    xz: Use "%"PRIu32 instead of "%d" in a format string.
+
+ src/xz/message.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ae74d1bdeb075c3beefe76e1136c5741804e7e91
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit d492b80ddd6f9a13419de6d102df7374d8f448e8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-10-10 16:49:01 +0300
+
+    lzmainfo: Use "%"PRIu32 instead of "%u" for uint32_t.
+
+ src/lzmainfo/lzmainfo.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 825e859a9054bd91202e5723c41a17e72f63040a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-10-10 16:47:01 +0300
+
+    lzmainfo: Use fileno(stdin) instead of STDIN_FILENO.
+
+ src/lzmainfo/lzmainfo.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit acbc4cdecbeec2a4dfaac04f185ece49b2ff17c8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-10-09 23:20:51 +0300
+
+    lzmainfo: Use setmode() on DOS-like systems.
+
+ src/lzmainfo/lzmainfo.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+commit ef364d3abc5647111c5424ea0d83a567e184a23b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 7 insertions(+)
+
+commit 5629c4be07b6c67e79842b2569da1cedc9c0d69a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-10-09 18:57:55 +0300
+
+    Windows: Put some license info into README-Windows.txt.
+
+ windows/README-Windows.txt | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+commit e75100f549f85d231df25c07aa94d63e78e2d668
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-10-09 18:57:04 +0300
+
+    Windows: Fix a diagnostics bug in build.bash.
+
+ windows/build.bash | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit efeb998a2b1025df1c1d202cc7d21d866cd1c336
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 389d418445f1623593dfdbba55d52fbb6d1205f5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-10-09 12:57:25 +0300
+
+    Add missing public domain notice to lzmadec_w32res.rc.
+
+ src/xzdec/lzmadec_w32res.rc | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+commit 6389c773a4912dd9f111256d74ba1605230a7957
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-10-09 12:52:12 +0300
+
+    Windows: Update common_w32res.rc.
+
+ src/common/common_w32res.rc | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+commit 71275457ca24c9b01721f5cfc3638cf094daf454
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <http://marc.info/?l=mingw-users&m=126489506214078>.
+
+ windows/build.bash | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+commit 3ac35719d8433af937af6491383d4a50e343099b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 12 insertions(+), 2 deletions(-)
+
+commit 7b5db576fd7a4a67813b8437a9ccd4dbc94bbaae
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-10-08 21:42:37 +0300
+
+    Windows: Fix build.bash again.
+    
+    630a8beda34af0ac153c8051b1bf01230558e422 wasn't good.
+
+ windows/build.bash | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+commit d3cd7abe85ec7c2f46cf198b15c00d5d119df3dd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 084c60d318f2dbaef4078d9b100b4a373d0c3a7f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-10-08 15:59:25 +0300
+
+    configure.ac: Remove two unused defines.
+
+ configure.ac | 4 ----
+ 1 file changed, 4 deletions(-)
+
+commit 11f51b6714357cb67ec7e56ed9575c199b5581fe
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-10-08 15:32:29 +0300
+
+    Make tests accommodate missing xz or xzdec.
+
+ tests/test_compress.sh | 47 ++++++++++++++++++++++++++++++-----------------
+ tests/test_files.sh    | 28 ++++++++++++++++++++++++++--
+ 2 files changed, 56 insertions(+), 19 deletions(-)
+
+commit b1c7368f95e93ccdefdd0748e04398c26766f47f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-10-07 00:44:53 +0300
+
+    Windows: Make build.bash work without --enable-dynamic=no.
+
+ windows/build.bash | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit f9907503f882a745dce9d84c2968f6c175ba966a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-10-05 12:18:58 +0300
+
+    configure.ac: Silence a warning from Autoconf 2.68.
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 80b5675fa62c87426fe86f8fcd20feeabc4361b9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 24 insertions(+), 21 deletions(-)
+
+commit f9722dbeca4dc4c43cfd15d122dafaac50b0a0bb
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-10-02 12:07:33 +0300
+
+    Update the FAQ.
+
+ doc/faq.txt | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 100 insertions(+), 4 deletions(-)
+
+commit 61ae593661e8dc402394e84d567ca2044a51572b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 7 insertions(+), 3 deletions(-)
+
+commit 9166682dc601fd42c1b9510572e3f917d18de504
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-09-28 10:59:53 +0300
+
+    Move version.sh to build-aux.
+
+ Makefile.am                        | 4 ++--
+ version.sh => build-aux/version.sh | 0
+ configure.ac                       | 2 +-
+ windows/build.bash                 | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 84af9d8770451339a692e9b70f96cf56156a6069
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-09-28 10:53:02 +0300
+
+    Update .gitignore.
+
+ .gitignore | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+commit 31575a449ac64c523da3bab8d0c0b522cdc7c780
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-09-28 01:17:14 +0300
+
+    Fix accomodate -> accommodate on the xz man page.
+
+ src/xz/xz.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit cec0ddc8ec4ce81685a51998b978e22167e461f9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+)
+
+commit 2577da9ebdba13fbe99ae5ee8bde35f7ed60f6d1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-09-17 22:14:30 +0300
+
+    xz: Update the Czech translation.
+    
+    Thanks to Marek Černocký.
+
+ po/cs.po | 202 +++++++++++++++++++++++++++++++++++++++++----------------------
+ 1 file changed, 131 insertions(+), 71 deletions(-)
+
+commit a1766af582dc23fddd9da1eeb4b9d61e3eb4c2e6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 21088018554e2b0e02914205377ceb6e34a090bd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-09-15 00:34:13 +0300
+
+    xz: Edit a translators comment.
+
+ src/xz/list.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit be16e28ece1b492b8f93382b7fa1cc4da23c6ff6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit e23ea74f3240e6b69683f9e69d1716e0f9e9092b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-09-10 14:30:25 +0300
+
+    Updated README.
+
+ README | 2 --
+ 1 file changed, 2 deletions(-)
+
+commit 8dad2fd69336985adb9f774fa96dc9c0efcb5a71
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-09-10 14:30:07 +0300
+
+    Updated INSTALL.
+
+ INSTALL | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+commit 0b5f07fe3728c27cce416ddc40f7e4803ae96ac2
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-09-10 14:26:20 +0300
+
+    Updated the git repository address in ChangeLog.
+
+ ChangeLog | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit a8760203f93a69bc39fd14520a6e9e7b7d70be06
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-09-10 14:09:33 +0300
+
+    xz: Add a comment to translators about "literal context bits".
+
+ src/xz/message.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit bb0b1004f83cdc4d309e1471c2ecaf9f95ce60c5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-09-08 08:49:22 +0300
+
+    Update the Czech translation.
+    
+    Thanks to Marek Černocký.
+
+ po/cs.po | 655 +++++++++++++++++++++++++++++++++++++++++++--------------------
+ 1 file changed, 454 insertions(+), 201 deletions(-)
+
+commit 41bc9956ebfd7c86777d33676acf34c45e7ca7c7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-09-07 12:31:40 +0300
+
+    xz: Add a note to translators.
+
+ src/xz/hardware.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 77a7746616e555fc08028e883a56d06bf0088b81
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-09-06 19:43:12 +0300
+
+    Add missing files to POTFILES.in.
+
+ po/POTFILES.in | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 58f55131820d2e08a1a6beb9ec0ee2378044eb30
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-09-06 10:16:24 +0300
+
+    xz: Improve a comment.
+
+ src/xz/file_io.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+commit bcb1b898341f7073f51660d7052d7ed6c5461a66
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+), 4 deletions(-)
+
+commit da014d55972f5addbf6b4360d3d8ed2ef4282170
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-09-05 12:16:17 +0300
+
+    xz: Hopefully ease translating the messages in list.c.
+
+ src/xz/list.c | 33 +++++++++++++++++++++++----------
+ 1 file changed, 23 insertions(+), 10 deletions(-)
+
+commit ef840950ad99cf2955c754875af0e01acf125079
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-09-04 23:14:44 +0300
+
+    xz: Fix grammar.
+
+ src/xz/options.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+commit c46afd6edc04ea140db6c59e8486f5707c810c13
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-09-04 23:12:20 +0300
+
+    xz: Use lzma_lzma_preset() to initialize the options structure.
+
+ src/xz/options.c | 14 ++------------
+ 1 file changed, 2 insertions(+), 12 deletions(-)
+
+commit 8fd3ac046d0b1416a2094fecc456d9e0f4d5d065
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 deletion(-)
+
+commit 474bac0c33e94aeaca8ada17ab19972b1424bc2b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-09-04 22:10:32 +0300
+
+    xz: Minor improvements to --help and --long-help.
+
+ src/xz/message.c | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+commit 373ee26f955617295c5c537b04a153a1969140d2
+Author: Jonathan Nieder <jrnieder at gmail.com>
+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 <jrnieder at gmail.com>
+
+ tests/test_compress.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 2fce9312f36727ea82f3430cc5d3a7d243c5f087
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-09-03 15:54:40 +0300
+
+    xz: Make -vv show also decompressor memory usage.
+
+ src/xz/coder.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+commit b4b1cbcb53624ab832f8b3189c74450dc7ea29b6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 19 insertions(+), 10 deletions(-)
+
+commit 77fe5954cd3d10fb1837372684cbc133b56b6a87
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+), 3 deletions(-)
+
+commit fce69059cf901ce8075a78c7607d591f144a3b5a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 5 insertions(+), 2 deletions(-)
+
+commit a848e47ced6e5e2a564b5c454b2f5a19c2f40298
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 9 insertions(+)
+
+commit b3ff7ba044eaeab3e424d7b51fe914daf681b1a3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-09-02 19:09:57 +0300
+
+    xz: Always warn if adjusting dictionary size due to memlimit.
+
+ src/xz/coder.c | 28 +++++++++-------------------
+ 1 file changed, 9 insertions(+), 19 deletions(-)
+
+commit d5653ba8a1ea9c00de4fddc617aba3c51e18139d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 792331bdee706aa852a78b171040ebf814c6f3ae
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-07-27 20:47:12 +0300
+
+    Windows: Add a note about building a Git repository snapshot
+
+ windows/INSTALL-Windows.txt | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+commit 507a4a4dea1e5462f12f7ed4b076c34e02054a38
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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.sh => build.bash} | 6 +++---
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+commit b1cbfd40f049a646a639eb78a3e41e9e3ef73339
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-07-27 20:27:32 +0300
+
+    Windows: Don't strip liblzma.a too much.
+
+ windows/build.sh | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit a540198ffb25fad36380c5e92ac20c2d28eec46a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-07-13 20:07:26 +0300
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit bab0f01ed931f606b4675aa9f9331a17cec09bad
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit c15c42abb3c8c6e77c778ef06c97a4a10b8b5d00
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-06-11 21:51:32 +0300
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit bc612d0e0c9e4504c59d49168e87a7ae3e458443
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+), 2 deletions(-)
+
+commit e1b6935d60a00405e6b5b455a3426d2248cc926c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-06-11 10:40:28 +0300
+
+    Put the git commit to the filename in mydist rule.
+
+ Makefile.am | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit d8b41eedce486d400f701b757b7b5e4e32276618
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-06-02 23:13:55 +0300
+
+    Fix compiling with -Werror.
+
+ src/xz/message.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit b5fbab6123a39c9a55cd5d7af410e9aae067d5f8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 5 insertions(+), 1 deletion(-)
+
+commit 29a7b250e685852f2f97615493ec49acaf528623
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 7 insertions(+), 7 deletions(-)
+
+commit e243145c84ab5c3be8259fd486ead0de5235b3f0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 366 insertions(+), 19 deletions(-)
+
+commit ce6dc3c0a891f23a862f80ec08d3b6f0beb2a562
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-06-01 15:51:44 +0300
+
+    Major update to xz --list.
+
+ src/xz/list.c | 652 ++++++++++++++++++++++++++++++++++++++++++----------------
+ 1 file changed, 471 insertions(+), 181 deletions(-)
+
+commit 905e54804a899e4ad526d38fdba7e803ab9b71bd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-06-01 14:09:12 +0300
+
+    Fix a comment.
+
+ src/liblzma/api/lzma/index.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 07dc34f6da45c9ab757dad7fd5eef522ad27d296
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-05-27 16:17:42 +0300
+
+    Fix lzma_block_compressed_size().
+
+ src/liblzma/common/block_util.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 44d70cb154225e47eebf15a3cfbdf3794cbb4593
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(-)
+
+commit a334348dc02803241cf4e0a539eecdc0e7ad2cc7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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, 32 deletions(-)
+
+commit 70e5e2f6a7084e6af909deee88ceac2f6efa7893
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 67 deletions(-)
+
+commit 01a414eaf4be6352c06b48001b041b47e8202faa
+Author: Jonathan Nieder <jrnieder at gmail.com>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 920a69a8d8e4203c5edddd829d932130eac188ea
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-05-26 10:30:20 +0300
+
+    Fix compilation of debug/known_sizes.c.
+
+ debug/known_sizes.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 98a4856a6ea84f79c790057a6eb89a25bc45b074
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-05-26 10:28:54 +0300
+
+    Remove references to Subblock filter in debug/sync_flush.c.
+
+ debug/sync_flush.c | 13 -------------
+ 1 file changed, 13 deletions(-)
+
+commit 703d2c33c095c41ae0693ee8c27c45e3847e4535
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-05-26 10:16:57 +0300
+
+    Better #error message.
+
+ src/common/sysdefs.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit d8a55c48b39703dd83f11089ad01e1ff2ac102e0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-05-10 19:57:24 +0300
+
+    Updated INSTALL.
+
+ INSTALL | 5 -----
+ 1 file changed, 5 deletions(-)
+
+commit 3fb3d594a2b53886adee161b6261e92277f05f7c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-05-10 19:54:52 +0300
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 6548e304657e77d3a972053db3c41c5daf591113
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <http://bugs.debian.org/574583>
+    and Jonathan Nieder for suggestions how to fix it.
+
+ THANKS           |  1 +
+ src/xz/message.c | 86 +++++++++++++++++++++++++-------------------------------
+ 2 files changed, 39 insertions(+), 48 deletions(-)
+
+commit a1f7a986b8d708f9290da9799ca1b8d7082fad3e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit c737eec91d200d730aa82662affd6b06ebb0bff0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-03-22 21:03:03 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit f4b2b52624b802c786e4e2a8eb6895794dd93b24
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit cf38da00a140bd3bd65b192390ae5553380fd774
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-03-06 21:36:19 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit d0d1c51aea4351288a7e533cce28cb7f852f6b05
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <http://bugs.gentoo.org/show_bug.cgi?id=305591>.
+    Thanks to Rafał Mużyło for helping to debug it on IRC.
+
+ src/liblzma/common/common.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit eb7d51a3faf9298c0c7aa9aaeae1023dcf9e37ea
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-02-02 11:50:11 +0200
+
+    Fix wrong assertion.
+    
+    This was added in 455e68c030fde8a8c2f5e254c3b3ab9489bf3735.
+
+ src/xz/main.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit 9d67588c1597849504a3e5ac8bf6f06e7d2ee8be
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-02-01 22:48:42 +0200
+
+    Updated TODO.
+
+ TODO | 4 ----
+ 1 file changed, 4 deletions(-)
+
+commit fef6333f52c8801308c3b78acb7942988541d137
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-02-01 22:46:56 +0200
+
+    Fix signal handling for --list.
+
+ src/xz/main.c | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+commit 82220a149015616f75641ee8bbea415137535b9b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 13 insertions(+), 1 deletion(-)
+
+commit d4da177d5ba3d2ef7323a6f1e06ca16e0478810e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-02-01 10:20:57 +0200
+
+    Fix a comment.
+
+ windows/build.sh | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+commit f9dd797a423a148903cf345b4146cb1fe1eab11d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-01-31 23:43:54 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit ee5ddb8b28419fe4923ded5c18a50570a762dcab
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-01-31 23:41:29 +0200
+
+    Updated TODO.
+
+ TODO | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+commit 11936ad3f5a2e97bda3463c7a56a2f4bb9265ea6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-01-31 23:35:04 +0200
+
+    Mention TODO in README.
+
+ README | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 2901a8e7e82af05675b8cd8758a8ceddb111359f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-01-31 23:31:14 +0200
+
+    Updated INSTALL.
+
+ INSTALL | 52 ++++++++++++++++++++++++++--------------------------
+ 1 file changed, 26 insertions(+), 26 deletions(-)
+
+commit 8884e16864ba53fb4b58623d7537d7ef30c28e11
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 14 insertions(+), 5 deletions(-)
+
+commit 96a4f840e3b9ca5c81e5711ff9c267b194f93ef1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 24 insertions(+), 10 deletions(-)
+
+commit 231c3c7098f1099a56abb8afece76fc9b8699f05
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+)
+
+commit b4b1a56e0cbd597157858264f5c7189201ac9018
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-01-29 13:24:27 +0200
+
+    Add lzmainfo.1 to manfiles list to convert to .txt and .pdf.
+
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 5574d64e03ad3a3d6e00e4b0d3e81c7b5529ec95
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 deletion(-)
+
+commit b063cc34a30a4edf109343ff373b2b62b8ca72d3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit e5496f9628ff5979392a80421d0b63a4de8015b4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+), 5 deletions(-)
+
+commit d0b4bbf5da068503c099cd456e294d7673548cc0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-01-26 14:46:43 +0200
+
+    Minor comment fix.
+
+ src/xz/main.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 0bc9eab243dee3be764b3530433a7fcdc3f7c6a1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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(+)
+
+commit ef68dd4a92976276304de2aedfbe34ae91a86abb
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+)
+
+commit 0dd6d007669b946543ca939a44243833c79e08f4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2010-01-20 22:02:35 +0200
+
+    Fix a typo in README.
+    
+    Thanks to R. Bijker.
+
+ README | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 07a11dad44e041b01dcfc73e8d4e00731158c06d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+), 6 deletions(-)
+
+commit 3ffd5d81a43210c8da56da5c5b3637d3f8bc63c7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 10 insertions(+), 5 deletions(-)
+
+commit cee12aa852ec0902983dc1f153346ef750157fb9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2010-01-12 16:30:33 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 153c7740c54b3c90129dbd3d6153ac1303c4d605
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 deletion(-)
+
+commit 097bad000363e0bf29f8274ad2d7ab59f7dbf644
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-12-31 21:11:05 +0200
+
+    Add missing lzma_nothrow in filter.h.
+
+ src/liblzma/api/lzma/filter.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit b56cb1fc31fa2381f92eefc040df85667048d626
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-12-09 18:13:44 +0200
+
+    Remove redefinition of _(msgid) macro from lzmainfo.c.
+
+ src/lzmainfo/lzmainfo.c | 7 -------
+ 1 file changed, 7 deletions(-)
+
+commit 171b03febfe09d9fae6ac8be6aa4518bcaf427d2
+Author: Jonathan Nieder <jrnieder at gmail.com>
+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 <jrnieder at gmail.com>
+
+ po/.gitignore | 28 ++++++++++++++++++++++------
+ 1 file changed, 22 insertions(+), 6 deletions(-)
+
+commit f7e44c6c11f630519072971b8b07a5729c096c36
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 9 insertions(+), 7 deletions(-)
+
+commit 7b76a3e2336f25088957cba92b0dbd854d9caa3c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+)
+
+commit 0696f5d268362221380e039bad48a86e29067c6a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 5e817a50d276f0a3607638c1c1d449d50b9aa4e5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+)
+
+commit 6db1c35be9e1e364cdacff6878910e1b7aac2a37
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit e0c2776b6ffbd2b1900fde353aceac734edc93d7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 8 deletions(-)
+
+commit f057a33c6f7c5992389479f2d4feabf2900ba7ee
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-11-26 10:11:23 +0200
+
+    Typo fix to sysdefs.h.
+    
+    Thanks to Jonathan Nieder.
+
+ src/common/sysdefs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 8767b41534eafdf5e742e12190646bf5740b0cdb
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+)
+
+commit 919fbaff860acdaa4bcd216500a0b1c960a6db92
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 11 insertions(+), 9 deletions(-)
+
+commit bd13b04e202b6f495a68eb0766f97085b7c50a06
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-11-22 12:43:06 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit f1a28b96c900c658fe016852ff62f6c24d1f50fa
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 12 insertions(+), 14 deletions(-)
+
+commit 0733f4c9994db696420a405810d5f02c79ebc404
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 insertion(+), 65 deletions(-)
+
+commit 7ac3985d891dcc5773543f84cc5bce6c14841b12
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 181 insertions(+), 8 deletions(-)
+
+commit c74c132f7f79a842c073c66575a4fdb985e4c2e3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(-)
+
+commit d315ca4930ff96e1428c6021c96f209e1abdd83e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-11-14 20:21:19 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 2ddcae247c284cc2f396b6cfdab57790c7588b5f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-11-14 20:20:03 +0200
+
+    Some updates to xz man page.
+
+ src/xz/xz.1 | 54 +++++++++++++++++++++++++++++++++++++++++++++++++-----
+ 1 file changed, 49 insertions(+), 5 deletions(-)
+
+commit 19b2674f07f8b588dfaf6638396b4b42866d7e23
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-11-14 19:51:03 +0200
+
+    Fix description of --memory in --long-help.
+
+ src/xz/message.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+commit 2291346f0cccf88e605d84b75c9c5aaaaddb5df8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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(+)
+
+commit 78e92c18470483e161388e679c1ee556adb3a691
+Author: Jonathan Nieder <jrnieder at gmail.com>
+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 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 7b7fe902d98da28e5769e2aa1e0c08c92384f7ee
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ebfb2c5e1f344e5c6e549b9dedaa49b0749a4a24
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <byteswap.h> on GNU,
+    <sys/endian.h> on *BSDs and <sys/byteorder.h>
+    on Solaris, which may contain optimized code
+    like inline assembly.
+
+ configure.ac                              |  54 +----
+ m4/tuklib_integer.m4                      |  74 +++++++
+ src/common/bswap.h                        |  52 -----
+ src/common/integer.h                      | 170 ---------------
+ src/common/tuklib_config.h                |   8 +-
+ src/common/tuklib_integer.h               | 350 ++++++++++++++++++++++++++++++
+ src/liblzma/check/check.c                 |   4 +-
+ src/liblzma/check/crc32_fast.c            |   4 +-
+ src/liblzma/check/crc32_tablegen.c        |   8 +-
+ src/liblzma/check/crc64_fast.c            |   4 +-
+ src/liblzma/check/crc64_tablegen.c        |   8 +-
+ src/liblzma/check/crc_macros.h            |   2 -
+ src/liblzma/check/sha256.c                |  18 +-
+ src/liblzma/common/alone_encoder.c        |   2 +-
+ src/liblzma/common/block_header_decoder.c |   2 +-
+ src/liblzma/common/block_header_encoder.c |   2 +-
+ src/liblzma/common/common.h               |   2 +-
+ src/liblzma/common/stream_flags_decoder.c |   6 +-
+ src/liblzma/common/stream_flags_encoder.c |   6 +-
+ src/liblzma/lz/lz_encoder_hash.h          |   2 +-
+ src/liblzma/lzma/lzma_decoder.c           |   2 +-
+ src/liblzma/lzma/lzma_encoder.c           |   2 +-
+ src/liblzma/lzma/lzma_encoder_private.h   |   2 +-
+ src/liblzma/simple/simple_decoder.c       |   2 +-
+ src/liblzma/simple/simple_encoder.c       |   2 +-
+ tests/test_block_header.c                 |   4 +-
+ tests/test_stream_flags.c                 |   6 +-
+ tests/tests.h                             |   2 +-
+ 28 files changed, 467 insertions(+), 333 deletions(-)
+
+commit 29fd321033276261b87da7be5223db33d879a4c7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+), 2 deletions(-)
+
+commit c5f68b5cc79085a87f950fea53843e27f328068e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <vapier at gentoo.org>
+Date:   2009-09-26 12:51:50 -0400
+
+    add lzmainfo to gitignore
+    
+    Signed-off-by: Mike Frysinger <vapier at gentoo.org>
+
+ .gitignore | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 188a1dcd0cc7867810ed3a55c598d0680922c63b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-09-27 11:53:36 +0300
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit db9119b9181b307e7ac5d2bae82444d04b902b59
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 6 insertions(+)
+
+commit b3d105e69786a45963176fd2193abe75e05ba738
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 5e000ff00d4d01e559397b49eb648ad3f159d496
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-09-22 18:59:56 +0300
+
+    Added OpenVMS-specific information to INSTALL.
+
+ INSTALL | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+commit 932b2e204463d70f3eee5b8a1ea5a23bf9d001a4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-09-22 14:03:02 +0300
+
+    Better fixes for OpenVMS support.
+    
+    Thanks to Jouk Jansen.
+
+ src/xz/file_io.c | 19 ++++++++++++++++---
+ 1 file changed, 16 insertions(+), 3 deletions(-)
+
+commit 4c3630ec4179fe9265407a35c4db1374ffc82372
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-09-22 13:40:19 +0300
+
+    Avoid non-standard preprocessor construct.
+    
+    Thanks to Jouk Jansen.
+
+ src/common/tuklib_common.h | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+commit 0deb1bb60addd1306b525e0ac0ad2a84eb0390d9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+), 1 deletion(-)
+
+commit e599bba4216c0edb8cc8f40adad3a6dba88685f4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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_physmem.m4                                   |  84 ---------------
+ m4/tuklib_common.m4                                |  22 ++++
+ m4/{lc_cpucores.m4 => tuklib_cpucores.m4}          |  83 ++++++++------
+ m4/tuklib_physmem.m4                               | 119 +++++++++++++++++++++
+ m4/tuklib_progname.m4                              |  25 +++++
+ src/common/sysdefs.h                               |   4 -
+ src/common/tuklib_common.h                         |  67 ++++++++++++
+ src/common/tuklib_config.h                         |   1 +
+ src/common/{cpucores.h => tuklib_cpucores.c}       |  39 +++----
+ src/common/tuklib_cpucores.h                       |  23 ++++
+ src/common/tuklib_exit.c                           |  57 ++++++++++
+ src/common/tuklib_exit.h                           |  25 +++++
+ src/common/tuklib_gettext.h                        |  44 ++++++++
+ src/common/{open_stdxxx.h => tuklib_open_stdxxx.c} |  24 +++--
+ src/common/tuklib_open_stdxxx.h                    |  23 ++++
+ src/common/{physmem.h => tuklib_physmem.c}         |  58 +++++-----
+ src/common/tuklib_physmem.h                        |  28 +++++
+ src/common/tuklib_progname.c                       |  50 +++++++++
+ src/common/tuklib_progname.h                       |  32 ++++++
+ src/lzmainfo/Makefile.am                           |   5 +-
+ src/lzmainfo/lzmainfo.c                            |  65 ++++-------
+ src/xz/Makefile.am                                 |   7 +-
+ src/xz/args.c                                      |   8 +-
+ src/xz/file_io.c                                   |  43 ++++----
+ src/xz/hardware.c                                  |   8 +-
+ src/xz/main.c                                      | 100 ++++-------------
+ src/xz/main.h                                      |   7 --
+ src/xz/message.c                                   |  30 +++---
+ src/xz/message.h                                   |   8 +-
+ src/xz/private.h                                   |  11 +-
+ src/xz/signals.c                                   |   2 +
+ src/xz/signals.h                                   |  17 ++-
+ src/xz/suffix.c                                    |   2 +-
+ src/xzdec/Makefile.am                              |  13 ++-
+ src/xzdec/xzdec.c                                  |  55 +++-------
+ 37 files changed, 768 insertions(+), 434 deletions(-)
+
+commit 49cfc8d392cf535f8dd10233225b1fc726fec9ef
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-09-12 14:09:17 +0300
+
+    Fix GCC version check for nothrow attribute.
+
+ src/liblzma/api/lzma.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 6bfdd3a88a819f04c8f202e7d3c6f88a01c7d224
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-09-12 14:08:15 +0300
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 4ab7b16b9573bdfa32279e4adadff684d5cd58ac
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-09-11 17:08:15 +0300
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 68059334ff435300ab1ce2c616b0eee1b0d88dd9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 221be761f467da76875247bc02d7a1716682075d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 21 insertions(+), 11 deletions(-)
+
+commit 7aca7b3174bcbba4a4915682ff0cd405d63f5740
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-09-05 01:21:15 +0300
+
+    Updated THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 60ccb80c9c4a0d771acc5b7d9d6f32b17fed1071
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-09-02 09:43:51 +0300
+
+    Mention in INSTALL that --enable-small doesn't modify CFLAGS.
+
+ INSTALL | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 319a0fd7d7e9ebbb71ca6930abfc20777cb4aacc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-09-01 20:40:01 +0300
+
+    Refactored option parsing.
+
+ src/xz/options.c | 70 ++++++++++++++++++++++++++++----------------------------
+ 1 file changed, 35 insertions(+), 35 deletions(-)
+
+commit 25adaaa56e2e51a47a910a8d73452414619a2e53
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+), 4 deletions(-)
+
+commit 5f6dddc6c911df02ba660564e78e6de80947c947
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-09-01 20:20:19 +0300
+
+    Updated TODO.
+
+ TODO | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 655457b9ada5ec7db398c5392e41290f3f332ea8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-08-30 17:29:19 +0300
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 2331f5f97af3e5897e23da45d9df3d664099c7f8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-30 17:28:52 +0300
+
+    Add more OS/2 specific info to INSTALL.
+
+ INSTALL | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+commit 94c66b3297b3ad307eee93cf6b160e3c43997f11
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 25 insertions(+), 11 deletions(-)
+
+commit 3432e9c6aab851da1227b63dce645d7f190c04d8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-29 13:42:56 +0300
+
+    Updated THANKS.
+
+ THANKS | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 27414daadf5727e8ab942374b5ec1c8990122878
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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(-)
+
+commit 682efdc1f9492fdd76c9ce82e7c00ca0768067e8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-27 18:36:59 +0300
+
+    "make dist" fixes
+
+ Makefile.am | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+commit c8c184db1c95bf70f78256ec6237845a57f342af
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-27 17:08:33 +0300
+
+    Update xz man page date.
+
+ src/xz/xz.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 9756fce565e98b8fa5fe6ead296d84e7601ec254
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-08-27 16:36:40 +0300
+
+    Add missing files to EXTRA_DIST.
+
+ Makefile.am | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+commit 04dcbfdeb921e5f361a4487134e91e23fffbe09d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-27 16:21:22 +0300
+
+    Bumped version to 4.999.9beta.
+
+ src/liblzma/api/lzma/version.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit fd7618611a22f42a6913bc8d518c9bbc9252d6b4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-27 16:17:47 +0300
+
+    Updated THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit c29e76c0f910fca0a90a50b78d337f6c32623e9d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 15 insertions(+), 11 deletions(-)
+
+commit 696d7ee3953beaf4f0ed18e78917ccf300431966
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-27 15:43:54 +0300
+
+    Require GNU libtool 2.2.
+
+ configure.ac | 13 +++----------
+ 1 file changed, 3 insertions(+), 10 deletions(-)
+
+commit 4c3558aa8305a8f8b6c43b8569eb539717ca9e8d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-27 15:34:45 +0300
+
+    Add "dos" to EXTRA_DIST.
+
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 35b29e4424ced5a3ababf132283e519080c7b298
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-27 15:23:27 +0300
+
+    Updated TODO.
+
+ TODO | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit 23414377192c21f3f34c84cdfe0ef0fbd06a1dea
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-27 15:17:00 +0300
+
+    Some xz man page improvements.
+
+ src/xz/xz.1 | 78 ++++++++++++++++++++++++++++++++++++++++++++++++-------------
+ 1 file changed, 62 insertions(+), 16 deletions(-)
+
+commit 371b04e19fc9051dbaeec51ec0badec6a1f0699d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-27 10:41:01 +0300
+
+    Removed doc/bugs.txt.
+
+ doc/bugs.txt | 46 ----------------------------------------------
+ 1 file changed, 46 deletions(-)
+
+commit d88c4072b36d3a76f839185799fb1d91037a1b81
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-27 10:40:25 +0300
+
+    Updated README.
+    
+    It now includes bug reporting instructions/tips.
+
+ README | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 55 insertions(+), 10 deletions(-)
+
+commit 92e536d8b8d33a6b12d0802bcd7be4437046f13e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 3e2ba8b58585743e59251e69ad2783eb08357079
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-08-18 00:30:09 +0300
+
+    Install faq.txt.
+
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit b198e770a146e4a41f91a93f0b233713f2515848
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 73 insertions(+), 166 deletions(-)
+
+commit fe111a25cd788d31b581996e4533910388a7f0a9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-17 22:45:50 +0300
+
+    Some xz man changes.
+
+ src/xz/xz.1 | 88 ++++++++++++++++++++++++++++++-------------------------------
+ 1 file changed, 43 insertions(+), 45 deletions(-)
+
+commit 10242a21e9abda0c5c6a03501703cc40b8a699a5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-16 22:15:42 +0300
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 3ce1916c83041113b9cad9ead5c97a527cf8aa1d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 66da129c8ec33dd66acc92f113f7c1ca740ca81a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-08-13 15:03:46 +0300
+
+    Link lzmainfo against shared liblzma by default.
+
+ src/lzmainfo/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 71f18e8a066a01dda0c8e5508b135ef104e43e4c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 57 insertions(+), 20 deletions(-)
+
+commit 5aa4678b2342dcfc1d2b31aa9fa4f39c539e4b61
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+)
+
+commit e51b4e49e800bd84e6d589dca2964d3985e88139
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 deletion(-)
+
+commit a4165d0584376d948c213ec93c6065d24ff6a5e7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-08-13 09:37:21 +0300
+
+    Add xz man page to manfiles in toplevel Makefile.am.
+
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 180bdf58ea5bb07941e0a99b304d9aa832198748
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-13 09:37:01 +0300
+
+    Fix first line of xz man page.
+
+ src/xz/xz.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit e1ce2291e759b50ebfcf7cbbcc04cd098f1705a4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit e71903fc6101f1c039d702e335b08aad1e1b4100
+Author: Jonathan Nieder <jrnieder at gmail.com>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 1d314b81aa5b0c4530638ffabd4e0edb52e5362c
+Author: Jonathan Nieder <jrnieder at gmail.com>
+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 file changed, 7 insertions(+), 1 deletion(-)
+
+commit a7f5d2fe4826ac68839d00059f05004fb81d5c69
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-09 20:57:46 +0300
+
+    GPLv2+ not GPLv2 for Doxyfile.in is probably OK.
+
+ Doxyfile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit b735cde20cc14857136ae65a0e5d336ed7ddc862
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+)
+
+commit 0fd157cc008446adfc8f91394f5503868025a642
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-02 00:11:37 +0300
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit b198da96ff9ac8c89b466b4d196c5f3fe1c7904f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-08-02 00:10:22 +0300
+
+    Updated TODO.
+
+ TODO | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 669413bb2db954bbfde3c4542fddbbab53891eb4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-07-30 12:25:55 +0300
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit dbbd8fb870ae789d96497911006c869d37148c15
+Author: Jonathan Nieder <jrnieder at gmail.com>
+Date:   2009-07-28 17:37:24 -0500
+
+    xzdiff: add missing ;; to case statement
+
+ src/scripts/xzdiff.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit adbad2d16cb5909f85d4a429011005613ea62ffe
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-07-24 13:15:06 +0300
+
+    Added history.txt to doc_DATA.
+
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit e0236f12569eb36f9b81ce7a1e52e0f73698ac27
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-07-24 11:34:02 +0300
+
+    Minor improvements to COPYING.
+
+ COPYING | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+commit 0db1befcfbc120377df4b89923762f16d25f548a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 deletion(-)
+
+commit 8f8ec942d6d21ada2096eaf063411bc8bc7e2d48
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-07-20 15:43:32 +0300
+
+    Avoid internal error with --format=xz --lzma1.
+
+ src/xz/coder.c | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+commit 99f9e879a6a8bb54a65da99c12e0f390216c152a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-07-19 11:09:31 +0300
+
+    Added missing author notice to xzless.in.
+
+ src/scripts/xzless.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 4c9c989d45b188667799a7a1d6c728ed43f7bf77
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-07-18 14:34:08 +0300
+
+    Updated the totally outdated TODO file.
+
+ TODO | 117 ++++++++++++++++---------------------------------------------------
+ 1 file changed, 27 insertions(+), 90 deletions(-)
+
+commit 64e498c89d8b9966e8663f43bf64d47c26c55c62
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 deletion(-)
+
+commit a35755c5de808df027675688855d1b621a4fb428
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 7 insertions(+)
+
+commit 98f3cac1ad31191c5160a7e48398bf85141e941c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 59 insertions(+), 21 deletions(-)
+
+commit d873a09e956363e54bf58c577c8f7e487b6fb464
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 31 insertions(+)
+
+commit cd69a5a6c16c289f6f8e2823b03c72289472270f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 13 insertions(+), 9 deletions(-)
+
+commit 6f62fa88f4ff7ba78565c314c0e6e71c498fa658
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-07-08 23:06:46 +0300
+
+    Updated THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 1754b7e03e2aa7e2e0196807fe8b0f3f5a637b0e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-07-08 23:05:29 +0300
+
+    Portability improvement to version.sh.
+
+ version.sh | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 3bdb53792c0e3e3febe9370e56eda5b08f89410f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 insertion(+), 9 deletions(-)
+
+commit 5f16ef4abf220028a9ddbcb138217597a9455f62
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-07-05 19:26:53 +0300
+
+    Use @PACKAGE_HOMEPAGE@ in liblzma.pc.in.
+
+ src/liblzma/liblzma.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 18c10c30d2833f394cd7bce0e6a821044b15832f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 178 insertions(+), 35 deletions(-)
+
+commit 0a289c01ac821ea9c4250aa906b0ae3cfa953633
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-07-01 12:21:24 +0300
+
+    Avoid visibility related compiler warnings on Windows.
+
+ configure.ac | 20 +++++++++-----------
+ 1 file changed, 9 insertions(+), 11 deletions(-)
+
+commit 7653d1cf48080e63b189ed9d58dea0e82b6b1c5e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-06-30 17:14:39 +0300
+
+    Use static liblzma by default also for tests.
+
+ tests/Makefile.am | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+commit f42ee981668b545ab6d06c6072e262c29605273c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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
+    <http://lists.gnu.org/archive/html/libtool/2009-06/msg00070.html>
+    but the problem is significant also e.g. on GNU/Linux.
+    
+    Unless --disable-shared is passed to configure, static
+    library built from a set of convenience libraries will
+    contain PIC objects. That is, while libtool builds non-PIC
+    objects too, only PIC objects will be used from the
+    convenience libraries. On 32-bit x86 (tested on mobile XP2400+),
+    using PIC instead of non-PIC makes the decompressor 10 % slower
+    with the default CFLAGS.
+    
+    So while xz was linked against static liblzma by default,
+    it got the slower PIC objects unless --disable-shared was
+    used. I tend develop and benchmark with --disable-shared
+    due to faster build time, so I hadn't noticed the problem
+    in benchmarks earlier.
+    
+    This commit also adds support for building Windows resources
+    into liblzma and executables.
+
+ configure.ac                        | 34 ++++++++++------
+ src/liblzma/Makefile.am             | 79 +++++++++++++++++++++++++++++--------
+ src/liblzma/check/Makefile.am       | 47 ----------------------
+ src/liblzma/check/Makefile.inc      | 51 ++++++++++++++++++++++++
+ src/liblzma/common/Makefile.am      | 78 ------------------------------------
+ src/liblzma/common/Makefile.inc     | 67 +++++++++++++++++++++++++++++++
+ src/liblzma/common/common.h         | 16 +++++---
+ src/liblzma/delta/Makefile.am       | 28 -------------
+ src/liblzma/delta/Makefile.inc      | 23 +++++++++++
+ src/liblzma/lz/Makefile.am          | 29 --------------
+ src/liblzma/lz/Makefile.inc         | 21 ++++++++++
+ src/liblzma/lzma/Makefile.am        | 51 ------------------------
+ src/liblzma/lzma/Makefile.inc       | 43 ++++++++++++++++++++
+ src/liblzma/rangecoder/Makefile.am  | 26 ------------
+ src/liblzma/rangecoder/Makefile.inc | 21 ++++++++++
+ src/liblzma/simple/Makefile.am      | 51 ------------------------
+ src/liblzma/simple/Makefile.inc     | 47 ++++++++++++++++++++++
+ src/liblzma/subblock/Makefile.am    | 26 ------------
+ src/liblzma/subblock/Makefile.inc   | 20 ++++++++++
+ src/xz/Makefile.am                  | 11 +++++-
+ src/xzdec/Makefile.am               | 20 +++++++++-
+ 21 files changed, 417 insertions(+), 372 deletions(-)
+
+commit 89dac1db6f168d7469cfbc4432651d4724c5c0de
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-06-29 22:19:51 +0300
+
+    Added a comment about "autoconf -fi" to autogen.sh.
+
+ autogen.sh | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 6e685aae4594bc0af1b5032e01bb37d0edaa3ebd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-06-28 10:04:24 +0300
+
+    Add -no-undefined to get shared liblzma on Windows.
+
+ src/liblzma/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 73f560ee5fa064992b76688d9472baf139432540
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-06-27 22:57:15 +0300
+
+    Make physmem() work on Cygwin 1.5 and older.
+
+ src/common/physmem.h | 77 +++++++++++++++++++++++++++-------------------------
+ 1 file changed, 40 insertions(+), 37 deletions(-)
+
+commit 7ff0004fbce24ae72eddfe392828ffd7d4639ed1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-06-27 17:28:01 +0300
+
+    Moved the Windows resource files outside the windows directory
+    to prepare for building them with Autotools.
+
+ windows/common.rc => src/common/common_w32res.rc   |  0
+ .../liblzma.rc => src/liblzma/liblzma_w32res.rc    |  2 +-
+ windows/xz.rc => src/xz/xz_w32res.rc               |  2 +-
+ windows/lzmadec.rc => src/xzdec/lzmadec_w32res.rc  |  2 +-
+ windows/xzdec.rc => src/xzdec/xzdec_w32res.rc      |  2 +-
+ windows/Makefile                                   | 35 ++++++++++++----------
+ 6 files changed, 23 insertions(+), 20 deletions(-)
+
+commit 449c634674f35336a4815d398172e447659a135e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-06-27 13:05:03 +0300
+
+    Added missing $(EXEEXT).
+
+ src/xz/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 792db79f27ad9ab1fb977e23be65c7761f545752
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-06-27 10:02:24 +0300
+
+    Silence a compiler warning on DOS-like systems.
+
+ src/xz/file_io.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+commit ad12edc95254ede3f0cb8dec8645e8789e984c4f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-06-27 09:35:15 +0300
+
+    Updated the filenames in POTFILES.in too.
+
+ po/POTFILES.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit b2b1f867532732fe9969131f8713bdd6b0731763
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+)
+
+commit da0af22e4b4139b8a10710945f8b245b3a77c97d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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/{process.c => coder.c} | 0
+ src/xz/{process.h => coder.h} | 0
+ src/xz/{io.c => file_io.c}    | 0
+ src/xz/{io.h => file_io.h}    | 0
+ src/xz/private.h              | 4 ++--
+ windows/Makefile              | 4 ++--
+ 8 files changed, 10 insertions(+), 10 deletions(-)
+
+commit 5e1257466dcb66f1d7a3f71814a5ad885cba43e8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-06-26 15:40:40 +0300
+
+    Added missing source files to windows/Makefile.
+
+ windows/Makefile | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 390a6408563067613b29de895cb40e4d0386d62c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-06-26 14:20:02 +0300
+
+    Allow to explicitly specify autotool versions in autogen.sh.
+
+ autogen.sh | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+commit eaf8367368a329afa48785380f9dca6b681f3397
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-06-26 14:18:32 +0300
+
+    Add version.sh to EXTRA_DIST.
+
+ Makefile.am | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit b317b218e2d383dd27a700094c0de4510540ea18
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-06-24 20:14:10 +0300
+
+    Support HW_PHYSMEM64
+
+ src/common/physmem.h | 30 +++++++++++++++++++-----------
+ 1 file changed, 19 insertions(+), 11 deletions(-)
+
+commit ae82dde5d9cc60c80cc89601b6c51cc1611d48e7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-06-24 13:01:59 +0300
+
+    Cast a char argument to isspace() to unsigned char.
+
+ src/xz/args.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+commit 1735d31ea347210e914df038eeea4b2626e76e42
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 7 insertions(+), 5 deletions(-)
+
+commit 8ed156ce894966103e895aa08f2a9fb912f6fad5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit f6df39afaa84f71439507178a49b2a5dda6e824c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-06-04 23:26:47 +0300
+
+    Harmonized xzdec --memory with xz --memory and made
+    minor cleanups.
+
+ src/xzdec/xzdec.c | 74 +++++++++++++++++++++++++++++++++++++++----------------
+ 1 file changed, 53 insertions(+), 21 deletions(-)
+
+commit 1774f27c61ce294a56712ca2f4785f90a62441bc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-06-01 14:53:57 +0300
+
+    The .xz file format version 1.0.1
+
+ doc/xz-file-format.txt | 29 ++++++++++++++++++++++-------
+ 1 file changed, 22 insertions(+), 7 deletions(-)
+
+commit 083c23c680ff844846d177cfc58bb7a874e7e6b9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-05-23 16:57:21 +0300
+
+    Remove undocumented alternative option names --bcj, --ppc,
+    and --itanium.
+
+ src/xz/args.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+commit b1edee2cdc7ef4411b1a21c07094ec763f071281
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-05-23 14:51:09 +0300
+
+    Updated THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit dcedb6998cefeca6597dd1219328a3abf5acf66d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 49 insertions(+), 27 deletions(-)
+
+commit 5f735dae80aa629853f4831d7b84ec1c614979eb
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 5 insertions(+), 5 deletions(-)
+
+commit b60376249e0c586910c4121fab4f791820cc1289
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 deletion(-)
+
+commit b4f92f522d4b854c0adb7c38be7531e1a6a7b008
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-05-22 14:27:40 +0300
+
+    Fix a comment.
+
+ src/xz/main.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 4dd21d23f22569285ae706b58b0e5904b8db1839
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-05-22 14:21:20 +0300
+
+    Remove the --info option, which was an alias for --list.
+
+ src/xz/args.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+commit 8836139b63ce774bdd62abf17ab69b290e08229e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 6 insertions(+), 11 deletions(-)
+
+commit b0063023f8adb06ea735ec4af5c6f5b7bdb8e84d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 deletion(-)
+
+commit 03ca67fd37dd43fa7f590de340899cd497c10802
+Author: ABCD <en.abcd at gmail.com>
+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 file changed, 14 insertions(+), 2 deletions(-)
+
+commit a6f43e64128a6da5cd641de1e1e527433b3e5638
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 8 insertions(+), 40 deletions(-)
+
+commit be06858d5cf8ba46557395035d821dc332f3f830
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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, 956 deletions(-)
+
+commit 0255401e57c96af87c6b159eca28974e79430a82
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-05-01 11:21:46 +0300
+
+    Added documentation about the legacy .lzma file format.
+
+ doc/lzma-file-format.txt | 166 +++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 166 insertions(+)
+
+commit 1496ff437c46f38303e0e94c511ca604b3a11f85
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 => xz-file-format.txt} | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+
+commit 21c6b94373d239d7e86bd480fcd558e30391712f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-04-14 11:48:46 +0300
+
+    Minor fixes to test files' README.
+
+ tests/files/README | 17 +++++++++--------
+ 1 file changed, 9 insertions(+), 8 deletions(-)
+
+commit 4787d654434891c7df5b43959b0d2873718f06e0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-04-13 16:36:41 +0300
+
+    Updated history.txt.
+
+ doc/history.txt | 123 ++++++++++++++++++++++++++++++--------------------------
+ 1 file changed, 66 insertions(+), 57 deletions(-)
+
+commit 2f0bc9cd40f709152a0177c8e585c0757e9af9c9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 => xzdiff}     | 24 +++++++++----------
+ src/scripts/{lzdiff.1 => xzdiff.1} | 29 ++++++++++++++---------
+ src/scripts/{lzgrep => xzgrep}     | 10 ++++----
+ src/scripts/{lzgrep.1 => xzgrep.1} | 48 +++++++++++++++++++++++++-------------
+ src/scripts/{lzmore => xzmore}     | 12 +++++-----
+ src/scripts/{lzmore.1 => xzmore.1} | 33 +++++++++++++++++---------
+ 7 files changed, 119 insertions(+), 75 deletions(-)
+
+commit 02ddf09bc3079b3e17297729b9e43f14d407b8fc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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                     | 46 ++++++++----------
+ src/liblzma/check/Makefile.am                  |  8 ++-
+ src/liblzma/check/check.c                      |  7 ++-
+ src/liblzma/check/check.h                      |  7 ++-
+ src/liblzma/check/crc32_fast.c                 | 30 +++++-------
+ src/liblzma/check/crc32_small.c                |  7 ++-
+ src/liblzma/check/crc32_table.c                |  7 ++-
+ src/liblzma/check/crc32_tablegen.c             |  7 ++-
+ src/liblzma/check/crc32_x86.S                  | 21 +++++---
+ src/liblzma/check/crc64_fast.c                 | 20 +++-----
+ src/liblzma/check/crc64_small.c                |  7 ++-
+ src/liblzma/check/crc64_table.c                |  7 ++-
+ src/liblzma/check/crc64_tablegen.c             |  7 ++-
+ src/liblzma/check/crc64_x86.S                  | 14 ++++--
+ src/liblzma/check/crc_macros.h                 |  9 ++--
+ src/liblzma/check/sha256.c                     | 23 +++++----
+ src/liblzma/common/Makefile.am                 | 13 ++---
+ src/liblzma/common/alone_decoder.c             | 13 ++---
+ src/liblzma/common/alone_decoder.h             | 13 ++---
+ src/liblzma/common/alone_encoder.c             | 13 ++---
+ src/liblzma/common/auto_decoder.c              | 13 ++---
+ src/liblzma/common/block_buffer_decoder.c      | 13 ++---
+ src/liblzma/common/block_buffer_encoder.c      | 13 ++---
+ src/liblzma/common/block_decoder.c             | 13 ++---
+ src/liblzma/common/block_decoder.h             | 13 ++---
+ src/liblzma/common/block_encoder.c             | 13 ++---
+ src/liblzma/common/block_encoder.h             | 13 ++---
+ src/liblzma/common/block_header_decoder.c      | 13 ++---
+ src/liblzma/common/block_header_encoder.c      | 13 ++---
+ src/liblzma/common/block_util.c                | 13 ++---
+ src/liblzma/common/bsr.h                       |  7 ++-
+ src/liblzma/common/chunk_size.c                | 13 ++---
+ src/liblzma/common/common.c                    | 13 ++---
+ src/liblzma/common/common.h                    | 13 ++---
+ src/liblzma/common/easy_buffer_encoder.c       | 13 ++---
+ src/liblzma/common/easy_decoder_memusage.c     | 13 ++---
+ src/liblzma/common/easy_encoder.c              | 13 ++---
+ src/liblzma/common/easy_encoder_memusage.c     | 13 ++---
+ src/liblzma/common/easy_preset.c               | 13 ++---
+ src/liblzma/common/easy_preset.h               | 13 ++---
+ src/liblzma/common/filter_buffer_decoder.c     | 13 ++---
+ src/liblzma/common/filter_buffer_encoder.c     | 13 ++---
+ src/liblzma/common/filter_common.c             | 13 ++---
+ src/liblzma/common/filter_common.h             | 13 ++---
+ src/liblzma/common/filter_decoder.c            | 13 ++---
+ src/liblzma/common/filter_decoder.h            | 13 ++---
+ src/liblzma/common/filter_encoder.c            | 13 ++---
+ src/liblzma/common/filter_encoder.h            | 13 ++---
+ src/liblzma/common/filter_flags_decoder.c      | 13 ++---
+ src/liblzma/common/filter_flags_encoder.c      | 13 ++---
+ src/liblzma/common/index.c                     | 13 ++---
+ src/liblzma/common/index.h                     | 13 ++---
+ src/liblzma/common/index_decoder.c             | 13 ++---
+ src/liblzma/common/index_encoder.c             | 13 ++---
+ src/liblzma/common/index_encoder.h             | 13 ++---
+ src/liblzma/common/index_hash.c                | 13 ++---
+ src/liblzma/common/stream_buffer_decoder.c     | 13 ++---
+ src/liblzma/common/stream_buffer_encoder.c     | 13 ++---
+ src/liblzma/common/stream_decoder.c            | 13 ++---
+ src/liblzma/common/stream_decoder.h            | 13 ++---
+ src/liblzma/common/stream_encoder.c            | 13 ++---
+ src/liblzma/common/stream_encoder.h            | 13 ++---
+ src/liblzma/common/stream_flags_common.c       | 13 ++---
+ src/liblzma/common/stream_flags_common.h       | 13 ++---
+ src/liblzma/common/stream_flags_decoder.c      | 13 ++---
+ src/liblzma/common/stream_flags_encoder.c      | 13 ++---
+ src/liblzma/common/vli_decoder.c               | 13 ++---
+ src/liblzma/common/vli_encoder.c               | 13 ++---
+ src/liblzma/common/vli_size.c                  | 13 ++---
+ src/liblzma/delta/Makefile.am                  | 13 ++---
+ src/liblzma/delta/delta_common.c               | 13 ++---
+ src/liblzma/delta/delta_common.h               | 13 ++---
+ src/liblzma/delta/delta_decoder.c              | 13 ++---
+ src/liblzma/delta/delta_decoder.h              | 13 ++---
+ src/liblzma/delta/delta_encoder.c              | 13 ++---
+ src/liblzma/delta/delta_encoder.h              | 13 ++---
+ src/liblzma/delta/delta_private.h              | 13 ++---
+ src/liblzma/lz/Makefile.am                     | 13 ++---
+ src/liblzma/lz/lz_decoder.c                    | 17 ++-----
+ src/liblzma/lz/lz_decoder.h                    | 17 ++-----
+ src/liblzma/lz/lz_encoder.c                    | 17 ++-----
+ src/liblzma/lz/lz_encoder.h                    | 17 ++-----
+ src/liblzma/lz/lz_encoder_hash.h               | 13 ++---
+ src/liblzma/lz/lz_encoder_mf.c                 | 17 ++-----
+ src/liblzma/lzma/Makefile.am                   | 13 ++---
+ src/liblzma/lzma/fastpos.h                     | 17 ++-----
+ src/liblzma/lzma/fastpos_tablegen.c            | 17 ++-----
+ src/liblzma/lzma/lzma2_decoder.c               | 17 ++-----
+ src/liblzma/lzma/lzma2_decoder.h               | 17 ++-----
+ src/liblzma/lzma/lzma2_encoder.c               | 17 ++-----
+ src/liblzma/lzma/lzma2_encoder.h               | 17 ++-----
+ src/liblzma/lzma/lzma_common.h                 | 17 ++-----
+ src/liblzma/lzma/lzma_decoder.c                | 17 ++-----
+ src/liblzma/lzma/lzma_decoder.h                | 17 ++-----
+ src/liblzma/lzma/lzma_encoder.c                | 17 ++-----
+ src/liblzma/lzma/lzma_encoder.h                | 17 ++-----
+ src/liblzma/lzma/lzma_encoder_optimum_fast.c   | 13 ++---
+ src/liblzma/lzma/lzma_encoder_optimum_normal.c | 13 ++---
+ src/liblzma/lzma/lzma_encoder_presets.c        | 13 ++---
+ src/liblzma/lzma/lzma_encoder_private.h        | 17 ++-----
+ src/liblzma/rangecoder/Makefile.am             | 13 ++---
+ src/liblzma/rangecoder/price.h                 | 13 ++---
+ src/liblzma/rangecoder/price_tablegen.c        | 16 ++----
+ src/liblzma/rangecoder/range_common.h          | 17 ++-----
+ src/liblzma/rangecoder/range_decoder.h         | 17 ++-----
+ src/liblzma/rangecoder/range_encoder.h         | 17 ++-----
+ src/liblzma/simple/Makefile.am                 | 13 ++---
+ src/liblzma/simple/arm.c                       | 17 ++-----
+ src/liblzma/simple/armthumb.c                  | 17 ++-----
+ src/liblzma/simple/ia64.c                      | 17 ++-----
+ src/liblzma/simple/powerpc.c                   | 17 ++-----
+ src/liblzma/simple/simple_coder.c              | 13 ++---
+ src/liblzma/simple/simple_coder.h              | 14 ++----
+ src/liblzma/simple/simple_decoder.c            | 13 ++---
+ src/liblzma/simple/simple_decoder.h            | 13 ++---
+ src/liblzma/simple/simple_encoder.c            | 13 ++---
+ src/liblzma/simple/simple_encoder.h            | 13 ++---
+ src/liblzma/simple/simple_private.h            | 13 ++---
+ src/liblzma/simple/sparc.c                     | 17 ++-----
+ src/liblzma/simple/x86.c                       | 17 ++-----
+ src/liblzma/subblock/Makefile.am               | 13 ++---
+ src/liblzma/subblock/subblock_decoder.c        | 13 ++---
+ src/liblzma/subblock/subblock_decoder.h        | 13 ++---
+ src/liblzma/subblock/subblock_decoder_helper.c | 13 ++---
+ src/liblzma/subblock/subblock_decoder_helper.h | 13 ++---
+ src/liblzma/subblock/subblock_encoder.c        | 13 ++---
+ src/liblzma/subblock/subblock_encoder.h        | 13 ++---
+ src/scripts/Makefile.am                        |  7 +++
+ src/xz/Makefile.am                             | 13 ++---
+ src/xz/args.c                                  | 13 ++---
+ src/xz/args.h                                  | 13 ++---
+ src/xz/hardware.c                              | 13 ++---
+ src/xz/hardware.h                              | 13 ++---
+ src/xz/io.c                                    | 13 ++---
+ src/xz/io.h                                    | 13 ++---
+ src/xz/list.c                                  | 13 ++---
+ src/xz/main.c                                  | 13 ++---
+ src/xz/main.h                                  | 13 ++---
+ src/xz/message.c                               | 13 ++---
+ src/xz/message.h                               | 13 ++---
+ src/xz/options.c                               | 13 ++---
+ src/xz/options.h                               | 13 ++---
+ src/xz/private.h                               | 13 ++---
+ src/xz/process.c                               | 13 ++---
+ src/xz/process.h                               | 13 ++---
+ src/xz/signals.c                               | 13 ++---
+ src/xz/signals.h                               | 13 ++---
+ src/xz/suffix.c                                | 13 ++---
+ src/xz/suffix.h                                | 13 ++---
+ src/xz/util.c                                  | 13 ++---
+ src/xz/util.h                                  | 13 ++---
+ src/xzdec/Makefile.am                          | 13 ++---
+ src/xzdec/xzdec.c                              | 13 ++---
+ tests/Makefile.am                              | 13 ++---
+ tests/bcj_test.c                               |  7 ++-
+ tests/create_compress_files.c                  | 13 ++---
+ tests/test_block.c                             | 13 ++---
+ tests/test_block_header.c                      | 13 ++---
+ tests/test_check.c                             | 13 ++---
+ tests/test_compress.sh                         | 13 ++---
+ tests/test_files.sh                            | 13 ++---
+ tests/test_filter_flags.c                      | 13 ++---
+ tests/test_index.c                             | 13 ++---
+ tests/test_stream_flags.c                      | 13 ++---
+ tests/tests.h                                  | 13 ++---
+ windows/common.rc                              |  2 +-
+ 206 files changed, 868 insertions(+), 2023 deletions(-)
+
+commit e79c42d854657ae7f75613bd80c1a35ff7c525cb
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 94eb9ad46f1fded6d8369cf3d38bb9754c1375af
+Author: Pavel Roskin <proski at gnu.org>
+Date:   2009-03-31 12:15:01 -0400
+
+    Fix minor typos in README
+
+ README | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 9bab5336ebd765ec4e12252f416eefdf04eba750
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 11 insertions(+)
+
+commit a0497ff7a06f9350349264fe9b52dfefc6d53ead
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-03-18 16:54:38 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 390e69887fc5e0a108eb41203bed9acd100a3d76
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 19 insertions(+), 9 deletions(-)
+
+commit cf751edfde3ad6e088dc18e0522d31ae38405933
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-03-01 09:00:06 +0200
+
+    Added AC_CONFIG_MACRO_DIR to configure.ac.
+
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 63df14c57dee7c461717784287056688482a7eb9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+)
+
+commit fd6a380f4eda4f00be5f2aa8d222992cd74a714f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-02-22 19:07:54 +0200
+
+    Add a rough explanation of --extreme to output of --help.
+
+ src/xz/message.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 68bf7ac2984d3627369a240ef0491934d53f7899
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 deletion(-)
+
+commit 489a3dbaa0465f04400804e956a1cfbbee3654a2
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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_buffer_encoder.c      | 34 +++++++++++++++++
+ src/liblzma/common/easy_decoder_memusage.c    | 31 ++++++++++++++++
+ src/liblzma/common/{easy.c => easy_encoder.c} | 53 +++------------------------
+ src/liblzma/common/easy_encoder_memusage.c    | 31 ++++++++++++++++
+ src/liblzma/common/easy_preset.c              | 34 +++++++++++++++++
+ src/liblzma/common/easy_preset.h              | 39 ++++++++++++++++++++
+ windows/Makefile                              |  6 ++-
+ 8 files changed, 185 insertions(+), 49 deletions(-)
+
+commit 7494816ab08d82f4d6409788825930c4e43cfd0d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 27 insertions(+), 4 deletions(-)
+
+commit 11ae4ae35fd70182c713f2d914b7cb1143bc76f0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-02-14 20:44:52 +0200
+
+    Fix microsecond vs. nanosecond confusion in my_time().
+
+ src/xz/message.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 3084d662d2646ab7eb58daf0dc32cf3f9a74eec7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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(+)
+
+commit 0dae8b7751d09e9c5a482d5519daaee4800ce203
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 deletion(-)
+
+commit 96c46df7deb231ea68a03d8d1da9de4c774e36d8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-02-11 20:02:32 +0200
+
+    Remove dead directories from .gitignore.
+
+ .gitignore | 2 --
+ 1 file changed, 2 deletions(-)
+
+commit 1ec5b0027911d94cb6f98892cbc690f818d8a861
+Author: Jim Meyering <jim at meyering.net>
+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 file changed, 22 insertions(+)
+
+commit 154f5aec2de201c674841de4fcc9804c2a87af07
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 deletion(-)
+
+commit e605c2663691b0a4c307786aa368d124ea081daa
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-02-08 21:35:11 +0200
+
+    Fix aliasing issue in physmem.h.
+
+ src/common/physmem.h | 19 ++++++++++---------
+ 1 file changed, 10 insertions(+), 9 deletions(-)
+
+commit 0e27028d74c5c7a8e036ae2a9b8cecb0ac79d3a6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 79e25eded48d2fe33f31441ab7a034f902e335f8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 9 insertions(+)
+
+commit bc7c7109cc4410055a888c1c70cbd1c9445c4361
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 28 deletions(-)
+
+commit edfc2031e56f8a2ccda063f02936b3a848d88723
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-02-07 21:41:52 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 880c3309386aac58fc4f3d7ca99bd31bcb1526a3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <vapier at gentoo.org>
+Date:   2009-02-06 23:38:39 -0500
+
+    add gitignore files
+    
+    Signed-off-by: Mike Frysinger <vapier at gentoo.org>
+
+ .gitignore    | 32 ++++++++++++++++++++++++++++++++
+ m4/.gitignore | 35 +++++++++++++++++++++++++++++++++++
+ po/.gitignore | 12 ++++++++++++
+ 3 files changed, 79 insertions(+)
+
+commit bd7ca1dad5c146b6217799ffaa230c32d207a3e5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit d0ab8c1c73ae712adb0d26fbb9da762d99a63618
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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(+)
+
+commit 3306cf3883492720b3c34baa02f4eb4227d91c73
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-02-06 16:55:45 +0200
+
+    Another grammar fix
+
+ README | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit fe5434f940f75fec3611cf9d9edf78c4da8ac760
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-02-06 12:30:23 +0200
+
+    Grammar fix in README.
+
+ README | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 3dfa58a9eedf5a0e566452b078801c9cbcf7a245
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 insertion(+), 1 deletion(-)
+
+commit 094b1b09a531f0d201ec81f2b07346a995fd80b9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-02-05 21:21:27 +0200
+
+    Add the "windows" directory to EXTRA_DIST.
+
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit e1c3412eec7acec7ca3b32c9c828f3147dc65b49
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 75905a9afc0ee89954ede7d08af70d1148bf0fd9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-02-03 12:15:17 +0200
+
+    Another utime() fix.
+
+ src/xz/io.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+commit ccf92a29e8c7234284f1568c1ec0fd7cb98356ca
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 99c1c2abfae2e87f3c17e929783e6d1bb7a3f302
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+), 4 deletions(-)
+
+commit 55fd41431e61fb8178858283d636b6781e33e847
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-02-01 00:11:20 +0200
+
+    Fix missing newlines in xzdec.c.
+
+ src/xzdec/xzdec.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit d64ca34f1b6f34e86adefc7f735b4eff8e6d4a35
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 2dbdc5befb33c3703e4609809101047c67caf343
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 4ab760109106dc04f39dd81c97d50f528d1b51c1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 46 insertions(+), 24 deletions(-)
+
+commit b2172cf823d3be34cb0246cb4cb32d105e2a34c9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-01-31 08:49:54 +0200
+
+    Fix # -> ## in a macro in lzma.h.
+
+ src/liblzma/api/lzma.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 1aae8698746d3c87a93f8398cdde2de9ba1f7208
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-01-30 18:50:16 +0200
+
+    Updated README.
+
+ README | 30 ++++++++++++++++++++----------
+ 1 file changed, 20 insertions(+), 10 deletions(-)
+
+commit f54bcf6f80d585236bc03ce49f7c73e1abaa17eb
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-01-30 00:29:58 +0200
+
+    Remove dangling crc64_init.c.
+
+ src/liblzma/check/crc64_init.c | 55 ------------------------------------------
+ 1 file changed, 55 deletions(-)
+
+commit 982da7ed314398420c38bf154a8f759d5f18b480
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 49 insertions(+), 35 deletions(-)
+
+commit c4683a660b4372156bdaf92f0cdc54a58f95ee6f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-01-28 08:45:59 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 3241317093595db9f79104faafe93cb989c9f858
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+)
+
+commit f76e39cf930f888d460b443d18f977ebedea8b2a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <meyering at redhat.com>
+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 <lasse.collin at tukaani.org>
+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(+)
+
+commit 5fb34d8324d3e7e0061df25d0086b64c8726b19d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 7 insertions(+)
+
+commit c129748675a5daa8838df92bde32cc04f6ce61ba
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-01-26 14:33:13 +0200
+
+    Avoid hardcoded constant in easy.c.
+
+ src/liblzma/common/easy.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 1859d22d75e072463db74c25bc3f5a7992e5fdf6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 2c5fe958e4bbe9b147b10c255955dfe2827fb8e7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+), 3 deletions(-)
+
+commit c81f13ff29271de7293f8af3d81848b1dcae3d19
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-01-22 12:53:33 +0200
+
+    Fix a comment.
+
+ src/liblzma/common/common.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 9ec80355a7212a0a2f8c89d98e51b1d8b4e34eec
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 8 insertions(+), 16 deletions(-)
+
+commit 2f1a8e8eb898f6c036cde55d153ad348bfab3c00
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2009-01-19 22:53:18 +0200
+
+    Fix handling of non-fatal errors in lzma_code().
+
+ src/liblzma/common/common.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+commit 4810b6bc25087be872960b9dd1d11ff07735dc88
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-01-19 13:52:36 +0200
+
+    Remove dead code.
+
+ src/liblzma/lzma/lzma_encoder.h | 8 --------
+ 1 file changed, 8 deletions(-)
+
+commit 128586213f77c9bd82b7e9a62927f6d0c3769d85
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2009-01-15 14:29:22 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit dc8f3be06d54ef6e6cfb5134dd3d25edd08cef89
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 24 insertions(+), 23 deletions(-)
+
+commit 8286a60b8f4bd5accfbc9d229d2204bac31994f2
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 13 insertions(+), 9 deletions(-)
+
+commit 9c45658ddc8bd4a7819ef8547d3e7ccf73203e78
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit b59f1e98f50694cf6a8f1b342fd878feebdb2f88
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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, 6 deletions(-)
+
+commit d1d17a40d33a9682424ca37282813492f2cba6d0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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/{simple.h => bcj.h} | 22 +++++++++++-----------
+ src/liblzma/simple/simple_coder.c        |  2 +-
+ src/liblzma/simple/simple_decoder.c      |  4 ++--
+ src/liblzma/simple/simple_encoder.c      |  4 ++--
+ tests/test_filter_flags.c                |  8 ++++----
+ 7 files changed, 22 insertions(+), 22 deletions(-)
+
+commit 7eea8bec3abfed883efba66264a1452a1c04f6b0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-12-31 00:57:27 +0200
+
+    Fixed missing quoting in configure.ac.
+
+ configure.ac | 38 +++++++++++++++++++-------------------
+ 1 file changed, 19 insertions(+), 19 deletions(-)
+
+commit 28e75f7086dbe9501d926c370375c69dfb1236ce
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 7ed9d943b31d3ee9c5fb2387e84a241ba33afe90
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 => crc32_fast.c} |  0
+ src/liblzma/check/crc32_init.c              | 55 -------------------
+ src/liblzma/check/crc32_small.c             | 54 ++++++++++++++++++
+ src/liblzma/check/crc32_tablegen.c          | 55 ++++++++++++++++---
+ src/liblzma/check/{crc64.c => crc64_fast.c} |  0
+ src/liblzma/check/crc64_small.c             | 54 ++++++++++++++++++
+ src/liblzma/check/crc64_tablegen.c          | 55 ++++++++++++++++---
+ src/liblzma/common/Makefile.am              |  3 -
+ src/liblzma/common/common.h                 |  1 +
+ src/liblzma/common/init.c                   | 39 -------------
+ src/liblzma/common/init_decoder.c           | 31 -----------
+ src/liblzma/common/init_encoder.c           | 40 --------------
+ src/liblzma/{lzma.pc.in => liblzma.pc.in}   |  5 +-
+ src/liblzma/lz/lz_encoder.c                 |  6 ++
+ src/liblzma/rangecoder/Makefile.am          |  8 +--
+ src/liblzma/rangecoder/price.h              | 16 +-----
+ src/liblzma/rangecoder/price_table.c        |  2 +-
+ src/liblzma/rangecoder/price_table_init.c   | 55 -------------------
+ src/liblzma/rangecoder/price_tablegen.c     | 51 ++++++++++++++---
+ src/xz/Makefile.am                          |  5 +-
+ src/xz/main.c                               |  3 -
+ src/xzdec/xzdec.c                           |  3 -
+ tests/test_block_header.c                   |  1 -
+ tests/test_check.c                          |  2 -
+ tests/test_filter_flags.c                   |  2 -
+ tests/test_index.c                          |  2 -
+ tests/test_stream_flags.c                   |  2 -
+ tests/tests.h                               |  2 +-
+ 37 files changed, 347 insertions(+), 456 deletions(-)
+
+commit 5cda29b5665004fc0f21d0c41d78022a6a559ab2
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 050eb14d29e2537c014662e83599fd8a77f13c45
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 8 insertions(+), 15 deletions(-)
+
+commit 4820f10d0f173864f6a2ea7479663b509ac53358
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 deletion(-)
+
+commit 634636fa56ccee6e744f78b0abed76c8940f2f8f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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, 176 deletions(-)
+
+commit 4fed98417d1687f5eccccb42a133fde3ec81216a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 14 insertions(+), 15 deletions(-)
+
+commit 671a5adf1e844bfdd6fd327016c3c28694493158
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 23 insertions(+), 10 deletions(-)
+
+commit f9f2d1e74398500724041f7fb3c38db35ad8c8d8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit ff7fb2c605bccc411069e07b9f11fb957aea2ddf
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-12-13 00:54:11 +0200
+
+    Name the package "xz" in configure.ac.
+
+ configure.ac | 11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+commit a94bf00d0af9b423851905b031be5a645a657820
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 5 insertions(+), 3 deletions(-)
+
+commit 8582d392baacd2cdac07ca60041f8c661323676d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-12-10 01:31:00 +0200
+
+    Remove obsolete comment.
+
+ src/xz/message.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+commit b1ae6dd731ea3636c3c2bfc7aefa71457d3328f1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-12-10 01:27:15 +0200
+
+    Use "decompression" consistently in --long-help.
+
+ src/xz/message.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 1ea9e7f15afd5d3981e2432710e932320597bca9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit bceb3918dbb21f34976bfdd4c171a81319de71f7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 9 insertions(+), 15 deletions(-)
+
+commit 6efa2d80d46a38861016f41f0eb6fa2ec9260fe6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-12-09 10:36:24 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit ef7890d56453dca1aeb2e12db29b7e418d93dde4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+), 4 deletions(-)
+
+commit ccd57afa09e332d664d6d6a7498702791ea5f659
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 10 insertions(+), 4 deletions(-)
+
+commit c596fda40b62fe1683d0ac34d0c673dcaae2aa15
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 41 insertions(+), 54 deletions(-)
+
+commit 656ec87882ee74b192c4ea4a233a235eca7b04d4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 insertion(+), 1 deletion(-)
+
+commit c7007ddf06ac2b0e018d71d281c21b99f16e7ae0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 9 insertions(+), 5 deletions(-)
+
+commit ae65dcfde27014e4d811e1a1308aa5d0fe8debbd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-11-27 19:28:59 +0200
+
+    Cleanups to message.c.
+
+ src/xz/message.c | 47 ++++++++++++++++++-----------------------------
+ 1 file changed, 18 insertions(+), 29 deletions(-)
+
+commit a8368b75cdcd5427299001cc42839287f27b244d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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, 614 deletions(-)
+
+commit 69472ee5f055a2bb6f28106f0923e1461fd1d080
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-11-22 17:44:33 +0200
+
+    Typo fix
+
+ src/xz/process.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 6d1d6f4598d121253dbe1084c6866b66e95c361b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-11-20 22:59:10 +0200
+
+    Support NetBSD's errno for O_NOFOLLOW.
+
+ src/xz/io.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+commit f901a290eef67b8ea4720ccdf5f46edf775ed9d7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-11-20 11:01:29 +0200
+
+    Minor cleanups to xzdec.
+
+ src/xzdec/xzdec.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+commit 54f716ba8905d09752dcd1519455a40bd21d5317
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-11-19 23:55:22 +0200
+
+    Added missing check for uint16_t.
+
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 1880a3927b23f265f63b2adb86fbdb81ea09eb06
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 => xz}/Makefile.am             | 32 +++++++++++++++++---------------
+ src/{lzma => xz}/args.c                  |  0
+ src/{lzma => xz}/args.h                  |  0
+ src/{lzma => xz}/hardware.c              |  0
+ src/{lzma => xz}/hardware.h              |  0
+ src/{lzma => xz}/io.c                    |  0
+ src/{lzma => xz}/io.h                    |  0
+ src/{lzma => xz}/list.c                  |  0
+ src/{lzma => xz}/main.c                  |  0
+ src/{lzma => xz}/main.h                  |  0
+ src/{lzma => xz}/message.c               |  0
+ src/{lzma => xz}/message.h               |  0
+ src/{lzma => xz}/options.c               |  0
+ src/{lzma => xz}/options.h               |  0
+ src/{lzma => xz}/private.h               |  0
+ src/{lzma => xz}/process.c               |  0
+ src/{lzma => xz}/process.h               |  0
+ src/{lzma => xz}/suffix.c                |  0
+ src/{lzma => xz}/suffix.h                |  0
+ src/{lzma => xz}/util.c                  |  0
+ src/{lzma => xz}/util.h                  |  0
+ src/{lzmadec => xzdec}/Makefile.am       | 12 ++++++------
+ src/{lzmadec/lzmadec.c => xzdec/xzdec.c} |  4 ++--
+ tests/test_compress.sh                   | 29 ++++++++++++++---------------
+ tests/test_files.sh                      |  4 ++--
+ 28 files changed, 53 insertions(+), 55 deletions(-)
+
+commit e114502b2bc371e4a45449832cb69be036360722
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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_.h => getopt.in.h}               |   8 +-
+ lib/getopt1.c                                |   8 +-
+ lib/gettext.h                                | 240 -------
+ m4/getopt.m4                                 |  64 +-
+ src/common/bswap.h                           |  15 +-
+ src/common/physmem.h                         |   4 +
+ src/common/sysdefs.h                         |  12 +-
+ src/liblzma/api/lzma/block.h                 |  47 +-
+ src/liblzma/api/lzma/filter.h                |   8 +
+ src/liblzma/api/lzma/index.h                 |  20 +-
+ src/liblzma/api/lzma/index_hash.h            |   4 +-
+ src/liblzma/common/block_decoder.c           |  59 +-
+ src/liblzma/common/block_encoder.c           |  41 +-
+ src/liblzma/common/block_header_decoder.c    |  31 +-
+ src/liblzma/common/block_header_encoder.c    |  69 +--
+ src/liblzma/common/block_util.c              |  45 +-
+ src/liblzma/common/common.h                  |   8 -
+ src/liblzma/common/filter_common.c           |   4 +-
+ src/liblzma/common/index.c                   | 259 ++++----
+ src/liblzma/common/index.h                   |  33 +-
+ src/liblzma/common/index_decoder.c           |  31 +-
+ src/liblzma/common/index_encoder.c           |  16 +-
+ src/liblzma/common/index_hash.c              |  68 +-
+ src/liblzma/common/stream_decoder.c          |   9 +-
+ src/liblzma/common/stream_encoder.c          |   6 +-
+ src/liblzma/lz/lz_decoder.h                  |   4 +-
+ src/liblzma/subblock/subblock_decoder.c      |   3 +-
+ src/lzma/Makefile.am                         |   9 +-
+ src/lzma/alloc.c                             | 106 ----
+ src/lzma/alloc.h                             |  42 --
+ src/lzma/args.c                              | 531 +++++++---------
+ src/lzma/args.h                              |  42 +-
+ src/lzma/error.c                             | 162 -----
+ src/lzma/error.h                             |  67 --
+ src/lzma/hardware.c                          |  75 ++-
+ src/lzma/hardware.h                          |  16 +-
+ src/lzma/help.c                              | 170 -----
+ src/lzma/help.h                              |  32 -
+ src/lzma/io.c                                | 757 +++++++++++------------
+ src/lzma/io.h                                |  51 +-
+ src/lzma/main.c                              | 392 ++++++++----
+ src/lzma/main.h                              |  60 ++
+ src/lzma/message.c                           | 892 +++++++++++++++++++++++++++
+ src/lzma/message.h                           | 132 ++++
+ src/lzma/options.c                           |  42 +-
+ src/lzma/options.h                           |   6 +-
+ src/lzma/private.h                           |  28 +-
+ src/lzma/process.c                           | 525 ++++++++--------
+ src/lzma/process.h                           |  40 ++
+ src/lzma/suffix.c                            |  52 +-
+ src/lzma/suffix.h                            |  17 +-
+ src/lzma/util.c                              | 100 +--
+ src/lzma/util.h                              |  43 +-
+ src/lzmadec/lzmadec.c                        |  36 +-
+ tests/files/README                           |  12 +-
+ tests/files/bad-1-block_header-1.xz          | Bin 64 -> 64 bytes
+ tests/files/bad-1-block_header-2.xz          | Bin 64 -> 64 bytes
+ tests/files/bad-1-block_header-3.xz          | Bin 68 -> 68 bytes
+ tests/files/bad-1-block_header-4.xz          | Bin 72 -> 76 bytes
+ tests/files/bad-1-block_header-5.xz          | Bin 0 -> 72 bytes
+ tests/files/bad-1-check-crc32.xz             | Bin 68 -> 68 bytes
+ tests/files/bad-1-check-crc64.xz             | Bin 72 -> 72 bytes
+ tests/files/bad-1-check-sha256.xz            | Bin 96 -> 96 bytes
+ tests/files/bad-1-lzma2-1.xz                 | Bin 64 -> 64 bytes
+ tests/files/bad-1-lzma2-2.xz                 | Bin 424 -> 424 bytes
+ tests/files/bad-1-lzma2-3.xz                 | Bin 424 -> 424 bytes
+ tests/files/bad-1-lzma2-4.xz                 | Bin 408 -> 408 bytes
+ tests/files/bad-1-lzma2-5.xz                 | Bin 408 -> 408 bytes
+ tests/files/bad-1-lzma2-6.xz                 | Bin 68 -> 68 bytes
+ tests/files/bad-1-lzma2-7.xz                 | Bin 408 -> 408 bytes
+ tests/files/bad-1-stream_flags-1.xz          | Bin 68 -> 68 bytes
+ tests/files/bad-1-stream_flags-2.xz          | Bin 68 -> 68 bytes
+ tests/files/bad-1-stream_flags-3.xz          | Bin 68 -> 68 bytes
+ tests/files/bad-1-vli-1.xz                   | Bin 72 -> 72 bytes
+ tests/files/bad-1-vli-2.xz                   | Bin 72 -> 76 bytes
+ tests/files/bad-2-compressed_data_padding.xz | Bin 92 -> 92 bytes
+ tests/files/bad-2-index-1.xz                 | Bin 92 -> 92 bytes
+ tests/files/bad-2-index-2.xz                 | Bin 92 -> 92 bytes
+ tests/files/bad-2-index-3.xz                 | Bin 92 -> 92 bytes
+ tests/files/bad-2-index-4.xz                 | Bin 92 -> 92 bytes
+ tests/files/bad-2-index-5.xz                 | Bin 0 -> 92 bytes
+ tests/files/good-1-3delta-lzma2.xz           | Bin 528 -> 528 bytes
+ tests/files/good-1-block_header-1.xz         | Bin 72 -> 72 bytes
+ tests/files/good-1-block_header-2.xz         | Bin 68 -> 68 bytes
+ tests/files/good-1-block_header-3.xz         | Bin 68 -> 68 bytes
+ tests/files/good-1-check-crc32.xz            | Bin 68 -> 68 bytes
+ tests/files/good-1-check-crc64.xz            | Bin 72 -> 72 bytes
+ tests/files/good-1-check-none.xz             | Bin 64 -> 64 bytes
+ tests/files/good-1-check-sha256.xz           | Bin 96 -> 96 bytes
+ tests/files/good-1-delta-lzma2.tiff.xz       | Bin 51312 -> 51316 bytes
+ tests/files/good-1-lzma2-1.xz                | Bin 424 -> 424 bytes
+ tests/files/good-1-lzma2-2.xz                | Bin 424 -> 424 bytes
+ tests/files/good-1-lzma2-3.xz                | Bin 408 -> 408 bytes
+ tests/files/good-1-sparc-lzma2.xz            | Bin 2292 -> 2296 bytes
+ tests/files/good-1-x86-lzma2.xz              | Bin 1936 -> 1936 bytes
+ tests/files/good-2-lzma2.xz                  | Bin 92 -> 92 bytes
+ tests/files/unsupported-block_header.xz      | Bin 68 -> 68 bytes
+ tests/files/unsupported-check.xz             | Bin 68 -> 68 bytes
+ tests/files/unsupported-filter_flags-1.xz    | Bin 68 -> 68 bytes
+ tests/files/unsupported-filter_flags-2.xz    | Bin 68 -> 68 bytes
+ tests/files/unsupported-filter_flags-3.xz    | Bin 68 -> 68 bytes
+ tests/test_block_header.c                    |  16 +-
+ tests/test_index.c                           |  42 +-
+ 112 files changed, 3240 insertions(+), 2724 deletions(-)
+
+commit 3c3905b53462ae235c9438d86a4dc51086410932
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 0f295bf7a3ece01f667caae318cc3e3424085886
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-10-07 16:42:18 +0300
+
+    Fixed some help messages.
+
+ src/lzma/help.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 1e8e4fd1f3e50129b4541406ad765d2aa1233943
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-10-03 19:36:09 +0300
+
+    Removed fi from po/LINGUAS.
+
+ po/LINGUAS | 1 -
+ 1 file changed, 1 deletion(-)
+
+commit fcfb86c7770328cfffa2e83b176af9a1ba2d9128
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-10-03 07:06:48 +0300
+
+    Fixed suffix handling with --format=raw.
+
+ src/lzma/suffix.c | 28 +++++++++++++++++++---------
+ 1 file changed, 19 insertions(+), 9 deletions(-)
+
+commit bd137524f2f50e30ba054f42f1f6536cd3cee920
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-09-30 17:43:55 +0300
+
+    Renamed the test files from .lzma suffix to .xz suffix.
+
+ tests/files/README                                 | 128 ++++++++++-----------
+ ...0-backward_size.lzma => bad-0-backward_size.xz} | Bin
+ ...pty-truncated.lzma => bad-0-empty-truncated.xz} | Bin
+ ...d-0-footer_magic.lzma => bad-0-footer_magic.xz} | Bin
+ ...d-0-header_magic.lzma => bad-0-header_magic.xz} | Bin
+ ...nonempty_index.lzma => bad-0-nonempty_index.xz} | Bin
+ .../{bad-0cat-alone.lzma => bad-0cat-alone.xz}     | Bin
+ ...-header_magic.lzma => bad-0cat-header_magic.xz} | Bin
+ ...bad-0catpad-empty.lzma => bad-0catpad-empty.xz} | Bin
+ .../{bad-0pad-empty.lzma => bad-0pad-empty.xz}     | Bin
+ ...block_header-1.lzma => bad-1-block_header-1.xz} | Bin
+ ...block_header-2.lzma => bad-1-block_header-2.xz} | Bin
+ ...block_header-3.lzma => bad-1-block_header-3.xz} | Bin
+ ...block_header-4.lzma => bad-1-block_header-4.xz} | Bin
+ ...bad-1-check-crc32.lzma => bad-1-check-crc32.xz} | Bin
+ ...bad-1-check-crc64.lzma => bad-1-check-crc64.xz} | Bin
+ ...d-1-check-sha256.lzma => bad-1-check-sha256.xz} | Bin
+ .../files/{bad-1-lzma2-1.lzma => bad-1-lzma2-1.xz} | Bin
+ .../files/{bad-1-lzma2-2.lzma => bad-1-lzma2-2.xz} | Bin
+ .../files/{bad-1-lzma2-3.lzma => bad-1-lzma2-3.xz} | Bin
+ .../files/{bad-1-lzma2-4.lzma => bad-1-lzma2-4.xz} | Bin
+ .../files/{bad-1-lzma2-5.lzma => bad-1-lzma2-5.xz} | Bin
+ .../files/{bad-1-lzma2-6.lzma => bad-1-lzma2-6.xz} | Bin
+ .../files/{bad-1-lzma2-7.lzma => bad-1-lzma2-7.xz} | Bin
+ ...stream_flags-1.lzma => bad-1-stream_flags-1.xz} | Bin
+ ...stream_flags-2.lzma => bad-1-stream_flags-2.xz} | Bin
+ ...stream_flags-3.lzma => bad-1-stream_flags-3.xz} | Bin
+ tests/files/{bad-1-vli-1.lzma => bad-1-vli-1.xz}   | Bin
+ tests/files/{bad-1-vli-2.lzma => bad-1-vli-2.xz}   | Bin
+ ...dding.lzma => bad-2-compressed_data_padding.xz} | Bin
+ .../files/{bad-2-index-1.lzma => bad-2-index-1.xz} | Bin
+ .../files/{bad-2-index-2.lzma => bad-2-index-2.xz} | Bin
+ .../files/{bad-2-index-3.lzma => bad-2-index-3.xz} | Bin
+ .../files/{bad-2-index-4.lzma => bad-2-index-4.xz} | Bin
+ tests/files/{good-0-empty.lzma => good-0-empty.xz} | Bin
+ .../{good-0cat-empty.lzma => good-0cat-empty.xz}   | Bin
+ ...od-0catpad-empty.lzma => good-0catpad-empty.xz} | Bin
+ .../{good-0pad-empty.lzma => good-0pad-empty.xz}   | Bin
+ ...-1-3delta-lzma2.lzma => good-1-3delta-lzma2.xz} | Bin
+ ...lock_header-1.lzma => good-1-block_header-1.xz} | Bin
+ ...lock_header-2.lzma => good-1-block_header-2.xz} | Bin
+ ...lock_header-3.lzma => good-1-block_header-3.xz} | Bin
+ ...od-1-check-crc32.lzma => good-1-check-crc32.xz} | Bin
+ ...od-1-check-crc64.lzma => good-1-check-crc64.xz} | Bin
+ ...good-1-check-none.lzma => good-1-check-none.xz} | Bin
+ ...-1-check-sha256.lzma => good-1-check-sha256.xz} | Bin
+ ...-lzma2.tiff.lzma => good-1-delta-lzma2.tiff.xz} | Bin
+ .../{good-1-lzma2-1.lzma => good-1-lzma2-1.xz}     | Bin
+ .../{good-1-lzma2-2.lzma => good-1-lzma2-2.xz}     | Bin
+ .../{good-1-lzma2-3.lzma => good-1-lzma2-3.xz}     | Bin
+ ...od-1-sparc-lzma2.lzma => good-1-sparc-lzma2.xz} | Bin
+ .../{good-1-x86-lzma2.lzma => good-1-x86-lzma2.xz} | Bin
+ tests/files/{good-2-lzma2.lzma => good-2-lzma2.xz} | Bin
+ ...ock_header.lzma => unsupported-block_header.xz} | Bin
+ ...unsupported-check.lzma => unsupported-check.xz} | Bin
+ ..._flags-1.lzma => unsupported-filter_flags-1.xz} | Bin
+ ..._flags-2.lzma => unsupported-filter_flags-2.xz} | Bin
+ ..._flags-3.lzma => unsupported-filter_flags-3.xz} | Bin
+ tests/test_files.sh                                |   6 +-
+ 59 files changed, 66 insertions(+), 68 deletions(-)
+
+commit 8e60c889a2816a63013a35c99ce26bf28f5b78eb
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 5 insertions(+)
+
+commit 3bdbc12c054d1961133ee19802af7dd3c3494543
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-09-30 13:34:07 +0300
+
+    Fixed uninitialized variable in Stream decoder.
+
+ src/liblzma/common/stream_decoder.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit ed3709000a3f17ecefab29b2235d7e2221b00003
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit ea560b0ea80525752bdcd0074d24f8dc170bbe29
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-09-27 23:49:24 +0300
+
+    Fix conflicting Subblock helper filter's ID.
+
+ src/liblzma/common/common.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ad97483b6e55142fd8d5c041db057017a891cd95
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 446 deletions(-)
+
+commit 018ae09df8f2fee5a7374f307df4cb42fad0b81e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-09-27 23:13:54 +0300
+
+    Fix also test_compress.sh.
+
+ tests/test_compress.sh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 3a62a5fb85d2eebd8666e64ed5d364d095062858
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 8 insertions(+), 8 deletions(-)
+
+commit c6ca26eef7cd07eba449035514e2b8f9ac3111c0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 32 insertions(+), 93 deletions(-)
+
+commit 1dcecfb09b55157b8653d747963069c8bed74f04
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-09-27 11:28:49 +0300
+
+    Added 7z2lzma.bash.
+
+ extra/7z2lzma/7z2lzma.bash | 114 +++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 114 insertions(+)
+
+commit f147666a5cd15542d4e427da58629f4a71cc38e1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-09-13 13:54:00 +0300
+
+    LZ decoder cleanup
+
+ src/liblzma/lz/lz_decoder.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+commit 13a74b78e37f16c9096ba5fe1859cc04eaa2f9f7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 5 insertions(+), 9 deletions(-)
+
+commit 16e8b98f2659347edfa74afdbbb9e73311153cb9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 5 deletions(-)
+
+commit 5a710c3805bdf6d7e3c92e954e4e4565b27bcb13
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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, 36 deletions(-)
+
+commit 01892b2ca5f69bed0ea746e04b604030d57806bb
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-09-11 10:49:14 +0300
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 962f2231d49409fe6852e44ffe8c5dbabb04bc7d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 18 insertions(+), 14 deletions(-)
+
+commit fa3ab0df8ae7a8a1ad55b52266dc0fd387458671
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-09-11 10:46:14 +0300
+
+    Silence a compiler warning.
+
+ src/lzma/process.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 9373e81e18822db4972819442ea4c2cb9955470b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+), 3 deletions(-)
+
+commit 123ab0acec435c9e9866a99e30482116cfbd9ba5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-09-10 00:33:00 +0300
+
+    Comments
+
+ src/liblzma/common/stream_encoder.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit 2ba01bfa755e47ff6af84a978e3c8d63d7d2775e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-09-03 17:06:25 +0300
+
+    Minor updates to the file format specification.
+
+ doc/file-format.txt | 105 ++++++++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 85 insertions(+), 20 deletions(-)
+
+commit 9c75b089b4a9e0edcf4cf7970a4383768707d6c8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-09-02 19:33:32 +0300
+
+    Command line tool fixes
+
+ src/lzma/process.c | 21 +++++++++++++--------
+ 1 file changed, 13 insertions(+), 8 deletions(-)
+
+commit bab0590504b5aeff460ab4ca8c964dd7c1bad9e4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-09-02 19:31:42 +0300
+
+    Auto decoder cleanup
+
+ src/liblzma/common/auto_decoder.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 689602336d126a46b60d791a67decab65e1e81f5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 71 insertions(+), 16 deletions(-)
+
+commit 80c4158f19904026433eb6f5d5ca98a0ecd4f66c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-09-02 14:56:52 +0300
+
+    Stream decoder cleanups
+
+ src/liblzma/common/stream_decoder.c | 57 +++++++++++++++++++++----------------
+ 1 file changed, 32 insertions(+), 25 deletions(-)
+
+commit fc681657450ce57be1fe08f7a15d31dcc705e514
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-08-31 11:47:01 +0300
+
+    Fix wrong pointer calculation in LZMA encoder.
+
+ src/liblzma/lzma/lzma_encoder.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit 3b34851de1eaf358cf9268922fa0eeed8278d680
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 +-
+ .../lz/lz_encoder_private.h => debug/crc32.c       |   41 +-
+ debug/full_flush.c                                 |   14 +-
+ debug/hex2bin.c                                    |   54 +
+ debug/known_sizes.c                                |  135 ++
+ debug/memusage.c                                   |    8 +-
+ debug/sync_flush.c                                 |   20 +-
+ src/common/integer.h                               |   26 +-
+ src/common/sysdefs.h                               |   42 +-
+ src/liblzma/Makefile.am                            |   17 +-
+ src/liblzma/api/Makefile.am                        |    6 +-
+ src/liblzma/api/lzma.h                             |  161 ++-
+ src/liblzma/api/lzma/alignment.h                   |    6 +-
+ src/liblzma/api/lzma/alone.h                       |   52 -
+ src/liblzma/api/lzma/auto.h                        |   36 -
+ src/liblzma/api/lzma/base.h                        |   61 +-
+ src/liblzma/api/lzma/block.h                       |   38 +-
+ src/liblzma/api/lzma/check.h                       |   41 +-
+ src/liblzma/api/lzma/container.h                   |  252 ++++
+ src/liblzma/api/lzma/delta.h                       |   36 +-
+ src/liblzma/api/lzma/easy.h                        |  121 --
+ src/liblzma/api/lzma/filter.h                      |   74 +-
+ src/liblzma/api/lzma/index.h                       |   40 +-
+ src/liblzma/api/lzma/index_hash.h                  |   12 +-
+ src/liblzma/api/lzma/lzma.h                        |  222 ++--
+ src/liblzma/api/lzma/memlimit.h                    |   15 +-
+ src/liblzma/api/lzma/raw.h                         |   60 -
+ src/liblzma/api/lzma/simple.h                      |    2 +-
+ src/liblzma/api/lzma/stream.h                      |   53 -
+ src/liblzma/api/lzma/stream_flags.h                |   17 +-
+ src/liblzma/api/lzma/subblock.h                    |    4 +-
+ src/liblzma/api/lzma/version.h                     |   10 +-
+ src/liblzma/api/lzma/vli.h                         |  131 +-
+ src/liblzma/check/check.c                          |  128 +-
+ src/liblzma/check/check.h                          |   67 +-
+ src/liblzma/check/sha256.c                         |   29 +-
+ src/liblzma/common/Makefile.am                     |   51 +-
+ src/liblzma/common/alignment.c                     |    4 +-
+ src/liblzma/common/allocator.c                     |   58 -
+ src/liblzma/common/alone_decoder.c                 |   49 +-
+ src/liblzma/common/alone_decoder.h                 |    9 +-
+ src/liblzma/common/alone_encoder.c                 |   13 +-
+ src/liblzma/common/auto_decoder.c                  |   38 +-
+ src/liblzma/common/block_decoder.c                 |   67 +-
+ src/liblzma/common/block_decoder.h                 |    2 +-
+ src/liblzma/common/block_encoder.c                 |   42 +-
+ src/liblzma/common/block_encoder.h                 |    2 +-
+ src/liblzma/common/block_header_decoder.c          |    6 +-
+ src/liblzma/common/block_header_encoder.c          |    9 +-
+ src/liblzma/common/block_util.c                    |   10 +-
+ src/liblzma/common/{code.c => common.c}            |  129 +-
+ src/liblzma/common/common.h                        |  237 ++--
+ src/liblzma/common/easy.c                          |   18 +-
+ src/liblzma/common/features.c                      |   66 -
+ src/liblzma/common/filter_common.c                 |  262 ++++
+ src/liblzma/common/filter_common.h                 |   52 +
+ src/liblzma/common/filter_decoder.c                |  236 ++++
+ src/liblzma/common/filter_decoder.h                |   35 +
+ src/liblzma/common/filter_encoder.c                |  308 +++++
+ src/liblzma/common/filter_encoder.h                |   38 +
+ src/liblzma/common/filter_flags_decoder.c          |  185 +--
+ src/liblzma/common/filter_flags_encoder.c          |  261 +---
+ src/liblzma/common/index_decoder.c                 |   14 +-
+ src/liblzma/common/index_encoder.c                 |   16 +-
+ src/liblzma/common/index_hash.c                    |    8 +-
+ src/liblzma/common/init_encoder.c                  |    2 +-
+ src/liblzma/common/memory_usage.c                  |  112 --
+ src/liblzma/common/next_coder.c                    |   65 -
+ src/liblzma/common/raw_common.c                    |  127 --
+ src/liblzma/common/raw_decoder.c                   |  116 --
+ src/liblzma/common/raw_encoder.c                   |  111 --
+ src/liblzma/common/stream_common.c                 |   23 -
+ src/liblzma/common/stream_decoder.c                |  238 +++-
+ src/liblzma/common/stream_decoder.h                |    4 +-
+ src/liblzma/common/stream_encoder.c                |   35 +-
+ src/liblzma/common/stream_encoder.h                |    2 +-
+ ...{stream_flags_equal.c => stream_flags_common.c} |   14 +-
+ .../{stream_common.h => stream_flags_common.h}     |    8 +-
+ src/liblzma/common/stream_flags_decoder.c          |    2 +-
+ src/liblzma/common/stream_flags_encoder.c          |    2 +-
+ src/liblzma/common/vli_decoder.c                   |   29 +-
+ src/liblzma/common/vli_encoder.c                   |   23 +-
+ src/liblzma/common/{version.c => vli_size.c}       |   22 +-
+ src/liblzma/delta/Makefile.am                      |   34 +
+ src/liblzma/{common => delta}/delta_common.c       |    2 +-
+ src/liblzma/{common => delta}/delta_common.h       |    0
+ src/liblzma/{common => delta}/delta_decoder.c      |   21 +
+ src/liblzma/{common => delta}/delta_decoder.h      |    4 +
+ src/liblzma/{common => delta}/delta_encoder.c      |   21 +
+ src/liblzma/{common => delta}/delta_encoder.h      |    2 +
+ src/liblzma/lz/Makefile.am                         |   35 +-
+ src/liblzma/lz/bt2.c                               |   27 -
+ src/liblzma/lz/bt2.h                               |   31 -
+ src/liblzma/lz/bt3.c                               |   29 -
+ src/liblzma/lz/bt3.h                               |   31 -
+ src/liblzma/lz/bt4.c                               |   30 -
+ src/liblzma/lz/bt4.h                               |   31 -
+ src/liblzma/lz/hc3.c                               |   30 -
+ src/liblzma/lz/hc3.h                               |   31 -
+ src/liblzma/lz/hc4.c                               |   31 -
+ src/liblzma/lz/hc4.h                               |   31 -
+ src/liblzma/lz/lz_decoder.c                        |  547 +++-----
+ src/liblzma/lz/lz_decoder.h                        |  308 ++---
+ src/liblzma/lz/lz_encoder.c                        |  780 ++++++------
+ src/liblzma/lz/lz_encoder.h                        |  334 +++--
+ src/liblzma/lz/lz_encoder_hash.h                   |  104 ++
+ src/liblzma/lz/lz_encoder_mf.c                     |  780 ++++++++++++
+ src/liblzma/lz/match_c.h                           |  412 ------
+ src/liblzma/lz/match_h.h                           |   69 --
+ src/liblzma/lzma/Makefile.am                       |   37 +-
+ src/liblzma/lzma/fastpos.h                         |    8 +-
+ src/liblzma/lzma/lzma2_decoder.c                   |  318 +++++
+ src/liblzma/lzma/lzma2_decoder.h                   |   35 +
+ src/liblzma/lzma/lzma2_encoder.c                   |  406 ++++++
+ .../{common/raw_common.h => lzma/lzma2_encoder.h}  |   22 +-
+ src/liblzma/lzma/lzma_common.h                     |  208 +++-
+ src/liblzma/lzma/lzma_decoder.c                    | 1306 ++++++++++++--------
+ src/liblzma/lzma/lzma_decoder.h                    |   21 +-
+ src/liblzma/lzma/lzma_encoder.c                    |  576 +++++++--
+ src/liblzma/lzma/lzma_encoder.h                    |   38 +-
+ src/liblzma/lzma/lzma_encoder_features.c           |    2 +-
+ src/liblzma/lzma/lzma_encoder_getoptimum.c         |  925 --------------
+ src/liblzma/lzma/lzma_encoder_getoptimumfast.c     |  201 ---
+ src/liblzma/lzma/lzma_encoder_init.c               |  228 ----
+ src/liblzma/lzma/lzma_encoder_optimum_fast.c       |  193 +++
+ src/liblzma/lzma/lzma_encoder_optimum_normal.c     |  875 +++++++++++++
+ src/liblzma/lzma/lzma_encoder_presets.c            |   52 +-
+ src/liblzma/lzma/lzma_encoder_private.h            |  174 +--
+ src/liblzma/lzma/lzma_literal.c                    |   51 -
+ src/liblzma/lzma/lzma_literal.h                    |   71 --
+ src/liblzma/rangecoder/Makefile.am                 |   10 +-
+ src/liblzma/rangecoder/price.h                     |  111 ++
+ src/liblzma/rangecoder/price_table.c               |   84 +-
+ src/liblzma/rangecoder/price_table_init.c          |   33 +-
+ .../{price_table_gen.c => price_tablegen.c}        |   19 +-
+ src/liblzma/rangecoder/range_common.h              |   17 +-
+ src/liblzma/rangecoder/range_decoder.h             |  209 ++--
+ src/liblzma/rangecoder/range_encoder.h             |   92 +-
+ src/liblzma/simple/Makefile.am                     |   12 +
+ src/liblzma/simple/simple_coder.c                  |    8 +-
+ src/liblzma/simple/simple_decoder.c                |   47 +
+ .../raw_decoder.h => simple/simple_decoder.h}      |   18 +-
+ src/liblzma/simple/simple_encoder.c                |   45 +
+ .../raw_encoder.h => simple/simple_encoder.h}      |   17 +-
+ src/liblzma/subblock/Makefile.am                   |    4 +-
+ src/liblzma/subblock/subblock_decoder.c            |   20 +-
+ src/liblzma/subblock/subblock_decoder_helper.c     |    2 +-
+ src/liblzma/subblock/subblock_encoder.c            |   28 +-
+ src/lzma/args.c                                    |   35 +-
+ src/lzma/args.h                                    |    4 +-
+ src/lzma/options.c                                 |   14 +-
+ src/lzma/process.c                                 |   88 +-
+ src/lzmadec/lzmadec.c                              |  157 +--
+ tests/Makefile.am                                  |    1 +
+ tests/files/README                                 |  303 ++---
+ tests/files/bad-0-backward_size.lzma               |  Bin 0 -> 32 bytes
+ tests/files/bad-0-empty-truncated.lzma             |  Bin 0 -> 31 bytes
+ tests/files/bad-0-nonempty_index.lzma              |  Bin 0 -> 32 bytes
+ tests/files/bad-0cat-alone.lzma                    |  Bin 0 -> 55 bytes
+ tests/files/bad-0catpad-empty.lzma                 |  Bin 0 -> 69 bytes
+ tests/files/bad-0pad-empty.lzma                    |  Bin 0 -> 37 bytes
+ tests/files/bad-1-block_header-1.lzma              |  Bin 0 -> 64 bytes
+ tests/files/bad-1-block_header-2.lzma              |  Bin 0 -> 64 bytes
+ tests/files/bad-1-block_header-3.lzma              |  Bin 0 -> 68 bytes
+ tests/files/bad-1-block_header-4.lzma              |  Bin 0 -> 72 bytes
+ tests/files/bad-1-check-crc32.lzma                 |  Bin 0 -> 68 bytes
+ tests/files/bad-1-check-crc64.lzma                 |  Bin 0 -> 72 bytes
+ tests/files/bad-1-check-sha256.lzma                |  Bin 0 -> 96 bytes
+ tests/files/bad-1-lzma2-1.lzma                     |  Bin 0 -> 64 bytes
+ tests/files/bad-1-lzma2-2.lzma                     |  Bin 0 -> 424 bytes
+ tests/files/bad-1-lzma2-3.lzma                     |  Bin 0 -> 424 bytes
+ tests/files/bad-1-lzma2-4.lzma                     |  Bin 0 -> 408 bytes
+ tests/files/bad-1-lzma2-5.lzma                     |  Bin 0 -> 408 bytes
+ tests/files/bad-1-lzma2-6.lzma                     |  Bin 0 -> 68 bytes
+ tests/files/bad-1-lzma2-7.lzma                     |  Bin 0 -> 408 bytes
+ tests/files/bad-1-stream_flags-1.lzma              |  Bin 0 -> 68 bytes
+ tests/files/bad-1-stream_flags-2.lzma              |  Bin 0 -> 68 bytes
+ tests/files/bad-1-stream_flags-3.lzma              |  Bin 0 -> 68 bytes
+ tests/files/bad-1-vli-1.lzma                       |  Bin 0 -> 72 bytes
+ tests/files/bad-1-vli-2.lzma                       |  Bin 0 -> 72 bytes
+ tests/files/bad-2-compressed_data_padding.lzma     |  Bin 0 -> 92 bytes
+ tests/files/bad-2-index-1.lzma                     |  Bin 0 -> 92 bytes
+ tests/files/bad-2-index-2.lzma                     |  Bin 0 -> 92 bytes
+ tests/files/bad-2-index-3.lzma                     |  Bin 0 -> 92 bytes
+ tests/files/bad-2-index-4.lzma                     |  Bin 0 -> 92 bytes
+ tests/files/bad-cat-single-none-pad_garbage_1.lzma |  Bin 65 -> 0 bytes
+ tests/files/bad-cat-single-none-pad_garbage_2.lzma |  Bin 65 -> 0 bytes
+ tests/files/bad-cat-single-none-pad_garbage_3.lzma |  Bin 65 -> 0 bytes
+ tests/files/bad-multi-none-1.lzma                  |  Bin 54 -> 0 bytes
+ tests/files/bad-multi-none-2.lzma                  |  Bin 53 -> 0 bytes
+ tests/files/bad-multi-none-3.lzma                  |  Bin 53 -> 0 bytes
+ tests/files/bad-multi-none-block_1.lzma            |  Bin 66 -> 0 bytes
+ tests/files/bad-multi-none-block_2.lzma            |  Bin 66 -> 0 bytes
+ tests/files/bad-multi-none-block_3.lzma            |  Bin 58 -> 0 bytes
+ tests/files/bad-multi-none-extra_1.lzma            |  Bin 54 -> 0 bytes
+ tests/files/bad-multi-none-extra_2.lzma            |  Bin 54 -> 0 bytes
+ tests/files/bad-multi-none-extra_3.lzma            |  Bin 55 -> 0 bytes
+ tests/files/bad-multi-none-header_1.lzma           |  Bin 57 -> 0 bytes
+ tests/files/bad-multi-none-header_2.lzma           |  Bin 61 -> 0 bytes
+ tests/files/bad-multi-none-header_3.lzma           |  Bin 59 -> 0 bytes
+ tests/files/bad-multi-none-header_4.lzma           |  Bin 59 -> 0 bytes
+ tests/files/bad-multi-none-header_5.lzma           |  Bin 58 -> 0 bytes
+ tests/files/bad-multi-none-header_6.lzma           |  Bin 59 -> 0 bytes
+ tests/files/bad-multi-none-header_7.lzma           |  Bin 59 -> 0 bytes
+ tests/files/bad-multi-none-index_1.lzma            |  Bin 51 -> 0 bytes
+ tests/files/bad-multi-none-index_2.lzma            |  Bin 49 -> 0 bytes
+ tests/files/bad-multi-none-index_3.lzma            |  Bin 51 -> 0 bytes
+ tests/files/bad-multi-none-index_4.lzma            |  Bin 51 -> 0 bytes
+ tests/files/bad-single-data_after_eopm_1.lzma      |  Bin 55 -> 0 bytes
+ tests/files/bad-single-data_after_eopm_2.lzma      |  Bin 56 -> 0 bytes
+ tests/files/bad-single-lzma-flush_beginning.lzma   |  Bin 53 -> 0 bytes
+ tests/files/bad-single-lzma-flush_twice.lzma       |  Bin 63 -> 0 bytes
+ tests/files/bad-single-none-empty.lzma             |  Bin 19 -> 0 bytes
+ .../files/bad-single-none-footer_filter_flags.lzma |  Bin 30 -> 0 bytes
+ tests/files/bad-single-none-too_long_vli.lzma      |  Bin 39 -> 0 bytes
+ tests/files/bad-single-none-truncated.lzma         |  Bin 29 -> 0 bytes
+ tests/files/bad-single-subblock-padding_loop.lzma  |  Bin 43 -> 0 bytes
+ tests/files/bad-single-subblock1023-slow.lzma      |  Bin 7886 -> 0 bytes
+ tests/files/bad-single-subblock_subblock.lzma      |  Bin 26 -> 0 bytes
+ tests/files/good-0-empty.lzma                      |  Bin 0 -> 32 bytes
+ tests/files/good-0cat-empty.lzma                   |  Bin 0 -> 64 bytes
+ tests/files/good-0catpad-empty.lzma                |  Bin 0 -> 68 bytes
+ tests/files/good-0pad-empty.lzma                   |  Bin 0 -> 36 bytes
+ tests/files/good-1-3delta-lzma2.lzma               |  Bin 0 -> 528 bytes
+ tests/files/good-1-block_header-1.lzma             |  Bin 0 -> 72 bytes
+ tests/files/good-1-block_header-2.lzma             |  Bin 0 -> 68 bytes
+ tests/files/good-1-block_header-3.lzma             |  Bin 0 -> 68 bytes
+ tests/files/good-1-check-crc32.lzma                |  Bin 0 -> 68 bytes
+ tests/files/good-1-check-crc64.lzma                |  Bin 0 -> 72 bytes
+ tests/files/good-1-check-none.lzma                 |  Bin 0 -> 64 bytes
+ tests/files/good-1-check-sha256.lzma               |  Bin 0 -> 96 bytes
+ tests/files/good-1-delta-lzma2.tiff.lzma           |  Bin 0 -> 51312 bytes
+ tests/files/good-1-lzma2-1.lzma                    |  Bin 0 -> 424 bytes
+ tests/files/good-1-lzma2-2.lzma                    |  Bin 0 -> 424 bytes
+ tests/files/good-1-lzma2-3.lzma                    |  Bin 0 -> 408 bytes
+ ...gle-sparc-lzma.lzma => good-1-sparc-lzma2.lzma} |  Bin 2263 -> 2292 bytes
+ ...-single-x86-lzma.lzma => good-1-x86-lzma2.lzma} |  Bin 1909 -> 1936 bytes
+ tests/files/good-2-lzma2.lzma                      |  Bin 0 -> 92 bytes
+ tests/files/good-cat-single-none-pad.lzma          |  Bin 64 -> 0 bytes
+ tests/files/good-multi-none-1.lzma                 |  Bin 75 -> 0 bytes
+ tests/files/good-multi-none-2.lzma                 |  Bin 53 -> 0 bytes
+ tests/files/good-multi-none-block_1.lzma           |  Bin 66 -> 0 bytes
+ tests/files/good-multi-none-block_2.lzma           |  Bin 58 -> 0 bytes
+ tests/files/good-multi-none-extra_1.lzma           |  Bin 51 -> 0 bytes
+ tests/files/good-multi-none-extra_2.lzma           |  Bin 79 -> 0 bytes
+ tests/files/good-multi-none-extra_3.lzma           |  Bin 55 -> 0 bytes
+ tests/files/good-multi-none-header_1.lzma          |  Bin 58 -> 0 bytes
+ tests/files/good-multi-none-header_2.lzma          |  Bin 66 -> 0 bytes
+ tests/files/good-multi-none-header_3.lzma          |  Bin 59 -> 0 bytes
+ tests/files/good-single-delta-lzma.tiff.lzma       |  Bin 51409 -> 0 bytes
+ tests/files/good-single-lzma-empty.lzma            |  Bin 21 -> 0 bytes
+ tests/files/good-single-lzma-flush_1.lzma          |  Bin 48 -> 0 bytes
+ tests/files/good-single-lzma-flush_2.lzma          |  Bin 63 -> 0 bytes
+ tests/files/good-single-lzma.lzma                  |  Bin 44 -> 0 bytes
+ tests/files/good-single-none-empty_1.lzma          |  Bin 18 -> 0 bytes
+ tests/files/good-single-none-empty_2.lzma          |  Bin 26 -> 0 bytes
+ tests/files/good-single-none-empty_3.lzma          |  Bin 19 -> 0 bytes
+ tests/files/good-single-none-pad.lzma              |  Bin 32 -> 0 bytes
+ tests/files/good-single-none.lzma                  |  Bin 30 -> 0 bytes
+ tests/files/good-single-subblock-lzma.lzma         |  Bin 50 -> 0 bytes
+ tests/files/good-single-subblock_implicit.lzma     |  Bin 35 -> 0 bytes
+ tests/files/good-single-subblock_rle.lzma          |  Bin 118 -> 0 bytes
+ tests/files/malicious-multi-metadata-64PiB.lzma    |  Bin 51 -> 0 bytes
+ tests/files/malicious-single-subblock-256MiB.lzma  |  Bin 30 -> 0 bytes
+ tests/files/malicious-single-subblock-64PiB.lzma   |  Bin 45 -> 0 bytes
+ tests/files/malicious-single-subblock31-slow.lzma  |  Bin 1233 -> 0 bytes
+ tests/files/unsupported-block_header.lzma          |  Bin 0 -> 68 bytes
+ tests/files/unsupported-check.lzma                 |  Bin 0 -> 68 bytes
+ tests/files/unsupported-filter_flags-1.lzma        |  Bin 0 -> 68 bytes
+ tests/files/unsupported-filter_flags-2.lzma        |  Bin 0 -> 68 bytes
+ tests/files/unsupported-filter_flags-3.lzma        |  Bin 0 -> 68 bytes
+ tests/test_block_header.c                          |   28 +-
+ tests/test_compress.sh                             |    4 +-
+ tests/test_filter_flags.c                          |   51 +-
+ tests/test_stream_flags.c                          |    4 +-
+ tests/tests.h                                      |    8 +
+ 277 files changed, 9050 insertions(+), 7477 deletions(-)
+
+commit 57b9a145a527f0716822615e5ed536d33aebd3fc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+)
+
+commit eaafc4367c77ec1d910e16d11b4da293969d97a3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-06-20 16:19:54 +0300
+
+    Remove some redundant code from LZMA encoder.
+
+ src/liblzma/lzma/lzma_encoder.c | 15 +--------------
+ 1 file changed, 1 insertion(+), 14 deletions(-)
+
+commit 0809c46534fa5664fe35d9e98d95e87312ed130e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-06-18 21:45:19 +0300
+
+    Comments
+
+ src/liblzma/lzma/lzma_encoder.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+commit 6368a2fa5901c75864be5171dd57a50af7adbb41
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 30 deletions(-)
+
+commit 7d17818cec8597f847b0a2537fde991bbc3d9e96
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 +-
+ .../check/check_byteswap.h => common/bswap.h}      |  15 +-
+ src/common/integer.h                               | 167 +++++
+ src/liblzma/api/Makefile.am                        |   5 +-
+ src/liblzma/api/lzma.h                             |   9 +-
+ src/liblzma/api/lzma/alone.h                       |  32 +-
+ src/liblzma/api/lzma/auto.h                        |   7 +-
+ src/liblzma/api/lzma/base.h                        |  15 +
+ src/liblzma/api/lzma/block.h                       | 306 +++-----
+ src/liblzma/api/lzma/check.h                       |  18 +-
+ src/liblzma/api/lzma/copy.h                        |  29 -
+ src/liblzma/api/lzma/easy.h                        |  61 +-
+ src/liblzma/api/lzma/extra.h                       | 114 ---
+ src/liblzma/api/lzma/filter.h                      |   5 +-
+ src/liblzma/api/lzma/index.h                       | 204 +++++-
+ src/liblzma/api/lzma/index_hash.h                  |  94 +++
+ src/liblzma/api/lzma/info.h                        | 315 --------
+ src/liblzma/api/lzma/lzma.h                        |   2 +-
+ src/liblzma/api/lzma/metadata.h                    | 100 ---
+ src/liblzma/api/lzma/raw.h                         |  20 +-
+ src/liblzma/api/lzma/stream.h                      | 157 +---
+ src/liblzma/api/lzma/stream_flags.h                | 146 ++--
+ src/liblzma/api/lzma/version.h                     |   2 +-
+ src/liblzma/api/lzma/vli.h                         |  83 +--
+ src/liblzma/check/Makefile.am                      |   1 -
+ src/liblzma/check/check.c                          |  55 +-
+ src/liblzma/check/check.h                          |  47 +-
+ src/liblzma/check/crc32_init.c                     |   2 +-
+ src/liblzma/check/crc64_init.c                     |   2 +-
+ src/liblzma/check/crc_macros.h                     |   2 +-
+ src/liblzma/check/sha256.c                         |  53 +-
+ src/liblzma/common/Makefile.am                     |  31 +-
+ src/liblzma/common/alignment.c                     |   5 +-
+ src/liblzma/common/alone_decoder.c                 |  77 +-
+ src/liblzma/common/alone_encoder.c                 |  99 ++-
+ src/liblzma/common/auto_decoder.c                  |  18 +-
+ src/liblzma/common/block_decoder.c                 | 298 ++------
+ src/liblzma/common/block_encoder.c                 | 228 ++----
+ src/liblzma/common/block_header_decoder.c          | 400 ++--------
+ src/liblzma/common/block_header_encoder.c          | 207 ++----
+ src/liblzma/common/block_private.h                 |  51 +-
+ src/liblzma/common/block_util.c                    |  73 ++
+ src/liblzma/common/common.h                        |  44 +-
+ src/liblzma/common/copy_coder.c                    | 144 ----
+ src/liblzma/common/copy_coder.h                    |  31 -
+ src/liblzma/common/delta_common.c                  |   4 -
+ src/liblzma/common/delta_common.h                  |   4 -
+ src/liblzma/common/delta_decoder.c                 |  55 +-
+ src/liblzma/common/delta_encoder.c                 |   7 +-
+ src/liblzma/common/{easy_multi.c => easy.c}        |  87 ++-
+ src/liblzma/common/easy_common.c                   |  54 --
+ src/liblzma/common/extra.c                         |  34 -
+ src/liblzma/common/features.c                      |   4 -
+ src/liblzma/common/filter_flags_decoder.c          | 384 +++-------
+ src/liblzma/common/filter_flags_encoder.c          | 120 +--
+ src/liblzma/common/index.c                         | 773 ++++++++++++++++---
+ src/liblzma/common/index.h                         |  67 ++
+ src/liblzma/common/index_decoder.c                 | 252 +++++++
+ src/liblzma/common/index_encoder.c                 | 222 ++++++
+ .../{stream_encoder_multi.h => index_encoder.h}    |  18 +-
+ src/liblzma/common/index_hash.c                    | 340 +++++++++
+ src/liblzma/common/info.c                          | 814 ---------------------
+ src/liblzma/common/memory_usage.c                  |   1 -
+ src/liblzma/common/metadata_decoder.c              | 578 ---------------
+ src/liblzma/common/metadata_decoder.h              |  31 -
+ src/liblzma/common/metadata_encoder.c              | 435 -----------
+ src/liblzma/common/raw_common.c                    | 178 ++---
+ src/liblzma/common/raw_common.h                    |   5 +-
+ src/liblzma/common/raw_decoder.c                   |  19 +-
+ src/liblzma/common/raw_decoder.h                   |   3 +-
+ src/liblzma/common/raw_encoder.c                   | 101 +--
+ src/liblzma/common/raw_encoder.h                   |   3 +-
+ src/liblzma/common/stream_common.h                 |   3 +
+ src/liblzma/common/stream_decoder.c                | 458 ++++--------
+ .../common/{easy_common.h => stream_decoder.h}     |  14 +-
+ src/liblzma/common/stream_encoder.c                | 282 +++++++
+ .../{metadata_encoder.h => stream_encoder.h}       |  14 +-
+ src/liblzma/common/stream_encoder_multi.c          | 445 -----------
+ src/liblzma/common/stream_encoder_single.c         | 219 ------
+ src/liblzma/common/stream_flags_decoder.c          | 260 ++-----
+ src/liblzma/common/stream_flags_encoder.c          |  56 +-
+ .../common/{easy_single.c => stream_flags_equal.c} |  27 +-
+ src/liblzma/common/vli_decoder.c                   |  68 +-
+ src/liblzma/common/vli_encoder.c                   |  59 +-
+ src/liblzma/common/vli_reverse_decoder.c           |  55 --
+ src/liblzma/lz/lz_decoder.c                        |   6 +-
+ src/liblzma/lz/lz_decoder.h                        |  10 +-
+ src/liblzma/lzma/lzma_decoder.c                    |  13 +-
+ src/liblzma/lzma/lzma_decoder.h                    |  10 +-
+ src/liblzma/simple/simple_coder.c                  |  29 +-
+ src/liblzma/simple/simple_private.h                |   4 -
+ src/liblzma/subblock/subblock_decoder.c            | 106 +--
+ src/liblzma/subblock/subblock_decoder_helper.c     |   5 +-
+ src/liblzma/subblock/subblock_encoder.c            |   8 +-
+ src/lzma/args.c                                    |  22 +-
+ src/lzma/args.h                                    |   2 -
+ src/lzma/error.c                                   |   6 +
+ src/lzma/process.c                                 |  26 +-
+ src/lzmadec/lzmadec.c                              |   8 +-
+ tests/Makefile.am                                  |   5 +-
+ tests/test_block_header.c                          | 411 ++++-------
+ tests/test_compress.sh                             |  65 +-
+ tests/test_filter_flags.c                          | 116 ++-
+ tests/test_index.c                                 | 504 ++++++++++++-
+ tests/test_info.c                                  | 717 ------------------
+ tests/test_stream_flags.c                          | 134 ++--
+ tests/tests.h                                      |  14 +-
+ 109 files changed, 4655 insertions(+), 7965 deletions(-)
+
+commit bf6348d1a3ff09fdc06940468f318f75ffa6af11
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 508 insertions(+), 1286 deletions(-)
+
+commit 803194ddd26f01ff60ba4e9924c6087a56b29827
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+)
+
+commit 0ea98e52ba87453497b1355c51f13bad55c8924a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 369f72fd656f537a9a8e06f13e6d0d4c242be22f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 12 insertions(+), 12 deletions(-)
+
+commit 11de5d5267f7a0a7f0a4d34eec147e65eaf9f9cf
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-05-06 13:41:05 +0300
+
+    Typo fix
+
+ src/liblzma/api/lzma/init.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 944b62b93239b27b338d117f2668c0e95849659b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 14 insertions(+), 1 deletion(-)
+
+commit 8e074349e47ea6832b8fdf9244e581d453733433
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 9 insertions(+)
+
+commit 2f361ac19b7fd3abcd362de4d470e6a9eb495b73
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-04-28 17:08:27 +0300
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 3be21fb12f4cec2cf07799e8960382f4cb375369
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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_limitter.c => memory_limiter.c} |  2 +-
+ src/lzma/list.c                                            |  6 +++---
+ src/lzmadec/lzmadec.c                                      | 12 ++++++------
+ tests/test_memlimit.c                                      |  4 ++--
+ 9 files changed, 29 insertions(+), 29 deletions(-)
+
+commit beeb81060821dfec4e7898e0d44b7900dcb2215e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 7 insertions(+), 2 deletions(-)
+
+commit c324325f9f13cdeb92153c5d00962341ba070ca2
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 deletion(-)
+
+commit 8f804c29aa8471ccd6438ddca254092b8869ca52
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+)
+
+commit 22ba3b0b5043fa481903482ce85015fe775939e5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-04-24 20:23:05 +0300
+
+    Make unlzma and lzcat symlinks.
+
+ src/lzma/Makefile.am | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+commit 17c36422d4cbc2c70d5c83ec389406f92cd9e85e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-04-24 20:20:27 +0300
+
+    Fixed a bug in command line option parsing.
+
+ src/lzma/options.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 283f939974c32c47f05d495e8dea455ec646ed64
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-04-24 20:19:20 +0300
+
+    Added two assert()s.
+
+ src/liblzma/lzma/lzma_encoder.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit eb348a60b6e19a7c093f892434f23c4756973ffd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 19 insertions(+), 6 deletions(-)
+
+commit 6c5306e312bcfd254cf654f88c04e34ba786df3d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+), 1 deletion(-)
+
+commit 7ab493924e0ed590a5121a15ee54038d238880d3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 641998c3e1ecc8b598fe0eb051fab8b9535c291b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 37 insertions(+), 15 deletions(-)
+
+commit 03e0e8a0d7228b6ff1f0af39e2c040a4e425973d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 7521bbdc83acab834594a22bec50c8e1bd836298
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 63b74d000eedaebb8485f623e56864ff5ab71064
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+)
+
+commit 7d516f5129e4373a6d57249d7f608c634c66bf12
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-03-14 21:32:37 +0200
+
+    Fix a comment API header.
+
+ src/liblzma/api/lzma/lzma.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 748d6e4274921a350bd0a317380309717441ef9c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit bfde3b24a5ae25ce53c854762b6148952386b025
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-03-11 15:35:34 +0200
+
+    Apply a minor speed optimization to LZMA decoder.
+
+ src/liblzma/lzma/lzma_decoder.c | 85 +++++++++++++++++++++--------------------
+ 1 file changed, 43 insertions(+), 42 deletions(-)
+
+commit f310c50286d9e4e9c6170bb65348c9bb430a65b4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+)
+
+commit 5ead36cf7f823093672a4e43c3180b38c9abbaff
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-03-10 15:57:55 +0200
+
+    Really fix the price count initialization.
+
+ src/liblzma/lzma/lzma_encoder_init.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit d4d7feb83d1a1ded8f662a82e21e053841ca726c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-03-10 13:47:17 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 0541c5ea63ef3c0ff85eeddb0a420e56b0c65258
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+)
+
+commit 596fa1fac72823e4ef5bc26bb53f9090445bf748
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 6 insertions(+), 5 deletions(-)
+
+commit 45e43e169527e7a98a8c8a821d37bf25822b764d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+), 3 deletions(-)
+
+commit c0e19e0662205f81a86da8903cdc325d50635870
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+), 19 deletions(-)
+
+commit de7485806284d1614095ae8cb2ebbb5d74c9ac45
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-02-06 13:25:32 +0200
+
+    Tiny clean up to file-format.txt.
+
+ doc/file-format.txt | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 1a3b21859818e4d8e89a1da99699233c1bfd197d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+), 4 deletions(-)
+
+commit 7e796e312bf644ea95aea0ff85480f47cfa30fc0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 73 insertions(+), 17 deletions(-)
+
+commit 7dd48578a3853e0cfab9f1830bc30927173ec4bc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-02-01 08:32:05 +0200
+
+    Avoid unneeded function call in raw_common.c.
+
+ src/liblzma/common/raw_common.c | 20 +++++++++++---------
+ 1 file changed, 11 insertions(+), 9 deletions(-)
+
+commit b596fac963c3ff96f615d4d9b427a213ec341211
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-26 21:42:38 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit e9f6e9c075ad93141a568d94f7d4eb0f2edbd6c2
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 4c7ad179c78f97f68ad548cb40a9dfa6871655ae
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 174 insertions(+)
+
+commit 288b232f54c3692cd36f471d4042f51daf3ea79f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit c467b0defccf233d0c79234407bc38d7d09574d3
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit f9842f712732c482f2def9f24437851e57dd83f8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit e988ea1d1a286dd0f27af0657f9665d5cd8573aa
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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(+)
+
+commit 7b8fc7e6b501a32a36636dac79ecb57099269005
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-01-25 13:55:52 +0200
+
+    Use more parenthesis in succeed() macro in tests/tests.h.
+
+ tests/tests.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 1fd76d488179580d37f31ee11948f4932aed31fd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 6e27b1098a28f4ce09bfa6df68ad94182dfc2936
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit db9df0a9609c01a00a227329fb96e983971040f5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+), 1 deletion(-)
+
+commit 765f0b05f6e95ed9194fb90819cee189ebbac36b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 7 insertions(+), 6 deletions(-)
+
+commit 3a7cc5c3dec7b078941f961b0393b86c418883b6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 12 insertions(+), 1 deletion(-)
+
+commit e5fdec93e273855c1bcc2579b83cfb481a9a1492
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+), 1 deletion(-)
+
+commit ed40dc5a2c28a8dfccab8c165b3780738eeef93e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 deletion(-)
+
+commit ae0cd09a666a1682da8fc09487322227679e218d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 5 insertions(+), 1 deletion(-)
+
+commit 0e80ded13dfceb98f9494cbb5381a95eb44d03db
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 +++++
+ tests/files/bad-single-none-footer_filter_flags.lzma | Bin 0 -> 30 bytes
+ tests/files/bad-single-none-too_long_vli.lzma        | Bin 0 -> 39 bytes
+ 3 files changed, 5 insertions(+)
+
+commit 8c8eb14055d8dd536b1b1c58fb284d34bb8ed1dd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-23 13:42:35 +0200
+
+    Fixed a typo.
+
+ src/liblzma/subblock/subblock_decoder_helper.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 980f65a9a10160c4d105767871e3002b9aaba3e0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-23 13:40:45 +0200
+
+    Fix a memory leak in the Subblock encoder.
+
+ src/liblzma/subblock/subblock_encoder.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 99e12af4e2b866c011fe0106cd1e0bfdcc8fe9c6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-01-23 13:15:55 +0200
+
+    Fix a memory leak in metadata_decoder.c.
+
+ src/liblzma/common/metadata_decoder.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 4d8cdbdab44400fd98f0f18a0f701e27cd1acdae
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+), 1 deletion(-)
+
+commit 67321de963ccf69410b3868b8e31534fe18a90de
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 8 insertions(+), 16 deletions(-)
+
+commit 863028cb7ad6d8d0455fa69348f56b376d7b908f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-23 00:18:32 +0200
+
+    Fixed a dangling pointer that caused invalid free().
+
+ src/liblzma/common/info.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit cf49f42a6bd40143f54a6b10d6e605599e958c0b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 0ed6f1adcea540fb9593ca115d36de537f7f0dc6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-01-20 20:15:21 +0200
+
+    Updated debug/sync_flush.c.
+
+ debug/sync_flush.c | 26 ++++++++++++++++++++++++--
+ 1 file changed, 24 insertions(+), 2 deletions(-)
+
+commit d53e9b77054cfade6a643e77d085273a348b189c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 107259e306bcfc2336a0fb870fb58034c28faa52
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 119 insertions(+), 51 deletions(-)
+
+commit e141fe18950400faaa3503ff88ac20eacd73e88c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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_common.c                  |  70 ++++++++
+ src/liblzma/common/delta_common.h                  |  48 ++++++
+ src/liblzma/common/delta_decoder.c                 | 102 +++++++++++
+ .../common/{delta_coder.h => delta_decoder.h}      |  11 +-
+ src/liblzma/common/delta_encoder.c                 |  97 +++++++++++
+ src/liblzma/common/delta_encoder.h                 |  28 +++
+ src/liblzma/common/raw_decoder.c                   |   2 +-
+ src/liblzma/common/raw_encoder.c                   |   2 +-
+ 10 files changed, 363 insertions(+), 200 deletions(-)
+
+commit 61dc82f3e306b25ce3cd3d529df9ec7a0ec04b73
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 0ae3208db94585eb8294b97ded387de0a3a07646
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit ab5feaf1fcc146ef9fd39360c53c290bec39524e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 deletion(-)
+
+commit 61d1784d8f1761d979a6da6e223e279ca33815e6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 9 insertions(+)
+
+commit c9cba976913e55ff9aac8a8133cc94416c7c1c9c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 139 insertions(+), 133 deletions(-)
+
+commit b254bd97b1cdb68d127523d91ca9e054ed89c4fd
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 8f5794c8f1a30e8e3b524b415bbe81af2e04c64a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-17 17:27:45 +0200
+
+    Added --delta to the output of "lzma --help".
+
+ src/lzma/help.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit f88590e0014b38d40465937c19f25f05f16c79ae
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 6 insertions(+)
+
+commit bc0b945ca376e333077644d2f7fd54c2848aab8a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-16 16:33:37 +0200
+
+    Tiny non-technical edits to file-format.txt.
+
+ doc/file-format.txt | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 7599bb7064ccf007f054595dedda7927af868252
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-16 14:48:04 +0200
+
+    Plugged a memory leak in stream_decoder.c.
+
+ src/liblzma/common/stream_decoder.c | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+commit 0b581539311f3712946e81e747839f8fb5f441a7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-16 14:47:27 +0200
+
+    Added memory leak detection to lzmadec.c.
+
+ src/lzmadec/lzmadec.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 5b5b13c7bb8fde6331064d21f3ebde41072480c4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 19389f2b82ec54fd4c847a18f16482e7be4c9887
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-16 14:31:44 +0200
+
+    Added ARRAY_SIZE(array) macro.
+
+ src/common/sysdefs.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 9bc33a54cbf83952130adbcb1be32c6882485416
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 01d71d60b79027e1ce3eb9c79ae5191e1407c883
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 7 insertions(+)
+
+commit 8235e6e5b2878f76633afcda9a334640db503ef5
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-15 16:25:38 +0200
+
+    Fix memory leaks from test_block_header.c.
+
+ tests/test_block_header.c | 19 +++++++++++++++++--
+ 1 file changed, 17 insertions(+), 2 deletions(-)
+
+commit f10fc6a69d40b6d5c9cfbf8d3746f49869c2e2f6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 19 insertions(+), 21 deletions(-)
+
+commit e5728142a2048979f5c0c2149ce71ae952a092e1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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(+)
+
+commit f3c88e8b8d8dd57f4bba5f0921eebf276437c244
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-15 13:29:14 +0200
+
+    Fixed assembler detection in configure.ac, and added
+    detection for x86_64.
+
+ configure.ac | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+commit 54ec204f58287f50d3976288295da4188a19192b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 01b4b19f49f00e17a0f9cb8754c672ac0847b6e1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 insertions(+), 6 deletions(-)
+
+commit 19bd7f3cf25e4ff8487ef7098ca4a7b58681961d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-15 08:37:42 +0200
+
+    Fix a typo in lzma_encoder.c.
+
+ src/liblzma/lzma/lzma_encoder.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 9f9b1983013048f2142e8bc7e240149d2687bedc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-01-15 07:41:39 +0200
+
+    Fix typo in test_index.c.
+
+ tests/test_index.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit d13d693155c176fc9e9ad5c50d48ccba27c2d9c6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 +++++++++++++++++
+ .../{range_encoder.c => price_table_init.c}        |  6 +-
+ src/liblzma/rangecoder/range_common.h              |  4 +-
+ src/liblzma/rangecoder/range_encoder.h             | 21 ++++---
+ 7 files changed, 153 insertions(+), 17 deletions(-)
+
+commit 362dc3843b373c1007a50a4719f378981f18ae03
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+), 2 deletions(-)
+
+commit e22b37968d153683fec61ad37b6b160cb7ca4ddc
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+)
+
+commit 9547e734a00ddb64c851fa3f116e4f9e7d763ea7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 2 deletions(-)
+
+commit 3e09e1c05871f3757f759b801890ccccc9286608
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+), 3 deletions(-)
+
+commit a670fec8021e5962429689c194148a04c3418872
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 30 insertions(+), 22 deletions(-)
+
+commit f73c2ab6079ed5675a42b39d584a567befbd4624
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 4 insertions(+), 1 deletion(-)
+
+commit 0e70fbe4032351aab13a1cd8e5deced105c0b276
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 379fbbe84d922c7cc00afa65c6f0c095da596b19
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 7 insertions(+), 16 deletions(-)
+
+commit 97d5fa82077e57815dfad995dc393c2809a78539
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-08 23:10:57 +0200
+
+    Updated tests/files/README.
+
+ tests/files/README | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+commit 3bb9bb310936cba6a743b4f06739a397dec7c28f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit 7054c5f5888ac6a7178cd43dc9583ce6c7e78c9f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 14 insertions(+), 23 deletions(-)
+
+commit 753e4d95cd1cf29c632dfe1a670af7c67aeffbf4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(+)
+
+commit faeac7b7aca75f86afed1e7cc06279d9d497c627
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit a751126dbb656767ed4666cf0e5d3e17349d93d1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 9080267603b1006c4867c823307dca9df8be0d20
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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
+ ...eopm.lzma => bad-single-data_after_eopm_1.lzma} | Bin
+ tests/files/bad-single-none-truncated.lzma         | Bin 0 -> 29 bytes
+ 6 files changed, 18 insertions(+), 3 deletions(-)
+
+commit b4943ccf73b64fc93a90a23474509c316f55eb2b
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+), 1 deletion(-)
+
+commit e2417b2b9134f3f65e14b61e23cd3644d8954353
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-01-07 23:25:32 +0200
+
+    Updated fi.po although it's currently pretty much crap.
+
+ po/fi.po | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+commit c7189d981a1b27c63da0c1ee80d9b5cd8ce1733d
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 3dbbea82b74bb841c995ad332a3aeca613015e10
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 2fd2d181543feab1b4003f3ac6e85625fbee04f0
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-07 18:22:24 +0200
+
+    Cosmetic edit to test_files.sh.
+
+ tests/test_files.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 9a71d573100a990ceb30ce0bec6a9a15d795605f
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-07 18:09:44 +0200
+
+    Added tests/files/README.
+
+ tests/files/README | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 108 insertions(+)
+
+commit 47f48fe9936ed72617a60fbd015df7e0e47a1e43
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-07 14:20:57 +0200
+
+    Tell in COPYING that everything in tests/files is
+    public domain.
+
+ COPYING | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 3502b3e1d00251d3c8dda96079440705c28d8225
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-07 14:19:05 +0200
+
+    Cleaned up the tests/files directory.
+
+ ...ck-loop.lzma => bad-single-subblock-padding_loop.lzma} | Bin
+ ...ck1023-slow.lzma => bad-single-subblock1023-slow.lzma} | Bin
+ tests/files/malicious-single-subblock-lzma.lzma           | Bin 505 -> 0 bytes
+ 3 files changed, 0 insertions(+), 0 deletions(-)
+
+commit 908b2ac604b9940369d7fe8a45e9eb6da5d2a24c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 deletion(-)
+
+commit ecb2a6548f5978022a8fa931719dc575f5fd3bf6
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-07 11:23:13 +0200
+
+    Updated README regarding the assembler optimizations.
+
+ README | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+commit eacb8050438d3e6146c86eb9732d3fb1ef1825cb
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-07 10:58:00 +0200
+
+    Updated THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 1239649f96132b18e3b7e2dd152ecf53a195caa8
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-06 21:47:17 +0200
+
+    Cosmetic changes to configure.ac.
+
+ configure.ac | 14 ++++++--------
+ 1 file changed, 6 insertions(+), 8 deletions(-)
+
+commit 88ee301ec2e4506a30ec7ac9aaa2288e2dcadd0e
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 15 insertions(+), 2 deletions(-)
+
+commit c15a7abf66e3a70792f7444115e484c7981c8284
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2008-01-05 19:57:00 +0200
+
+    Fix typo in comment (INT64_MAX -> UINT64_MAX).
+
+ src/liblzma/api/lzma/vli.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 072927905a3b66281c6311b4b351caa501d8b73a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-05 19:42:04 +0200
+
+    Rearranged testing of GCC-specific flags.
+
+ configure.ac | 33 +++++++++++++++++++++++----------
+ 1 file changed, 23 insertions(+), 10 deletions(-)
+
+commit d160ee32598c6d1cd9054ef019e8c9331208b188
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-05 01:20:24 +0200
+
+    Another bug fix for flush marker detection.
+
+ src/liblzma/lzma/lzma_decoder.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+commit fc67f79f607cbfa78c6f47a69dec098d8659b162
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2008-01-04 21:37:01 +0200
+
+    Fix stupid bugs in flush marker detection.
+
+ src/liblzma/lzma/lzma_decoder.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+commit 0029cbbabe87d491fc046a55a629a6d556010baa
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+Date:   2007-12-14 11:15:21 +0200
+
+    Added a note to README that --disable-assembler
+    must be used on Darwin.
+
+ README | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 44b333d4615b5aabc557a0e1b6bb0096da3fae24
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 => crc32_x86.S} | 0
+ src/liblzma/check/{crc64_x86.s => crc64_x86.S} | 0
+ 3 files changed, 2 insertions(+), 2 deletions(-)
+
+commit ec1c82b2e82f395f6e8e19ac212a639644330cd7
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2007-12-14 09:59:05 +0200
+
+    Fixed wrong symbol name in crc64_x86.s.
+
+ src/liblzma/check/crc64_x86.s | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 2881570df6803eed2fe550af34574e8e61794804
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 918bcb0e0728d2d976621e9f35b56f224f11d989
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2007-12-11 17:08:04 +0200
+
+    Removed uncompressed size tracking from Delta encoder too.
+
+ src/liblzma/common/delta_coder.c | 21 +++------------------
+ 1 file changed, 3 insertions(+), 18 deletions(-)
+
+commit 3e16d51dd645667b05ff826665b1fc353aa41cd9
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 7c1ad41eb611ed89e5bb8792a3beb533b7aa59f4
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ce64df716243fdc40359090d1f6541f3a4f5f21a
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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 file changed, 57 insertions(+), 35 deletions(-)
+
+commit 329c272d501e88793dda5540358d55c12428d194
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <meyering at redhat.com>
+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 insertion(+), 2 deletions(-)
+
+commit 07ac881779a8477f2c1ab112b91a129e24aa743c
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 <lasse.collin at tukaani.org>
+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
+ tests/files/malicious-single-subblock1023-slow.lzma | Bin 0 -> 7886 bytes
+ tests/files/malicious-single-subblock31-slow.lzma   | Bin 0 -> 1233 bytes
+ 17 files changed, 0 insertions(+), 0 deletions(-)
+
+commit ff946ceb7975d4f11950afd33f6315b4d20d1a03
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 2bf36d22d2c24ac3f488e63b35564fa2f6dab8d1
+Author: Lasse Collin <lasse.collin at tukaani.org>
+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(-)
+
+commit 5d018dc03549c1ee4958364712fb0c94e1bf2741
+Author: Lasse Collin <lasse.collin at tukaani.org>
+Date:   2007-12-09 00:42:33 +0200
+
+    Imported to git.
+
+ AUTHORS                                        |   18 +
+ COPYING                                        |   24 +
+ COPYING.GPLv2                                  |  339 +++++
+ COPYING.GPLv3                                  |  674 +++++++++
+ COPYING.LGPLv2.1                               |  504 +++++++
+ ChangeLog                                      |    2 +
+ Doxyfile.in                                    | 1229 ++++++++++++++++
+ Makefile.am                                    |   38 +
+ NEWS                                           |    0
+ README                                         |  151 ++
+ THANKS                                         |   23 +
+ TODO                                           |  109 ++
+ autogen.sh                                     |   38 +
+ configure.ac                                   |  611 ++++++++
+ doc/bugs.txt                                   |   46 +
+ doc/faq.txt                                    |  247 ++++
+ doc/file-format.txt                            | 1861 ++++++++++++++++++++++++
+ doc/history.txt                                |  140 ++
+ doc/liblzma-advanced.txt                       |  324 +++++
+ doc/liblzma-hacking.txt                        |  112 ++
+ doc/liblzma-intro.txt                          |  188 +++
+ doc/liblzma-security.txt                       |  219 +++
+ doc/lzma-intro.txt                             |  107 ++
+ extra/scanlzma/scanlzma.c                      |   85 ++
+ lib/Makefile.am                                |   40 +
+ lib/getopt.c                                   | 1191 +++++++++++++++
+ lib/getopt1.c                                  |  171 +++
+ lib/getopt_.h                                  |  226 +++
+ lib/getopt_int.h                               |  131 ++
+ lib/gettext.h                                  |  240 +++
+ m4/acx_pthread.m4                              |  279 ++++
+ m4/getopt.m4                                   |   83 ++
+ po/LINGUAS                                     |    1 +
+ po/Makevars                                    |   46 +
+ po/POTFILES.in                                 |   13 +
+ po/fi.po                                       |  445 ++++++
+ src/Makefile.am                                |   16 +
+ src/common/open_stdxxx.h                       |   50 +
+ src/common/physmem.h                           |   77 +
+ src/common/sysdefs.h                           |  100 ++
+ src/liblzma/Makefile.am                        |   47 +
+ src/liblzma/api/Makefile.am                    |   39 +
+ src/liblzma/api/lzma.h                         |  122 ++
+ src/liblzma/api/lzma/alignment.h               |   60 +
+ src/liblzma/api/lzma/alone.h                   |   82 ++
+ src/liblzma/api/lzma/auto.h                    |   41 +
+ src/liblzma/api/lzma/base.h                    |  410 ++++++
+ src/liblzma/api/lzma/block.h                   |  409 ++++++
+ src/liblzma/api/lzma/check.h                   |  128 ++
+ src/liblzma/api/lzma/copy.h                    |   29 +
+ src/liblzma/api/lzma/delta.h                   |   49 +
+ src/liblzma/api/lzma/extra.h                   |  114 ++
+ src/liblzma/api/lzma/filter.h                  |  166 +++
+ src/liblzma/api/lzma/index.h                   |   84 ++
+ src/liblzma/api/lzma/info.h                    |  315 ++++
+ src/liblzma/api/lzma/init.h                    |   85 ++
+ src/liblzma/api/lzma/lzma.h                    |  312 ++++
+ src/liblzma/api/lzma/memlimit.h                |  157 ++
+ src/liblzma/api/lzma/metadata.h                |  100 ++
+ src/liblzma/api/lzma/raw.h                     |   72 +
+ src/liblzma/api/lzma/simple.h                  |   85 ++
+ src/liblzma/api/lzma/stream.h                  |  178 +++
+ src/liblzma/api/lzma/stream_flags.h            |  142 ++
+ src/liblzma/api/lzma/subblock.h                |  197 +++
+ src/liblzma/api/lzma/version.h                 |   59 +
+ src/liblzma/api/lzma/vli.h                     |  244 ++++
+ src/liblzma/check/Makefile.am                  |   64 +
+ src/liblzma/check/check.c                      |  160 ++
+ src/liblzma/check/check.h                      |  102 ++
+ src/liblzma/check/check_byteswap.h             |   43 +
+ src/liblzma/check/check_init.c                 |   37 +
+ src/liblzma/check/crc32.c                      |   88 ++
+ src/liblzma/check/crc32_init.c                 |   58 +
+ src/liblzma/check/crc32_table.c                |   22 +
+ src/liblzma/check/crc32_table_be.h             |  527 +++++++
+ src/liblzma/check/crc32_table_le.h             |  527 +++++++
+ src/liblzma/check/crc32_tablegen.c             |   55 +
+ src/liblzma/check/crc32_x86.s                  |  217 +++
+ src/liblzma/check/crc64.c                      |   75 +
+ src/liblzma/check/crc64_init.c                 |   58 +
+ src/liblzma/check/crc64_table.c                |   22 +
+ src/liblzma/check/crc64_table_be.h             |  523 +++++++
+ src/liblzma/check/crc64_table_le.h             |  523 +++++++
+ src/liblzma/check/crc64_tablegen.c             |   56 +
+ src/liblzma/check/crc64_x86.s                  |  203 +++
+ src/liblzma/check/crc_macros.h                 |   33 +
+ src/liblzma/check/sha256.c                     |  203 +++
+ src/liblzma/common/Makefile.am                 |   94 ++
+ src/liblzma/common/alignment.c                 |  118 ++
+ src/liblzma/common/allocator.c                 |   57 +
+ src/liblzma/common/alone_decoder.c             |  197 +++
+ src/liblzma/common/alone_decoder.h             |   24 +
+ src/liblzma/common/alone_encoder.c             |  167 +++
+ src/liblzma/common/auto_decoder.c              |  113 ++
+ src/liblzma/common/block_decoder.c             |  405 ++++++
+ src/liblzma/common/block_decoder.h             |   29 +
+ src/liblzma/common/block_encoder.c             |  375 +++++
+ src/liblzma/common/block_encoder.h             |   29 +
+ src/liblzma/common/block_header_decoder.c      |  373 +++++
+ src/liblzma/common/block_header_encoder.c      |  211 +++
+ src/liblzma/common/block_private.h             |   46 +
+ src/liblzma/common/chunk_size.c                |   74 +
+ src/liblzma/common/code.c                      |  203 +++
+ src/liblzma/common/common.h                    |  271 ++++
+ src/liblzma/common/copy_coder.c                |  143 ++
+ src/liblzma/common/copy_coder.h                |   31 +
+ src/liblzma/common/delta_coder.c               |  210 +++
+ src/liblzma/common/delta_coder.h               |   31 +
+ src/liblzma/common/extra.c                     |   33 +
+ src/liblzma/common/features.c                  |   70 +
+ src/liblzma/common/filter_flags_decoder.c      |  382 +++++
+ src/liblzma/common/filter_flags_encoder.c      |  359 +++++
+ src/liblzma/common/index.c                     |  140 ++
+ src/liblzma/common/info.c                      |  823 +++++++++++
+ src/liblzma/common/init.c                      |   39 +
+ src/liblzma/common/init_decoder.c              |   33 +
+ src/liblzma/common/init_encoder.c              |   44 +
+ src/liblzma/common/memory_limitter.c           |  200 +++
+ src/liblzma/common/memory_usage.c              |  113 ++
+ src/liblzma/common/metadata_decoder.c          |  555 +++++++
+ src/liblzma/common/metadata_decoder.h          |   31 +
+ src/liblzma/common/metadata_encoder.c          |  436 ++++++
+ src/liblzma/common/metadata_encoder.h          |   30 +
+ src/liblzma/common/next_coder.c                |   65 +
+ src/liblzma/common/raw_common.c                |  175 +++
+ src/liblzma/common/raw_common.h                |   31 +
+ src/liblzma/common/raw_decoder.c               |  127 ++
+ src/liblzma/common/raw_decoder.h               |   30 +
+ src/liblzma/common/raw_encoder.c               |  124 ++
+ src/liblzma/common/raw_encoder.h               |   30 +
+ src/liblzma/common/stream_common.c             |   23 +
+ src/liblzma/common/stream_common.h             |   28 +
+ src/liblzma/common/stream_decoder.c            |  454 ++++++
+ src/liblzma/common/stream_encoder_multi.c      |  460 ++++++
+ src/liblzma/common/stream_encoder_single.c     |  220 +++
+ src/liblzma/common/stream_flags_decoder.c      |  258 ++++
+ src/liblzma/common/stream_flags_decoder.h      |   31 +
+ src/liblzma/common/stream_flags_encoder.c      |   75 +
+ src/liblzma/common/sysdefs.h                   |    1 +
+ src/liblzma/common/version.c                   |   25 +
+ src/liblzma/common/vli_decoder.c               |   69 +
+ src/liblzma/common/vli_encoder.c               |   81 ++
+ src/liblzma/common/vli_reverse_decoder.c       |   55 +
+ src/liblzma/lz/Makefile.am                     |   63 +
+ src/liblzma/lz/bt2.c                           |   27 +
+ src/liblzma/lz/bt2.h                           |   31 +
+ src/liblzma/lz/bt3.c                           |   29 +
+ src/liblzma/lz/bt3.h                           |   31 +
+ src/liblzma/lz/bt4.c                           |   30 +
+ src/liblzma/lz/bt4.h                           |   31 +
+ src/liblzma/lz/hc3.c                           |   30 +
+ src/liblzma/lz/hc3.h                           |   31 +
+ src/liblzma/lz/hc4.c                           |   31 +
+ src/liblzma/lz/hc4.h                           |   31 +
+ src/liblzma/lz/lz_decoder.c                    |  462 ++++++
+ src/liblzma/lz/lz_decoder.h                    |  214 +++
+ src/liblzma/lz/lz_encoder.c                    |  481 ++++++
+ src/liblzma/lz/lz_encoder.h                    |  161 ++
+ src/liblzma/lz/lz_encoder_private.h            |   40 +
+ src/liblzma/lz/match_c.h                       |  401 +++++
+ src/liblzma/lz/match_h.h                       |   69 +
+ src/liblzma/lzma.pc.in                         |   11 +
+ src/liblzma/lzma/Makefile.am                   |   43 +
+ src/liblzma/lzma/lzma_common.h                 |  128 ++
+ src/liblzma/lzma/lzma_decoder.c                |  844 +++++++++++
+ src/liblzma/lzma/lzma_decoder.h                |   41 +
+ src/liblzma/lzma/lzma_encoder.c                |  413 ++++++
+ src/liblzma/lzma/lzma_encoder.h                |   35 +
+ src/liblzma/lzma/lzma_encoder_features.c       |   59 +
+ src/liblzma/lzma/lzma_encoder_getoptimum.c     |  893 ++++++++++++
+ src/liblzma/lzma/lzma_encoder_getoptimumfast.c |  201 +++
+ src/liblzma/lzma/lzma_encoder_init.c           |  245 ++++
+ src/liblzma/lzma/lzma_encoder_presets.c        |   34 +
+ src/liblzma/lzma/lzma_encoder_private.h        |  225 +++
+ src/liblzma/lzma/lzma_literal.c                |   74 +
+ src/liblzma/lzma/lzma_literal.h                |   74 +
+ src/liblzma/rangecoder/Makefile.am             |   28 +
+ src/liblzma/rangecoder/range_common.h          |   68 +
+ src/liblzma/rangecoder/range_decoder.h         |  189 +++
+ src/liblzma/rangecoder/range_encoder.c         |   46 +
+ src/liblzma/rangecoder/range_encoder.h         |  317 ++++
+ src/liblzma/simple/Makefile.am                 |   46 +
+ src/liblzma/simple/arm.c                       |   76 +
+ src/liblzma/simple/armthumb.c                  |   81 ++
+ src/liblzma/simple/ia64.c                      |  117 ++
+ src/liblzma/simple/powerpc.c                   |   80 +
+ src/liblzma/simple/simple_coder.c              |  306 ++++
+ src/liblzma/simple/simple_coder.h              |   68 +
+ src/liblzma/simple/simple_private.h            |   86 ++
+ src/liblzma/simple/sparc.c                     |   88 ++
+ src/liblzma/simple/x86.c                       |  161 ++
+ src/liblzma/subblock/Makefile.am               |   33 +
+ src/liblzma/subblock/subblock_decoder.c        |  681 +++++++++
+ src/liblzma/subblock/subblock_decoder.h        |   29 +
+ src/liblzma/subblock/subblock_decoder_helper.c |   80 +
+ src/liblzma/subblock/subblock_decoder_helper.h |   36 +
+ src/liblzma/subblock/subblock_encoder.c        |  841 +++++++++++
+ src/liblzma/subblock/subblock_encoder.h        |   28 +
+ src/lzma/Makefile.am                           |   63 +
+ src/lzma/alloc.c                               |  106 ++
+ src/lzma/alloc.h                               |   42 +
+ src/lzma/args.c                                |  566 +++++++
+ src/lzma/args.h                                |   64 +
+ src/lzma/error.c                               |  156 ++
+ src/lzma/error.h                               |   67 +
+ src/lzma/hardware.c                            |   99 ++
+ src/lzma/hardware.h                            |   31 +
+ src/lzma/help.c                                |  178 +++
+ src/lzma/help.h                                |   32 +
+ src/lzma/io.c                                  |  664 +++++++++
+ src/lzma/io.h                                  |   60 +
+ src/lzma/list.c                                |  477 ++++++
+ src/lzma/main.c                                |  254 ++++
+ src/lzma/options.c                             |  346 +++++
+ src/lzma/options.h                             |   46 +
+ src/lzma/private.h                             |   55 +
+ src/lzma/process.c                             |  458 ++++++
+ src/lzma/process.h                             |   30 +
+ src/lzma/suffix.c                              |  145 ++
+ src/lzma/suffix.h                              |   25 +
+ src/lzma/util.c                                |  182 +++
+ src/lzma/util.h                                |   32 +
+ src/lzmadec/Makefile.am                        |   27 +
+ src/lzmadec/lzmadec.c                          |  515 +++++++
+ src/scripts/Makefile.am                        |   24 +
+ src/scripts/lzdiff                             |   67 +
+ src/scripts/lzdiff.1                           |   51 +
+ src/scripts/lzgrep                             |  123 ++
+ src/scripts/lzgrep.1                           |   61 +
+ src/scripts/lzmore                             |   74 +
+ src/scripts/lzmore.1                           |   55 +
+ tests/Makefile.am                              |   43 +
+ tests/test_block.c                             |   59 +
+ tests/test_block_header.c                      |  352 +++++
+ tests/test_check.c                             |   90 ++
+ tests/test_filter_flags.c                      |  326 +++++
+ tests/test_index.c                             |   43 +
+ tests/test_info.c                              |  717 +++++++++
+ tests/test_stream_flags.c                      |  191 +++
+ tests/tests.h                                  |  148 ++
+ 240 files changed, 42513 insertions(+)

Deleted: vendor/xz/5.2.3/INSTALL
===================================================================
--- vendor/xz/dist/INSTALL	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/INSTALL	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,506 +0,0 @@
-
-XZ Utils Installation
-=====================
-
-    0. Preface
-    1. Supported platforms
-       1.1. Compilers
-       1.2. Platform-specific notes
-            1.2.1. AIX
-            1.2.2. IRIX
-            1.2.3. MINIX 3
-            1.2.4. OpenVMS
-            1.2.5. Solaris, OpenSolaris, and derivatives
-            1.2.6. Tru64
-            1.2.7. Windows
-            1.2.8. DOS
-       1.3. Adding support for new platforms
-    2. configure options
-       2.1. Static vs. dynamic linking of liblzma
-       2.2. Optimizing xzdec and lzmadec
-    3. xzgrep and other scripts
-       3.1. Dependencies
-       3.2. PATH
-    4. Troubleshooting
-       4.1. "No C99 compiler was found."
-       4.2. "No POSIX conforming shell (sh) was found."
-       4.3. configure works but build fails at crc32_x86.S
-       4.4. Lots of warnings about symbol visibility
-       4.5. "make check" fails
-       4.6. liblzma.so (or similar) not found when running xz
-
-
-0. Preface
-----------
-
-    If you aren't familiar with building packages that use GNU Autotools,
-    see the file INSTALL.generic for generic instructions before reading
-    further.
-
-    If you are going to build a package for distribution, see also the
-    file PACKAGERS. It contains information that should help making the
-    binary packages as good as possible, but the information isn't very
-    interesting to those making local builds for private use or for use
-    in special situations like embedded systems.
-
-
-1. Supported platforms
-----------------------
-
-    XZ Utils are developed on GNU/Linux, but they should work on many
-    POSIX-like operating systems like *BSDs and Solaris, and even on
-    a few non-POSIX operating systems.
-
-
-1.1. Compilers
-
-    A C99 compiler is required to compile XZ Utils. If you use GCC, you
-    need at least version 3.x.x. GCC version 2.xx.x doesn't support some
-    C99 features used in XZ Utils source code, thus GCC 2 won't compile
-    XZ Utils.
-
-    XZ Utils takes advantage of some GNU C extensions when building
-    with GCC. Because these extensions are used only when building
-    with GCC, it should be possible to use any C99 compiler.
-
-
-1.2. Platform-specific notes
-
-1.2.1. AIX
-
-    If you use IBM XL C compiler, pass CC=xlc_r to configure. If
-    you use CC=xlc instead, you must disable threading support
-    with --disable-threads (usually not recommended).
-
-
-1.2.2. IRIX
-
-    MIPSpro 7.4.4m has been reported to produce broken code if using
-    the -O2 optimization flag ("make check" fails). Using -O1 should
-    work.
-
-    A problem has been reported when using shared liblzma. Passing
-    --disable-shared to configure works around this. Alternatively,
-    putting "-64" to CFLAGS to build a 64-bit version might help too.
-
-
-1.2.3. MINIX 3
-
-    The default install of MINIX 3 includes Amsterdam Compiler Kit (ACK),
-    which doesn't support C99. Install GCC to compile XZ Utils.
-
-    MINIX 3.1.8 and older have bugs in /usr/include/stdint.h, which has
-    to be patched before XZ Utils can be compiled correctly. See
-    <http://gforge.cs.vu.nl/gf/project/minix/tracker/?action=TrackerItemEdit&tracker_item_id=537>.
-
-    MINIX 3.2.0 and later use a different libc and aren't affected by
-    the above bug.
-
-    XZ Utils doesn't have code to detect the amount of physical RAM and
-    number of CPU cores on MINIX 3.
-
-    See section 4.4 in this file about symbol visibility warnings (you
-    may want to pass gl_cv_cc_visibility=no to configure).
-
-
-1.2.4. OpenVMS
-
-    XZ Utils can be built for OpenVMS, but the build system files
-    are not included in the XZ Utils source package. The required
-    OpenVMS-specific files are maintained by Jouk Jansen and can be
-    downloaded here:
-
-        http://nchrem.tnw.tudelft.nl/openvms/software2.html#xzutils
-
-
-1.2.5. Solaris, OpenSolaris, and derivatives
-
-    The following linker error has been reported on some x86 systems:
-
-        ld: fatal: relocation error: R_386_GOTOFF: ...
-
-    This can be worked around by passing gl_cv_cc_visibility=no
-    as an argument to the configure script.
-
-
-1.2.6. Tru64
-
-    If you try to use the native C compiler on Tru64 (passing CC=cc to
-    configure), you may need the workaround mention in section 4.1 in
-    this file (pass also ac_cv_prog_cc_c99= to configure).
-
-
-1.2.7. Windows
-
-    Building XZ Utils on Windows is supported under MinGW + MSYS,
-    MinGW-w64 + MSYS, and Cygwin. There is windows/build.bash to
-    ease packaging XZ Utils with MinGW(-w64) + MSYS into a
-    redistributable .zip or .7z file. See windows/INSTALL-Windows.txt
-    for more information.
-
-    It might be possible to build liblzma with a non-GNU toolchain too,
-    but that will probably require writing a separate makefile. Building
-    the command line tools with non-GNU toolchains will be harder than
-    building only liblzma.
-
-    Even if liblzma is built with MinGW, the resulting DLL or static
-    library can be used by other compilers and linkers, including MSVC.
-    Thus, it shouldn't be a problem to use MinGW to build liblzma even
-    if you cannot use MinGW to build the rest of your project. See
-    windows/README-Windows.txt for details.
-
-
-1.2.8. DOS
-
-    There is an experimental Makefile in the "dos" directory to build
-    XZ Utils on DOS using DJGPP. Support for long file names (LFN) is
-    needed. See dos/README for more information.
-
-    GNU Autotools based build hasn't been tried on DOS. If you try, I
-    would like to hear if it worked.
-
-
-1.3. Adding support for new platforms
-
-    If you have written patches to make XZ Utils to work on previously
-    unsupported platform, please send the patches to me! I will consider
-    including them to the official version. It's nice to minimize the
-    need of third-party patching.
-
-    One exception: Don't request or send patches to change the whole
-    source package to C89. I find C99 substantially nicer to write and
-    maintain. However, the public library headers must be in C89 to
-    avoid frustrating those who maintain programs, which are strictly
-    in C89 or C++.
-
-
-2. configure options
---------------------
-
-    In most cases, the defaults are what you want. Many of the options
-    below are useful only when building a size-optimized version of
-    liblzma or command line tools.
-
-    --enable-encoders=LIST
-    --disable-encoders
-                Specify a comma-separated LIST of filter encoders to
-                build. See "./configure --help" for exact list of
-                available filter encoders. The default is to build all
-                supported encoders.
-
-                If LIST is empty or --disable-encoders is used, no filter
-                encoders will be built and also the code shared between
-                encoders will be omitted.
-
-                Disabling encoders will remove some symbols from the
-                liblzma ABI, so this option should be used only when it
-                is known to not cause problems.
-
-    --enable-decoders=LIST
-    --disable-decoders
-                This is like --enable-encoders but for decoders. The
-                default is to build all supported decoders.
-
-    --enable-match-finders=LIST
-                liblzma includes two categories of match finders:
-                hash chains and binary trees. Hash chains (hc3 and hc4)
-                are quite fast but they don't provide the best compression
-                ratio. Binary trees (bt2, bt3 and bt4) give excellent
-                compression ratio, but they are slower and need more
-                memory than hash chains.
-
-                You need to enable at least one match finder to build the
-                LZMA1 or LZMA2 filter encoders. Usually hash chains are
-                used only in the fast mode, while binary trees are used to
-                when the best compression ratio is wanted.
-
-                The default is to build all the match finders if LZMA1
-                or LZMA2 filter encoders are being built.
-
-    --enable-checks=LIST
-                liblzma support multiple integrity checks. CRC32 is
-                mandatory, and cannot be omitted. See "./configure --help"
-                for exact list of available integrity check types.
-
-                liblzma and the command line tools can decompress files
-                which use unsupported integrity check type, but naturally
-                the file integrity cannot be verified in that case.
-
-                Disabling integrity checks may remove some symbols from
-                the liblzma ABI, so this option should be used only when
-                it is known to not cause problems.
-
-    --disable-xz
-    --disable-xzdec
-    --disable-lzmadec
-    --disable-lzmainfo
-                Don't build and install the command line tool mentioned
-                in the option name.
-
-                NOTE: Disabling xz will skip some tests in "make check".
-
-                NOTE: If xzdec is disabled and lzmadec is left enabled,
-                a dangling man page symlink lzmadec.1 -> xzdec.1 is
-                created.
-
-    --disable-lzma-links
-                Don't create symlinks for LZMA Utils compatibility.
-                This includes lzma, unlzma, and lzcat. If scripts are
-                installed, also lzdiff, lzcmp, lzgrep, lzegrep, lzfgrep,
-                lzmore, and lzless will be omitted if this option is used.
-
-    --disable-scripts
-                Don't install the scripts xzdiff, xzgrep, xzmore, xzless,
-                and their symlinks.
-
-    --disable-doc
-                Don't install the documentation files to $docdir
-                (often /usr/doc/xz or /usr/local/doc/xz). Man pages
-                will still be installed. The $docdir can be changed
-                with --docdir=DIR.
-
-    --disable-assembler
-                liblzma includes some assembler optimizations. Currently
-                there is only assembler code for CRC32 and CRC64 for
-                32-bit x86.
-
-                All the assembler code in liblzma is position-independent
-                code, which is suitable for use in shared libraries and
-                position-independent executables. So far only i386
-                instructions are used, but the code is optimized for i686
-                class CPUs. If you are compiling liblzma exclusively for
-                pre-i686 systems, you may want to disable the assembler
-                code.
-
-    --enable-unaligned-access
-                Allow liblzma to use unaligned memory access for 16-bit
-                and 32-bit loads and stores. This should be enabled only
-                when the hardware supports this, i.e. when unaligned
-                access is fast. Some operating system kernels emulate
-                unaligned access, which is extremely slow. This option
-                shouldn't be used on systems that rely on such emulation.
-
-                Unaligned access is enabled by default on x86, x86-64,
-                and big endian PowerPC.
-
-    --enable-small
-                Reduce the size of liblzma by selecting smaller but
-                semantically equivalent version of some functions, and
-                omit precomputed lookup tables. This option tends to
-                make liblzma slightly slower.
-
-                Note that while omitting the precomputed tables makes
-                liblzma smaller on disk, the tables are still needed at
-                run time, and need to be computed at startup. This also
-                means that the RAM holding the tables won't be shared
-                between applications linked against shared liblzma.
-
-                This option doesn't modify CFLAGS to tell the compiler
-                to optimize for size. You need to add -Os or equivalent
-                flag(s) to CFLAGS manually.
-
-    --enable-assume-ram=SIZE
-                On the most common operating systems, XZ Utils is able to
-                detect the amount of physical memory on the system. This
-                information is used by the options --memlimit-compress,
-                --memlimit-decompress, and --memlimit when setting the
-                limit to a percentage of total RAM.
-
-                On some systems, there is no code to detect the amount of
-                RAM though. Using --enable-assume-ram one can set how much
-                memory to assume on these systems. SIZE is given as MiB.
-                The default is 128 MiB.
-
-                Feel free to send patches to add support for detecting
-                the amount of RAM on the operating system you use. See
-                src/common/tuklib_physmem.c for details.
-
-    --disable-threads
-                Disable threading support. This makes some things
-                thread-unsafe, meaning that if multithreaded application
-                calls liblzma functions from more than one thread,
-                something bad may happen.
-
-                Use this option if threading support causes you trouble,
-                or if you know that you will use liblzma only from
-                single-threaded applications and want to avoid dependency
-                on libpthread.
-
-    --enable-debug
-                This enables the assert() macro and possibly some other
-                run-time consistency checks. It makes the code slower, so
-                you normally don't want to have this enabled.
-
-    --enable-werror
-                If building with GCC, make all compiler warnings an error,
-                that abort the compilation. This may help catching bugs,
-                and should work on most systems. This has no effect on the
-                resulting binaries.
-
-
-2.1. Static vs. dynamic linking of liblzma
-
-    On 32-bit x86, linking against static liblzma can give a minor
-    speed improvement. Static libraries on x86 are usually compiled as
-    position-dependent code (non-PIC) and shared libraries are built as
-    position-independent code (PIC). PIC wastes one register, which can
-    make the code slightly slower compared to a non-PIC version. (Note
-    that this doesn't apply to x86-64.)
-
-    If you want to link xz against static liblzma, the simplest way
-    is to pass --disable-shared to configure. If you want also shared
-    liblzma, run configure again and run "make install" only for
-    src/liblzma.
-
-
-2.2. Optimizing xzdec and lzmadec
-
-    xzdec and lzmadec are intended to be relatively small instead of
-    optimizing for the best speed. Thus, it is a good idea to build
-    xzdec and lzmadec separately:
-
-      - To link the tools against static liblzma, pass --disable-shared
-        to configure.
-
-      - To select somewhat size-optimized variant of some things in
-        liblzma, pass --enable-small to configure.
-
-      - Tell the compiler to optimize for size instead of speed.
-        E.g. with GCC, put -Os into CFLAGS.
-
-      - xzdec and lzmadec will never use multithreading capabilities of
-        liblzma. You can avoid dependency on libpthread by passing
-        --disable-threads to configure.
-
-      - There are and will be no translated messages for xzdec and
-        lzmadec, so it is fine to pass also --disable-nls to configure.
-
-      - Only decoder code is needed, so you can speed up the build
-        slightly by passing --disable-encoders to configure. This
-        shouldn't affect the final size of the executables though,
-        because the linker is able to omit the encoder code anyway.
-
-    If you have no use for xzdec or lzmadec, you can disable them with
-    --disable-xzdec and --disable-lzmadec.
-
-
-3. xzgrep and other scripts
----------------------------
-
-3.1. Dependencies
-
-    POSIX shell (sh) and bunch of other standard POSIX tools are required
-    to run the scripts. The configure script tries to find a POSIX
-    compliant sh, but if it fails, you can force the shell by passing
-    gl_cv_posix_shell=/path/to/posix-sh as an argument to the configure
-    script.
-
-    Some of the scripts require also mktemp. The original mktemp can be
-    found from <http://www.mktemp.org/>. On GNU, most will use the mktemp
-    program from GNU coreutils instead of the original implementation.
-    Both mktemp versions are fine for XZ Utils (and practically for
-    everything else too).
-
-
-3.2. PATH
-
-    The scripts assume that the required tools (standard POSIX utilities,
-    mktemp, and xz) are in PATH; the scripts don't set the PATH themselves.
-    Some people like this while some think this is a bug. Those in the
-    latter group can easily patch the scripts before running the configure
-    script by taking advantage of a placeholder line in the scripts.
-
-    For example, to make the scripts prefix /usr/bin:/bin to PATH:
-
-        perl -pi -e 's|^#SET_PATH.*$|PATH=/usr/bin:/bin:\$PATH|' \
-                src/scripts/xz*.in
-
-
-4. Troubleshooting
-------------------
-
-4.1. "No C99 compiler was found."
-
-    You need a C99 compiler to build XZ Utils. If the configure script
-    cannot find a C99 compiler and you think you have such a compiler
-    installed, set the compiler command by passing CC=/path/to/c99 as
-    an argument to the configure script.
-
-    If you get this error even when you think your compiler supports C99,
-    you can override the test by passing ac_cv_prog_cc_c99= as an argument
-    to the configure script. The test for C99 compiler is not perfect (and
-    it is not as easy to make it perfect as it sounds), so sometimes this
-    may be needed. You will get a compile error if your compiler doesn't
-    support enough C99.
-
-
-4.2. "No POSIX conforming shell (sh) was found."
-
-    xzgrep and other scripts need a shell that (roughly) conforms
-    to POSIX. The configure script tries to find such a shell. If
-    it fails, you can force the shell to be used by passing
-    gl_cv_posix_shell=/path/to/posix-sh as an argument to the configure
-    script.
-
-
-4.3. configure works but build fails at crc32_x86.S
-
-    The easy fix is to pass --disable-assembler to the configure script.
-
-    The configure script determines if assembler code can be used by
-    looking at the configure triplet; there is currently no check if
-    the assembler code can actually actually be built. The x86 assembler
-    code should work on x86 GNU/Linux, *BSDs, Solaris, Darwin, MinGW,
-    Cygwin, and DJGPP. On other x86 systems, there may be problems and
-    the assembler code may need to be disabled with the configure option.
-
-    If you get this error when building for x86-64, you have specified or
-    the configure script has misguessed your architecture. Pass the
-    correct configure triplet using the --build=CPU-COMPANY-SYSTEM option
-    (see INSTALL.generic).
-
-
-4.4. Lots of warnings about symbol visibility
-
-    On some systems where symbol visibility isn't supported, GCC may
-    still accept the visibility options and attributes, which will make
-    configure think that visibility is supported. This will result in
-    many compiler warnings. You can avoid the warnings by forcing the
-    visibility support off by passing gl_cv_cc_visibility=no as an
-    argument to the configure script. This has no effect on the
-    resulting binaries, but fewer warnings looks nicer and may allow
-    using --enable-werror.
-
-
-4.5. "make check" fails
-
-    If the other tests pass but test_scripts.sh fails, then the problem
-    is in the scripts in src/scripts. Comparing the contents of
-    tests/xzgrep_test_output to tests/xzgrep_expected_output might
-    give a good idea about problems in xzgrep. One possibility is that
-    some tools are missing from the current PATH or the tools lack
-    support for some POSIX features. This can happen at least on
-    Solaris where the tools in /bin may be ancient but good enough
-    tools are available in /usr/xpg4/bin or /usr/xpg6/bin. One fix
-    for this problem is described in section 3.2 of this file.
-
-    If tests other than test_scripts.sh fail, a likely reason is that
-    libtool links the test programs against an installed version of
-    liblzma instead of the version that was just built. This is
-    obviously a bug which seems to happen on some platforms.
-    A workaround is to uninstall the old liblzma versions first.
-
-    If the problem isn't any of those described above, then it's likely
-    a bug in XZ Utils or in the compiler. See the platform-specific
-    notes in this file for possible known problems. Please report
-    a bug if you cannot solve the problem. See README for contact
-    information.
-
-
-4.6. liblzma.so (or similar) not found when running xz
-
-    If you installed the package with "make install" and get an error
-    about liblzma.so (or a similarly named file) being missing, try
-    running "ldconfig" to update the run-time linker cache (if your
-    operating system has such a command).
-

Deleted: vendor/xz/5.2.3/INSTALL.generic
===================================================================
--- vendor/xz/dist/INSTALL.generic	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/INSTALL.generic	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,365 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-
-   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.
-
-Basic Installation
-==================
-
-   Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.  Some packages provide this
-`INSTALL' file but do not implement all of the features documented
-below.  The lack of an optional feature in a given package is not
-necessarily a bug.  More recommendations for GNU packages can be found
-in *note Makefile Conventions: (standards)Makefile Conventions.
-
-   The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
-   If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
-   The simplest way to compile this package is:
-
-  1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.
-
-     Running `configure' might take a while.  While running, it prints
-     some messages telling which features it is checking for.
-
-  2. Type `make' to compile the package.
-
-  3. Optionally, type `make check' to run any self-tests that come with
-     the package, generally using the just-built uninstalled binaries.
-
-  4. Type `make install' to install the programs and any data files and
-     documentation.  When installing into a prefix owned by root, it is
-     recommended that the package be configured and built as a regular
-     user, and only the `make install' phase executed with root
-     privileges.
-
-  5. Optionally, type `make installcheck' to repeat any self-tests, but
-     this time using the binaries in their final installed location.
-     This target does not install anything.  Running this target as a
-     regular user, particularly if the prior `make install' required
-     root privileges, verifies that the installation completed
-     correctly.
-
-  6. You can remove the program binaries and object files from the
-     source code directory by typing `make clean'.  To also remove the
-     files that `configure' created (so you can compile the package for
-     a different kind of computer), type `make distclean'.  There is
-     also a `make maintainer-clean' target, but that is intended mainly
-     for the package's developers.  If you use it, you may have to get
-     all sorts of other programs in order to regenerate files that came
-     with the distribution.
-
-  7. Often, you can also type `make uninstall' to remove the installed
-     files again.  In practice, not all packages have tested that
-     uninstallation works correctly, even though it is required by the
-     GNU Coding Standards.
-
-  8. Some packages, particularly those that use Automake, provide `make
-     distcheck', which can by used by developers to test that all other
-     targets like `make install' and `make uninstall' work correctly.
-     This target is generally not run by end users.
-
-Compilers and Options
-=====================
-
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  Run `./configure --help'
-for details on some of the pertinent environment variables.
-
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
-
-     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
-   *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-   You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory.  To do this, you can use GNU `make'.  `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.  This
-is known as a "VPATH" build.
-
-   With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory.  After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
-
-   On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor.  Like
-this:
-
-     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CPP="gcc -E" CXXCPP="g++ -E"
-
-   This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
-
-Installation Names
-==================
-
-   By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc.  You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX', where PREFIX must be an
-absolute file name.
-
-   You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files.  If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
-   In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.  In general, the
-default for these options is expressed in terms of `${prefix}', so that
-specifying just `--prefix' will affect all of the other directory
-specifications that were not explicitly provided.
-
-   The most portable way to affect installation locations is to pass the
-correct locations to `configure'; however, many packages provide one or
-both of the following shortcuts of passing variable assignments to the
-`make install' command line to change installation locations without
-having to reconfigure or recompile.
-
-   The first method involves providing an override variable for each
-affected directory.  For example, `make install
-prefix=/alternate/directory' will choose an alternate location for all
-directory configuration variables that were expressed in terms of
-`${prefix}'.  Any directories that were specified during `configure',
-but not in terms of `${prefix}', must each be overridden at install
-time for the entire installation to be relocated.  The approach of
-makefile variable overrides for each directory variable is required by
-the GNU Coding Standards, and ideally causes no recompilation.
-However, some platforms have known limitations with the semantics of
-shared libraries that end up requiring recompilation when using this
-method, particularly noticeable in packages that use GNU Libtool.
-
-   The second method involves providing the `DESTDIR' variable.  For
-example, `make install DESTDIR=/alternate/directory' will prepend
-`/alternate/directory' before all installation names.  The approach of
-`DESTDIR' overrides is not required by the GNU Coding Standards, and
-does not work on platforms that have drive letters.  On the other hand,
-it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of `${prefix}'
-at `configure' time.
-
-Optional Features
-=================
-
-   If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-   Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System).  The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
-   For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-   Some packages offer the ability to configure how verbose the
-execution of `make' will be.  For these packages, running `./configure
---enable-silent-rules' sets the default to minimal output, which can be
-overridden with `make V=1'; while running `./configure
---disable-silent-rules' sets the default to verbose, which can be
-overridden with `make V=0'.
-
-Particular systems
-==================
-
-   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
-CC is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
-     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
-   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
-a workaround.  If GNU CC is not installed, it is therefore recommended
-to try
-
-     ./configure CC="cc"
-
-and if that doesn't work, try
-
-     ./configure CC="cc -nodtk"
-
-   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
-directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
-
-   On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'.  It is recommended to use the following options:
-
-     ./configure --prefix=/boot/common
-
-Specifying the System Type
-==========================
-
-   There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on.  Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
-     CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
-     OS
-     KERNEL-OS
-
-   See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
-   If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
-   If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-   If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists.  Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-   Variables not defined in a site shell script can be set in the
-environment passed to `configure'.  However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost.  In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'.  For example:
-
-     ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf bug.  Until the bug is fixed you can use this workaround:
-
-     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-`configure' Invocation
-======================
-
-   `configure' recognizes the following options to control how it
-operates.
-
-`--help'
-`-h'
-     Print a summary of all of the options to `configure', and exit.
-
-`--help=short'
-`--help=recursive'
-     Print a summary of the options unique to this package's
-     `configure', and exit.  The `short' variant lists options used
-     only in the top level, while the `recursive' variant lists options
-     also present in any nested packages.
-
-`--version'
-`-V'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
-
-`--cache-file=FILE'
-     Enable the cache: use and save the results of the tests in FILE,
-     traditionally `config.cache'.  FILE defaults to `/dev/null' to
-     disable caching.
-
-`--config-cache'
-`-C'
-     Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
-     Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to `/dev/null' (any error
-     messages will still be shown).
-
-`--srcdir=DIR'
-     Look for the package's source code in directory DIR.  Usually
-     `configure' can determine that directory automatically.
-
-`--prefix=DIR'
-     Use DIR as the installation prefix.  *note Installation Names::
-     for more details, including other options available for fine-tuning
-     the installation locations.
-
-`--no-create'
-`-n'
-     Run the configure checks, but stop before creating any output
-     files.
-
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
-

Deleted: vendor/xz/5.2.3/NEWS
===================================================================
--- vendor/xz/dist/NEWS	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/NEWS	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,245 +0,0 @@
-
-XZ Utils Release Notes
-======================
-
-5.0.8 (2014-12-21)
-
-    * Fixed an old bug in xzgrep that affected OpenBSD and probably
-      a few other operating systems too.
-
-    * Updated French and German translations.
-
-    * Added support for detecting the amount of RAM on AmigaOS/AROS.
-
-    * Minor build system updates.
-
-
-5.0.7 (2014-09-20)
-
-    * Fix regressions introduced in 5.0.6:
-
-        - Fix building with non-GNU make.
-
-        - Fix invalid Libs.private value in liblzma.pc which broke
-          static linking against liblzma if the linker flags were
-          taken from pkg-config.
-
-
-5.0.6 (2014-09-14)
-
-    * xzgrep now exits with status 0 if at least one file matched.
-
-    * A few minor portability and build system fixes
-
-
-5.0.5 (2013-06-30)
-
-    * lzmadec and liblzma's lzma_alone_decoder(): Support decompressing
-      .lzma files that have less common settings in the headers
-      (dictionary size other than 2^n or 2^n + 2^(n-1), or uncompressed
-      size greater than 256 GiB). The limitations existed to avoid false
-      positives when detecting .lzma files. The lc + lp <= 4 limitation
-      still remains since liblzma's LZMA decoder has that limitation.
-
-      NOTE: xz's .lzma support or liblzma's lzma_auto_decoder() are NOT
-      affected by this change. They still consider uncommon .lzma headers
-      as not being in the .lzma format. Changing this would give way too
-      many false positives.
-
-    * xz:
-
-        - Interaction of preset and custom filter chain options was
-          made less illogical. This affects only certain less typical
-          uses cases so few people are expected to notice this change.
-
-          Now when a custom filter chain option (e.g. --lzma2) is
-          specified, all preset options (-0 ... -9, -e) earlier are on
-          the command line are completely forgotten. Similarly, when
-          a preset option is specified, all custom filter chain options
-          earlier on the command line are completely forgotten.
-
-          Example 1: "xz -9 --lzma2=preset=5 -e" is equivalent to "xz -e"
-          which is equivalent to "xz -6e". Earlier -e didn't put xz back
-          into preset mode and thus the example command was equivalent
-          to "xz --lzma2=preset=5".
-
-          Example 2: "xz -9e --lzma2=preset=5 -7" is equivalent to
-          "xz -7". Earlier a custom filter chain option didn't make
-          xz forget the -e option so the example was equivalent to
-          "xz -7e".
-
-        - Fixes and improvements to error handling.
-
-        - Various fixes to the man page.
-
-    * xzless: Fixed to work with "less" versions 448 and later.
-
-    * xzgrep: Made -h an alias for --no-filename.
-
-    * Include the previously missing debug/translation.bash which can
-      be useful for translators.
-
-    * Include a build script for Mac OS X. This has been in the Git
-      repository since 2010 but due to a mistake in Makefile.am the
-      script hasn't been included in a release tarball before.
-
-
-5.0.4 (2012-06-22)
-
-    * liblzma:
-
-        - Fix lzma_index_init(). It could crash if memory allocation
-          failed.
-
-        - Fix the possibility of an incorrect LZMA_BUF_ERROR when a BCJ
-          filter is used and the application only provides exactly as
-          much output space as is the uncompressed size of the file.
-
-        - Fix a bug in doc/examples_old/xz_pipe_decompress.c. It didn't
-          check if the last call to lzma_code() really returned
-          LZMA_STREAM_END, which made the program think that truncated
-          files are valid.
-
-        - New example programs in doc/examples (old programs are now in
-          doc/examples_old). These have more comments and more detailed
-          error handling.
-
-    * Fix "xz -lvv foo.xz". It could crash on some corrupted files.
-
-    * Fix output of "xz --robot -lv" and "xz --robot -lvv" which
-      incorrectly printed the filename also in the "foo (x/x)" format.
-
-    * Fix exit status of "xzdiff foo.xz bar.xz".
-
-    * Fix exit status of "xzgrep foo binary_file".
-
-    * Fix portability to EBCDIC systems.
-
-    * Fix a configure issue on AIX with the XL C compiler. See INSTALL
-      for details.
-
-    * Update French, German, Italian, and Polish translations.
-
-
-5.0.3 (2011-05-21)
-
-    * liblzma fixes:
-
-        - A memory leak was fixed.
-
-        - lzma_stream_buffer_encode() no longer creates an empty .xz
-          Block if encoding an empty buffer. Such an empty Block with
-          LZMA2 data would trigger a bug in 5.0.1 and older (see the
-          first bullet point in 5.0.2 notes). When releasing 5.0.2,
-          I thought that no encoder creates this kind of files but
-          I was wrong.
-
-        - Validate function arguments better in a few functions. Most
-          importantly, specifying an unsupported integrity check to
-          lzma_stream_buffer_encode() no longer creates a corrupt .xz
-          file. Probably no application tries to do that, so this
-          shouldn't be a big problem in practice.
-
-        - Document that lzma_block_buffer_encode(),
-          lzma_easy_buffer_encode(), lzma_stream_encoder(), and
-          lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
-
-        - The return values of the _memusage() functions are now
-          documented better.
-
-    * Fix command name detection in xzgrep. xzegrep and xzfgrep now
-      correctly use egrep and fgrep instead of grep.
-
-    * French translation was added.
-
-
-5.0.2 (2011-04-01)
-
-    * LZMA2 decompressor now correctly accepts LZMA2 streams with no
-      uncompressed data. Previously it considered them corrupt. The
-      bug can affect applications that use raw LZMA2 streams. It is
-      very unlikely to affect .xz files because no compressor creates
-      .xz files with empty LZMA2 streams. (Empty .xz files are a
-      different thing than empty LZMA2 streams.)
-
-    * "xz --suffix=.foo filename.foo" now refuses to compress the
-      file due to it already having the suffix .foo. It was already
-      documented on the man page, but the code lacked the test.
-
-    * "xzgrep -l foo bar.xz" works now.
-
-    * Polish translation was added.
-
-
-5.0.1 (2011-01-29)
-
-    * xz --force now (de)compresses files that have setuid, setgid,
-      or sticky bit set and files that have multiple hard links.
-      The man page had it documented this way already, but the code
-      had a bug.
-
-    * gzip and bzip2 support in xzdiff was fixed.
-
-    * Portability fixes
-
-    * Minor fix to Czech translation
-
-
-5.0.0 (2010-10-23)
-
-    Only the most important changes compared to 4.999.9beta are listed
-    here. One change is especially important:
-
-      * The memory usage limit is now disabled by default. Some scripts
-        written before this change may have used --memory=max on xz command
-        line or in XZ_OPT. THESE USES OF --memory=max SHOULD BE REMOVED
-        NOW, because they interfere with user's ability to set the memory
-        usage limit himself. If user-specified limit causes problems to
-        your script, blame the user.
-
-    Other significant changes:
-
-      * Added support for XZ_DEFAULTS environment variable. This variable
-        allows users to set default options for xz, e.g. default memory
-        usage limit or default compression level. Scripts that use xz
-        must never set or unset XZ_DEFAULTS. Scripts should use XZ_OPT
-        instead if they need a way to pass options to xz via an
-        environment variable.
-
-      * The compression settings associated with the preset levels
-        -0 ... -9 have been changed. --extreme was changed a little too.
-        It is now less likely to make compression worse, but with some
-        files the new --extreme may compress slightly worse than the old
-        --extreme.
-
-      * If a preset level (-0 ... -9) is specified after a custom filter
-        chain options have been used (e.g. --lzma2), the custom filter
-        chain will be forgotten. Earlier the preset options were
-        completely ignored after custom filter chain options had been
-        seen.
-
-      * xz will create sparse files when decompressing if the uncompressed
-        data contains long sequences of binary zeros. This is done even
-        when writing to standard output that is connected to a regular
-        file and certain additional conditions are met to make it safe.
-
-      * Support for "xz --list" was added. Combine with --verbose or
-        --verbose --verbose (-vv) for detailed output.
-
-      * I had hoped that liblzma API would have been stable after
-        4.999.9beta, but there have been a couple of changes in the
-        advanced features, which don't affect most applications:
-
-          - Index handling code was revised. If you were using the old
-            API, you will get a compiler error (so it's easy to notice).
-
-          - A subtle but important change was made to the Block handling
-            API. lzma_block.version has to be initialized even for
-            lzma_block_header_decode(). Code that doesn't do it will work
-            for now, but might break in the future, which makes this API
-            change easy to miss.
-
-      * The major soname has been bumped to 5.0.0. liblzma API and ABI
-        are now stable, so the need to recompile programs linking against
-        liblzma shouldn't arise soon.
-

Deleted: vendor/xz/5.2.3/PACKAGERS
===================================================================
--- vendor/xz/dist/PACKAGERS	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/PACKAGERS	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,231 +0,0 @@
-
-Information to packagers of XZ Utils
-====================================
-
-    0. Preface
-    1. Package naming
-    2. Package description
-    3. License
-    4. configure options
-    5. Additional documentation
-    6. Extra files
-    7. Installing XZ Utils and LZMA Utils in parallel
-    8. Example
-
-
-0. Preface
-----------
-
-    This document is meant for people who create and maintain XZ Utils
-    packages for operating system distributions. The focus is on GNU/Linux
-    systems, but most things apply to other systems too.
-
-    While the standard "configure && make DESTDIR=$PKG install" should
-    give a pretty good package, there are some details which packagers
-    may want to tweak.
-
-    Packagers should also read the INSTALL file.
-
-
-1. Package naming
------------------
-
-    The preferred name for the XZ Utils package is "xz", because that's
-    the name of the upstream tarball. Naturally you may have good reasons
-    to use some other name; I won't get angry about it. ;-) It's just nice
-    to be able to point people to the correct package name without asking
-    what distro they have.
-
-    If your distro policy is to split things into small pieces, here is
-    one suggestion:
-
-        xz              xz, xzdec, scripts (xzdiff, xzgrep, etc.), docs
-        xz-lzma         lzma, unlzma, lzcat, lzgrep etc. symlinks and
-                        lzmadec binary for compatibility with LZMA Utils
-        liblzma         liblzma.so.*
-        liblzma-devel   liblzma.so, liblzma.a, API headers
-
-
-2. Package description
-----------------------
-
-    Here is a suggestion which you may use as the package description.
-    If you can use only one-line description, pick only the first line.
-    Naturally, feel free to use some other description if you find it
-    better, and maybe send it to me too.
-
-        Library and command line tools for XZ and LZMA compressed files
-
-        XZ Utils provide a general purpose data compression library
-        and command line tools. The native file format is the .xz
-        format, but also the legacy .lzma format is supported. The .xz
-        format supports multiple compression algorithms, of which LZMA2
-        is currently the primary algorithm. With typical files, XZ Utils
-        create about 30 % smaller files than gzip.
-
-    If you are splitting XZ Utils into multiple packages, here are some
-    suggestions for package descriptions:
-
-    xz:
-
-        Command line tools for XZ and LZMA compressed files
-
-        This package includes the xz compression tool and other command
-        line tools from XZ Utils. xz has command line syntax similar to
-        that of gzip. The native file format is the .xz format, but also
-        the legacy .lzma format is supported. The .xz format supports
-        multiple compression algorithms, of which LZMA2 is currently the
-        primary algorithm. With typical files, XZ Utils create about 30 %
-        smaller files than gzip.
-
-        Note that this package doesn't include the files needed for
-        LZMA Utils 4.32.x compatibility. Install also the xz-lzma
-        package to make XZ Utils emulate LZMA Utils 4.32.x.
-
-    xz-lzma:
-
-        LZMA Utils emulation with XZ Utils
-
-        This package includes executables and symlinks to make
-        XZ Utils emulate lzma, unlzma, lzcat, and other command
-        line tools found from the legacy LZMA Utils 4.32.x package.
-
-    liblzma:
-
-        Library for XZ and LZMA compressed files
-
-        liblzma is a general purpose data compression library with
-        an API similar to that of zlib. liblzma supports multiple
-        algorithms, of which LZMA2 is currently the primary algorithm.
-        The native file format is .xz, but also the legacy .lzma
-        format and raw streams (no headers at all) are supported.
-
-        This package includes the shared library.
-
-    liblzma-devel:
-
-        Library for XZ and LZMA compressed files
-
-        This package includes the API headers, static library, and
-        other development files related to liblzma.
-
-
-3. License
-----------
-
-    If the package manager supports a license field, you probably should
-    put GPLv2+ there (GNU GPL v2 or later). The interesting parts of
-    XZ Utils are in the public domain, but some less important files
-    ending up into the binary package are under GPLv2+. So it is simplest
-    to just say GPLv2+ if you cannot specify "public domain and GPLv2+".
-
-    If you split XZ Utils into multiple packages as described earlier
-    in this file, liblzma and liblzma-dev packages will contain only
-    public domain code (from XZ Utils at least; compiler or linker may
-    add some third-party code, which may be copyrighted).
-
-
-4. configure options
---------------------
-
-    Unless you are building a package for a distribution that is meant
-    only for embedded systems, don't use the following configure options:
-
-        --enable-debug
-        --enable-encoders (*)
-        --enable-decoders
-        --enable-match-finders
-        --enable-checks
-        --enable-small (*)
-        --disable-threads (*)
-
-    (*) These are OK when building xzdec and lzmadec as described
-        in INSTALL.
-
-    xzdec and lzmadec don't provide any functionality that isn't already
-    available in the xz tool. Shipping xzdec and lzmadec without size
-    optimization and statically-linked liblzma isn't very useful. Doing
-    that would give users the xzdec man page, which may make it easier
-    for people to find out that such tools exists, but the executables
-    wouldn't have any advantage over the full-featured xz.
-
-
-5. Additional documentation
----------------------------
-
-    "make install" copies some additional documentation to $docdir
-    (--docdir in configure). There is a copy of the GNU GPL v2, which
-    can be replaced with a symlink if your distro ships with shared
-    copies of the common license texts.
-
-    liblzma API is currently only documented using Doxygen tags in the
-    API headers. It hasn't been tested much how good results Doxygen
-    is able to make from the tags (e.g. Doxyfile might need tweaking,
-    the tagging may need to be improved etc.), so it might be simpler
-    to just let people read docs directly from the .h files for now,
-    and also save quite a bit in package size at the same time.
-
-
-6. Extra files
---------------
-
-    The "extra" directory contains some small extra tools or other files.
-    The exact set of extra files can vary between XZ Utils releases. The
-    extra files have only limited use or they are too dangerous to be
-    put directly to $bindir (7z2lzma.sh is a good example, since it can
-    silently create corrupt output if certain conditions are not met).
-
-    If you feel like it, you may copy the extra directory under the doc
-    directory (e.g. /usr/share/doc/xz/extra). Maybe some people will find
-    them useful. However, most people needing these tools probably are
-    able to find them from the source package too.
-
-    The "debug" directory contains some tools that are useful only when
-    hacking on XZ Utils. Don't package these tools.
-
-
-7. Installing XZ Utils and LZMA Utils in parallel
--------------------------------------------------
-
-    XZ Utils and LZMA Utils 4.32.x can be installed in parallel by
-    omitting the compatibility symlinks (lzma, unlzma, lzcat, lzgrep etc.)
-    from the XZ Utils package. It's probably a good idea to still package
-    the symlinks into a separate package so that users may choose if they
-    want to use XZ Utils or LZMA Utils for handling .lzma files.
-
-
-8. Example
-----------
-
-    Here is an example for i686 GNU/Linux that
-      - links xz and lzmainfo against shared liblzma;
-      - links size-optimized xzdec and lzmadec against static liblzma
-        while avoiding libpthread dependency;
-      - includes only shared liblzma in the final package; and
-      - copies also the "extra" directory to the package.
-
-    PKG=/tmp/xz-pkg
-    tar xf xz-x.y.z.tar.gz
-    cd xz-x.y.z
-    ./configure \
-            --prefix=/usr \
-            --disable-static \
-            --disable-xzdec \
-            --disable-lzmadec \
-            CFLAGS='-march=i686 -mtune=generic -O2'
-    make
-    make DESTDIR=$PKG install-strip
-    make clean
-    ./configure \
-            --prefix=/usr \
-            --disable-shared \
-            --disable-nls \
-            --disable-encoders \
-            --enable-small \
-            --disable-threads \
-            CFLAGS='-march=i686 -mtune=generic -Os'
-    make -C src/liblzma
-    make -C src/xzdec
-    make -C src/xzdec DESTDIR=$PKG install-strip
-    cp -a extra $PKG/usr/share/doc/xz
-

Deleted: vendor/xz/5.2.3/THANKS
===================================================================
--- vendor/xz/dist/THANKS	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/THANKS	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,98 +0,0 @@
-
-Thanks
-======
-
-Some people have helped more, some less, but nevertheless everyone's help
-has been important. :-) In alphabetical order:
-  - Mark Adler
-  - H. Peter Anvin
-  - Jeff Bastian
-  - Nelson H. F. Beebe
-  - Karl Berry
-  - Anders F. Björklund
-  - Emmanuel Blot
-  - Martin Blumenstingl
-  - Jakub Bogusz
-  - Maarten Bosmans
-  - Trent W. Buck
-  - James Buren
-  - David Burklund
-  - Daniel Mealha Cabrita
-  - Milo Casagrande
-  - Marek Černocký
-  - Tomer Chachamu
-  - Chris Donawa
-  - Andrew Dudman
-  - Markus Duft
-  - İsmail Dönmez
-  - Robert Elz
-  - Gilles Espinasse
-  - Denis Excoffier
-  - Michael Felt
-  - Mike Frysinger
-  - Daniel Richard G.
-  - Jason Gorski
-  - Juan Manuel Guerrero
-  - Joachim Henke
-  - Peter Ivanov
-  - Jouk Jansen
-  - Per Øyvind Karlsen
-  - Thomas Klausner
-  - Richard Koch
-  - Ville Koskinen
-  - Stephan Kulow
-  - Peter Lawler
-  - Hin-Tak Leung
-  - Andraž 'ruskie' Levstik
-  - Cary Lewis
-  - Wim Lewis
-  - Lorenzo De Liso
-  - Bela Lubkin
-  - Gregory Margo
-  - Jim Meyering
-  - Conley Moorhous
-  - Rafał Mużyło
-  - Adrien Nader
-  - Hongbo Ni
-  - Jonathan Nieder
-  - Andre Noll
-  - Peter O'Gorman
-  - Peter Pallinger
-  - Igor Pavlov
-  - Diego Elio Pettenò
-  - Elbert Pol
-  - Mikko Pouru
-  - Pavel Raiskup
-  - Robert Readman
-  - Bernhard Reutner-Fischer
-  - Eric S. Raymond
-  - Cristian Rodríguez
-  - Christian von Roques
-  - Jukka Salmi
-  - Alexandre Sauvé
-  - Benno Schulenberg
-  - Andreas Schwab
-  - Dan Shechter
-  - Stuart Shelton
-  - Jonathan Stott
-  - Dan Stromberg
-  - Paul Townsend
-  - Mohammed Adnène Trojette
-  - Alexey Tourbin
-  - Patrick J. Volkerding
-  - Martin Väth
-  - Christian Weisgerber
-  - Bert Wesarg
-  - Fredrik Wikstrom
-  - Ralf Wildenhues
-  - Charles Wilson
-  - Lars Wirzenius
-  - Pilorz Wojciech
-  - Ryan Young
-  - Andreas Zieringer
-
-Also thanks to all the people who have participated in the Tukaani project.
-
-I have probably forgot to add some names to the above list. Sorry about
-that and thanks for your help.
-

Copied: vendor/xz/5.2.3/THANKS (from rev 11013, vendor/xz/dist/THANKS)
===================================================================
--- vendor/xz/5.2.3/THANKS	                        (rev 0)
+++ vendor/xz/5.2.3/THANKS	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,120 @@
+
+Thanks
+======
+
+Some people have helped more, some less, but nevertheless everyone's help
+has been important. :-) In alphabetical order:
+  - Mark Adler
+  - H. Peter Anvin
+  - Jeff Bastian
+  - Nelson H. F. Beebe
+  - Karl Berry
+  - Anders F. Björklund
+  - Emmanuel Blot
+  - Martin Blumenstingl
+  - Jakub Bogusz
+  - Maarten Bosmans
+  - Trent W. Buck
+  - James Buren
+  - David Burklund
+  - Daniel Mealha Cabrita
+  - Milo Casagrande
+  - Marek Černocký
+  - Tomer Chachamu
+  - Gabi Davar
+  - Chris Donawa
+  - Andrew Dudman
+  - Markus Duft
+  - İsmail Dönmez
+  - Robert Elz
+  - Gilles Espinasse
+  - Denis Excoffier
+  - Michael Felt
+  - Michael Fox
+  - Mike Frysinger
+  - Daniel Richard G.
+  - Bill Glessner
+  - Jason Gorski
+  - Juan Manuel Guerrero
+  - Diederik de Haas
+  - Joachim Henke
+  - Christian Hesse
+  - Vincenzo Innocente
+  - Peter Ivanov
+  - Jouk Jansen
+  - Jun I Jin
+  - Per Øyvind Karlsen
+  - Thomas Klausner
+  - Richard Koch
+  - Ville Koskinen
+  - Jan Kratochvil
+  - Christian Kujau
+  - Stephan Kulow
+  - Peter Lawler
+  - James M Leddy
+  - Hin-Tak Leung
+  - Andraž 'ruskie' Levstik
+  - Cary Lewis
+  - Wim Lewis
+  - Lorenzo De Liso
+  - Bela Lubkin
+  - Gregory Margo
+  - Jim Meyering
+  - Arkadiusz Miskiewicz
+  - Conley Moorhous
+  - Rafał Mużyło
+  - Adrien Nader
+  - Evan Nemerson
+  - Hongbo Ni
+  - Jonathan Nieder
+  - Andre Noll
+  - Peter O'Gorman
+  - Peter Pallinger
+  - Rui Paulo
+  - Igor Pavlov
+  - Diego Elio Pettenò
+  - Elbert Pol
+  - Mikko Pouru
+  - Rich Prohaska
+  - Trần Ngọc Quân
+  - Pavel Raiskup
+  - Ole André Vadla Ravnås
+  - Robert Readman
+  - Bernhard Reutner-Fischer
+  - Eric S. Raymond
+  - Cristian Rodríguez
+  - Christian von Roques
+  - Torsten Rupp
+  - Jukka Salmi
+  - Alexandre Sauvé
+  - Benno Schulenberg
+  - Andreas Schwab
+  - Dan Shechter
+  - Stuart Shelton
+  - Sebastian Andrzej Siewior
+  - Brad Smith
+  - Jonathan Stott
+  - Dan Stromberg
+  - Vincent Torri
+  - Paul Townsend
+  - Mohammed Adnène Trojette
+  - Alexey Tourbin
+  - Patrick J. Volkerding
+  - Martin Väth
+  - Adam Walling
+  - Christian Weisgerber
+  - Bert Wesarg
+  - Fredrik Wikstrom
+  - Jim Wilcoxson
+  - Ralf Wildenhues
+  - Charles Wilson
+  - Lars Wirzenius
+  - Pilorz Wojciech
+  - Ryan Young
+  - Andreas Zieringer
+
+Also thanks to all the people who have participated in the Tukaani project.
+
+I have probably forgot to add some names to the above list. Sorry about
+that and thanks for your help.
+

Deleted: vendor/xz/5.2.3/TODO
===================================================================
--- vendor/xz/dist/TODO	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/TODO	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,63 +0,0 @@
-
-XZ Utils To-Do List
-===================
-
-Known bugs
-----------
-
-    The test suite is too incomplete.
-
-    If the memory usage limit is less than about 13 MiB, xz is unable to
-    automatically scale down the compression settings enough even though
-    it would be  possible by switching from BT2/BT3/BT4 match finder to
-    HC3/HC4.
-
-    XZ Utils compress some files significantly worse than LZMA Utils.
-    This is due to faster compression presets used by XZ Utils, and
-    can often be worked around by using "xz --extreme". With some files
-    --extreme isn't enough though: it's most likely with files that
-    compress extremely well, so going from compression ratio of 0.003
-    to 0.004 means big relative increase in the compressed file size.
-
-    xz doesn't quote unprintable characters when it displays file names
-    given on the command line.
-
-    tuklib_exit() doesn't block signals => EINTR is possible.
-
-    SIGTSTP is not handled. If xz is stopped, the estimated remaining
-    time and calculated (de)compression speed won't make sense in the
-    progress indicator (xz --verbose).
-
-
-Missing features
-----------------
-
-    xz doesn't support copying extended attributes, access control
-    lists etc. from source to target file.
-
-    Multithreaded compression
-
-    Multithreaded decompression
-
-    Buffer-to-buffer coding could use less RAM (especially when
-    decompressing LZMA1 or LZMA2).
-
-    I/O library is not implemented (similar to gzopen() in zlib).
-    It will be a separate library that supports uncompressed, .gz,
-    .bz2, .lzma, and .xz files.
-
-    lzma_strerror() to convert lzma_ret to human readable form?
-    This is tricky, because the same error codes are used with
-    slightly different meanings, and this cannot be fixed anymore.
-
-
-Documentation
--------------
-
-    Some tutorial is needed for liblzma. I have planned to write some
-    extremely well commented example programs, which would work as
-    a tutorial. I suppose the Doxygen tags are quite OK as a quick
-    reference once one is familiar with the liblzma API.
-
-    Document the LZMA1 and LZMA2 algorithms.
-

Copied: vendor/xz/5.2.3/TODO (from rev 9176, vendor/xz/dist/TODO)
===================================================================
--- vendor/xz/5.2.3/TODO	                        (rev 0)
+++ vendor/xz/5.2.3/TODO	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,111 @@
+
+XZ Utils To-Do List
+===================
+
+Known bugs
+----------
+
+    The test suite is too incomplete.
+
+    If the memory usage limit is less than about 13 MiB, xz is unable to
+    automatically scale down the compression settings enough even though
+    it would be  possible by switching from BT2/BT3/BT4 match finder to
+    HC3/HC4.
+
+    XZ Utils compress some files significantly worse than LZMA Utils.
+    This is due to faster compression presets used by XZ Utils, and
+    can often be worked around by using "xz --extreme". With some files
+    --extreme isn't enough though: it's most likely with files that
+    compress extremely well, so going from compression ratio of 0.003
+    to 0.004 means big relative increase in the compressed file size.
+
+    xz doesn't quote unprintable characters when it displays file names
+    given on the command line.
+
+    tuklib_exit() doesn't block signals => EINTR is possible.
+
+    SIGTSTP is not handled. If xz is stopped, the estimated remaining
+    time and calculated (de)compression speed won't make sense in the
+    progress indicator (xz --verbose).
+
+    If liblzma has created threads and fork() gets called, liblzma
+    code will break in the child process unless it calls exec() and
+    doesn't touch liblzma.
+
+
+Missing features
+----------------
+
+    Add support for storing metadata in .xz files. A preliminary
+    idea is to create a new Stream type for metadata. When both
+    metadata and data are wanted in the same .xz file, two or more
+    Streams would be concatenated.
+
+    The state stored in lzma_stream should be cloneable, which would
+    be mostly useful when using a preset dictionary in LZMA2, but
+    it may have other uses too. Compare to deflateCopy() in zlib.
+
+    Support LZMA_FINISH in raw decoder to indicate end of LZMA1 and
+    other streams that don't have an end of payload marker.
+
+    Adjust dictionary size when the input file size is known.
+    Maybe do this only if an option is given.
+
+    xz doesn't support copying extended attributes, access control
+    lists etc. from source to target file.
+
+    Multithreaded compression:
+      - Reduce memory usage of the current method.
+      - Implement threaded match finders.
+      - Implement pigz-style threading in LZMA2.
+
+    Multithreaded decompression
+
+    Buffer-to-buffer coding could use less RAM (especially when
+    decompressing LZMA1 or LZMA2).
+
+    I/O library is not implemented (similar to gzopen() in zlib).
+    It will be a separate library that supports uncompressed, .gz,
+    .bz2, .lzma, and .xz files.
+
+    Support changing lzma_options_lzma.mode with lzma_filters_update().
+
+    Support LZMA_FULL_FLUSH for lzma_stream_decoder() to stop at
+    Block and Stream boundaries.
+
+    lzma_strerror() to convert lzma_ret to human readable form?
+    This is tricky, because the same error codes are used with
+    slightly different meanings, and this cannot be fixed anymore.
+
+    Make it possible to adjust LZMA2 options in the middle of a Block
+    so that the encoding speed vs. compression ratio can be optimized
+    when the compressed data is streamed over network.
+
+    Improved BCJ filters. The current filters are small but they aren't
+    so great when compressing binary packages that contain various file
+    types. Specifically, they make things worse if there are static
+    libraries or Linux kernel modules. The filtering could also be
+    more effective (without getting overly complex), for example,
+    streamable variant BCJ2 from 7-Zip could be implemented.
+
+    Filter that autodetects specific data types in the input stream
+    and applies appropriate filters for the corrects parts of the input.
+    Perhaps combine this with the BCJ filter improvement point above.
+
+    Long-range LZ77 method as a separate filter or as a new LZMA2
+    match finder.
+
+
+Documentation
+-------------
+
+    More tutorial programs are needed for liblzma.
+
+    Document the LZMA1 and LZMA2 algorithms.
+
+
+Miscellaneous
+------------
+
+    Try to get the media type for .xz registered at IANA.
+

Deleted: vendor/xz/5.2.3/src/common/common_w32res.rc
===================================================================
--- vendor/xz/dist/src/common/common_w32res.rc	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/common/common_w32res.rc	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,50 +0,0 @@
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#include <winresrc.h>
-#include "config.h"
-#define LZMA_H_INTERNAL
-#define LZMA_H_INTERNAL_RC
-#include "lzma/version.h"
-
-#ifndef MY_BUILD
-# define MY_BUILD 0
-#endif
-#define MY_VERSION LZMA_VERSION_MAJOR,LZMA_VERSION_MINOR,LZMA_VERSION_PATCH,MY_BUILD
-
-#define MY_FILENAME    MY_NAME MY_SUFFIX
-#define MY_COMPANY     "The Tukaani Project <http://tukaani.org/>"
-#define MY_PRODUCT     PACKAGE_NAME " <" PACKAGE_URL ">"
-
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-VS_VERSION_INFO VERSIONINFO
-  FILEVERSION MY_VERSION
-  PRODUCTVERSION MY_VERSION
-  FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-  FILEFLAGS 0
-  FILEOS VOS_NT_WINDOWS32
-  FILETYPE MY_TYPE
-  FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904b0"
-        BEGIN
-            VALUE "CompanyName", MY_COMPANY
-            VALUE "FileDescription", MY_DESC
-            VALUE "FileVersion", LZMA_VERSION_STRING
-            VALUE "InternalName", MY_NAME
-            VALUE "OriginalFilename", MY_FILENAME
-            VALUE "ProductName", MY_PRODUCT
-            VALUE "ProductVersion", LZMA_VERSION_STRING
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x409, 1200
-    END
-END

Deleted: vendor/xz/5.2.3/src/common/mythread.h
===================================================================
--- vendor/xz/dist/src/common/mythread.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/common/mythread.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,42 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       mythread.h
-/// \brief      Wrappers for threads
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "sysdefs.h"
-
-
-#ifdef HAVE_PTHREAD
-#	include <pthread.h>
-
-#	define mythread_once(func) \
-	do { \
-		static pthread_once_t once_ = PTHREAD_ONCE_INIT; \
-		pthread_once(&once_, &func); \
-	} while (0)
-
-#	define mythread_sigmask(how, set, oset) \
-		pthread_sigmask(how, set, oset)
-
-#else
-
-#	define mythread_once(func) \
-	do { \
-		static bool once_ = false; \
-		if (!once_) { \
-			func(); \
-			once_ = true; \
-		} \
-	} while (0)
-
-#	define mythread_sigmask(how, set, oset) \
-		sigprocmask(how, set, oset)
-
-#endif

Copied: vendor/xz/5.2.3/src/common/mythread.h (from rev 9176, vendor/xz/dist/src/common/mythread.h)
===================================================================
--- vendor/xz/5.2.3/src/common/mythread.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/common/mythread.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,521 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       mythread.h
+/// \brief      Some threading related helper macros and functions
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef MYTHREAD_H
+#define MYTHREAD_H
+
+#include "sysdefs.h"
+
+// If any type of threading is enabled, #define MYTHREAD_ENABLED.
+#if defined(MYTHREAD_POSIX) || defined(MYTHREAD_WIN95) \
+		|| defined(MYTHREAD_VISTA)
+#	define MYTHREAD_ENABLED 1
+#endif
+
+
+#ifdef MYTHREAD_ENABLED
+
+////////////////////////////////////////
+// Shared between all threading types //
+////////////////////////////////////////
+
+// Locks a mutex for a duration of a block.
+//
+// Perform mythread_mutex_lock(&mutex) in the beginning of a block
+// and mythread_mutex_unlock(&mutex) at the end of the block. "break"
+// may be used to unlock the mutex and jump out of the block.
+// mythread_sync blocks may be nested.
+//
+// Example:
+//
+//     mythread_sync(mutex) {
+//         foo();
+//         if (some_error)
+//             break; // Skips bar()
+//         bar();
+//     }
+//
+// At least GCC optimizes the loops completely away so it doesn't slow
+// things down at all compared to plain mythread_mutex_lock(&mutex)
+// and mythread_mutex_unlock(&mutex) calls.
+//
+#define mythread_sync(mutex) mythread_sync_helper1(mutex, __LINE__)
+#define mythread_sync_helper1(mutex, line) mythread_sync_helper2(mutex, line)
+#define mythread_sync_helper2(mutex, line) \
+	for (unsigned int mythread_i_ ## line = 0; \
+			mythread_i_ ## line \
+				? (mythread_mutex_unlock(&(mutex)), 0) \
+				: (mythread_mutex_lock(&(mutex)), 1); \
+			mythread_i_ ## line = 1) \
+		for (unsigned int mythread_j_ ## line = 0; \
+				!mythread_j_ ## line; \
+				mythread_j_ ## line = 1)
+#endif
+
+
+#if !defined(MYTHREAD_ENABLED)
+
+//////////////////
+// No threading //
+//////////////////
+
+// Calls the given function once. This isn't thread safe.
+#define mythread_once(func) \
+do { \
+	static bool once_ = false; \
+	if (!once_) { \
+		func(); \
+		once_ = true; \
+	} \
+} while (0)
+
+
+#if !(defined(_WIN32) && !defined(__CYGWIN__))
+// Use sigprocmask() to set the signal mask in single-threaded programs.
+#include <signal.h>
+
+static inline void
+mythread_sigmask(int how, const sigset_t *restrict set,
+		sigset_t *restrict oset)
+{
+	int ret = sigprocmask(how, set, oset);
+	assert(ret == 0);
+	(void)ret;
+}
+#endif
+
+
+#elif defined(MYTHREAD_POSIX)
+
+////////////////////
+// Using pthreads //
+////////////////////
+
+#include <sys/time.h>
+#include <pthread.h>
+#include <signal.h>
+#include <time.h>
+#include <errno.h>
+
+#define MYTHREAD_RET_TYPE void *
+#define MYTHREAD_RET_VALUE NULL
+
+typedef pthread_t mythread;
+typedef pthread_mutex_t mythread_mutex;
+
+typedef struct {
+	pthread_cond_t cond;
+#ifdef HAVE_CLOCK_GETTIME
+	// Clock ID (CLOCK_REALTIME or CLOCK_MONOTONIC) associated with
+	// the condition variable.
+	clockid_t clk_id;
+#endif
+} mythread_cond;
+
+typedef struct timespec mythread_condtime;
+
+
+// Calls the given function once in a thread-safe way.
+#define mythread_once(func) \
+	do { \
+		static pthread_once_t once_ = PTHREAD_ONCE_INIT; \
+		pthread_once(&once_, &func); \
+	} while (0)
+
+
+// Use pthread_sigmask() to set the signal mask in multi-threaded programs.
+// Do nothing on OpenVMS since it lacks pthread_sigmask().
+static inline void
+mythread_sigmask(int how, const sigset_t *restrict set,
+		sigset_t *restrict oset)
+{
+#ifdef __VMS
+	(void)how;
+	(void)set;
+	(void)oset;
+#else
+	int ret = pthread_sigmask(how, set, oset);
+	assert(ret == 0);
+	(void)ret;
+#endif
+}
+
+
+// Creates a new thread with all signals blocked. Returns zero on success
+// and non-zero on error.
+static inline int
+mythread_create(mythread *thread, void *(*func)(void *arg), void *arg)
+{
+	sigset_t old;
+	sigset_t all;
+	sigfillset(&all);
+
+	mythread_sigmask(SIG_SETMASK, &all, &old);
+	const int ret = pthread_create(thread, NULL, func, arg);
+	mythread_sigmask(SIG_SETMASK, &old, NULL);
+
+	return ret;
+}
+
+// Joins a thread. Returns zero on success and non-zero on error.
+static inline int
+mythread_join(mythread thread)
+{
+	return pthread_join(thread, NULL);
+}
+
+
+// Initiatlizes a mutex. Returns zero on success and non-zero on error.
+static inline int
+mythread_mutex_init(mythread_mutex *mutex)
+{
+	return pthread_mutex_init(mutex, NULL);
+}
+
+static inline void
+mythread_mutex_destroy(mythread_mutex *mutex)
+{
+	int ret = pthread_mutex_destroy(mutex);
+	assert(ret == 0);
+	(void)ret;
+}
+
+static inline void
+mythread_mutex_lock(mythread_mutex *mutex)
+{
+	int ret = pthread_mutex_lock(mutex);
+	assert(ret == 0);
+	(void)ret;
+}
+
+static inline void
+mythread_mutex_unlock(mythread_mutex *mutex)
+{
+	int ret = pthread_mutex_unlock(mutex);
+	assert(ret == 0);
+	(void)ret;
+}
+
+
+// Initializes a condition variable.
+//
+// Using CLOCK_MONOTONIC instead of the default CLOCK_REALTIME makes the
+// timeout in pthread_cond_timedwait() work correctly also if system time
+// is suddenly changed. Unfortunately CLOCK_MONOTONIC isn't available
+// everywhere while the default CLOCK_REALTIME is, so the default is
+// used if CLOCK_MONOTONIC isn't available.
+//
+// If clock_gettime() isn't available at all, gettimeofday() will be used.
+static inline int
+mythread_cond_init(mythread_cond *mycond)
+{
+#ifdef HAVE_CLOCK_GETTIME
+	// NOTE: HAVE_DECL_CLOCK_MONOTONIC is always defined to 0 or 1.
+#	if defined(HAVE_PTHREAD_CONDATTR_SETCLOCK) && HAVE_DECL_CLOCK_MONOTONIC
+	struct timespec ts;
+	pthread_condattr_t condattr;
+
+	// POSIX doesn't seem to *require* that pthread_condattr_setclock()
+	// will fail if given an unsupported clock ID. Test that
+	// CLOCK_MONOTONIC really is supported using clock_gettime().
+	if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0
+			&& pthread_condattr_init(&condattr) == 0) {
+		int ret = pthread_condattr_setclock(
+				&condattr, CLOCK_MONOTONIC);
+		if (ret == 0)
+			ret = pthread_cond_init(&mycond->cond, &condattr);
+
+		pthread_condattr_destroy(&condattr);
+
+		if (ret == 0) {
+			mycond->clk_id = CLOCK_MONOTONIC;
+			return 0;
+		}
+	}
+
+	// If anything above fails, fall back to the default CLOCK_REALTIME.
+	// POSIX requires that all implementations of clock_gettime() must
+	// support at least CLOCK_REALTIME.
+#	endif
+
+	mycond->clk_id = CLOCK_REALTIME;
+#endif
+
+	return pthread_cond_init(&mycond->cond, NULL);
+}
+
+static inline void
+mythread_cond_destroy(mythread_cond *cond)
+{
+	int ret = pthread_cond_destroy(&cond->cond);
+	assert(ret == 0);
+	(void)ret;
+}
+
+static inline void
+mythread_cond_signal(mythread_cond *cond)
+{
+	int ret = pthread_cond_signal(&cond->cond);
+	assert(ret == 0);
+	(void)ret;
+}
+
+static inline void
+mythread_cond_wait(mythread_cond *cond, mythread_mutex *mutex)
+{
+	int ret = pthread_cond_wait(&cond->cond, mutex);
+	assert(ret == 0);
+	(void)ret;
+}
+
+// Waits on a condition or until a timeout expires. If the timeout expires,
+// non-zero is returned, otherwise zero is returned.
+static inline int
+mythread_cond_timedwait(mythread_cond *cond, mythread_mutex *mutex,
+		const mythread_condtime *condtime)
+{
+	int ret = pthread_cond_timedwait(&cond->cond, mutex, condtime);
+	assert(ret == 0 || ret == ETIMEDOUT);
+	return ret;
+}
+
+// Sets condtime to the absolute time that is timeout_ms milliseconds
+// in the future. The type of the clock to use is taken from cond.
+static inline void
+mythread_condtime_set(mythread_condtime *condtime, const mythread_cond *cond,
+		uint32_t timeout_ms)
+{
+	condtime->tv_sec = timeout_ms / 1000;
+	condtime->tv_nsec = (timeout_ms % 1000) * 1000000;
+
+#ifdef HAVE_CLOCK_GETTIME
+	struct timespec now;
+	int ret = clock_gettime(cond->clk_id, &now);
+	assert(ret == 0);
+	(void)ret;
+
+	condtime->tv_sec += now.tv_sec;
+	condtime->tv_nsec += now.tv_nsec;
+#else
+	(void)cond;
+
+	struct timeval now;
+	gettimeofday(&now, NULL);
+
+	condtime->tv_sec += now.tv_sec;
+	condtime->tv_nsec += now.tv_usec * 1000L;
+#endif
+
+	// tv_nsec must stay in the range [0, 999_999_999].
+	if (condtime->tv_nsec >= 1000000000L) {
+		condtime->tv_nsec -= 1000000000L;
+		++condtime->tv_sec;
+	}
+}
+
+
+#elif defined(MYTHREAD_WIN95) || defined(MYTHREAD_VISTA)
+
+/////////////////////
+// Windows threads //
+/////////////////////
+
+#define WIN32_LEAN_AND_MEAN
+#ifdef MYTHREAD_VISTA
+#	undef _WIN32_WINNT
+#	define _WIN32_WINNT 0x0600
+#endif
+#include <windows.h>
+#include <process.h>
+
+#define MYTHREAD_RET_TYPE unsigned int __stdcall
+#define MYTHREAD_RET_VALUE 0
+
+typedef HANDLE mythread;
+typedef CRITICAL_SECTION mythread_mutex;
+
+#ifdef MYTHREAD_WIN95
+typedef HANDLE mythread_cond;
+#else
+typedef CONDITION_VARIABLE mythread_cond;
+#endif
+
+typedef struct {
+	// Tick count (milliseconds) in the beginning of the timeout.
+	// NOTE: This is 32 bits so it wraps around after 49.7 days.
+	// Multi-day timeouts may not work as expected.
+	DWORD start;
+
+	// Length of the timeout in milliseconds. The timeout expires
+	// when the current tick count minus "start" is equal or greater
+	// than "timeout".
+	DWORD timeout;
+} mythread_condtime;
+
+
+// mythread_once() is only available with Vista threads.
+#ifdef MYTHREAD_VISTA
+#define mythread_once(func) \
+	do { \
+		static INIT_ONCE once_ = INIT_ONCE_STATIC_INIT; \
+		BOOL pending_; \
+		if (!InitOnceBeginInitialize(&once_, 0, &pending_, NULL)) \
+			abort(); \
+		if (pending_) \
+			func(); \
+		if (!InitOnceComplete(&once, 0, NULL)) \
+			abort(); \
+	} while (0)
+#endif
+
+
+// mythread_sigmask() isn't available on Windows. Even a dummy version would
+// make no sense because the other POSIX signal functions are missing anyway.
+
+
+static inline int
+mythread_create(mythread *thread,
+		unsigned int (__stdcall *func)(void *arg), void *arg)
+{
+	uintptr_t ret = _beginthreadex(NULL, 0, func, arg, 0, NULL);
+	if (ret == 0)
+		return -1;
+
+	*thread = (HANDLE)ret;
+	return 0;
+}
+
+static inline int
+mythread_join(mythread thread)
+{
+	int ret = 0;
+
+	if (WaitForSingleObject(thread, INFINITE) != WAIT_OBJECT_0)
+		ret = -1;
+
+	if (!CloseHandle(thread))
+		ret = -1;
+
+	return ret;
+}
+
+
+static inline int
+mythread_mutex_init(mythread_mutex *mutex)
+{
+	InitializeCriticalSection(mutex);
+	return 0;
+}
+
+static inline void
+mythread_mutex_destroy(mythread_mutex *mutex)
+{
+	DeleteCriticalSection(mutex);
+}
+
+static inline void
+mythread_mutex_lock(mythread_mutex *mutex)
+{
+	EnterCriticalSection(mutex);
+}
+
+static inline void
+mythread_mutex_unlock(mythread_mutex *mutex)
+{
+	LeaveCriticalSection(mutex);
+}
+
+
+static inline int
+mythread_cond_init(mythread_cond *cond)
+{
+#ifdef MYTHREAD_WIN95
+	*cond = CreateEvent(NULL, FALSE, FALSE, NULL);
+	return *cond == NULL ? -1 : 0;
+#else
+	InitializeConditionVariable(cond);
+	return 0;
+#endif
+}
+
+static inline void
+mythread_cond_destroy(mythread_cond *cond)
+{
+#ifdef MYTHREAD_WIN95
+	CloseHandle(*cond);
+#else
+	(void)cond;
+#endif
+}
+
+static inline void
+mythread_cond_signal(mythread_cond *cond)
+{
+#ifdef MYTHREAD_WIN95
+	SetEvent(*cond);
+#else
+	WakeConditionVariable(cond);
+#endif
+}
+
+static inline void
+mythread_cond_wait(mythread_cond *cond, mythread_mutex *mutex)
+{
+#ifdef MYTHREAD_WIN95
+	LeaveCriticalSection(mutex);
+	WaitForSingleObject(*cond, INFINITE);
+	EnterCriticalSection(mutex);
+#else
+	BOOL ret = SleepConditionVariableCS(cond, mutex, INFINITE);
+	assert(ret);
+	(void)ret;
+#endif
+}
+
+static inline int
+mythread_cond_timedwait(mythread_cond *cond, mythread_mutex *mutex,
+		const mythread_condtime *condtime)
+{
+#ifdef MYTHREAD_WIN95
+	LeaveCriticalSection(mutex);
+#endif
+
+	DWORD elapsed = GetTickCount() - condtime->start;
+	DWORD timeout = elapsed >= condtime->timeout
+			? 0 : condtime->timeout - elapsed;
+
+#ifdef MYTHREAD_WIN95
+	DWORD ret = WaitForSingleObject(*cond, timeout);
+	assert(ret == WAIT_OBJECT_0 || ret == WAIT_TIMEOUT);
+
+	EnterCriticalSection(mutex);
+
+	return ret == WAIT_TIMEOUT;
+#else
+	BOOL ret = SleepConditionVariableCS(cond, mutex, timeout);
+	assert(ret || GetLastError() == ERROR_TIMEOUT);
+	return !ret;
+#endif
+}
+
+static inline void
+mythread_condtime_set(mythread_condtime *condtime, const mythread_cond *cond,
+		uint32_t timeout)
+{
+	(void)cond;
+	condtime->start = GetTickCount();
+	condtime->timeout = timeout;
+}
+
+#endif
+
+#endif

Deleted: vendor/xz/5.2.3/src/common/sysdefs.h
===================================================================
--- vendor/xz/dist/src/common/sysdefs.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/common/sysdefs.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,192 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       sysdefs.h
-/// \brief      Common includes, definitions, system-specific things etc.
-///
-/// This file is used also by the lzma command line tool, that's why this
-/// file is separate from common.h.
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_SYSDEFS_H
-#define LZMA_SYSDEFS_H
-
-//////////////
-// Includes //
-//////////////
-
-#ifdef HAVE_CONFIG_H
-#	include <config.h>
-#endif
-
-// Get standard-compliant stdio functions under MinGW and MinGW-w64.
-#ifdef __MINGW32__
-#	define __USE_MINGW_ANSI_STDIO 1
-#endif
-
-// size_t and NULL
-#include <stddef.h>
-
-#ifdef HAVE_INTTYPES_H
-#	include <inttypes.h>
-#endif
-
-// C99 says that inttypes.h always includes stdint.h, but some systems
-// don't do that, and require including stdint.h separately.
-#ifdef HAVE_STDINT_H
-#	include <stdint.h>
-#endif
-
-// Some pre-C99 systems have SIZE_MAX in limits.h instead of stdint.h. The
-// limits are also used to figure out some macros missing from pre-C99 systems.
-#ifdef HAVE_LIMITS_H
-#	include <limits.h>
-#endif
-
-// Be more compatible with systems that have non-conforming inttypes.h.
-// We assume that int is 32-bit and that long is either 32-bit or 64-bit.
-// Full Autoconf test could be more correct, but this should work well enough.
-// Note that this duplicates some code from lzma.h, but this is better since
-// we can work without inttypes.h thanks to Autoconf tests.
-#ifndef UINT32_C
-#	if UINT_MAX != 4294967295U
-#		error UINT32_C is not defined and unsigned int is not 32-bit.
-#	endif
-#	define UINT32_C(n) n ## U
-#endif
-#ifndef UINT32_MAX
-#	define UINT32_MAX UINT32_C(4294967295)
-#endif
-#ifndef PRIu32
-#	define PRIu32 "u"
-#endif
-#ifndef PRIx32
-#	define PRIx32 "x"
-#endif
-#ifndef PRIX32
-#	define PRIX32 "X"
-#endif
-
-#if ULONG_MAX == 4294967295UL
-#	ifndef UINT64_C
-#		define UINT64_C(n) n ## ULL
-#	endif
-#	ifndef PRIu64
-#		define PRIu64 "llu"
-#	endif
-#	ifndef PRIx64
-#		define PRIx64 "llx"
-#	endif
-#	ifndef PRIX64
-#		define PRIX64 "llX"
-#	endif
-#else
-#	ifndef UINT64_C
-#		define UINT64_C(n) n ## UL
-#	endif
-#	ifndef PRIu64
-#		define PRIu64 "lu"
-#	endif
-#	ifndef PRIx64
-#		define PRIx64 "lx"
-#	endif
-#	ifndef PRIX64
-#		define PRIX64 "lX"
-#	endif
-#endif
-#ifndef UINT64_MAX
-#	define UINT64_MAX UINT64_C(18446744073709551615)
-#endif
-
-// Incorrect(?) SIZE_MAX:
-//   - Interix headers typedef size_t to unsigned long,
-//     but a few lines later define SIZE_MAX to INT32_MAX.
-//   - SCO OpenServer (x86) headers typedef size_t to unsigned int
-//     but define SIZE_MAX to INT32_MAX.
-#if defined(__INTERIX) || defined(_SCO_DS)
-#	undef SIZE_MAX
-#endif
-
-// The code currently assumes that size_t is either 32-bit or 64-bit.
-#ifndef SIZE_MAX
-#	if SIZEOF_SIZE_T == 4
-#		define SIZE_MAX UINT32_MAX
-#	elif SIZEOF_SIZE_T == 8
-#		define SIZE_MAX UINT64_MAX
-#	else
-#		error size_t is not 32-bit or 64-bit
-#	endif
-#endif
-#if SIZE_MAX != UINT32_MAX && SIZE_MAX != UINT64_MAX
-#	error size_t is not 32-bit or 64-bit
-#endif
-
-#include <stdlib.h>
-#include <assert.h>
-
-// Pre-C99 systems lack stdbool.h. All the code in LZMA Utils must be written
-// so that it works with fake bool type, for example:
-//
-//    bool foo = (flags & 0x100) != 0;
-//    bool bar = !!(flags & 0x100);
-//
-// This works with the real C99 bool but breaks with fake bool:
-//
-//    bool baz = (flags & 0x100);
-//
-#ifdef HAVE_STDBOOL_H
-#	include <stdbool.h>
-#else
-#	if ! HAVE__BOOL
-typedef unsigned char _Bool;
-#	endif
-#	define bool _Bool
-#	define false 0
-#	define true 1
-#	define __bool_true_false_are_defined 1
-#endif
-
-// string.h should be enough but let's include strings.h and memory.h too if
-// they exists, since that shouldn't do any harm, but may improve portability.
-#ifdef HAVE_STRING_H
-#	include <string.h>
-#endif
-
-#ifdef HAVE_STRINGS_H
-#	include <strings.h>
-#endif
-
-#ifdef HAVE_MEMORY_H
-#	include <memory.h>
-#endif
-
-
-////////////
-// Macros //
-////////////
-
-#undef memzero
-#define memzero(s, n) memset(s, 0, n)
-
-// NOTE: Avoid using MIN() and MAX(), because even conditionally defining
-// those macros can cause some portability trouble, since on some systems
-// the system headers insist defining their own versions.
-#define my_min(x, y) ((x) < (y) ? (x) : (y))
-#define my_max(x, y) ((x) > (y) ? (x) : (y))
-
-#ifndef ARRAY_SIZE
-#	define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
-#endif
-
-#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4
-#	define lzma_attr_alloc_size(x) __attribute__((__alloc_size__(x)))
-#else
-#	define lzma_attr_alloc_size(x)
-#endif
-
-#endif

Copied: vendor/xz/5.2.3/src/common/sysdefs.h (from rev 9176, vendor/xz/dist/src/common/sysdefs.h)
===================================================================
--- vendor/xz/5.2.3/src/common/sysdefs.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/common/sysdefs.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,202 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       sysdefs.h
+/// \brief      Common includes, definitions, system-specific things etc.
+///
+/// This file is used also by the lzma command line tool, that's why this
+/// file is separate from common.h.
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_SYSDEFS_H
+#define LZMA_SYSDEFS_H
+
+//////////////
+// Includes //
+//////////////
+
+#ifdef HAVE_CONFIG_H
+#	include <config.h>
+#endif
+
+// Get standard-compliant stdio functions under MinGW and MinGW-w64.
+#ifdef __MINGW32__
+#	define __USE_MINGW_ANSI_STDIO 1
+#endif
+
+// size_t and NULL
+#include <stddef.h>
+
+#ifdef HAVE_INTTYPES_H
+#	include <inttypes.h>
+#endif
+
+// C99 says that inttypes.h always includes stdint.h, but some systems
+// don't do that, and require including stdint.h separately.
+#ifdef HAVE_STDINT_H
+#	include <stdint.h>
+#endif
+
+// Some pre-C99 systems have SIZE_MAX in limits.h instead of stdint.h. The
+// limits are also used to figure out some macros missing from pre-C99 systems.
+#ifdef HAVE_LIMITS_H
+#	include <limits.h>
+#endif
+
+// Be more compatible with systems that have non-conforming inttypes.h.
+// We assume that int is 32-bit and that long is either 32-bit or 64-bit.
+// Full Autoconf test could be more correct, but this should work well enough.
+// Note that this duplicates some code from lzma.h, but this is better since
+// we can work without inttypes.h thanks to Autoconf tests.
+#ifndef UINT32_C
+#	if UINT_MAX != 4294967295U
+#		error UINT32_C is not defined and unsigned int is not 32-bit.
+#	endif
+#	define UINT32_C(n) n ## U
+#endif
+#ifndef UINT32_MAX
+#	define UINT32_MAX UINT32_C(4294967295)
+#endif
+#ifndef PRIu32
+#	define PRIu32 "u"
+#endif
+#ifndef PRIx32
+#	define PRIx32 "x"
+#endif
+#ifndef PRIX32
+#	define PRIX32 "X"
+#endif
+
+#if ULONG_MAX == 4294967295UL
+#	ifndef UINT64_C
+#		define UINT64_C(n) n ## ULL
+#	endif
+#	ifndef PRIu64
+#		define PRIu64 "llu"
+#	endif
+#	ifndef PRIx64
+#		define PRIx64 "llx"
+#	endif
+#	ifndef PRIX64
+#		define PRIX64 "llX"
+#	endif
+#else
+#	ifndef UINT64_C
+#		define UINT64_C(n) n ## UL
+#	endif
+#	ifndef PRIu64
+#		define PRIu64 "lu"
+#	endif
+#	ifndef PRIx64
+#		define PRIx64 "lx"
+#	endif
+#	ifndef PRIX64
+#		define PRIX64 "lX"
+#	endif
+#endif
+#ifndef UINT64_MAX
+#	define UINT64_MAX UINT64_C(18446744073709551615)
+#endif
+
+// Incorrect(?) SIZE_MAX:
+//   - Interix headers typedef size_t to unsigned long,
+//     but a few lines later define SIZE_MAX to INT32_MAX.
+//   - SCO OpenServer (x86) headers typedef size_t to unsigned int
+//     but define SIZE_MAX to INT32_MAX.
+#if defined(__INTERIX) || defined(_SCO_DS)
+#	undef SIZE_MAX
+#endif
+
+// The code currently assumes that size_t is either 32-bit or 64-bit.
+#ifndef SIZE_MAX
+#	if SIZEOF_SIZE_T == 4
+#		define SIZE_MAX UINT32_MAX
+#	elif SIZEOF_SIZE_T == 8
+#		define SIZE_MAX UINT64_MAX
+#	else
+#		error size_t is not 32-bit or 64-bit
+#	endif
+#endif
+#if SIZE_MAX != UINT32_MAX && SIZE_MAX != UINT64_MAX
+#	error size_t is not 32-bit or 64-bit
+#endif
+
+#include <stdlib.h>
+#include <assert.h>
+
+// Pre-C99 systems lack stdbool.h. All the code in LZMA Utils must be written
+// so that it works with fake bool type, for example:
+//
+//    bool foo = (flags & 0x100) != 0;
+//    bool bar = !!(flags & 0x100);
+//
+// This works with the real C99 bool but breaks with fake bool:
+//
+//    bool baz = (flags & 0x100);
+//
+#ifdef HAVE_STDBOOL_H
+#	include <stdbool.h>
+#else
+#	if ! HAVE__BOOL
+typedef unsigned char _Bool;
+#	endif
+#	define bool _Bool
+#	define false 0
+#	define true 1
+#	define __bool_true_false_are_defined 1
+#endif
+
+// string.h should be enough but let's include strings.h and memory.h too if
+// they exists, since that shouldn't do any harm, but may improve portability.
+#ifdef HAVE_STRING_H
+#	include <string.h>
+#endif
+
+#ifdef HAVE_STRINGS_H
+#	include <strings.h>
+#endif
+
+#ifdef HAVE_MEMORY_H
+#	include <memory.h>
+#endif
+
+// As of MSVC 2013, inline and restrict are supported with
+// non-standard keywords.
+#if defined(_WIN32) && defined(_MSC_VER)
+#	ifndef inline
+#		define inline __inline
+#	endif
+#	ifndef restrict
+#		define restrict __restrict
+#	endif
+#endif
+
+////////////
+// Macros //
+////////////
+
+#undef memzero
+#define memzero(s, n) memset(s, 0, n)
+
+// NOTE: Avoid using MIN() and MAX(), because even conditionally defining
+// those macros can cause some portability trouble, since on some systems
+// the system headers insist defining their own versions.
+#define my_min(x, y) ((x) < (y) ? (x) : (y))
+#define my_max(x, y) ((x) > (y) ? (x) : (y))
+
+#ifndef ARRAY_SIZE
+#	define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
+#endif
+
+#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4
+#	define lzma_attr_alloc_size(x) __attribute__((__alloc_size__(x)))
+#else
+#	define lzma_attr_alloc_size(x)
+#endif
+
+#endif

Deleted: vendor/xz/5.2.3/src/common/tuklib_cpucores.c
===================================================================
--- vendor/xz/dist/src/common/tuklib_cpucores.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/common/tuklib_cpucores.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,62 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       tuklib_cpucores.c
-/// \brief      Get the number of CPU cores online
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "tuklib_cpucores.h"
-
-#if defined(TUKLIB_CPUCORES_SYSCTL)
-#	ifdef HAVE_SYS_PARAM_H
-#		include <sys/param.h>
-#	endif
-#	include <sys/sysctl.h>
-
-#elif defined(TUKLIB_CPUCORES_SYSCONF)
-#	include <unistd.h>
-
-// HP-UX
-#elif defined(TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
-#	include <sys/param.h>
-#	include <sys/pstat.h>
-#endif
-
-
-extern uint32_t
-tuklib_cpucores(void)
-{
-	uint32_t ret = 0;
-
-#if defined(TUKLIB_CPUCORES_SYSCTL)
-	int name[2] = { CTL_HW, HW_NCPU };
-	int cpus;
-	size_t cpus_size = sizeof(cpus);
-	if (sysctl(name, 2, &cpus, &cpus_size, NULL, 0) != -1
-			&& cpus_size == sizeof(cpus) && cpus > 0)
-		ret = cpus;
-
-#elif defined(TUKLIB_CPUCORES_SYSCONF)
-#	ifdef _SC_NPROCESSORS_ONLN
-	// Most systems
-	const long cpus = sysconf(_SC_NPROCESSORS_ONLN);
-#	else
-	// IRIX
-	const long cpus = sysconf(_SC_NPROC_ONLN);
-#	endif
-	if (cpus > 0)
-		ret = cpus;
-
-#elif defined(TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
-	struct pst_dynamic pst;
-	if (pstat_getdynamic(&pst, sizeof(pst), 1, 0) != -1)
-		ret = pst.psd_proc_cnt;
-#endif
-
-	return ret;
-}

Copied: vendor/xz/5.2.3/src/common/tuklib_cpucores.c (from rev 11013, vendor/xz/dist/src/common/tuklib_cpucores.c)
===================================================================
--- vendor/xz/5.2.3/src/common/tuklib_cpucores.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/common/tuklib_cpucores.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,100 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       tuklib_cpucores.c
+/// \brief      Get the number of CPU cores online
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "tuklib_cpucores.h"
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+#	ifndef _WIN32_WINNT
+#		define _WIN32_WINNT 0x0500
+#	endif
+#	include <windows.h>
+
+// glibc >= 2.9
+#elif defined(TUKLIB_CPUCORES_SCHED_GETAFFINITY)
+#	include <sched.h>
+
+// FreeBSD
+#elif defined(TUKLIB_CPUCORES_CPUSET)
+#	include <sys/param.h>
+#	include <sys/cpuset.h>
+
+#elif defined(TUKLIB_CPUCORES_SYSCTL)
+#	ifdef HAVE_SYS_PARAM_H
+#		include <sys/param.h>
+#	endif
+#	include <sys/sysctl.h>
+
+#elif defined(TUKLIB_CPUCORES_SYSCONF)
+#	include <unistd.h>
+
+// HP-UX
+#elif defined(TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
+#	include <sys/param.h>
+#	include <sys/pstat.h>
+#endif
+
+
+extern uint32_t
+tuklib_cpucores(void)
+{
+	uint32_t ret = 0;
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+	SYSTEM_INFO sysinfo;
+	GetSystemInfo(&sysinfo);
+	ret = sysinfo.dwNumberOfProcessors;
+
+#elif defined(TUKLIB_CPUCORES_SCHED_GETAFFINITY)
+	cpu_set_t cpu_mask;
+	if (sched_getaffinity(0, sizeof(cpu_mask), &cpu_mask) == 0)
+		ret = CPU_COUNT(&cpu_mask);
+
+#elif defined(TUKLIB_CPUCORES_CPUSET)
+	cpuset_t set;
+	if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1,
+			sizeof(set), &set) == 0) {
+#	ifdef CPU_COUNT
+		ret = CPU_COUNT(&set);
+#	else
+		for (unsigned i = 0; i < CPU_SETSIZE; ++i)
+			if (CPU_ISSET(i, &set))
+				++ret;
+#	endif
+	}
+
+#elif defined(TUKLIB_CPUCORES_SYSCTL)
+	int name[2] = { CTL_HW, HW_NCPU };
+	int cpus;
+	size_t cpus_size = sizeof(cpus);
+	if (sysctl(name, 2, &cpus, &cpus_size, NULL, 0) != -1
+			&& cpus_size == sizeof(cpus) && cpus > 0)
+		ret = cpus;
+
+#elif defined(TUKLIB_CPUCORES_SYSCONF)
+#	ifdef _SC_NPROCESSORS_ONLN
+	// Most systems
+	const long cpus = sysconf(_SC_NPROCESSORS_ONLN);
+#	else
+	// IRIX
+	const long cpus = sysconf(_SC_NPROC_ONLN);
+#	endif
+	if (cpus > 0)
+		ret = cpus;
+
+#elif defined(TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
+	struct pst_dynamic pst;
+	if (pstat_getdynamic(&pst, sizeof(pst), 1, 0) != -1)
+		ret = pst.psd_proc_cnt;
+#endif
+
+	return ret;
+}

Deleted: vendor/xz/5.2.3/src/common/tuklib_integer.h
===================================================================
--- vendor/xz/dist/src/common/tuklib_integer.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/common/tuklib_integer.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,523 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       tuklib_integer.h
-/// \brief      Various integer and bit operations
-///
-/// This file provides macros or functions to do some basic integer and bit
-/// operations.
-///
-/// Endianness related integer operations (XX = 16, 32, or 64; Y = b or l):
-///   - Byte swapping: bswapXX(num)
-///   - Byte order conversions to/from native: convXXYe(num)
-///   - Aligned reads: readXXYe(ptr)
-///   - Aligned writes: writeXXYe(ptr, num)
-///   - Unaligned reads (16/32-bit only): unaligned_readXXYe(ptr)
-///   - Unaligned writes (16/32-bit only): unaligned_writeXXYe(ptr, num)
-///
-/// Since they can macros, the arguments should have no side effects since
-/// they may be evaluated more than once.
-///
-/// \todo       PowerPC and possibly some other architectures support
-///             byte swapping load and store instructions. This file
-///             doesn't take advantage of those instructions.
-///
-/// Bit scan operations for non-zero 32-bit integers:
-///   - Bit scan reverse (find highest non-zero bit): bsr32(num)
-///   - Count leading zeros: clz32(num)
-///   - Count trailing zeros: ctz32(num)
-///   - Bit scan forward (simply an alias for ctz32()): bsf32(num)
-///
-/// The above bit scan operations return 0-31. If num is zero,
-/// the result is undefined.
-//
-//  Authors:    Lasse Collin
-//              Joachim Henke
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef TUKLIB_INTEGER_H
-#define TUKLIB_INTEGER_H
-
-#include "tuklib_common.h"
-
-
-////////////////////////////////////////
-// Operating system specific features //
-////////////////////////////////////////
-
-#if defined(HAVE_BYTESWAP_H)
-	// glibc, uClibc, dietlibc
-#	include <byteswap.h>
-#	ifdef HAVE_BSWAP_16
-#		define bswap16(num) bswap_16(num)
-#	endif
-#	ifdef HAVE_BSWAP_32
-#		define bswap32(num) bswap_32(num)
-#	endif
-#	ifdef HAVE_BSWAP_64
-#		define bswap64(num) bswap_64(num)
-#	endif
-
-#elif defined(HAVE_SYS_ENDIAN_H)
-	// *BSDs and Darwin
-#	include <sys/endian.h>
-
-#elif defined(HAVE_SYS_BYTEORDER_H)
-	// Solaris
-#	include <sys/byteorder.h>
-#	ifdef BSWAP_16
-#		define bswap16(num) BSWAP_16(num)
-#	endif
-#	ifdef BSWAP_32
-#		define bswap32(num) BSWAP_32(num)
-#	endif
-#	ifdef BSWAP_64
-#		define bswap64(num) BSWAP_64(num)
-#	endif
-#	ifdef BE_16
-#		define conv16be(num) BE_16(num)
-#	endif
-#	ifdef BE_32
-#		define conv32be(num) BE_32(num)
-#	endif
-#	ifdef BE_64
-#		define conv64be(num) BE_64(num)
-#	endif
-#	ifdef LE_16
-#		define conv16le(num) LE_16(num)
-#	endif
-#	ifdef LE_32
-#		define conv32le(num) LE_32(num)
-#	endif
-#	ifdef LE_64
-#		define conv64le(num) LE_64(num)
-#	endif
-#endif
-
-
-///////////////////
-// Byte swapping //
-///////////////////
-
-#ifndef bswap16
-#	define bswap16(num) \
-		(((uint16_t)(num) << 8) | ((uint16_t)(num) >> 8))
-#endif
-
-#ifndef bswap32
-#	define bswap32(num) \
-		( (((uint32_t)(num) << 24)                       ) \
-		| (((uint32_t)(num) <<  8) & UINT32_C(0x00FF0000)) \
-		| (((uint32_t)(num) >>  8) & UINT32_C(0x0000FF00)) \
-		| (((uint32_t)(num) >> 24)                       ) )
-#endif
-
-#ifndef bswap64
-#	define bswap64(num) \
-		( (((uint64_t)(num) << 56)                               ) \
-		| (((uint64_t)(num) << 40) & UINT64_C(0x00FF000000000000)) \
-		| (((uint64_t)(num) << 24) & UINT64_C(0x0000FF0000000000)) \
-		| (((uint64_t)(num) <<  8) & UINT64_C(0x000000FF00000000)) \
-		| (((uint64_t)(num) >>  8) & UINT64_C(0x00000000FF000000)) \
-		| (((uint64_t)(num) >> 24) & UINT64_C(0x0000000000FF0000)) \
-		| (((uint64_t)(num) >> 40) & UINT64_C(0x000000000000FF00)) \
-		| (((uint64_t)(num) >> 56)                               ) )
-#endif
-
-// Define conversion macros using the basic byte swapping macros.
-#ifdef WORDS_BIGENDIAN
-#	ifndef conv16be
-#		define conv16be(num) ((uint16_t)(num))
-#	endif
-#	ifndef conv32be
-#		define conv32be(num) ((uint32_t)(num))
-#	endif
-#	ifndef conv64be
-#		define conv64be(num) ((uint64_t)(num))
-#	endif
-#	ifndef conv16le
-#		define conv16le(num) bswap16(num)
-#	endif
-#	ifndef conv32le
-#		define conv32le(num) bswap32(num)
-#	endif
-#	ifndef conv64le
-#		define conv64le(num) bswap64(num)
-#	endif
-#else
-#	ifndef conv16be
-#		define conv16be(num) bswap16(num)
-#	endif
-#	ifndef conv32be
-#		define conv32be(num) bswap32(num)
-#	endif
-#	ifndef conv64be
-#		define conv64be(num) bswap64(num)
-#	endif
-#	ifndef conv16le
-#		define conv16le(num) ((uint16_t)(num))
-#	endif
-#	ifndef conv32le
-#		define conv32le(num) ((uint32_t)(num))
-#	endif
-#	ifndef conv64le
-#		define conv64le(num) ((uint64_t)(num))
-#	endif
-#endif
-
-
-//////////////////////////////
-// Aligned reads and writes //
-//////////////////////////////
-
-static inline uint16_t
-read16be(const uint8_t *buf)
-{
-	uint16_t num = *(const uint16_t *)buf;
-	return conv16be(num);
-}
-
-
-static inline uint16_t
-read16le(const uint8_t *buf)
-{
-	uint16_t num = *(const uint16_t *)buf;
-	return conv16le(num);
-}
-
-
-static inline uint32_t
-read32be(const uint8_t *buf)
-{
-	uint32_t num = *(const uint32_t *)buf;
-	return conv32be(num);
-}
-
-
-static inline uint32_t
-read32le(const uint8_t *buf)
-{
-	uint32_t num = *(const uint32_t *)buf;
-	return conv32le(num);
-}
-
-
-static inline uint64_t
-read64be(const uint8_t *buf)
-{
-	uint64_t num = *(const uint64_t *)buf;
-	return conv64be(num);
-}
-
-
-static inline uint64_t
-read64le(const uint8_t *buf)
-{
-	uint64_t num = *(const uint64_t *)buf;
-	return conv64le(num);
-}
-
-
-// NOTE: Possible byte swapping must be done in a macro to allow GCC
-// to optimize byte swapping of constants when using glibc's or *BSD's
-// byte swapping macros. The actual write is done in an inline function
-// to make type checking of the buf pointer possible similarly to readXXYe()
-// functions.
-
-#define write16be(buf, num) write16ne((buf), conv16be(num))
-#define write16le(buf, num) write16ne((buf), conv16le(num))
-#define write32be(buf, num) write32ne((buf), conv32be(num))
-#define write32le(buf, num) write32ne((buf), conv32le(num))
-#define write64be(buf, num) write64ne((buf), conv64be(num))
-#define write64le(buf, num) write64ne((buf), conv64le(num))
-
-
-static inline void
-write16ne(uint8_t *buf, uint16_t num)
-{
-	*(uint16_t *)buf = num;
-	return;
-}
-
-
-static inline void
-write32ne(uint8_t *buf, uint32_t num)
-{
-	*(uint32_t *)buf = num;
-	return;
-}
-
-
-static inline void
-write64ne(uint8_t *buf, uint64_t num)
-{
-	*(uint64_t *)buf = num;
-	return;
-}
-
-
-////////////////////////////////
-// Unaligned reads and writes //
-////////////////////////////////
-
-// NOTE: TUKLIB_FAST_UNALIGNED_ACCESS indicates only support for 16-bit and
-// 32-bit unaligned integer loads and stores. It's possible that 64-bit
-// unaligned access doesn't work or is slower than byte-by-byte access.
-// Since unaligned 64-bit is probably not needed as often as 16-bit or
-// 32-bit, we simply don't support 64-bit unaligned access for now.
-#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
-#	define unaligned_read16be read16be
-#	define unaligned_read16le read16le
-#	define unaligned_read32be read32be
-#	define unaligned_read32le read32le
-#	define unaligned_write16be write16be
-#	define unaligned_write16le write16le
-#	define unaligned_write32be write32be
-#	define unaligned_write32le write32le
-
-#else
-
-static inline uint16_t
-unaligned_read16be(const uint8_t *buf)
-{
-	uint16_t num = ((uint16_t)buf[0] << 8) | (uint16_t)buf[1];
-	return num;
-}
-
-
-static inline uint16_t
-unaligned_read16le(const uint8_t *buf)
-{
-	uint16_t num = ((uint16_t)buf[0]) | ((uint16_t)buf[1] << 8);
-	return num;
-}
-
-
-static inline uint32_t
-unaligned_read32be(const uint8_t *buf)
-{
-	uint32_t num = (uint32_t)buf[0] << 24;
-	num |= (uint32_t)buf[1] << 16;
-	num |= (uint32_t)buf[2] << 8;
-	num |= (uint32_t)buf[3];
-	return num;
-}
-
-
-static inline uint32_t
-unaligned_read32le(const uint8_t *buf)
-{
-	uint32_t num = (uint32_t)buf[0];
-	num |= (uint32_t)buf[1] << 8;
-	num |= (uint32_t)buf[2] << 16;
-	num |= (uint32_t)buf[3] << 24;
-	return num;
-}
-
-
-static inline void
-unaligned_write16be(uint8_t *buf, uint16_t num)
-{
-	buf[0] = num >> 8;
-	buf[1] = num;
-	return;
-}
-
-
-static inline void
-unaligned_write16le(uint8_t *buf, uint16_t num)
-{
-	buf[0] = num;
-	buf[1] = num >> 8;
-	return;
-}
-
-
-static inline void
-unaligned_write32be(uint8_t *buf, uint32_t num)
-{
-	buf[0] = num >> 24;
-	buf[1] = num >> 16;
-	buf[2] = num >> 8;
-	buf[3] = num;
-	return;
-}
-
-
-static inline void
-unaligned_write32le(uint8_t *buf, uint32_t num)
-{
-	buf[0] = num;
-	buf[1] = num >> 8;
-	buf[2] = num >> 16;
-	buf[3] = num >> 24;
-	return;
-}
-
-#endif
-
-
-static inline uint32_t
-bsr32(uint32_t n)
-{
-	// Check for ICC first, since it tends to define __GNUC__ too.
-#if defined(__INTEL_COMPILER)
-	return _bit_scan_reverse(n);
-
-#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX == UINT32_MAX
-	// GCC >= 3.4 has __builtin_clz(), which gives good results on
-	// multiple architectures. On x86, __builtin_clz() ^ 31U becomes
-	// either plain BSR (so the XOR gets optimized away) or LZCNT and
-	// XOR (if -march indicates that SSE4a instructions are supported).
-	return __builtin_clz(n) ^ 31U;
-
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-	uint32_t i;
-	__asm__("bsrl %1, %0" : "=r" (i) : "rm" (n));
-	return i;
-
-#elif defined(_MSC_VER) && _MSC_VER >= 1400
-	// MSVC isn't supported by tuklib, but since this code exists,
-	// it doesn't hurt to have it here anyway.
-	uint32_t i;
-	_BitScanReverse((DWORD *)&i, n);
-	return i;
-
-#else
-	uint32_t i = 31;
-
-	if ((n & UINT32_C(0xFFFF0000)) == 0) {
-		n <<= 16;
-		i = 15;
-	}
-
-	if ((n & UINT32_C(0xFF000000)) == 0) {
-		n <<= 8;
-		i -= 8;
-	}
-
-	if ((n & UINT32_C(0xF0000000)) == 0) {
-		n <<= 4;
-		i -= 4;
-	}
-
-	if ((n & UINT32_C(0xC0000000)) == 0) {
-		n <<= 2;
-		i -= 2;
-	}
-
-	if ((n & UINT32_C(0x80000000)) == 0)
-		--i;
-
-	return i;
-#endif
-}
-
-
-static inline uint32_t
-clz32(uint32_t n)
-{
-#if defined(__INTEL_COMPILER)
-	return _bit_scan_reverse(n) ^ 31U;
-
-#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX == UINT32_MAX
-	return __builtin_clz(n);
-
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-	uint32_t i;
-	__asm__("bsrl %1, %0\n\t"
-		"xorl $31, %0"
-		: "=r" (i) : "rm" (n));
-	return i;
-
-#elif defined(_MSC_VER) && _MSC_VER >= 1400
-	uint32_t i;
-	_BitScanReverse((DWORD *)&i, n);
-	return i ^ 31U;
-
-#else
-	uint32_t i = 0;
-
-	if ((n & UINT32_C(0xFFFF0000)) == 0) {
-		n <<= 16;
-		i = 16;
-	}
-
-	if ((n & UINT32_C(0xFF000000)) == 0) {
-		n <<= 8;
-		i += 8;
-	}
-
-	if ((n & UINT32_C(0xF0000000)) == 0) {
-		n <<= 4;
-		i += 4;
-	}
-
-	if ((n & UINT32_C(0xC0000000)) == 0) {
-		n <<= 2;
-		i += 2;
-	}
-
-	if ((n & UINT32_C(0x80000000)) == 0)
-		++i;
-
-	return i;
-#endif
-}
-
-
-static inline uint32_t
-ctz32(uint32_t n)
-{
-#if defined(__INTEL_COMPILER)
-	return _bit_scan_forward(n);
-
-#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX >= UINT32_MAX
-	return __builtin_ctz(n);
-
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-	uint32_t i;
-	__asm__("bsfl %1, %0" : "=r" (i) : "rm" (n));
-	return i;
-
-#elif defined(_MSC_VER) && _MSC_VER >= 1400
-	uint32_t i;
-	_BitScanForward((DWORD *)&i, n);
-	return i;
-
-#else
-	uint32_t i = 0;
-
-	if ((n & UINT32_C(0x0000FFFF)) == 0) {
-		n >>= 16;
-		i = 16;
-	}
-
-	if ((n & UINT32_C(0x000000FF)) == 0) {
-		n >>= 8;
-		i += 8;
-	}
-
-	if ((n & UINT32_C(0x0000000F)) == 0) {
-		n >>= 4;
-		i += 4;
-	}
-
-	if ((n & UINT32_C(0x00000003)) == 0) {
-		n >>= 2;
-		i += 2;
-	}
-
-	if ((n & UINT32_C(0x00000001)) == 0)
-		++i;
-
-	return i;
-#endif
-}
-
-#define bsf32 ctz32
-
-#endif

Copied: vendor/xz/5.2.3/src/common/tuklib_integer.h (from rev 9176, vendor/xz/dist/src/common/tuklib_integer.h)
===================================================================
--- vendor/xz/5.2.3/src/common/tuklib_integer.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/common/tuklib_integer.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,523 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       tuklib_integer.h
+/// \brief      Various integer and bit operations
+///
+/// This file provides macros or functions to do some basic integer and bit
+/// operations.
+///
+/// Endianness related integer operations (XX = 16, 32, or 64; Y = b or l):
+///   - Byte swapping: bswapXX(num)
+///   - Byte order conversions to/from native: convXXYe(num)
+///   - Aligned reads: readXXYe(ptr)
+///   - Aligned writes: writeXXYe(ptr, num)
+///   - Unaligned reads (16/32-bit only): unaligned_readXXYe(ptr)
+///   - Unaligned writes (16/32-bit only): unaligned_writeXXYe(ptr, num)
+///
+/// Since they can macros, the arguments should have no side effects since
+/// they may be evaluated more than once.
+///
+/// \todo       PowerPC and possibly some other architectures support
+///             byte swapping load and store instructions. This file
+///             doesn't take advantage of those instructions.
+///
+/// Bit scan operations for non-zero 32-bit integers:
+///   - Bit scan reverse (find highest non-zero bit): bsr32(num)
+///   - Count leading zeros: clz32(num)
+///   - Count trailing zeros: ctz32(num)
+///   - Bit scan forward (simply an alias for ctz32()): bsf32(num)
+///
+/// The above bit scan operations return 0-31. If num is zero,
+/// the result is undefined.
+//
+//  Authors:    Lasse Collin
+//              Joachim Henke
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_INTEGER_H
+#define TUKLIB_INTEGER_H
+
+#include "tuklib_common.h"
+
+
+////////////////////////////////////////
+// Operating system specific features //
+////////////////////////////////////////
+
+#if defined(HAVE_BYTESWAP_H)
+	// glibc, uClibc, dietlibc
+#	include <byteswap.h>
+#	ifdef HAVE_BSWAP_16
+#		define bswap16(num) bswap_16(num)
+#	endif
+#	ifdef HAVE_BSWAP_32
+#		define bswap32(num) bswap_32(num)
+#	endif
+#	ifdef HAVE_BSWAP_64
+#		define bswap64(num) bswap_64(num)
+#	endif
+
+#elif defined(HAVE_SYS_ENDIAN_H)
+	// *BSDs and Darwin
+#	include <sys/endian.h>
+
+#elif defined(HAVE_SYS_BYTEORDER_H)
+	// Solaris
+#	include <sys/byteorder.h>
+#	ifdef BSWAP_16
+#		define bswap16(num) BSWAP_16(num)
+#	endif
+#	ifdef BSWAP_32
+#		define bswap32(num) BSWAP_32(num)
+#	endif
+#	ifdef BSWAP_64
+#		define bswap64(num) BSWAP_64(num)
+#	endif
+#	ifdef BE_16
+#		define conv16be(num) BE_16(num)
+#	endif
+#	ifdef BE_32
+#		define conv32be(num) BE_32(num)
+#	endif
+#	ifdef BE_64
+#		define conv64be(num) BE_64(num)
+#	endif
+#	ifdef LE_16
+#		define conv16le(num) LE_16(num)
+#	endif
+#	ifdef LE_32
+#		define conv32le(num) LE_32(num)
+#	endif
+#	ifdef LE_64
+#		define conv64le(num) LE_64(num)
+#	endif
+#endif
+
+
+///////////////////
+// Byte swapping //
+///////////////////
+
+#ifndef bswap16
+#	define bswap16(num) \
+		(((uint16_t)(num) << 8) | ((uint16_t)(num) >> 8))
+#endif
+
+#ifndef bswap32
+#	define bswap32(num) \
+		( (((uint32_t)(num) << 24)                       ) \
+		| (((uint32_t)(num) <<  8) & UINT32_C(0x00FF0000)) \
+		| (((uint32_t)(num) >>  8) & UINT32_C(0x0000FF00)) \
+		| (((uint32_t)(num) >> 24)                       ) )
+#endif
+
+#ifndef bswap64
+#	define bswap64(num) \
+		( (((uint64_t)(num) << 56)                               ) \
+		| (((uint64_t)(num) << 40) & UINT64_C(0x00FF000000000000)) \
+		| (((uint64_t)(num) << 24) & UINT64_C(0x0000FF0000000000)) \
+		| (((uint64_t)(num) <<  8) & UINT64_C(0x000000FF00000000)) \
+		| (((uint64_t)(num) >>  8) & UINT64_C(0x00000000FF000000)) \
+		| (((uint64_t)(num) >> 24) & UINT64_C(0x0000000000FF0000)) \
+		| (((uint64_t)(num) >> 40) & UINT64_C(0x000000000000FF00)) \
+		| (((uint64_t)(num) >> 56)                               ) )
+#endif
+
+// Define conversion macros using the basic byte swapping macros.
+#ifdef WORDS_BIGENDIAN
+#	ifndef conv16be
+#		define conv16be(num) ((uint16_t)(num))
+#	endif
+#	ifndef conv32be
+#		define conv32be(num) ((uint32_t)(num))
+#	endif
+#	ifndef conv64be
+#		define conv64be(num) ((uint64_t)(num))
+#	endif
+#	ifndef conv16le
+#		define conv16le(num) bswap16(num)
+#	endif
+#	ifndef conv32le
+#		define conv32le(num) bswap32(num)
+#	endif
+#	ifndef conv64le
+#		define conv64le(num) bswap64(num)
+#	endif
+#else
+#	ifndef conv16be
+#		define conv16be(num) bswap16(num)
+#	endif
+#	ifndef conv32be
+#		define conv32be(num) bswap32(num)
+#	endif
+#	ifndef conv64be
+#		define conv64be(num) bswap64(num)
+#	endif
+#	ifndef conv16le
+#		define conv16le(num) ((uint16_t)(num))
+#	endif
+#	ifndef conv32le
+#		define conv32le(num) ((uint32_t)(num))
+#	endif
+#	ifndef conv64le
+#		define conv64le(num) ((uint64_t)(num))
+#	endif
+#endif
+
+
+//////////////////////////////
+// Aligned reads and writes //
+//////////////////////////////
+
+static inline uint16_t
+read16be(const uint8_t *buf)
+{
+	uint16_t num = *(const uint16_t *)buf;
+	return conv16be(num);
+}
+
+
+static inline uint16_t
+read16le(const uint8_t *buf)
+{
+	uint16_t num = *(const uint16_t *)buf;
+	return conv16le(num);
+}
+
+
+static inline uint32_t
+read32be(const uint8_t *buf)
+{
+	uint32_t num = *(const uint32_t *)buf;
+	return conv32be(num);
+}
+
+
+static inline uint32_t
+read32le(const uint8_t *buf)
+{
+	uint32_t num = *(const uint32_t *)buf;
+	return conv32le(num);
+}
+
+
+static inline uint64_t
+read64be(const uint8_t *buf)
+{
+	uint64_t num = *(const uint64_t *)buf;
+	return conv64be(num);
+}
+
+
+static inline uint64_t
+read64le(const uint8_t *buf)
+{
+	uint64_t num = *(const uint64_t *)buf;
+	return conv64le(num);
+}
+
+
+// NOTE: Possible byte swapping must be done in a macro to allow GCC
+// to optimize byte swapping of constants when using glibc's or *BSD's
+// byte swapping macros. The actual write is done in an inline function
+// to make type checking of the buf pointer possible similarly to readXXYe()
+// functions.
+
+#define write16be(buf, num) write16ne((buf), conv16be(num))
+#define write16le(buf, num) write16ne((buf), conv16le(num))
+#define write32be(buf, num) write32ne((buf), conv32be(num))
+#define write32le(buf, num) write32ne((buf), conv32le(num))
+#define write64be(buf, num) write64ne((buf), conv64be(num))
+#define write64le(buf, num) write64ne((buf), conv64le(num))
+
+
+static inline void
+write16ne(uint8_t *buf, uint16_t num)
+{
+	*(uint16_t *)buf = num;
+	return;
+}
+
+
+static inline void
+write32ne(uint8_t *buf, uint32_t num)
+{
+	*(uint32_t *)buf = num;
+	return;
+}
+
+
+static inline void
+write64ne(uint8_t *buf, uint64_t num)
+{
+	*(uint64_t *)buf = num;
+	return;
+}
+
+
+////////////////////////////////
+// Unaligned reads and writes //
+////////////////////////////////
+
+// NOTE: TUKLIB_FAST_UNALIGNED_ACCESS indicates only support for 16-bit and
+// 32-bit unaligned integer loads and stores. It's possible that 64-bit
+// unaligned access doesn't work or is slower than byte-by-byte access.
+// Since unaligned 64-bit is probably not needed as often as 16-bit or
+// 32-bit, we simply don't support 64-bit unaligned access for now.
+#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
+#	define unaligned_read16be read16be
+#	define unaligned_read16le read16le
+#	define unaligned_read32be read32be
+#	define unaligned_read32le read32le
+#	define unaligned_write16be write16be
+#	define unaligned_write16le write16le
+#	define unaligned_write32be write32be
+#	define unaligned_write32le write32le
+
+#else
+
+static inline uint16_t
+unaligned_read16be(const uint8_t *buf)
+{
+	uint16_t num = ((uint16_t)buf[0] << 8) | (uint16_t)buf[1];
+	return num;
+}
+
+
+static inline uint16_t
+unaligned_read16le(const uint8_t *buf)
+{
+	uint16_t num = ((uint16_t)buf[0]) | ((uint16_t)buf[1] << 8);
+	return num;
+}
+
+
+static inline uint32_t
+unaligned_read32be(const uint8_t *buf)
+{
+	uint32_t num = (uint32_t)buf[0] << 24;
+	num |= (uint32_t)buf[1] << 16;
+	num |= (uint32_t)buf[2] << 8;
+	num |= (uint32_t)buf[3];
+	return num;
+}
+
+
+static inline uint32_t
+unaligned_read32le(const uint8_t *buf)
+{
+	uint32_t num = (uint32_t)buf[0];
+	num |= (uint32_t)buf[1] << 8;
+	num |= (uint32_t)buf[2] << 16;
+	num |= (uint32_t)buf[3] << 24;
+	return num;
+}
+
+
+static inline void
+unaligned_write16be(uint8_t *buf, uint16_t num)
+{
+	buf[0] = (uint8_t)(num >> 8);
+	buf[1] = (uint8_t)num;
+	return;
+}
+
+
+static inline void
+unaligned_write16le(uint8_t *buf, uint16_t num)
+{
+	buf[0] = (uint8_t)num;
+	buf[1] = (uint8_t)(num >> 8);
+	return;
+}
+
+
+static inline void
+unaligned_write32be(uint8_t *buf, uint32_t num)
+{
+	buf[0] = (uint8_t)(num >> 24);
+	buf[1] = (uint8_t)(num >> 16);
+	buf[2] = (uint8_t)(num >> 8);
+	buf[3] = (uint8_t)num;
+	return;
+}
+
+
+static inline void
+unaligned_write32le(uint8_t *buf, uint32_t num)
+{
+	buf[0] = (uint8_t)num;
+	buf[1] = (uint8_t)(num >> 8);
+	buf[2] = (uint8_t)(num >> 16);
+	buf[3] = (uint8_t)(num >> 24);
+	return;
+}
+
+#endif
+
+
+static inline uint32_t
+bsr32(uint32_t n)
+{
+	// Check for ICC first, since it tends to define __GNUC__ too.
+#if defined(__INTEL_COMPILER)
+	return _bit_scan_reverse(n);
+
+#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX == UINT32_MAX
+	// GCC >= 3.4 has __builtin_clz(), which gives good results on
+	// multiple architectures. On x86, __builtin_clz() ^ 31U becomes
+	// either plain BSR (so the XOR gets optimized away) or LZCNT and
+	// XOR (if -march indicates that SSE4a instructions are supported).
+	return __builtin_clz(n) ^ 31U;
+
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+	uint32_t i;
+	__asm__("bsrl %1, %0" : "=r" (i) : "rm" (n));
+	return i;
+
+#elif defined(_MSC_VER) && _MSC_VER >= 1400
+	// MSVC isn't supported by tuklib, but since this code exists,
+	// it doesn't hurt to have it here anyway.
+	uint32_t i;
+	_BitScanReverse((DWORD *)&i, n);
+	return i;
+
+#else
+	uint32_t i = 31;
+
+	if ((n & UINT32_C(0xFFFF0000)) == 0) {
+		n <<= 16;
+		i = 15;
+	}
+
+	if ((n & UINT32_C(0xFF000000)) == 0) {
+		n <<= 8;
+		i -= 8;
+	}
+
+	if ((n & UINT32_C(0xF0000000)) == 0) {
+		n <<= 4;
+		i -= 4;
+	}
+
+	if ((n & UINT32_C(0xC0000000)) == 0) {
+		n <<= 2;
+		i -= 2;
+	}
+
+	if ((n & UINT32_C(0x80000000)) == 0)
+		--i;
+
+	return i;
+#endif
+}
+
+
+static inline uint32_t
+clz32(uint32_t n)
+{
+#if defined(__INTEL_COMPILER)
+	return _bit_scan_reverse(n) ^ 31U;
+
+#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX == UINT32_MAX
+	return __builtin_clz(n);
+
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+	uint32_t i;
+	__asm__("bsrl %1, %0\n\t"
+		"xorl $31, %0"
+		: "=r" (i) : "rm" (n));
+	return i;
+
+#elif defined(_MSC_VER) && _MSC_VER >= 1400
+	uint32_t i;
+	_BitScanReverse((DWORD *)&i, n);
+	return i ^ 31U;
+
+#else
+	uint32_t i = 0;
+
+	if ((n & UINT32_C(0xFFFF0000)) == 0) {
+		n <<= 16;
+		i = 16;
+	}
+
+	if ((n & UINT32_C(0xFF000000)) == 0) {
+		n <<= 8;
+		i += 8;
+	}
+
+	if ((n & UINT32_C(0xF0000000)) == 0) {
+		n <<= 4;
+		i += 4;
+	}
+
+	if ((n & UINT32_C(0xC0000000)) == 0) {
+		n <<= 2;
+		i += 2;
+	}
+
+	if ((n & UINT32_C(0x80000000)) == 0)
+		++i;
+
+	return i;
+#endif
+}
+
+
+static inline uint32_t
+ctz32(uint32_t n)
+{
+#if defined(__INTEL_COMPILER)
+	return _bit_scan_forward(n);
+
+#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX >= UINT32_MAX
+	return __builtin_ctz(n);
+
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+	uint32_t i;
+	__asm__("bsfl %1, %0" : "=r" (i) : "rm" (n));
+	return i;
+
+#elif defined(_MSC_VER) && _MSC_VER >= 1400
+	uint32_t i;
+	_BitScanForward((DWORD *)&i, n);
+	return i;
+
+#else
+	uint32_t i = 0;
+
+	if ((n & UINT32_C(0x0000FFFF)) == 0) {
+		n >>= 16;
+		i = 16;
+	}
+
+	if ((n & UINT32_C(0x000000FF)) == 0) {
+		n >>= 8;
+		i += 8;
+	}
+
+	if ((n & UINT32_C(0x0000000F)) == 0) {
+		n >>= 4;
+		i += 4;
+	}
+
+	if ((n & UINT32_C(0x00000003)) == 0) {
+		n >>= 2;
+		i += 2;
+	}
+
+	if ((n & UINT32_C(0x00000001)) == 0)
+		++i;
+
+	return i;
+#endif
+}
+
+#define bsf32 ctz32
+
+#endif

Deleted: vendor/xz/5.2.3/src/common/tuklib_physmem.c
===================================================================
--- vendor/xz/dist/src/common/tuklib_physmem.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/common/tuklib_physmem.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,203 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       tuklib_physmem.c
-/// \brief      Get the amount of physical memory
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "tuklib_physmem.h"
-
-// We want to use Windows-specific code on Cygwin, which also has memory
-// information available via sysconf(), but on Cygwin 1.5 and older it
-// gives wrong results (from our point of view).
-#if defined(_WIN32) || defined(__CYGWIN__)
-#	ifndef _WIN32_WINNT
-#		define _WIN32_WINNT 0x0500
-#	endif
-#	include <windows.h>
-
-#elif defined(__OS2__)
-#	define INCL_DOSMISC
-#	include <os2.h>
-
-#elif defined(__DJGPP__)
-#	include <dpmi.h>
-
-#elif defined(__VMS)
-#	include <lib$routines.h>
-#	include <syidef.h>
-#	include <ssdef.h>
-
-#elif defined(AMIGA) || defined(__AROS__)
-#	define __USE_INLINE__
-#	include <proto/exec.h>
-
-// AIX
-#elif defined(TUKLIB_PHYSMEM_AIX)
-#	include <sys/systemcfg.h>
-
-#elif defined(TUKLIB_PHYSMEM_SYSCONF)
-#	include <unistd.h>
-
-#elif defined(TUKLIB_PHYSMEM_SYSCTL)
-#	ifdef HAVE_SYS_PARAM_H
-#		include <sys/param.h>
-#	endif
-#	include <sys/sysctl.h>
-
-// Tru64
-#elif defined(TUKLIB_PHYSMEM_GETSYSINFO)
-#	include <sys/sysinfo.h>
-#	include <machine/hal_sysinfo.h>
-
-// HP-UX
-#elif defined(TUKLIB_PHYSMEM_PSTAT_GETSTATIC)
-#	include <sys/param.h>
-#	include <sys/pstat.h>
-
-// IRIX
-#elif defined(TUKLIB_PHYSMEM_GETINVENT_R)
-#	include <invent.h>
-
-// This sysinfo() is Linux-specific.
-#elif defined(TUKLIB_PHYSMEM_SYSINFO)
-#	include <sys/sysinfo.h>
-#endif
-
-
-extern uint64_t
-tuklib_physmem(void)
-{
-	uint64_t ret = 0;
-
-#if defined(_WIN32) || defined(__CYGWIN__)
-	if ((GetVersion() & 0xFF) >= 5) {
-		// Windows 2000 and later have GlobalMemoryStatusEx() which
-		// supports reporting values greater than 4 GiB. To keep the
-		// code working also on older Windows versions, use
-		// GlobalMemoryStatusEx() conditionally.
-		HMODULE kernel32 = GetModuleHandle("kernel32.dll");
-		if (kernel32 != NULL) {
-			BOOL (WINAPI *gmse)(LPMEMORYSTATUSEX) = GetProcAddress(
-					kernel32, "GlobalMemoryStatusEx");
-			if (gmse != NULL) {
-				MEMORYSTATUSEX meminfo;
-				meminfo.dwLength = sizeof(meminfo);
-				if (gmse(&meminfo))
-					ret = meminfo.ullTotalPhys;
-			}
-		}
-	}
-
-	if (ret == 0) {
-		// GlobalMemoryStatus() is supported by Windows 95 and later,
-		// so it is fine to link against it unconditionally. Note that
-		// GlobalMemoryStatus() has no return value.
-		MEMORYSTATUS meminfo;
-		meminfo.dwLength = sizeof(meminfo);
-		GlobalMemoryStatus(&meminfo);
-		ret = meminfo.dwTotalPhys;
-	}
-
-#elif defined(__OS2__)
-	unsigned long mem;
-	if (DosQuerySysInfo(QSV_TOTPHYSMEM, QSV_TOTPHYSMEM,
-			&mem, sizeof(mem)) == 0)
-		ret = mem;
-
-#elif defined(__DJGPP__)
-	__dpmi_free_mem_info meminfo;
-	if (__dpmi_get_free_memory_information(&meminfo) == 0
-			&& meminfo.total_number_of_physical_pages
-				!= (unsigned long)-1)
-		ret = (uint64_t)meminfo.total_number_of_physical_pages * 4096;
-
-#elif defined(__VMS)
-	int vms_mem;
-	int val = SYI$_MEMSIZE;
-	if (LIB$GETSYI(&val, &vms_mem, 0, 0, 0, 0) == SS$_NORMAL)
-		ret = (uint64_t)vms_mem * 8192;
-
-#elif defined(AMIGA) || defined(__AROS__)
-	ret = AvailMem(MEMF_TOTAL);
-
-#elif defined(TUKLIB_PHYSMEM_AIX)
-	ret = _system_configuration.physmem;
-
-#elif defined(TUKLIB_PHYSMEM_SYSCONF)
-	const long pagesize = sysconf(_SC_PAGESIZE);
-	const long pages = sysconf(_SC_PHYS_PAGES);
-	if (pagesize != -1 && pages != -1)
-		// According to docs, pagesize * pages can overflow.
-		// Simple case is 32-bit box with 4 GiB or more RAM,
-		// which may report exactly 4 GiB of RAM, and "long"
-		// being 32-bit will overflow. Casting to uint64_t
-		// hopefully avoids overflows in the near future.
-		ret = (uint64_t)pagesize * (uint64_t)pages;
-
-#elif defined(TUKLIB_PHYSMEM_SYSCTL)
-	int name[2] = {
-		CTL_HW,
-#ifdef HW_PHYSMEM64
-		HW_PHYSMEM64
-#else
-		HW_PHYSMEM
-#endif
-	};
-	union {
-		uint32_t u32;
-		uint64_t u64;
-	} mem;
-	size_t mem_ptr_size = sizeof(mem.u64);
-	if (sysctl(name, 2, &mem.u64, &mem_ptr_size, NULL, 0) != -1) {
-		// IIRC, 64-bit "return value" is possible on some 64-bit
-		// BSD systems even with HW_PHYSMEM (instead of HW_PHYSMEM64),
-		// so support both.
-		if (mem_ptr_size == sizeof(mem.u64))
-			ret = mem.u64;
-		else if (mem_ptr_size == sizeof(mem.u32))
-			ret = mem.u32;
-	}
-
-#elif defined(TUKLIB_PHYSMEM_GETSYSINFO)
-	// Docs are unclear if "start" is needed, but it doesn't hurt
-	// much to have it.
-	int memkb;
-	int start = 0;
-	if (getsysinfo(GSI_PHYSMEM, (caddr_t)&memkb, sizeof(memkb), &start)
-			!= -1)
-		ret = (uint64_t)memkb * 1024;
-
-#elif defined(TUKLIB_PHYSMEM_PSTAT_GETSTATIC)
-	struct pst_static pst;
-	if (pstat_getstatic(&pst, sizeof(pst), 1, 0) != -1)
-		ret = (uint64_t)pst.physical_memory * (uint64_t)pst.page_size;
-
-#elif defined(TUKLIB_PHYSMEM_GETINVENT_R)
-	inv_state_t *st = NULL;
-	if (setinvent_r(&st) != -1) {
-		inventory_t *i;
-		while ((i = getinvent_r(st)) != NULL) {
-			if (i->inv_class == INV_MEMORY
-					&& i->inv_type == INV_MAIN_MB) {
-				ret = (uint64_t)i->inv_state << 20;
-				break;
-			}
-		}
-
-		endinvent_r(st);
-	}
-
-#elif defined(TUKLIB_PHYSMEM_SYSINFO)
-	struct sysinfo si;
-	if (sysinfo(&si) == 0)
-		ret = (uint64_t)si.totalram * si.mem_unit;
-#endif
-
-	return ret;
-}

Copied: vendor/xz/5.2.3/src/common/tuklib_physmem.c (from rev 11013, vendor/xz/dist/src/common/tuklib_physmem.c)
===================================================================
--- vendor/xz/5.2.3/src/common/tuklib_physmem.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/common/tuklib_physmem.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,216 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       tuklib_physmem.c
+/// \brief      Get the amount of physical memory
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "tuklib_physmem.h"
+
+// We want to use Windows-specific code on Cygwin, which also has memory
+// information available via sysconf(), but on Cygwin 1.5 and older it
+// gives wrong results (from our point of view).
+#if defined(_WIN32) || defined(__CYGWIN__)
+#	ifndef _WIN32_WINNT
+#		define _WIN32_WINNT 0x0500
+#	endif
+#	include <windows.h>
+
+#elif defined(__OS2__)
+#	define INCL_DOSMISC
+#	include <os2.h>
+
+#elif defined(__DJGPP__)
+#	include <dpmi.h>
+
+#elif defined(__VMS)
+#	include <lib$routines.h>
+#	include <syidef.h>
+#	include <ssdef.h>
+
+#elif defined(AMIGA) || defined(__AROS__)
+#	define __USE_INLINE__
+#	include <proto/exec.h>
+
+#elif defined(__QNX__)
+#	include <sys/syspage.h>
+#	include <string.h>
+
+#elif defined(TUKLIB_PHYSMEM_AIX)
+#	include <sys/systemcfg.h>
+
+#elif defined(TUKLIB_PHYSMEM_SYSCONF)
+#	include <unistd.h>
+
+#elif defined(TUKLIB_PHYSMEM_SYSCTL)
+#	ifdef HAVE_SYS_PARAM_H
+#		include <sys/param.h>
+#	endif
+#	include <sys/sysctl.h>
+
+// Tru64
+#elif defined(TUKLIB_PHYSMEM_GETSYSINFO)
+#	include <sys/sysinfo.h>
+#	include <machine/hal_sysinfo.h>
+
+// HP-UX
+#elif defined(TUKLIB_PHYSMEM_PSTAT_GETSTATIC)
+#	include <sys/param.h>
+#	include <sys/pstat.h>
+
+// IRIX
+#elif defined(TUKLIB_PHYSMEM_GETINVENT_R)
+#	include <invent.h>
+
+// This sysinfo() is Linux-specific.
+#elif defined(TUKLIB_PHYSMEM_SYSINFO)
+#	include <sys/sysinfo.h>
+#endif
+
+
+extern uint64_t
+tuklib_physmem(void)
+{
+	uint64_t ret = 0;
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+	if ((GetVersion() & 0xFF) >= 5) {
+		// Windows 2000 and later have GlobalMemoryStatusEx() which
+		// supports reporting values greater than 4 GiB. To keep the
+		// code working also on older Windows versions, use
+		// GlobalMemoryStatusEx() conditionally.
+		HMODULE kernel32 = GetModuleHandle("kernel32.dll");
+		if (kernel32 != NULL) {
+			typedef BOOL (WINAPI *gmse_type)(LPMEMORYSTATUSEX);
+			gmse_type gmse = (gmse_type)GetProcAddress(
+					kernel32, "GlobalMemoryStatusEx");
+			if (gmse != NULL) {
+				MEMORYSTATUSEX meminfo;
+				meminfo.dwLength = sizeof(meminfo);
+				if (gmse(&meminfo))
+					ret = meminfo.ullTotalPhys;
+			}
+		}
+	}
+
+	if (ret == 0) {
+		// GlobalMemoryStatus() is supported by Windows 95 and later,
+		// so it is fine to link against it unconditionally. Note that
+		// GlobalMemoryStatus() has no return value.
+		MEMORYSTATUS meminfo;
+		meminfo.dwLength = sizeof(meminfo);
+		GlobalMemoryStatus(&meminfo);
+		ret = meminfo.dwTotalPhys;
+	}
+
+#elif defined(__OS2__)
+	unsigned long mem;
+	if (DosQuerySysInfo(QSV_TOTPHYSMEM, QSV_TOTPHYSMEM,
+			&mem, sizeof(mem)) == 0)
+		ret = mem;
+
+#elif defined(__DJGPP__)
+	__dpmi_free_mem_info meminfo;
+	if (__dpmi_get_free_memory_information(&meminfo) == 0
+			&& meminfo.total_number_of_physical_pages
+				!= (unsigned long)-1)
+		ret = (uint64_t)meminfo.total_number_of_physical_pages * 4096;
+
+#elif defined(__VMS)
+	int vms_mem;
+	int val = SYI$_MEMSIZE;
+	if (LIB$GETSYI(&val, &vms_mem, 0, 0, 0, 0) == SS$_NORMAL)
+		ret = (uint64_t)vms_mem * 8192;
+
+#elif defined(AMIGA) || defined(__AROS__)
+	ret = AvailMem(MEMF_TOTAL);
+
+#elif defined(__QNX__)
+	const struct asinfo_entry *entries = SYSPAGE_ENTRY(asinfo);
+	size_t count = SYSPAGE_ENTRY_SIZE(asinfo) / sizeof(struct asinfo_entry);
+	const char *strings = SYSPAGE_ENTRY(strings)->data;
+
+	for (size_t i = 0; i < count; ++i)
+		if (strcmp(strings + entries[i].name, "ram") == 0)
+			ret += entries[i].end - entries[i].start + 1;
+
+#elif defined(TUKLIB_PHYSMEM_AIX)
+	ret = _system_configuration.physmem;
+
+#elif defined(TUKLIB_PHYSMEM_SYSCONF)
+	const long pagesize = sysconf(_SC_PAGESIZE);
+	const long pages = sysconf(_SC_PHYS_PAGES);
+	if (pagesize != -1 && pages != -1)
+		// According to docs, pagesize * pages can overflow.
+		// Simple case is 32-bit box with 4 GiB or more RAM,
+		// which may report exactly 4 GiB of RAM, and "long"
+		// being 32-bit will overflow. Casting to uint64_t
+		// hopefully avoids overflows in the near future.
+		ret = (uint64_t)pagesize * (uint64_t)pages;
+
+#elif defined(TUKLIB_PHYSMEM_SYSCTL)
+	int name[2] = {
+		CTL_HW,
+#ifdef HW_PHYSMEM64
+		HW_PHYSMEM64
+#else
+		HW_PHYSMEM
+#endif
+	};
+	union {
+		uint32_t u32;
+		uint64_t u64;
+	} mem;
+	size_t mem_ptr_size = sizeof(mem.u64);
+	if (sysctl(name, 2, &mem.u64, &mem_ptr_size, NULL, 0) != -1) {
+		// IIRC, 64-bit "return value" is possible on some 64-bit
+		// BSD systems even with HW_PHYSMEM (instead of HW_PHYSMEM64),
+		// so support both.
+		if (mem_ptr_size == sizeof(mem.u64))
+			ret = mem.u64;
+		else if (mem_ptr_size == sizeof(mem.u32))
+			ret = mem.u32;
+	}
+
+#elif defined(TUKLIB_PHYSMEM_GETSYSINFO)
+	// Docs are unclear if "start" is needed, but it doesn't hurt
+	// much to have it.
+	int memkb;
+	int start = 0;
+	if (getsysinfo(GSI_PHYSMEM, (caddr_t)&memkb, sizeof(memkb), &start)
+			!= -1)
+		ret = (uint64_t)memkb * 1024;
+
+#elif defined(TUKLIB_PHYSMEM_PSTAT_GETSTATIC)
+	struct pst_static pst;
+	if (pstat_getstatic(&pst, sizeof(pst), 1, 0) != -1)
+		ret = (uint64_t)pst.physical_memory * (uint64_t)pst.page_size;
+
+#elif defined(TUKLIB_PHYSMEM_GETINVENT_R)
+	inv_state_t *st = NULL;
+	if (setinvent_r(&st) != -1) {
+		inventory_t *i;
+		while ((i = getinvent_r(st)) != NULL) {
+			if (i->inv_class == INV_MEMORY
+					&& i->inv_type == INV_MAIN_MB) {
+				ret = (uint64_t)i->inv_state << 20;
+				break;
+			}
+		}
+
+		endinvent_r(st);
+	}
+
+#elif defined(TUKLIB_PHYSMEM_SYSINFO)
+	struct sysinfo si;
+	if (sysinfo(&si) == 0)
+		ret = (uint64_t)si.totalram * si.mem_unit;
+#endif
+
+	return ret;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/api/lzma/base.h
===================================================================
--- vendor/xz/dist/src/liblzma/api/lzma/base.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/base.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,601 +0,0 @@
-/**
- * \file        lzma/base.h
- * \brief       Data types and functions used in many places in liblzma API
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       Boolean
- *
- * This is here because C89 doesn't have stdbool.h. To set a value for
- * variables having type lzma_bool, you can use
- *   - C99's `true' and `false' from stdbool.h;
- *   - C++'s internal `true' and `false'; or
- *   - integers one (true) and zero (false).
- */
-typedef unsigned char lzma_bool;
-
-
-/**
- * \brief       Type of reserved enumeration variable in structures
- *
- * To avoid breaking library ABI when new features are added, several
- * structures contain extra variables that may be used in future. Since
- * sizeof(enum) can be different than sizeof(int), and sizeof(enum) may
- * even vary depending on the range of enumeration constants, we specify
- * a separate type to be used for reserved enumeration variables. All
- * enumeration constants in liblzma API will be non-negative and less
- * than 128, which should guarantee that the ABI won't break even when
- * new constants are added to existing enumerations.
- */
-typedef enum {
-	LZMA_RESERVED_ENUM      = 0
-} lzma_reserved_enum;
-
-
-/**
- * \brief       Return values used by several functions in liblzma
- *
- * Check the descriptions of specific functions to find out which return
- * values they can return. With some functions the return values may have
- * more specific meanings than described here; those differences are
- * described per-function basis.
- */
-typedef enum {
-	LZMA_OK                 = 0,
-		/**<
-		 * \brief       Operation completed successfully
-		 */
-
-	LZMA_STREAM_END         = 1,
-		/**<
-		 * \brief       End of stream was reached
-		 *
-		 * In encoder, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or
-		 * LZMA_FINISH was finished. In decoder, this indicates
-		 * that all the data was successfully decoded.
-		 *
-		 * In all cases, when LZMA_STREAM_END is returned, the last
-		 * output bytes should be picked from strm->next_out.
-		 */
-
-	LZMA_NO_CHECK           = 2,
-		/**<
-		 * \brief       Input stream has no integrity check
-		 *
-		 * This return value can be returned only if the
-		 * LZMA_TELL_NO_CHECK flag was used when initializing
-		 * the decoder. LZMA_NO_CHECK is just a warning, and
-		 * the decoding can be continued normally.
-		 *
-		 * It is possible to call lzma_get_check() immediately after
-		 * lzma_code has returned LZMA_NO_CHECK. The result will
-		 * naturally be LZMA_CHECK_NONE, but the possibility to call
-		 * lzma_get_check() may be convenient in some applications.
-		 */
-
-	LZMA_UNSUPPORTED_CHECK  = 3,
-		/**<
-		 * \brief       Cannot calculate the integrity check
-		 *
-		 * The usage of this return value is different in encoders
-		 * and decoders.
-		 *
-		 * Encoders can return this value only from the initialization
-		 * function. If initialization fails with this value, the
-		 * encoding cannot be done, because there's no way to produce
-		 * output with the correct integrity check.
-		 *
-		 * Decoders can return this value only from lzma_code() and
-		 * only if the LZMA_TELL_UNSUPPORTED_CHECK flag was used when
-		 * initializing the decoder. The decoding can still be
-		 * continued normally even if the check type is unsupported,
-		 * but naturally the check will not be validated, and possible
-		 * errors may go undetected.
-		 *
-		 * With decoder, it is possible to call lzma_get_check()
-		 * immediately after lzma_code() has returned
-		 * LZMA_UNSUPPORTED_CHECK. This way it is possible to find
-		 * out what the unsupported Check ID was.
-		 */
-
-	LZMA_GET_CHECK          = 4,
-		/**<
-		 * \brief       Integrity check type is now available
-		 *
-		 * This value can be returned only by the lzma_code() function
-		 * and only if the decoder was initialized with the
-		 * LZMA_TELL_ANY_CHECK flag. LZMA_GET_CHECK tells the
-		 * application that it may now call lzma_get_check() to find
-		 * out the Check ID. This can be used, for example, to
-		 * implement a decoder that accepts only files that have
-		 * strong enough integrity check.
-		 */
-
-	LZMA_MEM_ERROR          = 5,
-		/**<
-		 * \brief       Cannot allocate memory
-		 *
-		 * Memory allocation failed, or the size of the allocation
-		 * would be greater than SIZE_MAX.
-		 *
-		 * Due to internal implementation reasons, the coding cannot
-		 * be continued even if more memory were made available after
-		 * LZMA_MEM_ERROR.
-		 */
-
-	LZMA_MEMLIMIT_ERROR     = 6,
-		/**
-		 * \brief       Memory usage limit was reached
-		 *
-		 * Decoder would need more memory than allowed by the
-		 * specified memory usage limit. To continue decoding,
-		 * the memory usage limit has to be increased with
-		 * lzma_memlimit_set().
-		 */
-
-	LZMA_FORMAT_ERROR       = 7,
-		/**<
-		 * \brief       File format not recognized
-		 *
-		 * The decoder did not recognize the input as supported file
-		 * format. This error can occur, for example, when trying to
-		 * decode .lzma format file with lzma_stream_decoder,
-		 * because lzma_stream_decoder accepts only the .xz format.
-		 */
-
-	LZMA_OPTIONS_ERROR      = 8,
-		/**<
-		 * \brief       Invalid or unsupported options
-		 *
-		 * Invalid or unsupported options, for example
-		 *  - unsupported filter(s) or filter options; or
-		 *  - reserved bits set in headers (decoder only).
-		 *
-		 * Rebuilding liblzma with more features enabled, or
-		 * upgrading to a newer version of liblzma may help.
-		 */
-
-	LZMA_DATA_ERROR         = 9,
-		/**<
-		 * \brief       Data is corrupt
-		 *
-		 * The usage of this return value is different in encoders
-		 * and decoders. In both encoder and decoder, the coding
-		 * cannot continue after this error.
-		 *
-		 * Encoders return this if size limits of the target file
-		 * format would be exceeded. These limits are huge, thus
-		 * getting this error from an encoder is mostly theoretical.
-		 * For example, the maximum compressed and uncompressed
-		 * size of a .xz Stream is roughly 8 EiB (2^63 bytes).
-		 *
-		 * Decoders return this error if the input data is corrupt.
-		 * This can mean, for example, invalid CRC32 in headers
-		 * or invalid check of uncompressed data.
-		 */
-
-	LZMA_BUF_ERROR          = 10,
-		/**<
-		 * \brief       No progress is possible
-		 *
-		 * This error code is returned when the coder cannot consume
-		 * any new input and produce any new output. The most common
-		 * reason for this error is that the input stream being
-		 * decoded is truncated or corrupt.
-		 *
-		 * This error is not fatal. Coding can be continued normally
-		 * by providing more input and/or more output space, if
-		 * possible.
-		 *
-		 * Typically the first call to lzma_code() that can do no
-		 * progress returns LZMA_OK instead of LZMA_BUF_ERROR. Only
-		 * the second consecutive call doing no progress will return
-		 * LZMA_BUF_ERROR. This is intentional.
-		 *
-		 * With zlib, Z_BUF_ERROR may be returned even if the
-		 * application is doing nothing wrong, so apps will need
-		 * to handle Z_BUF_ERROR specially. The above hack
-		 * guarantees that liblzma never returns LZMA_BUF_ERROR
-		 * to properly written applications unless the input file
-		 * is truncated or corrupt. This should simplify the
-		 * applications a little.
-		 */
-
-	LZMA_PROG_ERROR         = 11,
-		/**<
-		 * \brief       Programming error
-		 *
-		 * This indicates that the arguments given to the function are
-		 * invalid or the internal state of the decoder is corrupt.
-		 *   - Function arguments are invalid or the structures
-		 *     pointed by the argument pointers are invalid
-		 *     e.g. if strm->next_out has been set to NULL and
-		 *     strm->avail_out > 0 when calling lzma_code().
-		 *   - lzma_* functions have been called in wrong order
-		 *     e.g. lzma_code() was called right after lzma_end().
-		 *   - If errors occur randomly, the reason might be flaky
-		 *     hardware.
-		 *
-		 * If you think that your code is correct, this error code
-		 * can be a sign of a bug in liblzma. See the documentation
-		 * how to report bugs.
-		 */
-} lzma_ret;
-
-
-/**
- * \brief       The `action' argument for lzma_code()
- *
- * After the first use of LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or LZMA_FINISH,
- * the same `action' must is used until lzma_code() returns LZMA_STREAM_END.
- * Also, the amount of input (that is, strm->avail_in) must not be modified
- * by the application until lzma_code() returns LZMA_STREAM_END. Changing the
- * `action' or modifying the amount of input will make lzma_code() return
- * LZMA_PROG_ERROR.
- */
-typedef enum {
-	LZMA_RUN = 0,
-		/**<
-		 * \brief       Continue coding
-		 *
-		 * Encoder: Encode as much input as possible. Some internal
-		 * buffering will probably be done (depends on the filter
-		 * chain in use), which causes latency: the input used won't
-		 * usually be decodeable from the output of the same
-		 * lzma_code() call.
-		 *
-		 * Decoder: Decode as much input as possible and produce as
-		 * much output as possible.
-		 */
-
-	LZMA_SYNC_FLUSH = 1,
-		/**<
-		 * \brief       Make all the input available at output
-		 *
-		 * Normally the encoder introduces some latency.
-		 * LZMA_SYNC_FLUSH forces all the buffered data to be
-		 * available at output without resetting the internal
-		 * state of the encoder. This way it is possible to use
-		 * compressed stream for example for communication over
-		 * network.
-		 *
-		 * Only some filters support LZMA_SYNC_FLUSH. Trying to use
-		 * LZMA_SYNC_FLUSH with filters that don't support it will
-		 * make lzma_code() return LZMA_OPTIONS_ERROR. For example,
-		 * LZMA1 doesn't support LZMA_SYNC_FLUSH but LZMA2 does.
-		 *
-		 * Using LZMA_SYNC_FLUSH very often can dramatically reduce
-		 * the compression ratio. With some filters (for example,
-		 * LZMA2), fine-tuning the compression options may help
-		 * mitigate this problem significantly (for example,
-		 * match finder with LZMA2).
-		 *
-		 * Decoders don't support LZMA_SYNC_FLUSH.
-		 */
-
-	LZMA_FULL_FLUSH = 2,
-		/**<
-		 * \brief       Finish encoding of the current Block
-		 *
-		 * All the input data going to the current Block must have
-		 * been given to the encoder (the last bytes can still be
-		 * pending in* next_in). Call lzma_code() with LZMA_FULL_FLUSH
-		 * until it returns LZMA_STREAM_END. Then continue normally
-		 * with LZMA_RUN or finish the Stream with LZMA_FINISH.
-		 *
-		 * This action is currently supported only by Stream encoder
-		 * and easy encoder (which uses Stream encoder). If there is
-		 * no unfinished Block, no empty Block is created.
-		 */
-
-	LZMA_FINISH = 3
-		/**<
-		 * \brief       Finish the coding operation
-		 *
-		 * All the input data must have been given to the encoder
-		 * (the last bytes can still be pending in next_in).
-		 * Call lzma_code() with LZMA_FINISH until it returns
-		 * LZMA_STREAM_END. Once LZMA_FINISH has been used,
-		 * the amount of input must no longer be changed by
-		 * the application.
-		 *
-		 * When decoding, using LZMA_FINISH is optional unless the
-		 * LZMA_CONCATENATED flag was used when the decoder was
-		 * initialized. When LZMA_CONCATENATED was not used, the only
-		 * effect of LZMA_FINISH is that the amount of input must not
-		 * be changed just like in the encoder.
-		 */
-} lzma_action;
-
-
-/**
- * \brief       Custom functions for memory handling
- *
- * A pointer to lzma_allocator may be passed via lzma_stream structure
- * to liblzma, and some advanced functions take a pointer to lzma_allocator
- * as a separate function argument. The library will use the functions
- * specified in lzma_allocator for memory handling instead of the default
- * malloc() and free(). C++ users should note that the custom memory
- * handling functions must not throw exceptions.
- *
- * liblzma doesn't make an internal copy of lzma_allocator. Thus, it is
- * OK to change these function pointers in the middle of the coding
- * process, but obviously it must be done carefully to make sure that the
- * replacement `free' can deallocate memory allocated by the earlier
- * `alloc' function(s).
- */
-typedef struct {
-	/**
-	 * \brief       Pointer to a custom memory allocation function
-	 *
-	 * If you don't want a custom allocator, but still want
-	 * custom free(), set this to NULL and liblzma will use
-	 * the standard malloc().
-	 *
-	 * \param       opaque  lzma_allocator.opaque (see below)
-	 * \param       nmemb   Number of elements like in calloc(). liblzma
-	 *                      will always set nmemb to 1, so it is safe to
-	 *                      ignore nmemb in a custom allocator if you like.
-	 *                      The nmemb argument exists only for
-	 *                      compatibility with zlib and libbzip2.
-	 * \param       size    Size of an element in bytes.
-	 *                      liblzma never sets this to zero.
-	 *
-	 * \return      Pointer to the beginning of a memory block of
-	 *              `size' bytes, or NULL if allocation fails
-	 *              for some reason. When allocation fails, functions
-	 *              of liblzma return LZMA_MEM_ERROR.
-	 *
-	 * The allocator should not waste time zeroing the allocated buffers.
-	 * This is not only about speed, but also memory usage, since the
-	 * operating system kernel doesn't necessarily allocate the requested
-	 * memory in physical memory until it is actually used. With small
-	 * input files, liblzma may actually need only a fraction of the
-	 * memory that it requested for allocation.
-	 *
-	 * \note        LZMA_MEM_ERROR is also used when the size of the
-	 *              allocation would be greater than SIZE_MAX. Thus,
-	 *              don't assume that the custom allocator must have
-	 *              returned NULL if some function from liblzma
-	 *              returns LZMA_MEM_ERROR.
-	 */
-	void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size);
-
-	/**
-	 * \brief       Pointer to a custom memory freeing function
-	 *
-	 * If you don't want a custom freeing function, but still
-	 * want a custom allocator, set this to NULL and liblzma
-	 * will use the standard free().
-	 *
-	 * \param       opaque  lzma_allocator.opaque (see below)
-	 * \param       ptr     Pointer returned by lzma_allocator.alloc(),
-	 *                      or when it is set to NULL, a pointer returned
-	 *                      by the standard malloc().
-	 */
-	void (LZMA_API_CALL *free)(void *opaque, void *ptr);
-
-	/**
-	 * \brief       Pointer passed to .alloc() and .free()
-	 *
-	 * opaque is passed as the first argument to lzma_allocator.alloc()
-	 * and lzma_allocator.free(). This intended to ease implementing
-	 * custom memory allocation functions for use with liblzma.
-	 *
-	 * If you don't need this, you should set this to NULL.
-	 */
-	void *opaque;
-
-} lzma_allocator;
-
-
-/**
- * \brief       Internal data structure
- *
- * The contents of this structure is not visible outside the library.
- */
-typedef struct lzma_internal_s lzma_internal;
-
-
-/**
- * \brief       Passing data to and from liblzma
- *
- * The lzma_stream structure is used for
- *  - passing pointers to input and output buffers to liblzma;
- *  - defining custom memory hander functions; and
- *  - holding a pointer to coder-specific internal data structures.
- *
- * Typical usage:
- *
- *  - After allocating lzma_stream (on stack or with malloc()), it must be
- *    initialized to LZMA_STREAM_INIT (see LZMA_STREAM_INIT for details).
- *
- *  - Initialize a coder to the lzma_stream, for example by using
- *    lzma_easy_encoder() or lzma_auto_decoder(). Some notes:
- *      - In contrast to zlib, strm->next_in and strm->next_out are
- *        ignored by all initialization functions, thus it is safe
- *        to not initialize them yet.
- *      - The initialization functions always set strm->total_in and
- *        strm->total_out to zero.
- *      - If the initialization function fails, no memory is left allocated
- *        that would require freeing with lzma_end() even if some memory was
- *        associated with the lzma_stream structure when the initialization
- *        function was called.
- *
- *  - Use lzma_code() to do the actual work.
- *
- *  - Once the coding has been finished, the existing lzma_stream can be
- *    reused. It is OK to reuse lzma_stream with different initialization
- *    function without calling lzma_end() first. Old allocations are
- *    automatically freed.
- *
- *  - Finally, use lzma_end() to free the allocated memory. lzma_end() never
- *    frees the lzma_stream structure itself.
- *
- * Application may modify the values of total_in and total_out as it wants.
- * They are updated by liblzma to match the amount of data read and
- * written, but aren't used for anything else.
- */
-typedef struct {
-	const uint8_t *next_in; /**< Pointer to the next input byte. */
-	size_t avail_in;    /**< Number of available input bytes in next_in. */
-	uint64_t total_in;  /**< Total number of bytes read by liblzma. */
-
-	uint8_t *next_out;  /**< Pointer to the next output position. */
-	size_t avail_out;   /**< Amount of free space in next_out. */
-	uint64_t total_out; /**< Total number of bytes written by liblzma. */
-
-	/**
-	 * \brief       Custom memory allocation functions
-	 *
-	 * In most cases this is NULL which makes liblzma use
-	 * the standard malloc() and free().
-	 */
-	lzma_allocator *allocator;
-
-	/** Internal state is not visible to applications. */
-	lzma_internal *internal;
-
-	/*
-	 * Reserved space to allow possible future extensions without
-	 * breaking the ABI. Excluding the initialization of this structure,
-	 * you should not touch these, because the names of these variables
-	 * may change.
-	 */
-	void *reserved_ptr1;
-	void *reserved_ptr2;
-	void *reserved_ptr3;
-	void *reserved_ptr4;
-	uint64_t reserved_int1;
-	uint64_t reserved_int2;
-	size_t reserved_int3;
-	size_t reserved_int4;
-	lzma_reserved_enum reserved_enum1;
-	lzma_reserved_enum reserved_enum2;
-
-} lzma_stream;
-
-
-/**
- * \brief       Initialization for lzma_stream
- *
- * When you declare an instance of lzma_stream, you can immediately
- * initialize it so that initialization functions know that no memory
- * has been allocated yet:
- *
- *     lzma_stream strm = LZMA_STREAM_INIT;
- *
- * If you need to initialize a dynamically allocated lzma_stream, you can use
- * memset(strm_pointer, 0, sizeof(lzma_stream)). Strictly speaking, this
- * violates the C standard since NULL may have different internal
- * representation than zero, but it should be portable enough in practice.
- * Anyway, for maximum portability, you can use something like this:
- *
- *     lzma_stream tmp = LZMA_STREAM_INIT;
- *     *strm = tmp;
- */
-#define LZMA_STREAM_INIT \
-	{ NULL, 0, 0, NULL, 0, 0, NULL, NULL, \
-	NULL, NULL, NULL, NULL, 0, 0, 0, 0, \
-	LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }
-
-
-/**
- * \brief       Encode or decode data
- *
- * Once the lzma_stream has been successfully initialized (e.g. with
- * lzma_stream_encoder()), the actual encoding or decoding is done
- * using this function. The application has to update strm->next_in,
- * strm->avail_in, strm->next_out, and strm->avail_out to pass input
- * to and get output from liblzma.
- *
- * See the description of the coder-specific initialization function to find
- * out what `action' values are supported by the coder.
- */
-extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Free memory allocated for the coder data structures
- *
- * \param       strm    Pointer to lzma_stream that is at least initialized
- *                      with LZMA_STREAM_INIT.
- *
- * After lzma_end(strm), strm->internal is guaranteed to be NULL. No other
- * members of the lzma_stream structure are touched.
- *
- * \note        zlib indicates an error if application end()s unfinished
- *              stream structure. liblzma doesn't do this, and assumes that
- *              application knows what it is doing.
- */
-extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
-
-
-/**
- * \brief       Get the memory usage of decoder filter chain
- *
- * This function is currently supported only when *strm has been initialized
- * with a function that takes a memlimit argument. With other functions, you
- * should use e.g. lzma_raw_encoder_memusage() or lzma_raw_decoder_memusage()
- * to estimate the memory requirements.
- *
- * This function is useful e.g. after LZMA_MEMLIMIT_ERROR to find out how big
- * the memory usage limit should have been to decode the input. Note that
- * this may give misleading information if decoding .xz Streams that have
- * multiple Blocks, because each Block can have different memory requirements.
- *
- * \return      How much memory is currently allocated for the filter
- *              decoders. If no filter chain is currently allocated,
- *              some non-zero value is still returned, which is less than
- *              or equal to what any filter chain would indicate as its
- *              memory requirement.
- *
- *              If this function isn't supported by *strm or some other error
- *              occurs, zero is returned.
- */
-extern LZMA_API(uint64_t) lzma_memusage(const lzma_stream *strm)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Get the current memory usage limit
- *
- * This function is supported only when *strm has been initialized with
- * a function that takes a memlimit argument.
- *
- * \return      On success, the current memory usage limit is returned
- *              (always non-zero). On error, zero is returned.
- */
-extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Set the memory usage limit
- *
- * This function is supported only when *strm has been initialized with
- * a function that takes a memlimit argument.
- *
- * \return      - LZMA_OK: New memory usage limit successfully set.
- *              - LZMA_MEMLIMIT_ERROR: The new limit is too small.
- *                The limit was not changed.
- *              - LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't
- *                support memory usage limit or memlimit was zero.
- */
-extern LZMA_API(lzma_ret) lzma_memlimit_set(
-		lzma_stream *strm, uint64_t memlimit) lzma_nothrow;

Copied: vendor/xz/5.2.3/src/liblzma/api/lzma/base.h (from rev 9176, vendor/xz/dist/src/liblzma/api/lzma/base.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/api/lzma/base.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/base.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,654 @@
+/**
+ * \file        lzma/base.h
+ * \brief       Data types and functions used in many places in liblzma API
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ *
+ * See ../lzma.h for information about liblzma as a whole.
+ */
+
+#ifndef LZMA_H_INTERNAL
+#	error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief       Boolean
+ *
+ * This is here because C89 doesn't have stdbool.h. To set a value for
+ * variables having type lzma_bool, you can use
+ *   - C99's `true' and `false' from stdbool.h;
+ *   - C++'s internal `true' and `false'; or
+ *   - integers one (true) and zero (false).
+ */
+typedef unsigned char lzma_bool;
+
+
+/**
+ * \brief       Type of reserved enumeration variable in structures
+ *
+ * To avoid breaking library ABI when new features are added, several
+ * structures contain extra variables that may be used in future. Since
+ * sizeof(enum) can be different than sizeof(int), and sizeof(enum) may
+ * even vary depending on the range of enumeration constants, we specify
+ * a separate type to be used for reserved enumeration variables. All
+ * enumeration constants in liblzma API will be non-negative and less
+ * than 128, which should guarantee that the ABI won't break even when
+ * new constants are added to existing enumerations.
+ */
+typedef enum {
+	LZMA_RESERVED_ENUM      = 0
+} lzma_reserved_enum;
+
+
+/**
+ * \brief       Return values used by several functions in liblzma
+ *
+ * Check the descriptions of specific functions to find out which return
+ * values they can return. With some functions the return values may have
+ * more specific meanings than described here; those differences are
+ * described per-function basis.
+ */
+typedef enum {
+	LZMA_OK                 = 0,
+		/**<
+		 * \brief       Operation completed successfully
+		 */
+
+	LZMA_STREAM_END         = 1,
+		/**<
+		 * \brief       End of stream was reached
+		 *
+		 * In encoder, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or
+		 * LZMA_FINISH was finished. In decoder, this indicates
+		 * that all the data was successfully decoded.
+		 *
+		 * In all cases, when LZMA_STREAM_END is returned, the last
+		 * output bytes should be picked from strm->next_out.
+		 */
+
+	LZMA_NO_CHECK           = 2,
+		/**<
+		 * \brief       Input stream has no integrity check
+		 *
+		 * This return value can be returned only if the
+		 * LZMA_TELL_NO_CHECK flag was used when initializing
+		 * the decoder. LZMA_NO_CHECK is just a warning, and
+		 * the decoding can be continued normally.
+		 *
+		 * It is possible to call lzma_get_check() immediately after
+		 * lzma_code has returned LZMA_NO_CHECK. The result will
+		 * naturally be LZMA_CHECK_NONE, but the possibility to call
+		 * lzma_get_check() may be convenient in some applications.
+		 */
+
+	LZMA_UNSUPPORTED_CHECK  = 3,
+		/**<
+		 * \brief       Cannot calculate the integrity check
+		 *
+		 * The usage of this return value is different in encoders
+		 * and decoders.
+		 *
+		 * Encoders can return this value only from the initialization
+		 * function. If initialization fails with this value, the
+		 * encoding cannot be done, because there's no way to produce
+		 * output with the correct integrity check.
+		 *
+		 * Decoders can return this value only from lzma_code() and
+		 * only if the LZMA_TELL_UNSUPPORTED_CHECK flag was used when
+		 * initializing the decoder. The decoding can still be
+		 * continued normally even if the check type is unsupported,
+		 * but naturally the check will not be validated, and possible
+		 * errors may go undetected.
+		 *
+		 * With decoder, it is possible to call lzma_get_check()
+		 * immediately after lzma_code() has returned
+		 * LZMA_UNSUPPORTED_CHECK. This way it is possible to find
+		 * out what the unsupported Check ID was.
+		 */
+
+	LZMA_GET_CHECK          = 4,
+		/**<
+		 * \brief       Integrity check type is now available
+		 *
+		 * This value can be returned only by the lzma_code() function
+		 * and only if the decoder was initialized with the
+		 * LZMA_TELL_ANY_CHECK flag. LZMA_GET_CHECK tells the
+		 * application that it may now call lzma_get_check() to find
+		 * out the Check ID. This can be used, for example, to
+		 * implement a decoder that accepts only files that have
+		 * strong enough integrity check.
+		 */
+
+	LZMA_MEM_ERROR          = 5,
+		/**<
+		 * \brief       Cannot allocate memory
+		 *
+		 * Memory allocation failed, or the size of the allocation
+		 * would be greater than SIZE_MAX.
+		 *
+		 * Due to internal implementation reasons, the coding cannot
+		 * be continued even if more memory were made available after
+		 * LZMA_MEM_ERROR.
+		 */
+
+	LZMA_MEMLIMIT_ERROR     = 6,
+		/**
+		 * \brief       Memory usage limit was reached
+		 *
+		 * Decoder would need more memory than allowed by the
+		 * specified memory usage limit. To continue decoding,
+		 * the memory usage limit has to be increased with
+		 * lzma_memlimit_set().
+		 */
+
+	LZMA_FORMAT_ERROR       = 7,
+		/**<
+		 * \brief       File format not recognized
+		 *
+		 * The decoder did not recognize the input as supported file
+		 * format. This error can occur, for example, when trying to
+		 * decode .lzma format file with lzma_stream_decoder,
+		 * because lzma_stream_decoder accepts only the .xz format.
+		 */
+
+	LZMA_OPTIONS_ERROR      = 8,
+		/**<
+		 * \brief       Invalid or unsupported options
+		 *
+		 * Invalid or unsupported options, for example
+		 *  - unsupported filter(s) or filter options; or
+		 *  - reserved bits set in headers (decoder only).
+		 *
+		 * Rebuilding liblzma with more features enabled, or
+		 * upgrading to a newer version of liblzma may help.
+		 */
+
+	LZMA_DATA_ERROR         = 9,
+		/**<
+		 * \brief       Data is corrupt
+		 *
+		 * The usage of this return value is different in encoders
+		 * and decoders. In both encoder and decoder, the coding
+		 * cannot continue after this error.
+		 *
+		 * Encoders return this if size limits of the target file
+		 * format would be exceeded. These limits are huge, thus
+		 * getting this error from an encoder is mostly theoretical.
+		 * For example, the maximum compressed and uncompressed
+		 * size of a .xz Stream is roughly 8 EiB (2^63 bytes).
+		 *
+		 * Decoders return this error if the input data is corrupt.
+		 * This can mean, for example, invalid CRC32 in headers
+		 * or invalid check of uncompressed data.
+		 */
+
+	LZMA_BUF_ERROR          = 10,
+		/**<
+		 * \brief       No progress is possible
+		 *
+		 * This error code is returned when the coder cannot consume
+		 * any new input and produce any new output. The most common
+		 * reason for this error is that the input stream being
+		 * decoded is truncated or corrupt.
+		 *
+		 * This error is not fatal. Coding can be continued normally
+		 * by providing more input and/or more output space, if
+		 * possible.
+		 *
+		 * Typically the first call to lzma_code() that can do no
+		 * progress returns LZMA_OK instead of LZMA_BUF_ERROR. Only
+		 * the second consecutive call doing no progress will return
+		 * LZMA_BUF_ERROR. This is intentional.
+		 *
+		 * With zlib, Z_BUF_ERROR may be returned even if the
+		 * application is doing nothing wrong, so apps will need
+		 * to handle Z_BUF_ERROR specially. The above hack
+		 * guarantees that liblzma never returns LZMA_BUF_ERROR
+		 * to properly written applications unless the input file
+		 * is truncated or corrupt. This should simplify the
+		 * applications a little.
+		 */
+
+	LZMA_PROG_ERROR         = 11,
+		/**<
+		 * \brief       Programming error
+		 *
+		 * This indicates that the arguments given to the function are
+		 * invalid or the internal state of the decoder is corrupt.
+		 *   - Function arguments are invalid or the structures
+		 *     pointed by the argument pointers are invalid
+		 *     e.g. if strm->next_out has been set to NULL and
+		 *     strm->avail_out > 0 when calling lzma_code().
+		 *   - lzma_* functions have been called in wrong order
+		 *     e.g. lzma_code() was called right after lzma_end().
+		 *   - If errors occur randomly, the reason might be flaky
+		 *     hardware.
+		 *
+		 * If you think that your code is correct, this error code
+		 * can be a sign of a bug in liblzma. See the documentation
+		 * how to report bugs.
+		 */
+} lzma_ret;
+
+
+/**
+ * \brief       The `action' argument for lzma_code()
+ *
+ * After the first use of LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, LZMA_FULL_BARRIER,
+ * or LZMA_FINISH, the same `action' must is used until lzma_code() returns
+ * LZMA_STREAM_END. Also, the amount of input (that is, strm->avail_in) must
+ * not be modified by the application until lzma_code() returns
+ * LZMA_STREAM_END. Changing the `action' or modifying the amount of input
+ * will make lzma_code() return LZMA_PROG_ERROR.
+ */
+typedef enum {
+	LZMA_RUN = 0,
+		/**<
+		 * \brief       Continue coding
+		 *
+		 * Encoder: Encode as much input as possible. Some internal
+		 * buffering will probably be done (depends on the filter
+		 * chain in use), which causes latency: the input used won't
+		 * usually be decodeable from the output of the same
+		 * lzma_code() call.
+		 *
+		 * Decoder: Decode as much input as possible and produce as
+		 * much output as possible.
+		 */
+
+	LZMA_SYNC_FLUSH = 1,
+		/**<
+		 * \brief       Make all the input available at output
+		 *
+		 * Normally the encoder introduces some latency.
+		 * LZMA_SYNC_FLUSH forces all the buffered data to be
+		 * available at output without resetting the internal
+		 * state of the encoder. This way it is possible to use
+		 * compressed stream for example for communication over
+		 * network.
+		 *
+		 * Only some filters support LZMA_SYNC_FLUSH. Trying to use
+		 * LZMA_SYNC_FLUSH with filters that don't support it will
+		 * make lzma_code() return LZMA_OPTIONS_ERROR. For example,
+		 * LZMA1 doesn't support LZMA_SYNC_FLUSH but LZMA2 does.
+		 *
+		 * Using LZMA_SYNC_FLUSH very often can dramatically reduce
+		 * the compression ratio. With some filters (for example,
+		 * LZMA2), fine-tuning the compression options may help
+		 * mitigate this problem significantly (for example,
+		 * match finder with LZMA2).
+		 *
+		 * Decoders don't support LZMA_SYNC_FLUSH.
+		 */
+
+	LZMA_FULL_FLUSH = 2,
+		/**<
+		 * \brief       Finish encoding of the current Block
+		 *
+		 * All the input data going to the current Block must have
+		 * been given to the encoder (the last bytes can still be
+		 * pending in *next_in). Call lzma_code() with LZMA_FULL_FLUSH
+		 * until it returns LZMA_STREAM_END. Then continue normally
+		 * with LZMA_RUN or finish the Stream with LZMA_FINISH.
+		 *
+		 * This action is currently supported only by Stream encoder
+		 * and easy encoder (which uses Stream encoder). If there is
+		 * no unfinished Block, no empty Block is created.
+		 */
+
+	LZMA_FULL_BARRIER = 4,
+		/**<
+		 * \brief       Finish encoding of the current Block
+		 *
+		 * This is like LZMA_FULL_FLUSH except that this doesn't
+		 * necessarily wait until all the input has been made
+		 * available via the output buffer. That is, lzma_code()
+		 * might return LZMA_STREAM_END as soon as all the input
+		 * has been consumed (avail_in == 0).
+		 *
+		 * LZMA_FULL_BARRIER is useful with a threaded encoder if
+		 * one wants to split the .xz Stream into Blocks at specific
+		 * offsets but doesn't care if the output isn't flushed
+		 * immediately. Using LZMA_FULL_BARRIER allows keeping
+		 * the threads busy while LZMA_FULL_FLUSH would make
+		 * lzma_code() wait until all the threads have finished
+		 * until more data could be passed to the encoder.
+		 *
+		 * With a lzma_stream initialized with the single-threaded
+		 * lzma_stream_encoder() or lzma_easy_encoder(),
+		 * LZMA_FULL_BARRIER is an alias for LZMA_FULL_FLUSH.
+		 */
+
+	LZMA_FINISH = 3
+		/**<
+		 * \brief       Finish the coding operation
+		 *
+		 * All the input data must have been given to the encoder
+		 * (the last bytes can still be pending in next_in).
+		 * Call lzma_code() with LZMA_FINISH until it returns
+		 * LZMA_STREAM_END. Once LZMA_FINISH has been used,
+		 * the amount of input must no longer be changed by
+		 * the application.
+		 *
+		 * When decoding, using LZMA_FINISH is optional unless the
+		 * LZMA_CONCATENATED flag was used when the decoder was
+		 * initialized. When LZMA_CONCATENATED was not used, the only
+		 * effect of LZMA_FINISH is that the amount of input must not
+		 * be changed just like in the encoder.
+		 */
+} lzma_action;
+
+
+/**
+ * \brief       Custom functions for memory handling
+ *
+ * A pointer to lzma_allocator may be passed via lzma_stream structure
+ * to liblzma, and some advanced functions take a pointer to lzma_allocator
+ * as a separate function argument. The library will use the functions
+ * specified in lzma_allocator for memory handling instead of the default
+ * malloc() and free(). C++ users should note that the custom memory
+ * handling functions must not throw exceptions.
+ *
+ * Single-threaded mode only: liblzma doesn't make an internal copy of
+ * lzma_allocator. Thus, it is OK to change these function pointers in
+ * the middle of the coding process, but obviously it must be done
+ * carefully to make sure that the replacement `free' can deallocate
+ * memory allocated by the earlier `alloc' function(s).
+ *
+ * Multithreaded mode: liblzma might internally store pointers to the
+ * lzma_allocator given via the lzma_stream structure. The application
+ * must not change the allocator pointer in lzma_stream or the contents
+ * of the pointed lzma_allocator structure until lzma_end() has been used
+ * to free the memory associated with that lzma_stream. The allocation
+ * functions might be called simultaneously from multiple threads, and
+ * thus they must be thread safe.
+ */
+typedef struct {
+	/**
+	 * \brief       Pointer to a custom memory allocation function
+	 *
+	 * If you don't want a custom allocator, but still want
+	 * custom free(), set this to NULL and liblzma will use
+	 * the standard malloc().
+	 *
+	 * \param       opaque  lzma_allocator.opaque (see below)
+	 * \param       nmemb   Number of elements like in calloc(). liblzma
+	 *                      will always set nmemb to 1, so it is safe to
+	 *                      ignore nmemb in a custom allocator if you like.
+	 *                      The nmemb argument exists only for
+	 *                      compatibility with zlib and libbzip2.
+	 * \param       size    Size of an element in bytes.
+	 *                      liblzma never sets this to zero.
+	 *
+	 * \return      Pointer to the beginning of a memory block of
+	 *              `size' bytes, or NULL if allocation fails
+	 *              for some reason. When allocation fails, functions
+	 *              of liblzma return LZMA_MEM_ERROR.
+	 *
+	 * The allocator should not waste time zeroing the allocated buffers.
+	 * This is not only about speed, but also memory usage, since the
+	 * operating system kernel doesn't necessarily allocate the requested
+	 * memory in physical memory until it is actually used. With small
+	 * input files, liblzma may actually need only a fraction of the
+	 * memory that it requested for allocation.
+	 *
+	 * \note        LZMA_MEM_ERROR is also used when the size of the
+	 *              allocation would be greater than SIZE_MAX. Thus,
+	 *              don't assume that the custom allocator must have
+	 *              returned NULL if some function from liblzma
+	 *              returns LZMA_MEM_ERROR.
+	 */
+	void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size);
+
+	/**
+	 * \brief       Pointer to a custom memory freeing function
+	 *
+	 * If you don't want a custom freeing function, but still
+	 * want a custom allocator, set this to NULL and liblzma
+	 * will use the standard free().
+	 *
+	 * \param       opaque  lzma_allocator.opaque (see below)
+	 * \param       ptr     Pointer returned by lzma_allocator.alloc(),
+	 *                      or when it is set to NULL, a pointer returned
+	 *                      by the standard malloc().
+	 */
+	void (LZMA_API_CALL *free)(void *opaque, void *ptr);
+
+	/**
+	 * \brief       Pointer passed to .alloc() and .free()
+	 *
+	 * opaque is passed as the first argument to lzma_allocator.alloc()
+	 * and lzma_allocator.free(). This intended to ease implementing
+	 * custom memory allocation functions for use with liblzma.
+	 *
+	 * If you don't need this, you should set this to NULL.
+	 */
+	void *opaque;
+
+} lzma_allocator;
+
+
+/**
+ * \brief       Internal data structure
+ *
+ * The contents of this structure is not visible outside the library.
+ */
+typedef struct lzma_internal_s lzma_internal;
+
+
+/**
+ * \brief       Passing data to and from liblzma
+ *
+ * The lzma_stream structure is used for
+ *  - passing pointers to input and output buffers to liblzma;
+ *  - defining custom memory hander functions; and
+ *  - holding a pointer to coder-specific internal data structures.
+ *
+ * Typical usage:
+ *
+ *  - After allocating lzma_stream (on stack or with malloc()), it must be
+ *    initialized to LZMA_STREAM_INIT (see LZMA_STREAM_INIT for details).
+ *
+ *  - Initialize a coder to the lzma_stream, for example by using
+ *    lzma_easy_encoder() or lzma_auto_decoder(). Some notes:
+ *      - In contrast to zlib, strm->next_in and strm->next_out are
+ *        ignored by all initialization functions, thus it is safe
+ *        to not initialize them yet.
+ *      - The initialization functions always set strm->total_in and
+ *        strm->total_out to zero.
+ *      - If the initialization function fails, no memory is left allocated
+ *        that would require freeing with lzma_end() even if some memory was
+ *        associated with the lzma_stream structure when the initialization
+ *        function was called.
+ *
+ *  - Use lzma_code() to do the actual work.
+ *
+ *  - Once the coding has been finished, the existing lzma_stream can be
+ *    reused. It is OK to reuse lzma_stream with different initialization
+ *    function without calling lzma_end() first. Old allocations are
+ *    automatically freed.
+ *
+ *  - Finally, use lzma_end() to free the allocated memory. lzma_end() never
+ *    frees the lzma_stream structure itself.
+ *
+ * Application may modify the values of total_in and total_out as it wants.
+ * They are updated by liblzma to match the amount of data read and
+ * written but aren't used for anything else except as a possible return
+ * values from lzma_get_progress().
+ */
+typedef struct {
+	const uint8_t *next_in; /**< Pointer to the next input byte. */
+	size_t avail_in;    /**< Number of available input bytes in next_in. */
+	uint64_t total_in;  /**< Total number of bytes read by liblzma. */
+
+	uint8_t *next_out;  /**< Pointer to the next output position. */
+	size_t avail_out;   /**< Amount of free space in next_out. */
+	uint64_t total_out; /**< Total number of bytes written by liblzma. */
+
+	/**
+	 * \brief       Custom memory allocation functions
+	 *
+	 * In most cases this is NULL which makes liblzma use
+	 * the standard malloc() and free().
+	 *
+	 * \note        In 5.0.x this is not a const pointer.
+	 */
+	const lzma_allocator *allocator;
+
+	/** Internal state is not visible to applications. */
+	lzma_internal *internal;
+
+	/*
+	 * Reserved space to allow possible future extensions without
+	 * breaking the ABI. Excluding the initialization of this structure,
+	 * you should not touch these, because the names of these variables
+	 * may change.
+	 */
+	void *reserved_ptr1;
+	void *reserved_ptr2;
+	void *reserved_ptr3;
+	void *reserved_ptr4;
+	uint64_t reserved_int1;
+	uint64_t reserved_int2;
+	size_t reserved_int3;
+	size_t reserved_int4;
+	lzma_reserved_enum reserved_enum1;
+	lzma_reserved_enum reserved_enum2;
+
+} lzma_stream;
+
+
+/**
+ * \brief       Initialization for lzma_stream
+ *
+ * When you declare an instance of lzma_stream, you can immediately
+ * initialize it so that initialization functions know that no memory
+ * has been allocated yet:
+ *
+ *     lzma_stream strm = LZMA_STREAM_INIT;
+ *
+ * If you need to initialize a dynamically allocated lzma_stream, you can use
+ * memset(strm_pointer, 0, sizeof(lzma_stream)). Strictly speaking, this
+ * violates the C standard since NULL may have different internal
+ * representation than zero, but it should be portable enough in practice.
+ * Anyway, for maximum portability, you can use something like this:
+ *
+ *     lzma_stream tmp = LZMA_STREAM_INIT;
+ *     *strm = tmp;
+ */
+#define LZMA_STREAM_INIT \
+	{ NULL, 0, 0, NULL, 0, 0, NULL, NULL, \
+	NULL, NULL, NULL, NULL, 0, 0, 0, 0, \
+	LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }
+
+
+/**
+ * \brief       Encode or decode data
+ *
+ * Once the lzma_stream has been successfully initialized (e.g. with
+ * lzma_stream_encoder()), the actual encoding or decoding is done
+ * using this function. The application has to update strm->next_in,
+ * strm->avail_in, strm->next_out, and strm->avail_out to pass input
+ * to and get output from liblzma.
+ *
+ * See the description of the coder-specific initialization function to find
+ * out what `action' values are supported by the coder.
+ */
+extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Free memory allocated for the coder data structures
+ *
+ * \param       strm    Pointer to lzma_stream that is at least initialized
+ *                      with LZMA_STREAM_INIT.
+ *
+ * After lzma_end(strm), strm->internal is guaranteed to be NULL. No other
+ * members of the lzma_stream structure are touched.
+ *
+ * \note        zlib indicates an error if application end()s unfinished
+ *              stream structure. liblzma doesn't do this, and assumes that
+ *              application knows what it is doing.
+ */
+extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
+
+
+/**
+ * \brief       Get progress information
+ *
+ * In single-threaded mode, applications can get progress information from
+ * strm->total_in and strm->total_out. In multi-threaded mode this is less
+ * useful because a significant amount of both input and output data gets
+ * buffered internally by liblzma. This makes total_in and total_out give
+ * misleading information and also makes the progress indicator updates
+ * non-smooth.
+ *
+ * This function gives realistic progress information also in multi-threaded
+ * mode by taking into account the progress made by each thread. In
+ * single-threaded mode *progress_in and *progress_out are set to
+ * strm->total_in and strm->total_out, respectively.
+ */
+extern LZMA_API(void) lzma_get_progress(lzma_stream *strm,
+		uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow;
+
+
+/**
+ * \brief       Get the memory usage of decoder filter chain
+ *
+ * This function is currently supported only when *strm has been initialized
+ * with a function that takes a memlimit argument. With other functions, you
+ * should use e.g. lzma_raw_encoder_memusage() or lzma_raw_decoder_memusage()
+ * to estimate the memory requirements.
+ *
+ * This function is useful e.g. after LZMA_MEMLIMIT_ERROR to find out how big
+ * the memory usage limit should have been to decode the input. Note that
+ * this may give misleading information if decoding .xz Streams that have
+ * multiple Blocks, because each Block can have different memory requirements.
+ *
+ * \return      How much memory is currently allocated for the filter
+ *              decoders. If no filter chain is currently allocated,
+ *              some non-zero value is still returned, which is less than
+ *              or equal to what any filter chain would indicate as its
+ *              memory requirement.
+ *
+ *              If this function isn't supported by *strm or some other error
+ *              occurs, zero is returned.
+ */
+extern LZMA_API(uint64_t) lzma_memusage(const lzma_stream *strm)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Get the current memory usage limit
+ *
+ * This function is supported only when *strm has been initialized with
+ * a function that takes a memlimit argument.
+ *
+ * \return      On success, the current memory usage limit is returned
+ *              (always non-zero). On error, zero is returned.
+ */
+extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Set the memory usage limit
+ *
+ * This function is supported only when *strm has been initialized with
+ * a function that takes a memlimit argument.
+ *
+ * \return      - LZMA_OK: New memory usage limit successfully set.
+ *              - LZMA_MEMLIMIT_ERROR: The new limit is too small.
+ *                The limit was not changed.
+ *              - LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't
+ *                support memory usage limit or memlimit was zero.
+ */
+extern LZMA_API(lzma_ret) lzma_memlimit_set(
+		lzma_stream *strm, uint64_t memlimit) lzma_nothrow;

Deleted: vendor/xz/5.2.3/src/liblzma/api/lzma/block.h
===================================================================
--- vendor/xz/dist/src/liblzma/api/lzma/block.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/block.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,533 +0,0 @@
-/**
- * \file        lzma/block.h
- * \brief       .xz Block handling
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       Options for the Block and Block Header encoders and decoders
- *
- * Different Block handling functions use different parts of this structure.
- * Some read some members, other functions write, and some do both. Only the
- * members listed for reading need to be initialized when the specified
- * functions are called. The members marked for writing will be assigned
- * new values at some point either by calling the given function or by
- * later calls to lzma_code().
- */
-typedef struct {
-	/**
-	 * \brief       Block format version
-	 *
-	 * To prevent API and ABI breakages if new features are needed in
-	 * the Block field, a version number is used to indicate which
-	 * fields in this structure are in use. For now, version must always
-	 * be zero. With non-zero version, most Block related functions will
-	 * return LZMA_OPTIONS_ERROR.
-	 *
-	 * Read by:
-	 *  - All functions that take pointer to lzma_block as argument,
-	 *    including lzma_block_header_decode().
-	 *
-	 * Written by:
-	 *  - lzma_block_header_decode()
-	 */
-	uint32_t version;
-
-	/**
-	 * \brief       Size of the Block Header field
-	 *
-	 * This is always a multiple of four.
-	 *
-	 * Read by:
-	 *  - lzma_block_header_encode()
-	 *  - lzma_block_header_decode()
-	 *  - lzma_block_compressed_size()
-	 *  - lzma_block_unpadded_size()
-	 *  - lzma_block_total_size()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_decode()
-	 *
-	 * Written by:
-	 *  - lzma_block_header_size()
-	 *  - lzma_block_buffer_encode()
-	 */
-	uint32_t header_size;
-#	define LZMA_BLOCK_HEADER_SIZE_MIN 8
-#	define LZMA_BLOCK_HEADER_SIZE_MAX 1024
-
-	/**
-	 * \brief       Type of integrity Check
-	 *
-	 * The Check ID is not stored into the Block Header, thus its value
-	 * must be provided also when decoding.
-	 *
-	 * Read by:
-	 *  - lzma_block_header_encode()
-	 *  - lzma_block_header_decode()
-	 *  - lzma_block_compressed_size()
-	 *  - lzma_block_unpadded_size()
-	 *  - lzma_block_total_size()
-	 *  - lzma_block_encoder()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_encode()
-	 *  - lzma_block_buffer_decode()
-	 */
-	lzma_check check;
-
-	/**
-	 * \brief       Size of the Compressed Data in bytes
-	 *
-	 * Encoding: If this is not LZMA_VLI_UNKNOWN, Block Header encoder
-	 * will store this value to the Block Header. Block encoder doesn't
-	 * care about this value, but will set it once the encoding has been
-	 * finished.
-	 *
-	 * Decoding: If this is not LZMA_VLI_UNKNOWN, Block decoder will
-	 * verify that the size of the Compressed Data field matches
-	 * compressed_size.
-	 *
-	 * Usually you don't know this value when encoding in streamed mode,
-	 * and thus cannot write this field into the Block Header.
-	 *
-	 * In non-streamed mode you can reserve space for this field before
-	 * encoding the actual Block. After encoding the data, finish the
-	 * Block by encoding the Block Header. Steps in detail:
-	 *
-	 *  - Set compressed_size to some big enough value. If you don't know
-	 *    better, use LZMA_VLI_MAX, but remember that bigger values take
-	 *    more space in Block Header.
-	 *
-	 *  - Call lzma_block_header_size() to see how much space you need to
-	 *    reserve for the Block Header.
-	 *
-	 *  - Encode the Block using lzma_block_encoder() and lzma_code().
-	 *    It sets compressed_size to the correct value.
-	 *
-	 *  - Use lzma_block_header_encode() to encode the Block Header.
-	 *    Because space was reserved in the first step, you don't need
-	 *    to call lzma_block_header_size() anymore, because due to
-	 *    reserving, header_size has to be big enough. If it is "too big",
-	 *    lzma_block_header_encode() will add enough Header Padding to
-	 *    make Block Header to match the size specified by header_size.
-	 *
-	 * Read by:
-	 *  - lzma_block_header_size()
-	 *  - lzma_block_header_encode()
-	 *  - lzma_block_compressed_size()
-	 *  - lzma_block_unpadded_size()
-	 *  - lzma_block_total_size()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_decode()
-	 *
-	 * Written by:
-	 *  - lzma_block_header_decode()
-	 *  - lzma_block_compressed_size()
-	 *  - lzma_block_encoder()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_encode()
-	 *  - lzma_block_buffer_decode()
-	 */
-	lzma_vli compressed_size;
-
-	/**
-	 * \brief       Uncompressed Size in bytes
-	 *
-	 * This is handled very similarly to compressed_size above.
-	 *
-	 * uncompressed_size is needed by fewer functions than
-	 * compressed_size. This is because uncompressed_size isn't
-	 * needed to validate that Block stays within proper limits.
-	 *
-	 * Read by:
-	 *  - lzma_block_header_size()
-	 *  - lzma_block_header_encode()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_decode()
-	 *
-	 * Written by:
-	 *  - lzma_block_header_decode()
-	 *  - lzma_block_encoder()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_encode()
-	 *  - lzma_block_buffer_decode()
-	 */
-	lzma_vli uncompressed_size;
-
-	/**
-	 * \brief       Array of filters
-	 *
-	 * There can be 1-4 filters. The end of the array is marked with
-	 * .id = LZMA_VLI_UNKNOWN.
-	 *
-	 * Read by:
-	 *  - lzma_block_header_size()
-	 *  - lzma_block_header_encode()
-	 *  - lzma_block_encoder()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_encode()
-	 *  - lzma_block_buffer_decode()
-	 *
-	 * Written by:
-	 *  - lzma_block_header_decode(): Note that this does NOT free()
-	 *    the old filter options structures. All unused filters[] will
-	 *    have .id == LZMA_VLI_UNKNOWN and .options == NULL. If
-	 *    decoding fails, all filters[] are guaranteed to be
-	 *    LZMA_VLI_UNKNOWN and NULL.
-	 *
-	 * \note        Because of the array is terminated with
-	 *              .id = LZMA_VLI_UNKNOWN, the actual array must
-	 *              have LZMA_FILTERS_MAX + 1 members or the Block
-	 *              Header decoder will overflow the buffer.
-	 */
-	lzma_filter *filters;
-
-	/**
-	 * \brief       Raw value stored in the Check field
-	 *
-	 * After successful coding, the first lzma_check_size(check) bytes
-	 * of this array contain the raw value stored in the Check field.
-	 *
-	 * Note that CRC32 and CRC64 are stored in little endian byte order.
-	 * Take it into account if you display the Check values to the user.
-	 *
-	 * Written by:
-	 *  - lzma_block_encoder()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_encode()
-	 *  - lzma_block_buffer_decode()
-	 */
-	uint8_t raw_check[LZMA_CHECK_SIZE_MAX];
-
-	/*
-	 * 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.
-	 */
-	void *reserved_ptr1;
-	void *reserved_ptr2;
-	void *reserved_ptr3;
-	uint32_t reserved_int1;
-	uint32_t reserved_int2;
-	lzma_vli reserved_int3;
-	lzma_vli reserved_int4;
-	lzma_vli reserved_int5;
-	lzma_vli reserved_int6;
-	lzma_vli reserved_int7;
-	lzma_vli reserved_int8;
-	lzma_reserved_enum reserved_enum1;
-	lzma_reserved_enum reserved_enum2;
-	lzma_reserved_enum reserved_enum3;
-	lzma_reserved_enum reserved_enum4;
-	lzma_bool reserved_bool1;
-	lzma_bool reserved_bool2;
-	lzma_bool reserved_bool3;
-	lzma_bool reserved_bool4;
-	lzma_bool reserved_bool5;
-	lzma_bool reserved_bool6;
-	lzma_bool reserved_bool7;
-	lzma_bool reserved_bool8;
-
-} lzma_block;
-
-
-/**
- * \brief       Decode the Block Header Size field
- *
- * To decode Block Header using lzma_block_header_decode(), the size of the
- * Block Header has to be known and stored into lzma_block.header_size.
- * The size can be calculated from the first byte of a Block using this macro.
- * Note that if the first byte is 0x00, it indicates beginning of Index; use
- * this macro only when the byte is not 0x00.
- *
- * There is no encoding macro, because Block Header encoder is enough for that.
- */
-#define lzma_block_header_size_decode(b) (((uint32_t)(b) + 1) * 4)
-
-
-/**
- * \brief       Calculate Block Header Size
- *
- * Calculate the minimum size needed for the Block Header field using the
- * settings specified in the lzma_block structure. Note that it is OK to
- * increase the calculated header_size value as long as it is a multiple of
- * four and doesn't exceed LZMA_BLOCK_HEADER_SIZE_MAX. Increasing header_size
- * just means that lzma_block_header_encode() will add Header Padding.
- *
- * \return      - LZMA_OK: Size calculated successfully and stored to
- *                block->header_size.
- *              - LZMA_OPTIONS_ERROR: Unsupported version, filters or
- *                filter options.
- *              - LZMA_PROG_ERROR: Invalid values like compressed_size == 0.
- *
- * \note        This doesn't check that all the options are valid i.e. this
- *              may return LZMA_OK even if lzma_block_header_encode() or
- *              lzma_block_encoder() would fail. If you want to validate the
- *              filter chain, consider using lzma_memlimit_encoder() which as
- *              a side-effect validates the filter chain.
- */
-extern LZMA_API(lzma_ret) lzma_block_header_size(lzma_block *block)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Encode Block Header
- *
- * The caller must have calculated the size of the Block Header already with
- * lzma_block_header_size(). If a value larger than the one calculated by
- * lzma_block_header_size() is used, the Block Header will be padded to the
- * specified size.
- *
- * \param       out         Beginning of the output buffer. This must be
- *                          at least block->header_size bytes.
- * \param       block       Block options to be encoded.
- *
- * \return      - LZMA_OK: Encoding was successful. block->header_size
- *                bytes were written to output buffer.
- *              - LZMA_OPTIONS_ERROR: Invalid or unsupported options.
- *              - LZMA_PROG_ERROR: Invalid arguments, for example
- *                block->header_size is invalid or block->filters is NULL.
- */
-extern LZMA_API(lzma_ret) lzma_block_header_encode(
-		const lzma_block *block, uint8_t *out)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Decode Block Header
- *
- * block->version should be set to the highest value supported by the
- * application; currently the only possible version is zero. This function
- * will set version to the lowest value that still supports all the features
- * required by the Block Header.
- *
- * The size of the Block Header must have already been decoded with
- * lzma_block_header_size_decode() macro and stored to block->header_size.
- *
- * The integrity check type from Stream Header must have been stored
- * to block->check.
- *
- * block->filters must have been allocated, but they don't need to be
- * initialized (possible existing filter options are not freed).
- *
- * \param       block       Destination for Block options.
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() (and also free()
- *                          if an error occurs).
- * \param       in          Beginning of the input buffer. This must be
- *                          at least block->header_size bytes.
- *
- * \return      - LZMA_OK: Decoding was successful. block->header_size
- *                bytes were read from the input buffer.
- *              - LZMA_OPTIONS_ERROR: The Block Header specifies some
- *                unsupported options such as unsupported filters. This can
- *                happen also if block->version was set to a too low value
- *                compared to what would be required to properly represent
- *                the information stored in the Block Header.
- *              - LZMA_DATA_ERROR: Block Header is corrupt, for example,
- *                the CRC32 doesn't match.
- *              - LZMA_PROG_ERROR: Invalid arguments, for example
- *                block->header_size is invalid or block->filters is NULL.
- */
-extern LZMA_API(lzma_ret) lzma_block_header_decode(lzma_block *block,
-		lzma_allocator *allocator, const uint8_t *in)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Validate and set Compressed Size according to Unpadded Size
- *
- * Block Header stores Compressed Size, but Index has Unpadded Size. If the
- * application has already parsed the Index and is now decoding Blocks,
- * it can calculate Compressed Size from Unpadded Size. This function does
- * exactly that with error checking:
- *
- *  - Compressed Size calculated from Unpadded Size must be positive integer,
- *    that is, Unpadded Size must be big enough that after Block Header and
- *    Check fields there's still at least one byte for Compressed Size.
- *
- *  - If Compressed Size was present in Block Header, the new value
- *    calculated from Unpadded Size is compared against the value
- *    from Block Header.
- *
- * \note        This function must be called _after_ decoding the Block Header
- *              field so that it can properly validate Compressed Size if it
- *              was present in Block Header.
- *
- * \return      - LZMA_OK: block->compressed_size was set successfully.
- *              - LZMA_DATA_ERROR: unpadded_size is too small compared to
- *                block->header_size and lzma_check_size(block->check).
- *              - LZMA_PROG_ERROR: Some values are invalid. For example,
- *                block->header_size must be a multiple of four and
- *                between 8 and 1024 inclusive.
- */
-extern LZMA_API(lzma_ret) lzma_block_compressed_size(
-		lzma_block *block, lzma_vli unpadded_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Calculate Unpadded Size
- *
- * The Index field stores Unpadded Size and Uncompressed Size. The latter
- * can be taken directly from the lzma_block structure after coding a Block,
- * but Unpadded Size needs to be calculated from Block Header Size,
- * Compressed Size, and size of the Check field. This is where this function
- * is needed.
- *
- * \return      Unpadded Size on success, or zero on error.
- */
-extern LZMA_API(lzma_vli) lzma_block_unpadded_size(const lzma_block *block)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Calculate the total encoded size of a Block
- *
- * This is equivalent to lzma_block_unpadded_size() except that the returned
- * value includes the size of the Block Padding field.
- *
- * \return      On success, total encoded size of the Block. On error,
- *              zero is returned.
- */
-extern LZMA_API(lzma_vli) lzma_block_total_size(const lzma_block *block)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Initialize .xz Block encoder
- *
- * Valid actions for lzma_code() are LZMA_RUN, LZMA_SYNC_FLUSH (only if the
- * filter chain supports it), and LZMA_FINISH.
- *
- * \return      - LZMA_OK: All good, continue with lzma_code().
- *              - LZMA_MEM_ERROR
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_UNSUPPORTED_CHECK: block->check specifies a Check ID
- *                that is not supported by this buid of liblzma. Initializing
- *                the encoder failed.
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_block_encoder(
-		lzma_stream *strm, lzma_block *block)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Initialize .xz Block decoder
- *
- * Valid actions for lzma_code() are LZMA_RUN and LZMA_FINISH. Using
- * LZMA_FINISH is not required. It is supported only for convenience.
- *
- * \return      - LZMA_OK: All good, continue with lzma_code().
- *              - LZMA_UNSUPPORTED_CHECK: Initialization was successful, but
- *                the given Check ID is not supported, thus Check will be
- *                ignored.
- *              - LZMA_PROG_ERROR
- *              - LZMA_MEM_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_block_decoder(
-		lzma_stream *strm, lzma_block *block)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Calculate maximum output size for single-call Block encoding
- *
- * This is equivalent to lzma_stream_buffer_bound() but for .xz Blocks.
- * See the documentation of lzma_stream_buffer_bound().
- */
-extern LZMA_API(size_t) lzma_block_buffer_bound(size_t uncompressed_size)
-		lzma_nothrow;
-
-
-/**
- * \brief       Single-call .xz Block encoder
- *
- * In contrast to the multi-call encoder initialized with
- * lzma_block_encoder(), this function encodes also the Block Header. This
- * is required to make it possible to write appropriate Block Header also
- * in case the data isn't compressible, and different filter chain has to be
- * used to encode the data in uncompressed form using uncompressed chunks
- * of the LZMA2 filter.
- *
- * When the data isn't compressible, header_size, compressed_size, and
- * uncompressed_size are set just like when the data was compressible, but
- * it is possible that header_size is too small to hold the filter chain
- * specified in block->filters, because that isn't necessarily the filter
- * chain that was actually used to encode the data. lzma_block_unpadded_size()
- * still works normally, because it doesn't read the filters array.
- *
- * \param       block       Block options: block->version, block->check,
- *                          and block->filters must have been initialized.
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() and free().
- * \param       in          Beginning of the input buffer
- * \param       in_size     Size of the input buffer
- * \param       out         Beginning of the output buffer
- * \param       out_pos     The next byte will be written to out[*out_pos].
- *                          *out_pos is updated only if encoding succeeds.
- * \param       out_size    Size of the out buffer; the first byte into
- *                          which no data is written to is out[out_size].
- *
- * \return      - LZMA_OK: Encoding was successful.
- *              - LZMA_BUF_ERROR: Not enough output buffer space.
- *              - LZMA_UNSUPPORTED_CHECK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_MEM_ERROR
- *              - LZMA_DATA_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_block_buffer_encode(
-		lzma_block *block, lzma_allocator *allocator,
-		const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Single-call .xz Block decoder
- *
- * This is single-call equivalent of lzma_block_decoder(), and requires that
- * the caller has already decoded Block Header and checked its memory usage.
- *
- * \param       block       Block options just like with lzma_block_decoder().
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() and free().
- * \param       in          Beginning of the input buffer
- * \param       in_pos      The next byte will be read from in[*in_pos].
- *                          *in_pos is updated only if decoding succeeds.
- * \param       in_size     Size of the input buffer; the first byte that
- *                          won't be read is in[in_size].
- * \param       out         Beginning of the output buffer
- * \param       out_pos     The next byte will be written to out[*out_pos].
- *                          *out_pos is updated only if encoding succeeds.
- * \param       out_size    Size of the out buffer; the first byte into
- *                          which no data is written to is out[out_size].
- *
- * \return      - LZMA_OK: Decoding was successful.
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_DATA_ERROR
- *              - LZMA_MEM_ERROR
- *              - LZMA_BUF_ERROR: Output buffer was too small.
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_block_buffer_decode(
-		lzma_block *block, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-		lzma_nothrow;

Copied: vendor/xz/5.2.3/src/liblzma/api/lzma/block.h (from rev 9176, vendor/xz/dist/src/liblzma/api/lzma/block.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/api/lzma/block.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/block.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,581 @@
+/**
+ * \file        lzma/block.h
+ * \brief       .xz Block handling
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ *
+ * See ../lzma.h for information about liblzma as a whole.
+ */
+
+#ifndef LZMA_H_INTERNAL
+#	error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief       Options for the Block and Block Header encoders and decoders
+ *
+ * Different Block handling functions use different parts of this structure.
+ * Some read some members, other functions write, and some do both. Only the
+ * members listed for reading need to be initialized when the specified
+ * functions are called. The members marked for writing will be assigned
+ * new values at some point either by calling the given function or by
+ * later calls to lzma_code().
+ */
+typedef struct {
+	/**
+	 * \brief       Block format version
+	 *
+	 * To prevent API and ABI breakages when new features are needed,
+	 * a version number is used to indicate which fields in this
+	 * structure are in use:
+	 *   - liblzma >= 5.0.0: version = 0 is supported.
+	 *   - liblzma >= 5.1.4beta: Support for version = 1 was added,
+	 *     which adds the ignore_check field.
+	 *
+	 * If version is greater than one, most Block related functions
+	 * will return LZMA_OPTIONS_ERROR (lzma_block_header_decode() works
+	 * with any version value).
+	 *
+	 * Read by:
+	 *  - All functions that take pointer to lzma_block as argument,
+	 *    including lzma_block_header_decode().
+	 *
+	 * Written by:
+	 *  - lzma_block_header_decode()
+	 */
+	uint32_t version;
+
+	/**
+	 * \brief       Size of the Block Header field
+	 *
+	 * This is always a multiple of four.
+	 *
+	 * Read by:
+	 *  - lzma_block_header_encode()
+	 *  - lzma_block_header_decode()
+	 *  - lzma_block_compressed_size()
+	 *  - lzma_block_unpadded_size()
+	 *  - lzma_block_total_size()
+	 *  - lzma_block_decoder()
+	 *  - lzma_block_buffer_decode()
+	 *
+	 * Written by:
+	 *  - lzma_block_header_size()
+	 *  - lzma_block_buffer_encode()
+	 */
+	uint32_t header_size;
+#	define LZMA_BLOCK_HEADER_SIZE_MIN 8
+#	define LZMA_BLOCK_HEADER_SIZE_MAX 1024
+
+	/**
+	 * \brief       Type of integrity Check
+	 *
+	 * The Check ID is not stored into the Block Header, thus its value
+	 * must be provided also when decoding.
+	 *
+	 * Read by:
+	 *  - lzma_block_header_encode()
+	 *  - lzma_block_header_decode()
+	 *  - lzma_block_compressed_size()
+	 *  - lzma_block_unpadded_size()
+	 *  - lzma_block_total_size()
+	 *  - lzma_block_encoder()
+	 *  - lzma_block_decoder()
+	 *  - lzma_block_buffer_encode()
+	 *  - lzma_block_buffer_decode()
+	 */
+	lzma_check check;
+
+	/**
+	 * \brief       Size of the Compressed Data in bytes
+	 *
+	 * Encoding: If this is not LZMA_VLI_UNKNOWN, Block Header encoder
+	 * will store this value to the Block Header. Block encoder doesn't
+	 * care about this value, but will set it once the encoding has been
+	 * finished.
+	 *
+	 * Decoding: If this is not LZMA_VLI_UNKNOWN, Block decoder will
+	 * verify that the size of the Compressed Data field matches
+	 * compressed_size.
+	 *
+	 * Usually you don't know this value when encoding in streamed mode,
+	 * and thus cannot write this field into the Block Header.
+	 *
+	 * In non-streamed mode you can reserve space for this field before
+	 * encoding the actual Block. After encoding the data, finish the
+	 * Block by encoding the Block Header. Steps in detail:
+	 *
+	 *  - Set compressed_size to some big enough value. If you don't know
+	 *    better, use LZMA_VLI_MAX, but remember that bigger values take
+	 *    more space in Block Header.
+	 *
+	 *  - Call lzma_block_header_size() to see how much space you need to
+	 *    reserve for the Block Header.
+	 *
+	 *  - Encode the Block using lzma_block_encoder() and lzma_code().
+	 *    It sets compressed_size to the correct value.
+	 *
+	 *  - Use lzma_block_header_encode() to encode the Block Header.
+	 *    Because space was reserved in the first step, you don't need
+	 *    to call lzma_block_header_size() anymore, because due to
+	 *    reserving, header_size has to be big enough. If it is "too big",
+	 *    lzma_block_header_encode() will add enough Header Padding to
+	 *    make Block Header to match the size specified by header_size.
+	 *
+	 * Read by:
+	 *  - lzma_block_header_size()
+	 *  - lzma_block_header_encode()
+	 *  - lzma_block_compressed_size()
+	 *  - lzma_block_unpadded_size()
+	 *  - lzma_block_total_size()
+	 *  - lzma_block_decoder()
+	 *  - lzma_block_buffer_decode()
+	 *
+	 * Written by:
+	 *  - lzma_block_header_decode()
+	 *  - lzma_block_compressed_size()
+	 *  - lzma_block_encoder()
+	 *  - lzma_block_decoder()
+	 *  - lzma_block_buffer_encode()
+	 *  - lzma_block_buffer_decode()
+	 */
+	lzma_vli compressed_size;
+
+	/**
+	 * \brief       Uncompressed Size in bytes
+	 *
+	 * This is handled very similarly to compressed_size above.
+	 *
+	 * uncompressed_size is needed by fewer functions than
+	 * compressed_size. This is because uncompressed_size isn't
+	 * needed to validate that Block stays within proper limits.
+	 *
+	 * Read by:
+	 *  - lzma_block_header_size()
+	 *  - lzma_block_header_encode()
+	 *  - lzma_block_decoder()
+	 *  - lzma_block_buffer_decode()
+	 *
+	 * Written by:
+	 *  - lzma_block_header_decode()
+	 *  - lzma_block_encoder()
+	 *  - lzma_block_decoder()
+	 *  - lzma_block_buffer_encode()
+	 *  - lzma_block_buffer_decode()
+	 */
+	lzma_vli uncompressed_size;
+
+	/**
+	 * \brief       Array of filters
+	 *
+	 * There can be 1-4 filters. The end of the array is marked with
+	 * .id = LZMA_VLI_UNKNOWN.
+	 *
+	 * Read by:
+	 *  - lzma_block_header_size()
+	 *  - lzma_block_header_encode()
+	 *  - lzma_block_encoder()
+	 *  - lzma_block_decoder()
+	 *  - lzma_block_buffer_encode()
+	 *  - lzma_block_buffer_decode()
+	 *
+	 * Written by:
+	 *  - lzma_block_header_decode(): Note that this does NOT free()
+	 *    the old filter options structures. All unused filters[] will
+	 *    have .id == LZMA_VLI_UNKNOWN and .options == NULL. If
+	 *    decoding fails, all filters[] are guaranteed to be
+	 *    LZMA_VLI_UNKNOWN and NULL.
+	 *
+	 * \note        Because of the array is terminated with
+	 *              .id = LZMA_VLI_UNKNOWN, the actual array must
+	 *              have LZMA_FILTERS_MAX + 1 members or the Block
+	 *              Header decoder will overflow the buffer.
+	 */
+	lzma_filter *filters;
+
+	/**
+	 * \brief       Raw value stored in the Check field
+	 *
+	 * After successful coding, the first lzma_check_size(check) bytes
+	 * of this array contain the raw value stored in the Check field.
+	 *
+	 * Note that CRC32 and CRC64 are stored in little endian byte order.
+	 * Take it into account if you display the Check values to the user.
+	 *
+	 * Written by:
+	 *  - lzma_block_encoder()
+	 *  - lzma_block_decoder()
+	 *  - lzma_block_buffer_encode()
+	 *  - lzma_block_buffer_decode()
+	 */
+	uint8_t raw_check[LZMA_CHECK_SIZE_MAX];
+
+	/*
+	 * 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.
+	 */
+	void *reserved_ptr1;
+	void *reserved_ptr2;
+	void *reserved_ptr3;
+	uint32_t reserved_int1;
+	uint32_t reserved_int2;
+	lzma_vli reserved_int3;
+	lzma_vli reserved_int4;
+	lzma_vli reserved_int5;
+	lzma_vli reserved_int6;
+	lzma_vli reserved_int7;
+	lzma_vli reserved_int8;
+	lzma_reserved_enum reserved_enum1;
+	lzma_reserved_enum reserved_enum2;
+	lzma_reserved_enum reserved_enum3;
+	lzma_reserved_enum reserved_enum4;
+
+	/**
+	 * \brief       A flag to Block decoder to not verify the Check field
+	 *
+	 * This field is supported by liblzma >= 5.1.4beta if .version >= 1.
+	 *
+	 * If this is set to true, the integrity check won't be calculated
+	 * and verified. Unless you know what you are doing, you should
+	 * leave this to false. (A reason to set this to true is when the
+	 * file integrity is verified externally anyway and you want to
+	 * speed up the decompression, which matters mostly when using
+	 * SHA-256 as the integrity check.)
+	 *
+	 * If .version >= 1, read by:
+	 *   - lzma_block_decoder()
+	 *   - lzma_block_buffer_decode()
+	 *
+	 * Written by (.version is ignored):
+	 *   - lzma_block_header_decode() always sets this to false
+	 */
+	lzma_bool ignore_check;
+
+	lzma_bool reserved_bool2;
+	lzma_bool reserved_bool3;
+	lzma_bool reserved_bool4;
+	lzma_bool reserved_bool5;
+	lzma_bool reserved_bool6;
+	lzma_bool reserved_bool7;
+	lzma_bool reserved_bool8;
+
+} lzma_block;
+
+
+/**
+ * \brief       Decode the Block Header Size field
+ *
+ * To decode Block Header using lzma_block_header_decode(), the size of the
+ * Block Header has to be known and stored into lzma_block.header_size.
+ * The size can be calculated from the first byte of a Block using this macro.
+ * Note that if the first byte is 0x00, it indicates beginning of Index; use
+ * this macro only when the byte is not 0x00.
+ *
+ * There is no encoding macro, because Block Header encoder is enough for that.
+ */
+#define lzma_block_header_size_decode(b) (((uint32_t)(b) + 1) * 4)
+
+
+/**
+ * \brief       Calculate Block Header Size
+ *
+ * Calculate the minimum size needed for the Block Header field using the
+ * settings specified in the lzma_block structure. Note that it is OK to
+ * increase the calculated header_size value as long as it is a multiple of
+ * four and doesn't exceed LZMA_BLOCK_HEADER_SIZE_MAX. Increasing header_size
+ * just means that lzma_block_header_encode() will add Header Padding.
+ *
+ * \return      - LZMA_OK: Size calculated successfully and stored to
+ *                block->header_size.
+ *              - LZMA_OPTIONS_ERROR: Unsupported version, filters or
+ *                filter options.
+ *              - LZMA_PROG_ERROR: Invalid values like compressed_size == 0.
+ *
+ * \note        This doesn't check that all the options are valid i.e. this
+ *              may return LZMA_OK even if lzma_block_header_encode() or
+ *              lzma_block_encoder() would fail. If you want to validate the
+ *              filter chain, consider using lzma_memlimit_encoder() which as
+ *              a side-effect validates the filter chain.
+ */
+extern LZMA_API(lzma_ret) lzma_block_header_size(lzma_block *block)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Encode Block Header
+ *
+ * The caller must have calculated the size of the Block Header already with
+ * lzma_block_header_size(). If a value larger than the one calculated by
+ * lzma_block_header_size() is used, the Block Header will be padded to the
+ * specified size.
+ *
+ * \param       out         Beginning of the output buffer. This must be
+ *                          at least block->header_size bytes.
+ * \param       block       Block options to be encoded.
+ *
+ * \return      - LZMA_OK: Encoding was successful. block->header_size
+ *                bytes were written to output buffer.
+ *              - LZMA_OPTIONS_ERROR: Invalid or unsupported options.
+ *              - LZMA_PROG_ERROR: Invalid arguments, for example
+ *                block->header_size is invalid or block->filters is NULL.
+ */
+extern LZMA_API(lzma_ret) lzma_block_header_encode(
+		const lzma_block *block, uint8_t *out)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Decode Block Header
+ *
+ * block->version should (usually) be set to the highest value supported
+ * by the application. If the application sets block->version to a value
+ * higher than supported by the current liblzma version, this function will
+ * downgrade block->version to the highest value supported by it. Thus one
+ * should check the value of block->version after calling this function if
+ * block->version was set to a non-zero value and the application doesn't
+ * otherwise know that the liblzma version being used is new enough to
+ * support the specified block->version.
+ *
+ * The size of the Block Header must have already been decoded with
+ * lzma_block_header_size_decode() macro and stored to block->header_size.
+ *
+ * The integrity check type from Stream Header must have been stored
+ * to block->check.
+ *
+ * block->filters must have been allocated, but they don't need to be
+ * initialized (possible existing filter options are not freed).
+ *
+ * \param       block       Destination for Block options.
+ * \param       allocator   lzma_allocator for custom allocator functions.
+ *                          Set to NULL to use malloc() (and also free()
+ *                          if an error occurs).
+ * \param       in          Beginning of the input buffer. This must be
+ *                          at least block->header_size bytes.
+ *
+ * \return      - LZMA_OK: Decoding was successful. block->header_size
+ *                bytes were read from the input buffer.
+ *              - LZMA_OPTIONS_ERROR: The Block Header specifies some
+ *                unsupported options such as unsupported filters. This can
+ *                happen also if block->version was set to a too low value
+ *                compared to what would be required to properly represent
+ *                the information stored in the Block Header.
+ *              - LZMA_DATA_ERROR: Block Header is corrupt, for example,
+ *                the CRC32 doesn't match.
+ *              - LZMA_PROG_ERROR: Invalid arguments, for example
+ *                block->header_size is invalid or block->filters is NULL.
+ */
+extern LZMA_API(lzma_ret) lzma_block_header_decode(lzma_block *block,
+		const lzma_allocator *allocator, const uint8_t *in)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Validate and set Compressed Size according to Unpadded Size
+ *
+ * Block Header stores Compressed Size, but Index has Unpadded Size. If the
+ * application has already parsed the Index and is now decoding Blocks,
+ * it can calculate Compressed Size from Unpadded Size. This function does
+ * exactly that with error checking:
+ *
+ *  - Compressed Size calculated from Unpadded Size must be positive integer,
+ *    that is, Unpadded Size must be big enough that after Block Header and
+ *    Check fields there's still at least one byte for Compressed Size.
+ *
+ *  - If Compressed Size was present in Block Header, the new value
+ *    calculated from Unpadded Size is compared against the value
+ *    from Block Header.
+ *
+ * \note        This function must be called _after_ decoding the Block Header
+ *              field so that it can properly validate Compressed Size if it
+ *              was present in Block Header.
+ *
+ * \return      - LZMA_OK: block->compressed_size was set successfully.
+ *              - LZMA_DATA_ERROR: unpadded_size is too small compared to
+ *                block->header_size and lzma_check_size(block->check).
+ *              - LZMA_PROG_ERROR: Some values are invalid. For example,
+ *                block->header_size must be a multiple of four and
+ *                between 8 and 1024 inclusive.
+ */
+extern LZMA_API(lzma_ret) lzma_block_compressed_size(
+		lzma_block *block, lzma_vli unpadded_size)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Calculate Unpadded Size
+ *
+ * The Index field stores Unpadded Size and Uncompressed Size. The latter
+ * can be taken directly from the lzma_block structure after coding a Block,
+ * but Unpadded Size needs to be calculated from Block Header Size,
+ * Compressed Size, and size of the Check field. This is where this function
+ * is needed.
+ *
+ * \return      Unpadded Size on success, or zero on error.
+ */
+extern LZMA_API(lzma_vli) lzma_block_unpadded_size(const lzma_block *block)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Calculate the total encoded size of a Block
+ *
+ * This is equivalent to lzma_block_unpadded_size() except that the returned
+ * value includes the size of the Block Padding field.
+ *
+ * \return      On success, total encoded size of the Block. On error,
+ *              zero is returned.
+ */
+extern LZMA_API(lzma_vli) lzma_block_total_size(const lzma_block *block)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Initialize .xz Block encoder
+ *
+ * Valid actions for lzma_code() are LZMA_RUN, LZMA_SYNC_FLUSH (only if the
+ * filter chain supports it), and LZMA_FINISH.
+ *
+ * \return      - LZMA_OK: All good, continue with lzma_code().
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_UNSUPPORTED_CHECK: block->check specifies a Check ID
+ *                that is not supported by this buid of liblzma. Initializing
+ *                the encoder failed.
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_block_encoder(
+		lzma_stream *strm, lzma_block *block)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Initialize .xz Block decoder
+ *
+ * Valid actions for lzma_code() are LZMA_RUN and LZMA_FINISH. Using
+ * LZMA_FINISH is not required. It is supported only for convenience.
+ *
+ * \return      - LZMA_OK: All good, continue with lzma_code().
+ *              - LZMA_UNSUPPORTED_CHECK: Initialization was successful, but
+ *                the given Check ID is not supported, thus Check will be
+ *                ignored.
+ *              - LZMA_PROG_ERROR
+ *              - LZMA_MEM_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_block_decoder(
+		lzma_stream *strm, lzma_block *block)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Calculate maximum output size for single-call Block encoding
+ *
+ * This is equivalent to lzma_stream_buffer_bound() but for .xz Blocks.
+ * See the documentation of lzma_stream_buffer_bound().
+ */
+extern LZMA_API(size_t) lzma_block_buffer_bound(size_t uncompressed_size)
+		lzma_nothrow;
+
+
+/**
+ * \brief       Single-call .xz Block encoder
+ *
+ * In contrast to the multi-call encoder initialized with
+ * lzma_block_encoder(), this function encodes also the Block Header. This
+ * is required to make it possible to write appropriate Block Header also
+ * in case the data isn't compressible, and different filter chain has to be
+ * used to encode the data in uncompressed form using uncompressed chunks
+ * of the LZMA2 filter.
+ *
+ * When the data isn't compressible, header_size, compressed_size, and
+ * uncompressed_size are set just like when the data was compressible, but
+ * it is possible that header_size is too small to hold the filter chain
+ * specified in block->filters, because that isn't necessarily the filter
+ * chain that was actually used to encode the data. lzma_block_unpadded_size()
+ * still works normally, because it doesn't read the filters array.
+ *
+ * \param       block       Block options: block->version, block->check,
+ *                          and block->filters must have been initialized.
+ * \param       allocator   lzma_allocator for custom allocator functions.
+ *                          Set to NULL to use malloc() and free().
+ * \param       in          Beginning of the input buffer
+ * \param       in_size     Size of the input buffer
+ * \param       out         Beginning of the output buffer
+ * \param       out_pos     The next byte will be written to out[*out_pos].
+ *                          *out_pos is updated only if encoding succeeds.
+ * \param       out_size    Size of the out buffer; the first byte into
+ *                          which no data is written to is out[out_size].
+ *
+ * \return      - LZMA_OK: Encoding was successful.
+ *              - LZMA_BUF_ERROR: Not enough output buffer space.
+ *              - LZMA_UNSUPPORTED_CHECK
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_DATA_ERROR
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_block_buffer_encode(
+		lzma_block *block, const lzma_allocator *allocator,
+		const uint8_t *in, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Single-call uncompressed .xz Block encoder
+ *
+ * This is like lzma_block_buffer_encode() except this doesn't try to
+ * compress the data and instead encodes the data using LZMA2 uncompressed
+ * chunks. The required output buffer size can be determined with
+ * lzma_block_buffer_bound().
+ *
+ * Since the data won't be compressed, this function ignores block->filters.
+ * This function doesn't take lzma_allocator because this function doesn't
+ * allocate any memory from the heap.
+ */
+extern LZMA_API(lzma_ret) lzma_block_uncomp_encode(lzma_block *block,
+		const uint8_t *in, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Single-call .xz Block decoder
+ *
+ * This is single-call equivalent of lzma_block_decoder(), and requires that
+ * the caller has already decoded Block Header and checked its memory usage.
+ *
+ * \param       block       Block options just like with lzma_block_decoder().
+ * \param       allocator   lzma_allocator for custom allocator functions.
+ *                          Set to NULL to use malloc() and free().
+ * \param       in          Beginning of the input buffer
+ * \param       in_pos      The next byte will be read from in[*in_pos].
+ *                          *in_pos is updated only if decoding succeeds.
+ * \param       in_size     Size of the input buffer; the first byte that
+ *                          won't be read is in[in_size].
+ * \param       out         Beginning of the output buffer
+ * \param       out_pos     The next byte will be written to out[*out_pos].
+ *                          *out_pos is updated only if encoding succeeds.
+ * \param       out_size    Size of the out buffer; the first byte into
+ *                          which no data is written to is out[out_size].
+ *
+ * \return      - LZMA_OK: Decoding was successful.
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_DATA_ERROR
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_BUF_ERROR: Output buffer was too small.
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_block_buffer_decode(
+		lzma_block *block, const lzma_allocator *allocator,
+		const uint8_t *in, size_t *in_pos, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+		lzma_nothrow;

Deleted: vendor/xz/5.2.3/src/liblzma/api/lzma/container.h
===================================================================
--- vendor/xz/dist/src/liblzma/api/lzma/container.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/container.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,424 +0,0 @@
-/**
- * \file        lzma/container.h
- * \brief       File formats
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/************
- * Encoding *
- ************/
-
-/**
- * \brief       Default compression preset
- *
- * It's not straightforward to recommend a default preset, because in some
- * cases keeping the resource usage relatively low is more important that
- * getting the maximum compression ratio.
- */
-#define LZMA_PRESET_DEFAULT     UINT32_C(6)
-
-
-/**
- * \brief       Mask for preset level
- *
- * This is useful only if you need to extract the level from the preset
- * variable. That should be rare.
- */
-#define LZMA_PRESET_LEVEL_MASK  UINT32_C(0x1F)
-
-
-/*
- * Preset flags
- *
- * Currently only one flag is defined.
- */
-
-/**
- * \brief       Extreme compression preset
- *
- * This flag modifies the preset to make the encoding significantly slower
- * while improving the compression ratio only marginally. This is useful
- * when you don't mind wasting time to get as small result as possible.
- *
- * This flag doesn't affect the memory usage requirements of the decoder (at
- * least not significantly). The memory usage of the encoder may be increased
- * a little but only at the lowest preset levels (0-3).
- */
-#define LZMA_PRESET_EXTREME       (UINT32_C(1) << 31)
-
-
-/**
- * \brief       Calculate approximate memory usage of easy encoder
- *
- * This function is a wrapper for lzma_raw_encoder_memusage().
- *
- * \param       preset  Compression preset (level and possible flags)
- *
- * \return      Number of bytes of memory required for the given
- *              preset when encoding. If an error occurs, for example
- *              due to unsupported preset, UINT64_MAX is returned.
- */
-extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Calculate approximate decoder memory usage of a preset
- *
- * This function is a wrapper for lzma_raw_decoder_memusage().
- *
- * \param       preset  Compression preset (level and possible flags)
- *
- * \return      Number of bytes of memory required to decompress a file
- *              that was compressed using the given preset. If an error
- *              occurs, for example due to unsupported preset, UINT64_MAX
- *              is returned.
- */
-extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Initialize .xz Stream encoder using a preset number
- *
- * This function is intended for those who just want to use the basic features
- * if liblzma (that is, most developers out there).
- *
- * \param       strm    Pointer to lzma_stream that is at least initialized
- *                      with LZMA_STREAM_INIT.
- * \param       preset  Compression preset to use. A preset consist of level
- *                      number and zero or more flags. Usually flags aren't
- *                      used, so preset is simply a number [0, 9] which match
- *                      the options -0 ... -9 of the xz command line tool.
- *                      Additional flags can be be set using bitwise-or with
- *                      the preset level number, e.g. 6 | LZMA_PRESET_EXTREME.
- * \param       check   Integrity check type to use. 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_CRC32 is good too as long as the
- *                      uncompressed file is not many gigabytes.
- *
- * \return      - LZMA_OK: Initialization succeeded. Use lzma_code() to
- *                encode your data.
- *              - LZMA_MEM_ERROR: Memory allocation failed.
- *              - LZMA_OPTIONS_ERROR: The given compression preset is not
- *                supported by this build of liblzma.
- *              - LZMA_UNSUPPORTED_CHECK: The given check type is not
- *                supported by this liblzma build.
- *              - LZMA_PROG_ERROR: One or more of the parameters have values
- *                that will never be valid. For example, strm == NULL.
- *
- * If initialization fails (return value is not LZMA_OK), all the memory
- * allocated for *strm by liblzma is always freed. Thus, there is no need
- * to call lzma_end() after failed initialization.
- *
- * If initialization succeeds, use lzma_code() to do the actual encoding.
- * Valid values for `action' (the second argument of lzma_code()) are
- * LZMA_RUN, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, and LZMA_FINISH. In future,
- * there may be compression levels or flags that don't support LZMA_SYNC_FLUSH.
- */
-extern LZMA_API(lzma_ret) lzma_easy_encoder(
-		lzma_stream *strm, uint32_t preset, lzma_check check)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Single-call .xz Stream encoding using a preset number
- *
- * The maximum required output buffer size can be calculated with
- * lzma_stream_buffer_bound().
- *
- * \param       preset      Compression preset to use. See the description
- *                          in lzma_easy_encoder().
- * \param       check       Type of the integrity check to calculate from
- *                          uncompressed data.
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() and free().
- * \param       in          Beginning of the input buffer
- * \param       in_size     Size of the input buffer
- * \param       out         Beginning of the output buffer
- * \param       out_pos     The next byte will be written to out[*out_pos].
- *                          *out_pos is updated only if encoding succeeds.
- * \param       out_size    Size of the out buffer; the first byte into
- *                          which no data is written to is out[out_size].
- *
- * \return      - LZMA_OK: Encoding was successful.
- *              - LZMA_BUF_ERROR: Not enough output buffer space.
- *              - LZMA_UNSUPPORTED_CHECK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_MEM_ERROR
- *              - LZMA_DATA_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_easy_buffer_encode(
-		uint32_t preset, lzma_check check,
-		lzma_allocator *allocator, const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
-
-
-/**
- * \brief       Initialize .xz Stream encoder using a custom filter chain
- *
- * \param       strm    Pointer to properly prepared lzma_stream
- * \param       filters Array of filters. This must be terminated with
- *                      filters[n].id = LZMA_VLI_UNKNOWN. See filter.h for
- *                      more information.
- * \param       check   Type of the integrity check to calculate from
- *                      uncompressed data.
- *
- * \return      - LZMA_OK: Initialization was successful.
- *              - LZMA_MEM_ERROR
- *              - LZMA_UNSUPPORTED_CHECK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm,
-		const lzma_filter *filters, lzma_check check)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Initialize .lzma encoder (legacy file format)
- *
- * The .lzma format is sometimes called the LZMA_Alone format, which is the
- * reason for the name of this function. The .lzma format supports only the
- * LZMA1 filter. There is no support for integrity checks like CRC32.
- *
- * Use this function if and only if you need to create files readable by
- * legacy LZMA tools such as LZMA Utils 4.32.x. Moving to the .xz format
- * is strongly recommended.
- *
- * The valid action values for lzma_code() are LZMA_RUN and LZMA_FINISH.
- * No kind of flushing is supported, because the file format doesn't make
- * it possible.
- *
- * \return      - LZMA_OK
- *              - LZMA_MEM_ERROR
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_alone_encoder(
-		lzma_stream *strm, const lzma_options_lzma *options)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Calculate output buffer size for single-call Stream encoder
- *
- * When trying to compress uncompressible data, the encoded size will be
- * slightly bigger than the input data. This function calculates how much
- * output buffer space is required to be sure that lzma_stream_buffer_encode()
- * doesn't return LZMA_BUF_ERROR.
- *
- * The calculated value is not exact, but it is guaranteed to be big enough.
- * The actual maximum output space required may be slightly smaller (up to
- * about 100 bytes). This should not be a problem in practice.
- *
- * If the calculated maximum size doesn't fit into size_t or would make the
- * Stream grow past LZMA_VLI_MAX (which should never happen in practice),
- * zero is returned to indicate the error.
- *
- * \note        The limit calculated by this function applies only to
- *              single-call encoding. Multi-call encoding may (and probably
- *              will) have larger maximum expansion when encoding
- *              uncompressible data. Currently there is no function to
- *              calculate the maximum expansion of multi-call encoding.
- */
-extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size)
-		lzma_nothrow;
-
-
-/**
- * \brief       Single-call .xz Stream encoder
- *
- * \param       filters     Array of filters. This must be terminated with
- *                          filters[n].id = LZMA_VLI_UNKNOWN. See filter.h
- *                          for more information.
- * \param       check       Type of the integrity check to calculate from
- *                          uncompressed data.
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() and free().
- * \param       in          Beginning of the input buffer
- * \param       in_size     Size of the input buffer
- * \param       out         Beginning of the output buffer
- * \param       out_pos     The next byte will be written to out[*out_pos].
- *                          *out_pos is updated only if encoding succeeds.
- * \param       out_size    Size of the out buffer; the first byte into
- *                          which no data is written to is out[out_size].
- *
- * \return      - LZMA_OK: Encoding was successful.
- *              - LZMA_BUF_ERROR: Not enough output buffer space.
- *              - LZMA_UNSUPPORTED_CHECK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_MEM_ERROR
- *              - LZMA_DATA_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
-		lzma_filter *filters, lzma_check check,
-		lzma_allocator *allocator, const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/************
- * Decoding *
- ************/
-
-/**
- * This flag makes lzma_code() return LZMA_NO_CHECK if the input stream
- * being decoded has no integrity check. Note that when used with
- * lzma_auto_decoder(), all .lzma files will trigger LZMA_NO_CHECK
- * if LZMA_TELL_NO_CHECK is used.
- */
-#define LZMA_TELL_NO_CHECK              UINT32_C(0x01)
-
-
-/**
- * This flag makes lzma_code() return LZMA_UNSUPPORTED_CHECK if the input
- * stream has an integrity check, but the type of the integrity check is not
- * supported by this liblzma version or build. Such files can still be
- * decoded, but the integrity check cannot be verified.
- */
-#define LZMA_TELL_UNSUPPORTED_CHECK     UINT32_C(0x02)
-
-
-/**
- * This flag makes lzma_code() return LZMA_GET_CHECK as soon as the type
- * of the integrity check is known. The type can then be got with
- * lzma_get_check().
- */
-#define LZMA_TELL_ANY_CHECK             UINT32_C(0x04)
-
-
-/**
- * This flag enables decoding of concatenated files with file formats that
- * allow concatenating compressed files as is. From the formats currently
- * supported by liblzma, only the .xz format allows concatenated files.
- * Concatenated files are not allowed with the legacy .lzma format.
- *
- * This flag also affects the usage of the `action' argument for lzma_code().
- * When LZMA_CONCATENATED is used, lzma_code() won't return LZMA_STREAM_END
- * unless LZMA_FINISH is used as `action'. Thus, the application has to set
- * LZMA_FINISH in the same way as it does when encoding.
- *
- * If LZMA_CONCATENATED is not used, the decoders still accept LZMA_FINISH
- * as `action' for lzma_code(), but the usage of LZMA_FINISH isn't required.
- */
-#define LZMA_CONCATENATED               UINT32_C(0x08)
-
-
-/**
- * \brief       Initialize .xz Stream decoder
- *
- * \param       strm        Pointer to properly prepared lzma_stream
- * \param       memlimit    Memory usage limit as bytes. Use UINT64_MAX
- *                          to effectively disable the limiter.
- * \param       flags       Bitwise-or of zero or more of the decoder flags:
- *                          LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
- *                          LZMA_TELL_ANY_CHECK, LZMA_CONCATENATED
- *
- * \return      - LZMA_OK: Initialization was successful.
- *              - LZMA_MEM_ERROR: Cannot allocate memory.
- *              - LZMA_OPTIONS_ERROR: Unsupported flags
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_stream_decoder(
-		lzma_stream *strm, uint64_t memlimit, uint32_t flags)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Decode .xz Streams and .lzma files with autodetection
- *
- * This decoder autodetects between the .xz and .lzma file formats, and
- * calls lzma_stream_decoder() or lzma_alone_decoder() once the type
- * of the input file has been detected.
- *
- * \param       strm        Pointer to properly prepared lzma_stream
- * \param       memlimit    Memory usage limit as bytes. Use UINT64_MAX
- *                          to effectively disable the limiter.
- * \param       flags       Bitwise-or of flags, or zero for no flags.
- *
- * \return      - LZMA_OK: Initialization was successful.
- *              - LZMA_MEM_ERROR: Cannot allocate memory.
- *              - LZMA_OPTIONS_ERROR: Unsupported flags
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_auto_decoder(
-		lzma_stream *strm, uint64_t memlimit, uint32_t flags)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Initialize .lzma decoder (legacy file format)
- *
- * Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH.
- * There is no need to use LZMA_FINISH, but allowing it may simplify
- * certain types of applications.
- *
- * \return      - LZMA_OK
- *              - LZMA_MEM_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_alone_decoder(
-		lzma_stream *strm, uint64_t memlimit)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Single-call .xz Stream decoder
- *
- * \param       memlimit    Pointer to how much memory the decoder is allowed
- *                          to allocate. The value pointed by this pointer is
- *                          modified if and only if LZMA_MEMLIMIT_ERROR is
- *                          returned.
- * \param       flags       Bitwise-or of zero or more of the decoder flags:
- *                          LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
- *                          LZMA_CONCATENATED. Note that LZMA_TELL_ANY_CHECK
- *                          is not allowed and will return LZMA_PROG_ERROR.
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() and free().
- * \param       in          Beginning of the input buffer
- * \param       in_pos      The next byte will be read from in[*in_pos].
- *                          *in_pos is updated only if decoding succeeds.
- * \param       in_size     Size of the input buffer; the first byte that
- *                          won't be read is in[in_size].
- * \param       out         Beginning of the output buffer
- * \param       out_pos     The next byte will be written to out[*out_pos].
- *                          *out_pos is updated only if decoding succeeds.
- * \param       out_size    Size of the out buffer; the first byte into
- *                          which no data is written to is out[out_size].
- *
- * \return      - LZMA_OK: Decoding was successful.
- *              - LZMA_FORMAT_ERROR
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_DATA_ERROR
- *              - LZMA_NO_CHECK: This can be returned only if using
- *                the LZMA_TELL_NO_CHECK flag.
- *              - LZMA_UNSUPPORTED_CHECK: This can be returned only if using
- *                the LZMA_TELL_UNSUPPORTED_CHECK flag.
- *              - LZMA_MEM_ERROR
- *              - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.
- *                The minimum required memlimit value was stored to *memlimit.
- *              - LZMA_BUF_ERROR: Output buffer was too small.
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_stream_buffer_decode(
-		uint64_t *memlimit, uint32_t flags, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-		lzma_nothrow lzma_attr_warn_unused_result;

Copied: vendor/xz/5.2.3/src/liblzma/api/lzma/container.h (from rev 9176, vendor/xz/dist/src/liblzma/api/lzma/container.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/api/lzma/container.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/container.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,619 @@
+/**
+ * \file        lzma/container.h
+ * \brief       File formats
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ *
+ * See ../lzma.h for information about liblzma as a whole.
+ */
+
+#ifndef LZMA_H_INTERNAL
+#	error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/************
+ * Encoding *
+ ************/
+
+/**
+ * \brief       Default compression preset
+ *
+ * It's not straightforward to recommend a default preset, because in some
+ * cases keeping the resource usage relatively low is more important that
+ * getting the maximum compression ratio.
+ */
+#define LZMA_PRESET_DEFAULT     UINT32_C(6)
+
+
+/**
+ * \brief       Mask for preset level
+ *
+ * This is useful only if you need to extract the level from the preset
+ * variable. That should be rare.
+ */
+#define LZMA_PRESET_LEVEL_MASK  UINT32_C(0x1F)
+
+
+/*
+ * Preset flags
+ *
+ * Currently only one flag is defined.
+ */
+
+/**
+ * \brief       Extreme compression preset
+ *
+ * This flag modifies the preset to make the encoding significantly slower
+ * while improving the compression ratio only marginally. This is useful
+ * when you don't mind wasting time to get as small result as possible.
+ *
+ * This flag doesn't affect the memory usage requirements of the decoder (at
+ * least not significantly). The memory usage of the encoder may be increased
+ * a little but only at the lowest preset levels (0-3).
+ */
+#define LZMA_PRESET_EXTREME       (UINT32_C(1) << 31)
+
+
+/**
+ * \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.
+	 *
+	 * For each thread, about 3 * block_size bytes of memory will be
+	 * allocated. This may change in later liblzma versions. If so,
+	 * the memory usage will probably be reduced, not increased.
+	 */
+	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;
+
+
+/**
+ * \brief       Calculate approximate memory usage of easy encoder
+ *
+ * This function is a wrapper for lzma_raw_encoder_memusage().
+ *
+ * \param       preset  Compression preset (level and possible flags)
+ *
+ * \return      Number of bytes of memory required for the given
+ *              preset when encoding. If an error occurs, for example
+ *              due to unsupported preset, UINT64_MAX is returned.
+ */
+extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Calculate approximate decoder memory usage of a preset
+ *
+ * This function is a wrapper for lzma_raw_decoder_memusage().
+ *
+ * \param       preset  Compression preset (level and possible flags)
+ *
+ * \return      Number of bytes of memory required to decompress a file
+ *              that was compressed using the given preset. If an error
+ *              occurs, for example due to unsupported preset, UINT64_MAX
+ *              is returned.
+ */
+extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Initialize .xz Stream encoder using a preset number
+ *
+ * This function is intended for those who just want to use the basic features
+ * if liblzma (that is, most developers out there).
+ *
+ * \param       strm    Pointer to lzma_stream that is at least initialized
+ *                      with LZMA_STREAM_INIT.
+ * \param       preset  Compression preset to use. A preset consist of level
+ *                      number and zero or more flags. Usually flags aren't
+ *                      used, so preset is simply a number [0, 9] which match
+ *                      the options -0 ... -9 of the xz command line tool.
+ *                      Additional flags can be be set using bitwise-or with
+ *                      the preset level number, e.g. 6 | LZMA_PRESET_EXTREME.
+ * \param       check   Integrity check type to use. 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_CRC32 is good too as long as the
+ *                      uncompressed file is not many gigabytes.
+ *
+ * \return      - LZMA_OK: Initialization succeeded. Use lzma_code() to
+ *                encode your data.
+ *              - LZMA_MEM_ERROR: Memory allocation failed.
+ *              - LZMA_OPTIONS_ERROR: The given compression preset is not
+ *                supported by this build of liblzma.
+ *              - LZMA_UNSUPPORTED_CHECK: The given check type is not
+ *                supported by this liblzma build.
+ *              - LZMA_PROG_ERROR: One or more of the parameters have values
+ *                that will never be valid. For example, strm == NULL.
+ *
+ * If initialization fails (return value is not LZMA_OK), all the memory
+ * allocated for *strm by liblzma is always freed. Thus, there is no need
+ * to call lzma_end() after failed initialization.
+ *
+ * If initialization succeeds, use lzma_code() to do the actual encoding.
+ * Valid values for `action' (the second argument of lzma_code()) are
+ * LZMA_RUN, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, and LZMA_FINISH. In future,
+ * there may be compression levels or flags that don't support LZMA_SYNC_FLUSH.
+ */
+extern LZMA_API(lzma_ret) lzma_easy_encoder(
+		lzma_stream *strm, uint32_t preset, lzma_check check)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Single-call .xz Stream encoding using a preset number
+ *
+ * The maximum required output buffer size can be calculated with
+ * lzma_stream_buffer_bound().
+ *
+ * \param       preset      Compression preset to use. See the description
+ *                          in lzma_easy_encoder().
+ * \param       check       Type of the integrity check to calculate from
+ *                          uncompressed data.
+ * \param       allocator   lzma_allocator for custom allocator functions.
+ *                          Set to NULL to use malloc() and free().
+ * \param       in          Beginning of the input buffer
+ * \param       in_size     Size of the input buffer
+ * \param       out         Beginning of the output buffer
+ * \param       out_pos     The next byte will be written to out[*out_pos].
+ *                          *out_pos is updated only if encoding succeeds.
+ * \param       out_size    Size of the out buffer; the first byte into
+ *                          which no data is written to is out[out_size].
+ *
+ * \return      - LZMA_OK: Encoding was successful.
+ *              - LZMA_BUF_ERROR: Not enough output buffer space.
+ *              - LZMA_UNSUPPORTED_CHECK
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_DATA_ERROR
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_easy_buffer_encode(
+		uint32_t preset, lzma_check check,
+		const lzma_allocator *allocator,
+		const uint8_t *in, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
+
+
+/**
+ * \brief       Initialize .xz Stream encoder using a custom filter chain
+ *
+ * \param       strm    Pointer to properly prepared lzma_stream
+ * \param       filters Array of filters. This must be terminated with
+ *                      filters[n].id = LZMA_VLI_UNKNOWN. See filter.h for
+ *                      more information.
+ * \param       check   Type of the integrity check to calculate from
+ *                      uncompressed data.
+ *
+ * \return      - LZMA_OK: Initialization was successful.
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_UNSUPPORTED_CHECK
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm,
+		const lzma_filter *filters, lzma_check check)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \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.
+ *
+ * The supported actions for lzma_code() are LZMA_RUN, LZMA_FULL_FLUSH,
+ * LZMA_FULL_BARRIER, and LZMA_FINISH. Support for LZMA_SYNC_FLUSH might be
+ * added in the future.
+ *
+ * \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;
+
+
+/**
+ * \brief       Initialize .lzma encoder (legacy file format)
+ *
+ * The .lzma format is sometimes called the LZMA_Alone format, which is the
+ * reason for the name of this function. The .lzma format supports only the
+ * LZMA1 filter. There is no support for integrity checks like CRC32.
+ *
+ * Use this function if and only if you need to create files readable by
+ * legacy LZMA tools such as LZMA Utils 4.32.x. Moving to the .xz format
+ * is strongly recommended.
+ *
+ * The valid action values for lzma_code() are LZMA_RUN and LZMA_FINISH.
+ * No kind of flushing is supported, because the file format doesn't make
+ * it possible.
+ *
+ * \return      - LZMA_OK
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_alone_encoder(
+		lzma_stream *strm, const lzma_options_lzma *options)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Calculate output buffer size for single-call Stream encoder
+ *
+ * When trying to compress uncompressible data, the encoded size will be
+ * slightly bigger than the input data. This function calculates how much
+ * output buffer space is required to be sure that lzma_stream_buffer_encode()
+ * doesn't return LZMA_BUF_ERROR.
+ *
+ * The calculated value is not exact, but it is guaranteed to be big enough.
+ * The actual maximum output space required may be slightly smaller (up to
+ * about 100 bytes). This should not be a problem in practice.
+ *
+ * If the calculated maximum size doesn't fit into size_t or would make the
+ * Stream grow past LZMA_VLI_MAX (which should never happen in practice),
+ * zero is returned to indicate the error.
+ *
+ * \note        The limit calculated by this function applies only to
+ *              single-call encoding. Multi-call encoding may (and probably
+ *              will) have larger maximum expansion when encoding
+ *              uncompressible data. Currently there is no function to
+ *              calculate the maximum expansion of multi-call encoding.
+ */
+extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size)
+		lzma_nothrow;
+
+
+/**
+ * \brief       Single-call .xz Stream encoder
+ *
+ * \param       filters     Array of filters. This must be terminated with
+ *                          filters[n].id = LZMA_VLI_UNKNOWN. See filter.h
+ *                          for more information.
+ * \param       check       Type of the integrity check to calculate from
+ *                          uncompressed data.
+ * \param       allocator   lzma_allocator for custom allocator functions.
+ *                          Set to NULL to use malloc() and free().
+ * \param       in          Beginning of the input buffer
+ * \param       in_size     Size of the input buffer
+ * \param       out         Beginning of the output buffer
+ * \param       out_pos     The next byte will be written to out[*out_pos].
+ *                          *out_pos is updated only if encoding succeeds.
+ * \param       out_size    Size of the out buffer; the first byte into
+ *                          which no data is written to is out[out_size].
+ *
+ * \return      - LZMA_OK: Encoding was successful.
+ *              - LZMA_BUF_ERROR: Not enough output buffer space.
+ *              - LZMA_UNSUPPORTED_CHECK
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_DATA_ERROR
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
+		lzma_filter *filters, lzma_check check,
+		const lzma_allocator *allocator,
+		const uint8_t *in, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/************
+ * Decoding *
+ ************/
+
+/**
+ * This flag makes lzma_code() return LZMA_NO_CHECK if the input stream
+ * being decoded has no integrity check. Note that when used with
+ * lzma_auto_decoder(), all .lzma files will trigger LZMA_NO_CHECK
+ * if LZMA_TELL_NO_CHECK is used.
+ */
+#define LZMA_TELL_NO_CHECK              UINT32_C(0x01)
+
+
+/**
+ * This flag makes lzma_code() return LZMA_UNSUPPORTED_CHECK if the input
+ * stream has an integrity check, but the type of the integrity check is not
+ * supported by this liblzma version or build. Such files can still be
+ * decoded, but the integrity check cannot be verified.
+ */
+#define LZMA_TELL_UNSUPPORTED_CHECK     UINT32_C(0x02)
+
+
+/**
+ * This flag makes lzma_code() return LZMA_GET_CHECK as soon as the type
+ * of the integrity check is known. The type can then be got with
+ * lzma_get_check().
+ */
+#define LZMA_TELL_ANY_CHECK             UINT32_C(0x04)
+
+
+/**
+ * This flag makes lzma_code() not calculate and verify the integrity check
+ * of the compressed data in .xz files. This means that invalid integrity
+ * check values won't be detected and LZMA_DATA_ERROR won't be returned in
+ * such cases.
+ *
+ * This flag only affects the checks of the compressed data itself; the CRC32
+ * values in the .xz headers will still be verified normally.
+ *
+ * Don't use this flag unless you know what you are doing. Possible reasons
+ * to use this flag:
+ *
+ *   - Trying to recover data from a corrupt .xz file.
+ *
+ *   - Speeding up decompression, which matters mostly with SHA-256
+ *     or with files that have compressed extremely well. It's recommended
+ *     to not use this flag for this purpose unless the file integrity is
+ *     verified externally in some other way.
+ *
+ * Support for this flag was added in liblzma 5.1.4beta.
+ */
+#define LZMA_IGNORE_CHECK               UINT32_C(0x10)
+
+
+/**
+ * This flag enables decoding of concatenated files with file formats that
+ * allow concatenating compressed files as is. From the formats currently
+ * supported by liblzma, only the .xz format allows concatenated files.
+ * Concatenated files are not allowed with the legacy .lzma format.
+ *
+ * This flag also affects the usage of the `action' argument for lzma_code().
+ * When LZMA_CONCATENATED is used, lzma_code() won't return LZMA_STREAM_END
+ * unless LZMA_FINISH is used as `action'. Thus, the application has to set
+ * LZMA_FINISH in the same way as it does when encoding.
+ *
+ * If LZMA_CONCATENATED is not used, the decoders still accept LZMA_FINISH
+ * as `action' for lzma_code(), but the usage of LZMA_FINISH isn't required.
+ */
+#define LZMA_CONCATENATED               UINT32_C(0x08)
+
+
+/**
+ * \brief       Initialize .xz Stream decoder
+ *
+ * \param       strm        Pointer to properly prepared lzma_stream
+ * \param       memlimit    Memory usage limit as bytes. Use UINT64_MAX
+ *                          to effectively disable the limiter.
+ * \param       flags       Bitwise-or of zero or more of the decoder flags:
+ *                          LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
+ *                          LZMA_TELL_ANY_CHECK, LZMA_CONCATENATED
+ *
+ * \return      - LZMA_OK: Initialization was successful.
+ *              - LZMA_MEM_ERROR: Cannot allocate memory.
+ *              - LZMA_OPTIONS_ERROR: Unsupported flags
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_stream_decoder(
+		lzma_stream *strm, uint64_t memlimit, uint32_t flags)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Decode .xz Streams and .lzma files with autodetection
+ *
+ * This decoder autodetects between the .xz and .lzma file formats, and
+ * calls lzma_stream_decoder() or lzma_alone_decoder() once the type
+ * of the input file has been detected.
+ *
+ * \param       strm        Pointer to properly prepared lzma_stream
+ * \param       memlimit    Memory usage limit as bytes. Use UINT64_MAX
+ *                          to effectively disable the limiter.
+ * \param       flags       Bitwise-or of flags, or zero for no flags.
+ *
+ * \return      - LZMA_OK: Initialization was successful.
+ *              - LZMA_MEM_ERROR: Cannot allocate memory.
+ *              - LZMA_OPTIONS_ERROR: Unsupported flags
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_auto_decoder(
+		lzma_stream *strm, uint64_t memlimit, uint32_t flags)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Initialize .lzma decoder (legacy file format)
+ *
+ * Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH.
+ * There is no need to use LZMA_FINISH, but allowing it may simplify
+ * certain types of applications.
+ *
+ * \return      - LZMA_OK
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_alone_decoder(
+		lzma_stream *strm, uint64_t memlimit)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Single-call .xz Stream decoder
+ *
+ * \param       memlimit    Pointer to how much memory the decoder is allowed
+ *                          to allocate. The value pointed by this pointer is
+ *                          modified if and only if LZMA_MEMLIMIT_ERROR is
+ *                          returned.
+ * \param       flags       Bitwise-or of zero or more of the decoder flags:
+ *                          LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
+ *                          LZMA_CONCATENATED. Note that LZMA_TELL_ANY_CHECK
+ *                          is not allowed and will return LZMA_PROG_ERROR.
+ * \param       allocator   lzma_allocator for custom allocator functions.
+ *                          Set to NULL to use malloc() and free().
+ * \param       in          Beginning of the input buffer
+ * \param       in_pos      The next byte will be read from in[*in_pos].
+ *                          *in_pos is updated only if decoding succeeds.
+ * \param       in_size     Size of the input buffer; the first byte that
+ *                          won't be read is in[in_size].
+ * \param       out         Beginning of the output buffer
+ * \param       out_pos     The next byte will be written to out[*out_pos].
+ *                          *out_pos is updated only if decoding succeeds.
+ * \param       out_size    Size of the out buffer; the first byte into
+ *                          which no data is written to is out[out_size].
+ *
+ * \return      - LZMA_OK: Decoding was successful.
+ *              - LZMA_FORMAT_ERROR
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_DATA_ERROR
+ *              - LZMA_NO_CHECK: This can be returned only if using
+ *                the LZMA_TELL_NO_CHECK flag.
+ *              - LZMA_UNSUPPORTED_CHECK: This can be returned only if using
+ *                the LZMA_TELL_UNSUPPORTED_CHECK flag.
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.
+ *                The minimum required memlimit value was stored to *memlimit.
+ *              - LZMA_BUF_ERROR: Output buffer was too small.
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_stream_buffer_decode(
+		uint64_t *memlimit, uint32_t flags,
+		const lzma_allocator *allocator,
+		const uint8_t *in, size_t *in_pos, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+		lzma_nothrow lzma_attr_warn_unused_result;

Deleted: vendor/xz/5.2.3/src/liblzma/api/lzma/filter.h
===================================================================
--- vendor/xz/dist/src/liblzma/api/lzma/filter.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/filter.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,424 +0,0 @@
-/**
- * \file        lzma/filter.h
- * \brief       Common filter related types and functions
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       Maximum number of filters in a chain
- *
- * A filter chain can have 1-4 filters, of which three are allowed to change
- * the size of the data. Usually only one or two filters are needed.
- */
-#define LZMA_FILTERS_MAX 4
-
-
-/**
- * \brief       Filter options
- *
- * This structure is used to pass Filter ID and a pointer filter's
- * options to liblzma. A few functions work with a single lzma_filter
- * structure, while most functions expect a filter chain.
- *
- * A filter chain is indicated with an array of lzma_filter structures.
- * The array is terminated with .id = LZMA_VLI_UNKNOWN. Thus, the filter
- * array must have LZMA_FILTERS_MAX + 1 elements (that is, five) to
- * be able to hold any arbitrary filter chain. This is important when
- * using lzma_block_header_decode() from block.h, because too small
- * array would make liblzma write past the end of the filters array.
- */
-typedef struct {
-	/**
-	 * \brief       Filter ID
-	 *
-	 * Use constants whose name begin with `LZMA_FILTER_' to specify
-	 * different filters. In an array of lzma_filter structures, use
-	 * LZMA_VLI_UNKNOWN to indicate end of filters.
-	 *
-	 * \note        This is not an enum, because on some systems enums
-	 *              cannot be 64-bit.
-	 */
-	lzma_vli id;
-
-	/**
-	 * \brief       Pointer to filter-specific options structure
-	 *
-	 * If the filter doesn't need options, set this to NULL. If id is
-	 * set to LZMA_VLI_UNKNOWN, options is ignored, and thus
-	 * doesn't need be initialized.
-	 */
-	void *options;
-
-} lzma_filter;
-
-
-/**
- * \brief       Test if the given Filter ID is supported for encoding
- *
- * Return true if the give Filter ID is supported for encoding by this
- * liblzma build. Otherwise false is returned.
- *
- * There is no way to list which filters are available in this particular
- * liblzma version and build. It would be useless, because the application
- * couldn't know what kind of options the filter would need.
- */
-extern LZMA_API(lzma_bool) lzma_filter_encoder_is_supported(lzma_vli id)
-		lzma_nothrow lzma_attr_const;
-
-
-/**
- * \brief       Test if the given Filter ID is supported for decoding
- *
- * Return true if the give Filter ID is supported for decoding by this
- * liblzma build. Otherwise false is returned.
- */
-extern LZMA_API(lzma_bool) lzma_filter_decoder_is_supported(lzma_vli id)
-		lzma_nothrow lzma_attr_const;
-
-
-/**
- * \brief       Copy the filters array
- *
- * Copy the Filter IDs and filter-specific options from src to dest.
- * Up to LZMA_FILTERS_MAX filters are copied, plus the terminating
- * .id == LZMA_VLI_UNKNOWN. Thus, dest should have at least
- * LZMA_FILTERS_MAX + 1 elements space unless the caller knows that
- * src is smaller than that.
- *
- * Unless the filter-specific options is NULL, the Filter ID has to be
- * supported by liblzma, because liblzma needs to know the size of every
- * filter-specific options structure. The filter-specific options are not
- * validated. If options is NULL, any unsupported Filter IDs are copied
- * without returning an error.
- *
- * Old filter-specific options in dest are not freed, so dest doesn't
- * need to be initialized by the caller in any way.
- *
- * If an error occurs, memory possibly already allocated by this function
- * is always freed.
- *
- * \return      - LZMA_OK
- *              - LZMA_MEM_ERROR
- *              - LZMA_OPTIONS_ERROR: Unsupported Filter ID and its options
- *                is not NULL.
- *              - LZMA_PROG_ERROR: src or dest is NULL.
- */
-extern LZMA_API(lzma_ret) lzma_filters_copy(const lzma_filter *src,
-		lzma_filter *dest, lzma_allocator *allocator) lzma_nothrow;
-
-
-/**
- * \brief       Calculate approximate memory requirements for raw encoder
- *
- * This function can be used to calculate the memory requirements for
- * Block and Stream encoders too because Block and Stream encoders don't
- * need significantly more memory than raw encoder.
- *
- * \param       filters     Array of filters terminated with
- *                          .id == LZMA_VLI_UNKNOWN.
- *
- * \return      Number of bytes of memory required for the given
- *              filter chain when encoding. If an error occurs,
- *              for example due to unsupported filter chain,
- *              UINT64_MAX is returned.
- */
-extern LZMA_API(uint64_t) lzma_raw_encoder_memusage(const lzma_filter *filters)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Calculate approximate memory requirements for raw decoder
- *
- * This function can be used to calculate the memory requirements for
- * Block and Stream decoders too because Block and Stream decoders don't
- * need significantly more memory than raw decoder.
- *
- * \param       filters     Array of filters terminated with
- *                          .id == LZMA_VLI_UNKNOWN.
- *
- * \return      Number of bytes of memory required for the given
- *              filter chain when decoding. If an error occurs,
- *              for example due to unsupported filter chain,
- *              UINT64_MAX is returned.
- */
-extern LZMA_API(uint64_t) lzma_raw_decoder_memusage(const lzma_filter *filters)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Initialize raw encoder
- *
- * This function may be useful when implementing custom file formats.
- *
- * \param       strm    Pointer to properly prepared lzma_stream
- * \param       filters Array of lzma_filter structures. The end of the
- *                      array must be marked with .id = LZMA_VLI_UNKNOWN.
- *
- * The `action' with lzma_code() can be LZMA_RUN, LZMA_SYNC_FLUSH (if the
- * filter chain supports it), or LZMA_FINISH.
- *
- * \return      - LZMA_OK
- *              - LZMA_MEM_ERROR
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_raw_encoder(
-		lzma_stream *strm, const lzma_filter *filters)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Initialize raw decoder
- *
- * The initialization of raw decoder goes similarly to raw encoder.
- *
- * The `action' with lzma_code() can be LZMA_RUN or LZMA_FINISH. Using
- * LZMA_FINISH is not required, it is supported just for convenience.
- *
- * \return      - LZMA_OK
- *              - LZMA_MEM_ERROR
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_raw_decoder(
-		lzma_stream *strm, const lzma_filter *filters)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Update the filter chain in the encoder
- *
- * This function is for advanced users only. This function has two slightly
- * different purposes:
- *
- *  - After LZMA_FULL_FLUSH when using Stream encoder: Set a new filter
- *    chain, which will be used starting from the next Block.
- *
- *  - After LZMA_SYNC_FLUSH using Raw, Block, or Stream encoder: Change
- *    the filter-specific options in the middle of encoding. The actual
- *    filters in the chain (Filter IDs) cannot be changed. In the future,
- *    it might become possible to change the filter options without
- *    using LZMA_SYNC_FLUSH.
- *
- * While rarely useful, this function may be called also when no data has
- * been compressed yet. In that case, this function will behave as if
- * LZMA_FULL_FLUSH (Stream encoder) or LZMA_SYNC_FLUSH (Raw or Block
- * encoder) had been used right before calling this function.
- *
- * \return      - LZMA_OK
- *              - LZMA_MEM_ERROR
- *              - LZMA_MEMLIMIT_ERROR
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_filters_update(
-		lzma_stream *strm, const lzma_filter *filters) lzma_nothrow;
-
-
-/**
- * \brief       Single-call raw encoder
- *
- * \param       filters     Array of lzma_filter structures. The end of the
- *                          array must be marked with .id = LZMA_VLI_UNKNOWN.
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() and free().
- * \param       in          Beginning of the input buffer
- * \param       in_size     Size of the input buffer
- * \param       out         Beginning of the output buffer
- * \param       out_pos     The next byte will be written to out[*out_pos].
- *                          *out_pos is updated only if encoding succeeds.
- * \param       out_size    Size of the out buffer; the first byte into
- *                          which no data is written to is out[out_size].
- *
- * \return      - LZMA_OK: Encoding was successful.
- *              - LZMA_BUF_ERROR: Not enough output buffer space.
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_MEM_ERROR
- *              - LZMA_DATA_ERROR
- *              - LZMA_PROG_ERROR
- *
- * \note        There is no function to calculate how big output buffer
- *              would surely be big enough. (lzma_stream_buffer_bound()
- *              works only for lzma_stream_buffer_encode(); raw encoder
- *              won't necessarily meet that bound.)
- */
-extern LZMA_API(lzma_ret) lzma_raw_buffer_encode(
-		const lzma_filter *filters, lzma_allocator *allocator,
-		const uint8_t *in, size_t in_size, uint8_t *out,
-		size_t *out_pos, size_t out_size) lzma_nothrow;
-
-
-/**
- * \brief       Single-call raw decoder
- *
- * \param       filters     Array of lzma_filter structures. The end of the
- *                          array must be marked with .id = LZMA_VLI_UNKNOWN.
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() and free().
- * \param       in          Beginning of the input buffer
- * \param       in_pos      The next byte will be read from in[*in_pos].
- *                          *in_pos is updated only if decoding succeeds.
- * \param       in_size     Size of the input buffer; the first byte that
- *                          won't be read is in[in_size].
- * \param       out         Beginning of the output buffer
- * \param       out_pos     The next byte will be written to out[*out_pos].
- *                          *out_pos is updated only if encoding succeeds.
- * \param       out_size    Size of the out buffer; the first byte into
- *                          which no data is written to is out[out_size].
- */
-extern LZMA_API(lzma_ret) lzma_raw_buffer_decode(
-		const lzma_filter *filters, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
-
-
-/**
- * \brief       Get the size of the Filter Properties field
- *
- * This function may be useful when implementing custom file formats
- * using the raw encoder and decoder.
- *
- * \param       size    Pointer to uint32_t to hold the size of the properties
- * \param       filter  Filter ID and options (the size of the properties may
- *                      vary depending on the options)
- *
- * \return      - LZMA_OK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_PROG_ERROR
- *
- * \note        This function validates the Filter ID, but does not
- *              necessarily validate the options. Thus, it is possible
- *              that this returns LZMA_OK while the following call to
- *              lzma_properties_encode() returns LZMA_OPTIONS_ERROR.
- */
-extern LZMA_API(lzma_ret) lzma_properties_size(
-		uint32_t *size, const lzma_filter *filter) lzma_nothrow;
-
-
-/**
- * \brief       Encode the Filter Properties field
- *
- * \param       filter  Filter ID and options
- * \param       props   Buffer to hold the encoded options. The size of
- *                      buffer must have been already determined with
- *                      lzma_properties_size().
- *
- * \return      - LZMA_OK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_PROG_ERROR
- *
- * \note        Even this function won't validate more options than actually
- *              necessary. Thus, it is possible that encoding the properties
- *              succeeds but using the same options to initialize the encoder
- *              will fail.
- *
- * \note        If lzma_properties_size() indicated that the size
- *              of the Filter Properties field is zero, calling
- *              lzma_properties_encode() is not required, but it
- *              won't do any harm either.
- */
-extern LZMA_API(lzma_ret) lzma_properties_encode(
-		const lzma_filter *filter, uint8_t *props) lzma_nothrow;
-
-
-/**
- * \brief       Decode the Filter Properties field
- *
- * \param       filter      filter->id must have been set to the correct
- *                          Filter ID. filter->options doesn't need to be
- *                          initialized (it's not freed by this function). The
- *                          decoded options will be stored to filter->options.
- *                          filter->options is set to NULL if there are no
- *                          properties or if an error occurs.
- * \param       allocator   Custom memory allocator used to allocate the
- *                          options. Set to NULL to use the default malloc(),
- *                          and in case of an error, also free().
- * \param       props       Input buffer containing the properties.
- * \param       props_size  Size of the properties. This must be the exact
- *                          size; giving too much or too little input will
- *                          return LZMA_OPTIONS_ERROR.
- *
- * \return      - LZMA_OK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_MEM_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_properties_decode(
-		lzma_filter *filter, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size) lzma_nothrow;
-
-
-/**
- * \brief       Calculate encoded size of a Filter Flags field
- *
- * Knowing the size of Filter Flags is useful to know when allocating
- * memory to hold the encoded Filter Flags.
- *
- * \param       size    Pointer to integer to hold the calculated size
- * \param       filter  Filter ID and associated options whose encoded
- *                      size is to be calculated
- *
- * \return      - LZMA_OK: *size set successfully. Note that this doesn't
- *                guarantee that filter->options is valid, thus
- *                lzma_filter_flags_encode() may still fail.
- *              - LZMA_OPTIONS_ERROR: Unknown Filter ID or unsupported options.
- *              - LZMA_PROG_ERROR: Invalid options
- *
- * \note        If you need to calculate size of List of Filter Flags,
- *              you need to loop over every lzma_filter entry.
- */
-extern LZMA_API(lzma_ret) lzma_filter_flags_size(
-		uint32_t *size, const lzma_filter *filter)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Encode Filter Flags into given buffer
- *
- * In contrast to some functions, this doesn't allocate the needed buffer.
- * This is due to how this function is used internally by liblzma.
- *
- * \param       filter      Filter ID and options to be encoded
- * \param       out         Beginning of the output buffer
- * \param       out_pos     out[*out_pos] is the next write position. This
- *                          is updated by the encoder.
- * \param       out_size    out[out_size] is the first byte to not write.
- *
- * \return      - LZMA_OK: Encoding was successful.
- *              - LZMA_OPTIONS_ERROR: Invalid or unsupported options.
- *              - LZMA_PROG_ERROR: Invalid options or not enough output
- *                buffer space (you should have checked it with
- *                lzma_filter_flags_size()).
- */
-extern LZMA_API(lzma_ret) lzma_filter_flags_encode(const lzma_filter *filter,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Decode Filter Flags from given buffer
- *
- * The decoded result is stored into *filter. The old value of
- * filter->options is not free()d.
- *
- * \return      - LZMA_OK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_MEM_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_filter_flags_decode(
-		lzma_filter *filter, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size)
-		lzma_nothrow lzma_attr_warn_unused_result;

Copied: vendor/xz/5.2.3/src/liblzma/api/lzma/filter.h (from rev 9176, vendor/xz/dist/src/liblzma/api/lzma/filter.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/api/lzma/filter.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/filter.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,425 @@
+/**
+ * \file        lzma/filter.h
+ * \brief       Common filter related types and functions
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ *
+ * See ../lzma.h for information about liblzma as a whole.
+ */
+
+#ifndef LZMA_H_INTERNAL
+#	error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief       Maximum number of filters in a chain
+ *
+ * A filter chain can have 1-4 filters, of which three are allowed to change
+ * the size of the data. Usually only one or two filters are needed.
+ */
+#define LZMA_FILTERS_MAX 4
+
+
+/**
+ * \brief       Filter options
+ *
+ * This structure is used to pass Filter ID and a pointer filter's
+ * options to liblzma. A few functions work with a single lzma_filter
+ * structure, while most functions expect a filter chain.
+ *
+ * A filter chain is indicated with an array of lzma_filter structures.
+ * The array is terminated with .id = LZMA_VLI_UNKNOWN. Thus, the filter
+ * array must have LZMA_FILTERS_MAX + 1 elements (that is, five) to
+ * be able to hold any arbitrary filter chain. This is important when
+ * using lzma_block_header_decode() from block.h, because too small
+ * array would make liblzma write past the end of the filters array.
+ */
+typedef struct {
+	/**
+	 * \brief       Filter ID
+	 *
+	 * Use constants whose name begin with `LZMA_FILTER_' to specify
+	 * different filters. In an array of lzma_filter structures, use
+	 * LZMA_VLI_UNKNOWN to indicate end of filters.
+	 *
+	 * \note        This is not an enum, because on some systems enums
+	 *              cannot be 64-bit.
+	 */
+	lzma_vli id;
+
+	/**
+	 * \brief       Pointer to filter-specific options structure
+	 *
+	 * If the filter doesn't need options, set this to NULL. If id is
+	 * set to LZMA_VLI_UNKNOWN, options is ignored, and thus
+	 * doesn't need be initialized.
+	 */
+	void *options;
+
+} lzma_filter;
+
+
+/**
+ * \brief       Test if the given Filter ID is supported for encoding
+ *
+ * Return true if the give Filter ID is supported for encoding by this
+ * liblzma build. Otherwise false is returned.
+ *
+ * There is no way to list which filters are available in this particular
+ * liblzma version and build. It would be useless, because the application
+ * couldn't know what kind of options the filter would need.
+ */
+extern LZMA_API(lzma_bool) lzma_filter_encoder_is_supported(lzma_vli id)
+		lzma_nothrow lzma_attr_const;
+
+
+/**
+ * \brief       Test if the given Filter ID is supported for decoding
+ *
+ * Return true if the give Filter ID is supported for decoding by this
+ * liblzma build. Otherwise false is returned.
+ */
+extern LZMA_API(lzma_bool) lzma_filter_decoder_is_supported(lzma_vli id)
+		lzma_nothrow lzma_attr_const;
+
+
+/**
+ * \brief       Copy the filters array
+ *
+ * Copy the Filter IDs and filter-specific options from src to dest.
+ * Up to LZMA_FILTERS_MAX filters are copied, plus the terminating
+ * .id == LZMA_VLI_UNKNOWN. Thus, dest should have at least
+ * LZMA_FILTERS_MAX + 1 elements space unless the caller knows that
+ * src is smaller than that.
+ *
+ * Unless the filter-specific options is NULL, the Filter ID has to be
+ * supported by liblzma, because liblzma needs to know the size of every
+ * filter-specific options structure. The filter-specific options are not
+ * validated. If options is NULL, any unsupported Filter IDs are copied
+ * without returning an error.
+ *
+ * Old filter-specific options in dest are not freed, so dest doesn't
+ * need to be initialized by the caller in any way.
+ *
+ * If an error occurs, memory possibly already allocated by this function
+ * is always freed.
+ *
+ * \return      - LZMA_OK
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_OPTIONS_ERROR: Unsupported Filter ID and its options
+ *                is not NULL.
+ *              - LZMA_PROG_ERROR: src or dest is NULL.
+ */
+extern LZMA_API(lzma_ret) lzma_filters_copy(
+		const lzma_filter *src, lzma_filter *dest,
+		const lzma_allocator *allocator) lzma_nothrow;
+
+
+/**
+ * \brief       Calculate approximate memory requirements for raw encoder
+ *
+ * This function can be used to calculate the memory requirements for
+ * Block and Stream encoders too because Block and Stream encoders don't
+ * need significantly more memory than raw encoder.
+ *
+ * \param       filters     Array of filters terminated with
+ *                          .id == LZMA_VLI_UNKNOWN.
+ *
+ * \return      Number of bytes of memory required for the given
+ *              filter chain when encoding. If an error occurs,
+ *              for example due to unsupported filter chain,
+ *              UINT64_MAX is returned.
+ */
+extern LZMA_API(uint64_t) lzma_raw_encoder_memusage(const lzma_filter *filters)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Calculate approximate memory requirements for raw decoder
+ *
+ * This function can be used to calculate the memory requirements for
+ * Block and Stream decoders too because Block and Stream decoders don't
+ * need significantly more memory than raw decoder.
+ *
+ * \param       filters     Array of filters terminated with
+ *                          .id == LZMA_VLI_UNKNOWN.
+ *
+ * \return      Number of bytes of memory required for the given
+ *              filter chain when decoding. If an error occurs,
+ *              for example due to unsupported filter chain,
+ *              UINT64_MAX is returned.
+ */
+extern LZMA_API(uint64_t) lzma_raw_decoder_memusage(const lzma_filter *filters)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Initialize raw encoder
+ *
+ * This function may be useful when implementing custom file formats.
+ *
+ * \param       strm    Pointer to properly prepared lzma_stream
+ * \param       filters Array of lzma_filter structures. The end of the
+ *                      array must be marked with .id = LZMA_VLI_UNKNOWN.
+ *
+ * The `action' with lzma_code() can be LZMA_RUN, LZMA_SYNC_FLUSH (if the
+ * filter chain supports it), or LZMA_FINISH.
+ *
+ * \return      - LZMA_OK
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_raw_encoder(
+		lzma_stream *strm, const lzma_filter *filters)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Initialize raw decoder
+ *
+ * The initialization of raw decoder goes similarly to raw encoder.
+ *
+ * The `action' with lzma_code() can be LZMA_RUN or LZMA_FINISH. Using
+ * LZMA_FINISH is not required, it is supported just for convenience.
+ *
+ * \return      - LZMA_OK
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_raw_decoder(
+		lzma_stream *strm, const lzma_filter *filters)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Update the filter chain in the encoder
+ *
+ * This function is for advanced users only. This function has two slightly
+ * different purposes:
+ *
+ *  - After LZMA_FULL_FLUSH when using Stream encoder: Set a new filter
+ *    chain, which will be used starting from the next Block.
+ *
+ *  - After LZMA_SYNC_FLUSH using Raw, Block, or Stream encoder: Change
+ *    the filter-specific options in the middle of encoding. The actual
+ *    filters in the chain (Filter IDs) cannot be changed. In the future,
+ *    it might become possible to change the filter options without
+ *    using LZMA_SYNC_FLUSH.
+ *
+ * While rarely useful, this function may be called also when no data has
+ * been compressed yet. In that case, this function will behave as if
+ * LZMA_FULL_FLUSH (Stream encoder) or LZMA_SYNC_FLUSH (Raw or Block
+ * encoder) had been used right before calling this function.
+ *
+ * \return      - LZMA_OK
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_MEMLIMIT_ERROR
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_filters_update(
+		lzma_stream *strm, const lzma_filter *filters) lzma_nothrow;
+
+
+/**
+ * \brief       Single-call raw encoder
+ *
+ * \param       filters     Array of lzma_filter structures. The end of the
+ *                          array must be marked with .id = LZMA_VLI_UNKNOWN.
+ * \param       allocator   lzma_allocator for custom allocator functions.
+ *                          Set to NULL to use malloc() and free().
+ * \param       in          Beginning of the input buffer
+ * \param       in_size     Size of the input buffer
+ * \param       out         Beginning of the output buffer
+ * \param       out_pos     The next byte will be written to out[*out_pos].
+ *                          *out_pos is updated only if encoding succeeds.
+ * \param       out_size    Size of the out buffer; the first byte into
+ *                          which no data is written to is out[out_size].
+ *
+ * \return      - LZMA_OK: Encoding was successful.
+ *              - LZMA_BUF_ERROR: Not enough output buffer space.
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_DATA_ERROR
+ *              - LZMA_PROG_ERROR
+ *
+ * \note        There is no function to calculate how big output buffer
+ *              would surely be big enough. (lzma_stream_buffer_bound()
+ *              works only for lzma_stream_buffer_encode(); raw encoder
+ *              won't necessarily meet that bound.)
+ */
+extern LZMA_API(lzma_ret) lzma_raw_buffer_encode(
+		const lzma_filter *filters, const lzma_allocator *allocator,
+		const uint8_t *in, size_t in_size, uint8_t *out,
+		size_t *out_pos, size_t out_size) lzma_nothrow;
+
+
+/**
+ * \brief       Single-call raw decoder
+ *
+ * \param       filters     Array of lzma_filter structures. The end of the
+ *                          array must be marked with .id = LZMA_VLI_UNKNOWN.
+ * \param       allocator   lzma_allocator for custom allocator functions.
+ *                          Set to NULL to use malloc() and free().
+ * \param       in          Beginning of the input buffer
+ * \param       in_pos      The next byte will be read from in[*in_pos].
+ *                          *in_pos is updated only if decoding succeeds.
+ * \param       in_size     Size of the input buffer; the first byte that
+ *                          won't be read is in[in_size].
+ * \param       out         Beginning of the output buffer
+ * \param       out_pos     The next byte will be written to out[*out_pos].
+ *                          *out_pos is updated only if encoding succeeds.
+ * \param       out_size    Size of the out buffer; the first byte into
+ *                          which no data is written to is out[out_size].
+ */
+extern LZMA_API(lzma_ret) lzma_raw_buffer_decode(
+		const lzma_filter *filters, const lzma_allocator *allocator,
+		const uint8_t *in, size_t *in_pos, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
+
+
+/**
+ * \brief       Get the size of the Filter Properties field
+ *
+ * This function may be useful when implementing custom file formats
+ * using the raw encoder and decoder.
+ *
+ * \param       size    Pointer to uint32_t to hold the size of the properties
+ * \param       filter  Filter ID and options (the size of the properties may
+ *                      vary depending on the options)
+ *
+ * \return      - LZMA_OK
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_PROG_ERROR
+ *
+ * \note        This function validates the Filter ID, but does not
+ *              necessarily validate the options. Thus, it is possible
+ *              that this returns LZMA_OK while the following call to
+ *              lzma_properties_encode() returns LZMA_OPTIONS_ERROR.
+ */
+extern LZMA_API(lzma_ret) lzma_properties_size(
+		uint32_t *size, const lzma_filter *filter) lzma_nothrow;
+
+
+/**
+ * \brief       Encode the Filter Properties field
+ *
+ * \param       filter  Filter ID and options
+ * \param       props   Buffer to hold the encoded options. The size of
+ *                      buffer must have been already determined with
+ *                      lzma_properties_size().
+ *
+ * \return      - LZMA_OK
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_PROG_ERROR
+ *
+ * \note        Even this function won't validate more options than actually
+ *              necessary. Thus, it is possible that encoding the properties
+ *              succeeds but using the same options to initialize the encoder
+ *              will fail.
+ *
+ * \note        If lzma_properties_size() indicated that the size
+ *              of the Filter Properties field is zero, calling
+ *              lzma_properties_encode() is not required, but it
+ *              won't do any harm either.
+ */
+extern LZMA_API(lzma_ret) lzma_properties_encode(
+		const lzma_filter *filter, uint8_t *props) lzma_nothrow;
+
+
+/**
+ * \brief       Decode the Filter Properties field
+ *
+ * \param       filter      filter->id must have been set to the correct
+ *                          Filter ID. filter->options doesn't need to be
+ *                          initialized (it's not freed by this function). The
+ *                          decoded options will be stored to filter->options.
+ *                          filter->options is set to NULL if there are no
+ *                          properties or if an error occurs.
+ * \param       allocator   Custom memory allocator used to allocate the
+ *                          options. Set to NULL to use the default malloc(),
+ *                          and in case of an error, also free().
+ * \param       props       Input buffer containing the properties.
+ * \param       props_size  Size of the properties. This must be the exact
+ *                          size; giving too much or too little input will
+ *                          return LZMA_OPTIONS_ERROR.
+ *
+ * \return      - LZMA_OK
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_MEM_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_properties_decode(
+		lzma_filter *filter, const lzma_allocator *allocator,
+		const uint8_t *props, size_t props_size) lzma_nothrow;
+
+
+/**
+ * \brief       Calculate encoded size of a Filter Flags field
+ *
+ * Knowing the size of Filter Flags is useful to know when allocating
+ * memory to hold the encoded Filter Flags.
+ *
+ * \param       size    Pointer to integer to hold the calculated size
+ * \param       filter  Filter ID and associated options whose encoded
+ *                      size is to be calculated
+ *
+ * \return      - LZMA_OK: *size set successfully. Note that this doesn't
+ *                guarantee that filter->options is valid, thus
+ *                lzma_filter_flags_encode() may still fail.
+ *              - LZMA_OPTIONS_ERROR: Unknown Filter ID or unsupported options.
+ *              - LZMA_PROG_ERROR: Invalid options
+ *
+ * \note        If you need to calculate size of List of Filter Flags,
+ *              you need to loop over every lzma_filter entry.
+ */
+extern LZMA_API(lzma_ret) lzma_filter_flags_size(
+		uint32_t *size, const lzma_filter *filter)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Encode Filter Flags into given buffer
+ *
+ * In contrast to some functions, this doesn't allocate the needed buffer.
+ * This is due to how this function is used internally by liblzma.
+ *
+ * \param       filter      Filter ID and options to be encoded
+ * \param       out         Beginning of the output buffer
+ * \param       out_pos     out[*out_pos] is the next write position. This
+ *                          is updated by the encoder.
+ * \param       out_size    out[out_size] is the first byte to not write.
+ *
+ * \return      - LZMA_OK: Encoding was successful.
+ *              - LZMA_OPTIONS_ERROR: Invalid or unsupported options.
+ *              - LZMA_PROG_ERROR: Invalid options or not enough output
+ *                buffer space (you should have checked it with
+ *                lzma_filter_flags_size()).
+ */
+extern LZMA_API(lzma_ret) lzma_filter_flags_encode(const lzma_filter *filter,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Decode Filter Flags from given buffer
+ *
+ * The decoded result is stored into *filter. The old value of
+ * filter->options is not free()d.
+ *
+ * \return      - LZMA_OK
+ *              - LZMA_OPTIONS_ERROR
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_filter_flags_decode(
+		lzma_filter *filter, const lzma_allocator *allocator,
+		const uint8_t *in, size_t *in_pos, size_t in_size)
+		lzma_nothrow lzma_attr_warn_unused_result;

Deleted: vendor/xz/5.2.3/src/liblzma/api/lzma/hardware.h
===================================================================
--- vendor/xz/dist/src/liblzma/api/lzma/hardware.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/hardware.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,50 +0,0 @@
-/**
- * \file        lzma/hardware.h
- * \brief       Hardware information
- *
- * Since liblzma can consume a lot of system resources, it also provides
- * ways to limit the resource usage. Applications linking against liblzma
- * need to do the actual decisions how much resources to let liblzma to use.
- * To ease making these decisions, liblzma provides functions to find out
- * the relevant capabilities of the underlaying hardware. Currently there
- * is only a function to find out the amount of RAM, but in the future there
- * will be also a function to detect how many concurrent threads the system
- * can run.
- *
- * \note        On some operating systems, these function may temporarily
- *              load a shared library or open file descriptor(s) to find out
- *              the requested hardware information. Unless the application
- *              assumes that specific file descriptors are not touched by
- *              other threads, this should have no effect on thread safety.
- *              Possible operations involving file descriptors will restart
- *              the syscalls if they return EINTR.
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       Get the total amount of physical memory (RAM) in bytes
- *
- * This function may be useful when determining a reasonable memory
- * usage limit for decompressing or how much memory it is OK to use
- * for compressing.
- *
- * \return      On success, the total amount of physical memory in bytes
- *              is returned. If the amount of RAM cannot be determined,
- *              zero is returned. This can happen if an error occurs
- *              or if there is no code in liblzma to detect the amount
- *              of RAM on the specific operating system.
- */
-extern LZMA_API(uint64_t) lzma_physmem(void) lzma_nothrow;

Copied: vendor/xz/5.2.3/src/liblzma/api/lzma/hardware.h (from rev 9176, vendor/xz/dist/src/liblzma/api/lzma/hardware.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/api/lzma/hardware.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/hardware.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,64 @@
+/**
+ * \file        lzma/hardware.h
+ * \brief       Hardware information
+ *
+ * Since liblzma can consume a lot of system resources, it also provides
+ * ways to limit the resource usage. Applications linking against liblzma
+ * need to do the actual decisions how much resources to let liblzma to use.
+ * To ease making these decisions, liblzma provides functions to find out
+ * the relevant capabilities of the underlaying hardware. Currently there
+ * is only a function to find out the amount of RAM, but in the future there
+ * will be also a function to detect how many concurrent threads the system
+ * can run.
+ *
+ * \note        On some operating systems, these function may temporarily
+ *              load a shared library or open file descriptor(s) to find out
+ *              the requested hardware information. Unless the application
+ *              assumes that specific file descriptors are not touched by
+ *              other threads, this should have no effect on thread safety.
+ *              Possible operations involving file descriptors will restart
+ *              the syscalls if they return EINTR.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ *
+ * See ../lzma.h for information about liblzma as a whole.
+ */
+
+#ifndef LZMA_H_INTERNAL
+#	error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief       Get the total amount of physical memory (RAM) in bytes
+ *
+ * This function may be useful when determining a reasonable memory
+ * usage limit for decompressing or how much memory it is OK to use
+ * for compressing.
+ *
+ * \return      On success, the total amount of physical memory in bytes
+ *              is returned. If the amount of RAM cannot be determined,
+ *              zero is returned. This can happen if an error occurs
+ *              or if there is no code in liblzma to detect the amount
+ *              of RAM on the specific operating system.
+ */
+extern LZMA_API(uint64_t) lzma_physmem(void) lzma_nothrow;
+
+
+/**
+ * \brief       Get the number of processor cores or threads
+ *
+ * This function may be useful when determining how many threads to use.
+ * If the hardware supports more than one thread per CPU core, the number
+ * of hardware threads is returned if that information is available.
+ *
+ * \brief       On success, the number of available CPU threads or cores is
+ *              returned. If this information isn't available or an error
+ *              occurs, zero is returned.
+ */
+extern LZMA_API(uint32_t) lzma_cputhreads(void) lzma_nothrow;

Deleted: vendor/xz/5.2.3/src/liblzma/api/lzma/index.h
===================================================================
--- vendor/xz/dist/src/liblzma/api/lzma/index.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/index.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,682 +0,0 @@
-/**
- * \file        lzma/index.h
- * \brief       Handling of .xz Index and related information
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       Opaque data type to hold the Index(es) and other information
- *
- * lzma_index often holds just one .xz Index and possibly the Stream Flags
- * of the same Stream and size of the Stream Padding field. However,
- * multiple lzma_indexes can be concatenated with lzma_index_cat() and then
- * there may be information about multiple Streams in the same lzma_index.
- *
- * Notes about thread safety: Only one thread may modify lzma_index at
- * a time. All functions that take non-const pointer to lzma_index
- * modify it. As long as no thread is modifying the lzma_index, getting
- * information from the same lzma_index can be done from multiple threads
- * at the same time with functions that take a const pointer to
- * lzma_index or use lzma_index_iter. The same iterator must be used
- * only by one thread at a time, of course, but there can be as many
- * iterators for the same lzma_index as needed.
- */
-typedef struct lzma_index_s lzma_index;
-
-
-/**
- * \brief       Iterator to get information about Blocks and Streams
- */
-typedef struct {
-	struct {
-		/**
-		 * \brief       Pointer to Stream Flags
-		 *
-		 * This is NULL if Stream Flags have not been set for
-		 * this Stream with lzma_index_stream_flags().
-		 */
-		const lzma_stream_flags *flags;
-
-		const void *reserved_ptr1;
-		const void *reserved_ptr2;
-		const void *reserved_ptr3;
-
-		/**
-		 * \brief       Stream number in the lzma_index
-		 *
-		 * The first Stream is 1.
-		 */
-		lzma_vli number;
-
-		/**
-		 * \brief       Number of Blocks in the Stream
-		 *
-		 * If this is zero, the block structure below has
-		 * undefined values.
-		 */
-		lzma_vli block_count;
-
-		/**
-		 * \brief       Compressed start offset of this Stream
-		 *
-		 * The offset is relative to the beginning of the lzma_index
-		 * (i.e. usually the beginning of the .xz file).
-		 */
-		lzma_vli compressed_offset;
-
-		/**
-		 * \brief       Uncompressed start offset of this Stream
-		 *
-		 * The offset is relative to the beginning of the lzma_index
-		 * (i.e. usually the beginning of the .xz file).
-		 */
-		lzma_vli uncompressed_offset;
-
-		/**
-		 * \brief       Compressed size of this Stream
-		 *
-		 * This includes all headers except the possible
-		 * Stream Padding after this Stream.
-		 */
-		lzma_vli compressed_size;
-
-		/**
-		 * \brief       Uncompressed size of this Stream
-		 */
-		lzma_vli uncompressed_size;
-
-		/**
-		 * \brief       Size of Stream Padding after this Stream
-		 *
-		 * If it hasn't been set with lzma_index_stream_padding(),
-		 * this defaults to zero. Stream Padding is always
-		 * a multiple of four bytes.
-		 */
-		lzma_vli padding;
-
-		lzma_vli reserved_vli1;
-		lzma_vli reserved_vli2;
-		lzma_vli reserved_vli3;
-		lzma_vli reserved_vli4;
-	} stream;
-
-	struct {
-		/**
-		 * \brief       Block number in the file
-		 *
-		 * The first Block is 1.
-		 */
-		lzma_vli number_in_file;
-
-		/**
-		 * \brief       Compressed start offset of this Block
-		 *
-		 * This offset is relative to the beginning of the
-		 * lzma_index (i.e. usually the beginning of the .xz file).
-		 * Normally this is where you should seek in the .xz file
-		 * to start decompressing this Block.
-		 */
-		lzma_vli compressed_file_offset;
-
-		/**
-		 * \brief       Uncompressed start offset of this Block
-		 *
-		 * This offset is relative to the beginning of the lzma_index
-		 * (i.e. usually the beginning of the .xz file).
-		 *
-		 * When doing random-access reading, it is possible that
-		 * the target offset is not exactly at Block boundary. One
-		 * will need to compare the target offset against
-		 * uncompressed_file_offset or uncompressed_stream_offset,
-		 * and possibly decode and throw away some amount of data
-		 * before reaching the target offset.
-		 */
-		lzma_vli uncompressed_file_offset;
-
-		/**
-		 * \brief       Block number in this Stream
-		 *
-		 * The first Block is 1.
-		 */
-		lzma_vli number_in_stream;
-
-		/**
-		 * \brief       Compressed start offset of this Block
-		 *
-		 * This offset is relative to the beginning of the Stream
-		 * containing this Block.
-		 */
-		lzma_vli compressed_stream_offset;
-
-		/**
-		 * \brief       Uncompressed start offset of this Block
-		 *
-		 * This offset is relative to the beginning of the Stream
-		 * containing this Block.
-		 */
-		lzma_vli uncompressed_stream_offset;
-
-		/**
-		 * \brief       Uncompressed size of this Block
-		 *
-		 * You should pass this to the Block decoder if you will
-		 * decode this Block. It will allow the Block decoder to
-		 * validate the uncompressed size.
-		 */
-		lzma_vli uncompressed_size;
-
-		/**
-		 * \brief       Unpadded size of this Block
-		 *
-		 * You should pass this to the Block decoder if you will
-		 * decode this Block. It will allow the Block decoder to
-		 * validate the unpadded size.
-		 */
-		lzma_vli unpadded_size;
-
-		/**
-		 * \brief       Total compressed size
-		 *
-		 * This includes all headers and padding in this Block.
-		 * This is useful if you need to know how many bytes
-		 * the Block decoder will actually read.
-		 */
-		lzma_vli total_size;
-
-		lzma_vli reserved_vli1;
-		lzma_vli reserved_vli2;
-		lzma_vli reserved_vli3;
-		lzma_vli reserved_vli4;
-
-		const void *reserved_ptr1;
-		const void *reserved_ptr2;
-		const void *reserved_ptr3;
-		const void *reserved_ptr4;
-	} block;
-
-	/*
-	 * Internal data which is used to store the state of the iterator.
-	 * The exact format may vary between liblzma versions, so don't
-	 * touch these in any way.
-	 */
-	union {
-		const void *p;
-		size_t s;
-		lzma_vli v;
-	} internal[6];
-} lzma_index_iter;
-
-
-/**
- * \brief       Operation mode for lzma_index_iter_next()
- */
-typedef enum {
-	LZMA_INDEX_ITER_ANY             = 0,
-		/**<
-		 * \brief       Get the next Block or Stream
-		 *
-		 * Go to the next Block if the current Stream has at least
-		 * one Block left. Otherwise go to the next Stream even if
-		 * it has no Blocks. If the Stream has no Blocks
-		 * (lzma_index_iter.stream.block_count == 0),
-		 * lzma_index_iter.block will have undefined values.
-		 */
-
-	LZMA_INDEX_ITER_STREAM          = 1,
-		/**<
-		 * \brief       Get the next Stream
-		 *
-		 * Go to the next Stream even if the current Stream has
-		 * unread Blocks left. If the next Stream has at least one
-		 * Block, the iterator will point to the first Block.
-		 * If there are no Blocks, lzma_index_iter.block will have
-		 * undefined values.
-		 */
-
-	LZMA_INDEX_ITER_BLOCK           = 2,
-		/**<
-		 * \brief       Get the next Block
-		 *
-		 * Go to the next Block if the current Stream has at least
-		 * one Block left. If the current Stream has no Blocks left,
-		 * the next Stream with at least one Block is located and
-		 * the iterator will be made to point to the first Block of
-		 * that Stream.
-		 */
-
-	LZMA_INDEX_ITER_NONEMPTY_BLOCK  = 3
-		/**<
-		 * \brief       Get the next non-empty Block
-		 *
-		 * This is like LZMA_INDEX_ITER_BLOCK except that it will
-		 * skip Blocks whose Uncompressed Size is zero.
-		 */
-
-} lzma_index_iter_mode;
-
-
-/**
- * \brief       Calculate memory usage of lzma_index
- *
- * On disk, the size of the Index field depends on both the number of Records
- * stored and how big values the Records store (due to variable-length integer
- * encoding). When the Index is kept in lzma_index structure, the memory usage
- * depends only on the number of Records/Blocks stored in the Index(es), and
- * in case of concatenated lzma_indexes, the number of Streams. The size in
- * RAM is almost always significantly bigger than in the encoded form on disk.
- *
- * This function calculates an approximate amount of memory needed hold
- * the given number of Streams and Blocks in lzma_index structure. This
- * value may vary between CPU architectures and also between liblzma versions
- * if the internal implementation is modified.
- */
-extern LZMA_API(uint64_t) lzma_index_memusage(
-		lzma_vli streams, lzma_vli blocks) lzma_nothrow;
-
-
-/**
- * \brief       Calculate the memory usage of an existing lzma_index
- *
- * This is a shorthand for lzma_index_memusage(lzma_index_stream_count(i),
- * lzma_index_block_count(i)).
- */
-extern LZMA_API(uint64_t) lzma_index_memused(const lzma_index *i)
-		lzma_nothrow;
-
-
-/**
- * \brief       Allocate and initialize a new lzma_index structure
- *
- * \return      On success, a pointer to an empty initialized lzma_index is
- *              returned. If allocation fails, NULL is returned.
- */
-extern LZMA_API(lzma_index *) lzma_index_init(lzma_allocator *allocator)
-		lzma_nothrow;
-
-
-/**
- * \brief       Deallocate lzma_index
- *
- * If i is NULL, this does nothing.
- */
-extern LZMA_API(void) lzma_index_end(lzma_index *i, lzma_allocator *allocator)
-		lzma_nothrow;
-
-
-/**
- * \brief       Add a new Block to lzma_index
- *
- * \param       i                 Pointer to a lzma_index structure
- * \param       allocator         Pointer to lzma_allocator, or NULL to
- *                                use malloc()
- * \param       unpadded_size     Unpadded Size of a Block. This can be
- *                                calculated with lzma_block_unpadded_size()
- *                                after encoding or decoding the Block.
- * \param       uncompressed_size Uncompressed Size of a Block. This can be
- *                                taken directly from lzma_block structure
- *                                after encoding or decoding the Block.
- *
- * Appending a new Block does not invalidate iterators. For example,
- * if an iterator was pointing to the end of the lzma_index, after
- * lzma_index_append() it is possible to read the next Block with
- * an existing iterator.
- *
- * \return      - LZMA_OK
- *              - LZMA_MEM_ERROR
- *              - LZMA_DATA_ERROR: Compressed or uncompressed size of the
- *                Stream or size of the Index field would grow too big.
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_append(
-		lzma_index *i, lzma_allocator *allocator,
-		lzma_vli unpadded_size, lzma_vli uncompressed_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Set the Stream Flags
- *
- * Set the Stream Flags of the last (and typically the only) Stream
- * in lzma_index. This can be useful when reading information from the
- * lzma_index, because to decode Blocks, knowing the integrity check type
- * is needed.
- *
- * The given Stream Flags are copied into internal preallocated structure
- * in the lzma_index, thus the caller doesn't need to keep the *stream_flags
- * available after calling this function.
- *
- * \return      - LZMA_OK
- *              - LZMA_OPTIONS_ERROR: Unsupported stream_flags->version.
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_stream_flags(
-		lzma_index *i, const lzma_stream_flags *stream_flags)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Get the types of integrity Checks
- *
- * If lzma_index_stream_flags() is used to set the Stream Flags for
- * every Stream, lzma_index_checks() can be used to get a bitmask to
- * indicate which Check types have been used. It can be useful e.g. if
- * showing the Check types to the user.
- *
- * The bitmask is 1 << check_id, e.g. CRC32 is 1 << 1 and SHA-256 is 1 << 10.
- */
-extern LZMA_API(uint32_t) lzma_index_checks(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Set the amount of Stream Padding
- *
- * Set the amount of Stream Padding of the last (and typically the only)
- * Stream in the lzma_index. This is needed when planning to do random-access
- * reading within multiple concatenated Streams.
- *
- * By default, the amount of Stream Padding is assumed to be zero bytes.
- *
- * \return      - LZMA_OK
- *              - LZMA_DATA_ERROR: The file size would grow too big.
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_stream_padding(
-		lzma_index *i, lzma_vli stream_padding)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Get the number of Streams
- */
-extern LZMA_API(lzma_vli) lzma_index_stream_count(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Get the number of Blocks
- *
- * This returns the total number of Blocks in lzma_index. To get number
- * of Blocks in individual Streams, use lzma_index_iter.
- */
-extern LZMA_API(lzma_vli) lzma_index_block_count(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Get the size of the Index field as bytes
- *
- * This is needed to verify the Backward Size field in the Stream Footer.
- */
-extern LZMA_API(lzma_vli) lzma_index_size(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Get the total size of the Stream
- *
- * If multiple lzma_indexes have been combined, this works as if the Blocks
- * were in a single Stream. This is useful if you are going to combine
- * Blocks from multiple Streams into a single new Stream.
- */
-extern LZMA_API(lzma_vli) lzma_index_stream_size(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Get the total size of the Blocks
- *
- * This doesn't include the Stream Header, Stream Footer, Stream Padding,
- * or Index fields.
- */
-extern LZMA_API(lzma_vli) lzma_index_total_size(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Get the total size of the file
- *
- * When no lzma_indexes have been combined with lzma_index_cat() and there is
- * no Stream Padding, this function is identical to lzma_index_stream_size().
- * If multiple lzma_indexes have been combined, this includes also the headers
- * of each separate Stream and the possible Stream Padding fields.
- */
-extern LZMA_API(lzma_vli) lzma_index_file_size(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Get the uncompressed size of the file
- */
-extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Initialize an iterator
- *
- * \param       iter    Pointer to a lzma_index_iter structure
- * \param       i       lzma_index to which the iterator will be associated
- *
- * This function associates the iterator with the given lzma_index, and calls
- * lzma_index_iter_rewind() on the iterator.
- *
- * This function doesn't allocate any memory, thus there is no
- * lzma_index_iter_end(). The iterator is valid as long as the
- * associated lzma_index is valid, that is, until lzma_index_end() or
- * using it as source in lzma_index_cat(). Specifically, lzma_index doesn't
- * become invalid if new Blocks are added to it with lzma_index_append() or
- * if it is used as the destination in lzma_index_cat().
- *
- * It is safe to make copies of an initialized lzma_index_iter, for example,
- * to easily restart reading at some particular position.
- */
-extern LZMA_API(void) lzma_index_iter_init(
-		lzma_index_iter *iter, const lzma_index *i) lzma_nothrow;
-
-
-/**
- * \brief       Rewind the iterator
- *
- * Rewind the iterator so that next call to lzma_index_iter_next() will
- * return the first Block or Stream.
- */
-extern LZMA_API(void) lzma_index_iter_rewind(lzma_index_iter *iter)
-		lzma_nothrow;
-
-
-/**
- * \brief       Get the next Block or Stream
- *
- * \param       iter    Iterator initialized with lzma_index_iter_init()
- * \param       mode    Specify what kind of information the caller wants
- *                      to get. See lzma_index_iter_mode for details.
- *
- * \return      If next Block or Stream matching the mode was found, *iter
- *              is updated and this function returns false. If no Block or
- *              Stream matching the mode is found, *iter is not modified
- *              and this function returns true. If mode is set to an unknown
- *              value, *iter is not modified and this function returns true.
- */
-extern LZMA_API(lzma_bool) lzma_index_iter_next(
-		lzma_index_iter *iter, lzma_index_iter_mode mode)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Locate a Block
- *
- * If it is possible to seek in the .xz file, it is possible to parse
- * the Index field(s) and use lzma_index_iter_locate() to do random-access
- * reading with granularity of Block size.
- *
- * \param       iter    Iterator that was earlier initialized with
- *                      lzma_index_iter_init().
- * \param       target  Uncompressed target offset which the caller would
- *                      like to locate from the Stream
- *
- * If the target is smaller than the uncompressed size of the Stream (can be
- * checked with lzma_index_uncompressed_size()):
- *  - Information about the Stream and Block containing the requested
- *    uncompressed offset is stored into *iter.
- *  - Internal state of the iterator is adjusted so that
- *    lzma_index_iter_next() can be used to read subsequent Blocks or Streams.
- *  - This function returns false.
- *
- * If target is greater than the uncompressed size of the Stream, *iter
- * is not modified, and this function returns true.
- */
-extern LZMA_API(lzma_bool) lzma_index_iter_locate(
-		lzma_index_iter *iter, lzma_vli target) lzma_nothrow;
-
-
-/**
- * \brief       Concatenate lzma_indexes
- *
- * Concatenating lzma_indexes is useful when doing random-access reading in
- * multi-Stream .xz file, or when combining multiple Streams into single
- * Stream.
- *
- * \param       dest      lzma_index after which src is appended
- * \param       src       lzma_index to be appended after dest. If this
- *                        function succeeds, the memory allocated for src
- *                        is freed or moved to be part of dest, and all
- *                        iterators pointing to src will become invalid.
- * \param       allocator Custom memory allocator; can be NULL to use
- *                        malloc() and free().
- *
- * \return      - LZMA_OK: lzma_indexes were concatenated successfully.
- *                src is now a dangling pointer.
- *              - LZMA_DATA_ERROR: *dest would grow too big.
- *              - LZMA_MEM_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_cat(
-		lzma_index *dest, lzma_index *src, lzma_allocator *allocator)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Duplicate lzma_index
- *
- * \return      A copy of the lzma_index, or NULL if memory allocation failed.
- */
-extern LZMA_API(lzma_index *) lzma_index_dup(
-		const lzma_index *i, lzma_allocator *allocator)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Initialize .xz Index encoder
- *
- * \param       strm        Pointer to properly prepared lzma_stream
- * \param       i           Pointer to lzma_index which should be encoded.
- *
- * The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH.
- * It is enough to use only one of them (you can choose freely; use LZMA_RUN
- * to support liblzma versions older than 5.0.0).
- *
- * \return      - LZMA_OK: Initialization succeeded, continue with lzma_code().
- *              - LZMA_MEM_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_encoder(
-		lzma_stream *strm, const lzma_index *i)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Initialize .xz Index decoder
- *
- * \param       strm        Pointer to properly prepared lzma_stream
- * \param       i           The decoded Index will be made available via
- *                          this pointer. Initially this function will
- *                          set *i to NULL (the old value is ignored). If
- *                          decoding succeeds (lzma_code() returns
- *                          LZMA_STREAM_END), *i will be set to point
- *                          to a new lzma_index, which the application
- *                          has to later free with lzma_index_end().
- * \param       memlimit    How much memory the resulting lzma_index is
- *                          allowed to require.
- *
- * The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH.
- * It is enough to use only one of them (you can choose freely; use LZMA_RUN
- * to support liblzma versions older than 5.0.0).
- *
- * \return      - LZMA_OK: Initialization succeeded, continue with lzma_code().
- *              - LZMA_MEM_ERROR
- *              - LZMA_MEMLIMIT_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_decoder(
-		lzma_stream *strm, lzma_index **i, uint64_t memlimit)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Single-call .xz Index encoder
- *
- * \param       i         lzma_index to be encoded
- * \param       out       Beginning of the output buffer
- * \param       out_pos   The next byte will be written to out[*out_pos].
- *                        *out_pos is updated only if encoding succeeds.
- * \param       out_size  Size of the out buffer; the first byte into
- *                        which no data is written to is out[out_size].
- *
- * \return      - LZMA_OK: Encoding was successful.
- *              - LZMA_BUF_ERROR: Output buffer is too small. Use
- *                lzma_index_size() to find out how much output
- *                space is needed.
- *              - LZMA_PROG_ERROR
- *
- * \note        This function doesn't take allocator argument since all
- *              the internal data is allocated on stack.
- */
-extern LZMA_API(lzma_ret) lzma_index_buffer_encode(const lzma_index *i,
-		uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
-
-
-/**
- * \brief       Single-call .xz Index decoder
- *
- * \param       i           If decoding succeeds, *i will point to a new
- *                          lzma_index, which the application has to
- *                          later free with lzma_index_end(). If an error
- *                          occurs, *i will be NULL. The old value of *i
- *                          is always ignored and thus doesn't need to be
- *                          initialized by the caller.
- * \param       memlimit    Pointer to how much memory the resulting
- *                          lzma_index is allowed to require. The value
- *                          pointed by this pointer is modified if and only
- *                          if LZMA_MEMLIMIT_ERROR is returned.
- * \param       allocator   Pointer to lzma_allocator, or NULL to use malloc()
- * \param       in          Beginning of the input buffer
- * \param       in_pos      The next byte will be read from in[*in_pos].
- *                          *in_pos is updated only if decoding succeeds.
- * \param       in_size     Size of the input buffer; the first byte that
- *                          won't be read is in[in_size].
- *
- * \return      - LZMA_OK: Decoding was successful.
- *              - LZMA_MEM_ERROR
- *              - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.
- *                The minimum required memlimit value was stored to *memlimit.
- *              - LZMA_DATA_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_buffer_decode(lzma_index **i,
-		uint64_t *memlimit, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size)
-		lzma_nothrow;

Copied: vendor/xz/5.2.3/src/liblzma/api/lzma/index.h (from rev 9176, vendor/xz/dist/src/liblzma/api/lzma/index.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/api/lzma/index.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/index.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,682 @@
+/**
+ * \file        lzma/index.h
+ * \brief       Handling of .xz Index and related information
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ *
+ * See ../lzma.h for information about liblzma as a whole.
+ */
+
+#ifndef LZMA_H_INTERNAL
+#	error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief       Opaque data type to hold the Index(es) and other information
+ *
+ * lzma_index often holds just one .xz Index and possibly the Stream Flags
+ * of the same Stream and size of the Stream Padding field. However,
+ * multiple lzma_indexes can be concatenated with lzma_index_cat() and then
+ * there may be information about multiple Streams in the same lzma_index.
+ *
+ * Notes about thread safety: Only one thread may modify lzma_index at
+ * a time. All functions that take non-const pointer to lzma_index
+ * modify it. As long as no thread is modifying the lzma_index, getting
+ * information from the same lzma_index can be done from multiple threads
+ * at the same time with functions that take a const pointer to
+ * lzma_index or use lzma_index_iter. The same iterator must be used
+ * only by one thread at a time, of course, but there can be as many
+ * iterators for the same lzma_index as needed.
+ */
+typedef struct lzma_index_s lzma_index;
+
+
+/**
+ * \brief       Iterator to get information about Blocks and Streams
+ */
+typedef struct {
+	struct {
+		/**
+		 * \brief       Pointer to Stream Flags
+		 *
+		 * This is NULL if Stream Flags have not been set for
+		 * this Stream with lzma_index_stream_flags().
+		 */
+		const lzma_stream_flags *flags;
+
+		const void *reserved_ptr1;
+		const void *reserved_ptr2;
+		const void *reserved_ptr3;
+
+		/**
+		 * \brief       Stream number in the lzma_index
+		 *
+		 * The first Stream is 1.
+		 */
+		lzma_vli number;
+
+		/**
+		 * \brief       Number of Blocks in the Stream
+		 *
+		 * If this is zero, the block structure below has
+		 * undefined values.
+		 */
+		lzma_vli block_count;
+
+		/**
+		 * \brief       Compressed start offset of this Stream
+		 *
+		 * The offset is relative to the beginning of the lzma_index
+		 * (i.e. usually the beginning of the .xz file).
+		 */
+		lzma_vli compressed_offset;
+
+		/**
+		 * \brief       Uncompressed start offset of this Stream
+		 *
+		 * The offset is relative to the beginning of the lzma_index
+		 * (i.e. usually the beginning of the .xz file).
+		 */
+		lzma_vli uncompressed_offset;
+
+		/**
+		 * \brief       Compressed size of this Stream
+		 *
+		 * This includes all headers except the possible
+		 * Stream Padding after this Stream.
+		 */
+		lzma_vli compressed_size;
+
+		/**
+		 * \brief       Uncompressed size of this Stream
+		 */
+		lzma_vli uncompressed_size;
+
+		/**
+		 * \brief       Size of Stream Padding after this Stream
+		 *
+		 * If it hasn't been set with lzma_index_stream_padding(),
+		 * this defaults to zero. Stream Padding is always
+		 * a multiple of four bytes.
+		 */
+		lzma_vli padding;
+
+		lzma_vli reserved_vli1;
+		lzma_vli reserved_vli2;
+		lzma_vli reserved_vli3;
+		lzma_vli reserved_vli4;
+	} stream;
+
+	struct {
+		/**
+		 * \brief       Block number in the file
+		 *
+		 * The first Block is 1.
+		 */
+		lzma_vli number_in_file;
+
+		/**
+		 * \brief       Compressed start offset of this Block
+		 *
+		 * This offset is relative to the beginning of the
+		 * lzma_index (i.e. usually the beginning of the .xz file).
+		 * Normally this is where you should seek in the .xz file
+		 * to start decompressing this Block.
+		 */
+		lzma_vli compressed_file_offset;
+
+		/**
+		 * \brief       Uncompressed start offset of this Block
+		 *
+		 * This offset is relative to the beginning of the lzma_index
+		 * (i.e. usually the beginning of the .xz file).
+		 *
+		 * When doing random-access reading, it is possible that
+		 * the target offset is not exactly at Block boundary. One
+		 * will need to compare the target offset against
+		 * uncompressed_file_offset or uncompressed_stream_offset,
+		 * and possibly decode and throw away some amount of data
+		 * before reaching the target offset.
+		 */
+		lzma_vli uncompressed_file_offset;
+
+		/**
+		 * \brief       Block number in this Stream
+		 *
+		 * The first Block is 1.
+		 */
+		lzma_vli number_in_stream;
+
+		/**
+		 * \brief       Compressed start offset of this Block
+		 *
+		 * This offset is relative to the beginning of the Stream
+		 * containing this Block.
+		 */
+		lzma_vli compressed_stream_offset;
+
+		/**
+		 * \brief       Uncompressed start offset of this Block
+		 *
+		 * This offset is relative to the beginning of the Stream
+		 * containing this Block.
+		 */
+		lzma_vli uncompressed_stream_offset;
+
+		/**
+		 * \brief       Uncompressed size of this Block
+		 *
+		 * You should pass this to the Block decoder if you will
+		 * decode this Block. It will allow the Block decoder to
+		 * validate the uncompressed size.
+		 */
+		lzma_vli uncompressed_size;
+
+		/**
+		 * \brief       Unpadded size of this Block
+		 *
+		 * You should pass this to the Block decoder if you will
+		 * decode this Block. It will allow the Block decoder to
+		 * validate the unpadded size.
+		 */
+		lzma_vli unpadded_size;
+
+		/**
+		 * \brief       Total compressed size
+		 *
+		 * This includes all headers and padding in this Block.
+		 * This is useful if you need to know how many bytes
+		 * the Block decoder will actually read.
+		 */
+		lzma_vli total_size;
+
+		lzma_vli reserved_vli1;
+		lzma_vli reserved_vli2;
+		lzma_vli reserved_vli3;
+		lzma_vli reserved_vli4;
+
+		const void *reserved_ptr1;
+		const void *reserved_ptr2;
+		const void *reserved_ptr3;
+		const void *reserved_ptr4;
+	} block;
+
+	/*
+	 * Internal data which is used to store the state of the iterator.
+	 * The exact format may vary between liblzma versions, so don't
+	 * touch these in any way.
+	 */
+	union {
+		const void *p;
+		size_t s;
+		lzma_vli v;
+	} internal[6];
+} lzma_index_iter;
+
+
+/**
+ * \brief       Operation mode for lzma_index_iter_next()
+ */
+typedef enum {
+	LZMA_INDEX_ITER_ANY             = 0,
+		/**<
+		 * \brief       Get the next Block or Stream
+		 *
+		 * Go to the next Block if the current Stream has at least
+		 * one Block left. Otherwise go to the next Stream even if
+		 * it has no Blocks. If the Stream has no Blocks
+		 * (lzma_index_iter.stream.block_count == 0),
+		 * lzma_index_iter.block will have undefined values.
+		 */
+
+	LZMA_INDEX_ITER_STREAM          = 1,
+		/**<
+		 * \brief       Get the next Stream
+		 *
+		 * Go to the next Stream even if the current Stream has
+		 * unread Blocks left. If the next Stream has at least one
+		 * Block, the iterator will point to the first Block.
+		 * If there are no Blocks, lzma_index_iter.block will have
+		 * undefined values.
+		 */
+
+	LZMA_INDEX_ITER_BLOCK           = 2,
+		/**<
+		 * \brief       Get the next Block
+		 *
+		 * Go to the next Block if the current Stream has at least
+		 * one Block left. If the current Stream has no Blocks left,
+		 * the next Stream with at least one Block is located and
+		 * the iterator will be made to point to the first Block of
+		 * that Stream.
+		 */
+
+	LZMA_INDEX_ITER_NONEMPTY_BLOCK  = 3
+		/**<
+		 * \brief       Get the next non-empty Block
+		 *
+		 * This is like LZMA_INDEX_ITER_BLOCK except that it will
+		 * skip Blocks whose Uncompressed Size is zero.
+		 */
+
+} lzma_index_iter_mode;
+
+
+/**
+ * \brief       Calculate memory usage of lzma_index
+ *
+ * On disk, the size of the Index field depends on both the number of Records
+ * stored and how big values the Records store (due to variable-length integer
+ * encoding). When the Index is kept in lzma_index structure, the memory usage
+ * depends only on the number of Records/Blocks stored in the Index(es), and
+ * in case of concatenated lzma_indexes, the number of Streams. The size in
+ * RAM is almost always significantly bigger than in the encoded form on disk.
+ *
+ * This function calculates an approximate amount of memory needed hold
+ * the given number of Streams and Blocks in lzma_index structure. This
+ * value may vary between CPU architectures and also between liblzma versions
+ * if the internal implementation is modified.
+ */
+extern LZMA_API(uint64_t) lzma_index_memusage(
+		lzma_vli streams, lzma_vli blocks) lzma_nothrow;
+
+
+/**
+ * \brief       Calculate the memory usage of an existing lzma_index
+ *
+ * This is a shorthand for lzma_index_memusage(lzma_index_stream_count(i),
+ * lzma_index_block_count(i)).
+ */
+extern LZMA_API(uint64_t) lzma_index_memused(const lzma_index *i)
+		lzma_nothrow;
+
+
+/**
+ * \brief       Allocate and initialize a new lzma_index structure
+ *
+ * \return      On success, a pointer to an empty initialized lzma_index is
+ *              returned. If allocation fails, NULL is returned.
+ */
+extern LZMA_API(lzma_index *) lzma_index_init(const lzma_allocator *allocator)
+		lzma_nothrow;
+
+
+/**
+ * \brief       Deallocate lzma_index
+ *
+ * If i is NULL, this does nothing.
+ */
+extern LZMA_API(void) lzma_index_end(
+		lzma_index *i, const lzma_allocator *allocator) lzma_nothrow;
+
+
+/**
+ * \brief       Add a new Block to lzma_index
+ *
+ * \param       i                 Pointer to a lzma_index structure
+ * \param       allocator         Pointer to lzma_allocator, or NULL to
+ *                                use malloc()
+ * \param       unpadded_size     Unpadded Size of a Block. This can be
+ *                                calculated with lzma_block_unpadded_size()
+ *                                after encoding or decoding the Block.
+ * \param       uncompressed_size Uncompressed Size of a Block. This can be
+ *                                taken directly from lzma_block structure
+ *                                after encoding or decoding the Block.
+ *
+ * Appending a new Block does not invalidate iterators. For example,
+ * if an iterator was pointing to the end of the lzma_index, after
+ * lzma_index_append() it is possible to read the next Block with
+ * an existing iterator.
+ *
+ * \return      - LZMA_OK
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_DATA_ERROR: Compressed or uncompressed size of the
+ *                Stream or size of the Index field would grow too big.
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_append(
+		lzma_index *i, const lzma_allocator *allocator,
+		lzma_vli unpadded_size, lzma_vli uncompressed_size)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Set the Stream Flags
+ *
+ * Set the Stream Flags of the last (and typically the only) Stream
+ * in lzma_index. This can be useful when reading information from the
+ * lzma_index, because to decode Blocks, knowing the integrity check type
+ * is needed.
+ *
+ * The given Stream Flags are copied into internal preallocated structure
+ * in the lzma_index, thus the caller doesn't need to keep the *stream_flags
+ * available after calling this function.
+ *
+ * \return      - LZMA_OK
+ *              - LZMA_OPTIONS_ERROR: Unsupported stream_flags->version.
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_stream_flags(
+		lzma_index *i, const lzma_stream_flags *stream_flags)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Get the types of integrity Checks
+ *
+ * If lzma_index_stream_flags() is used to set the Stream Flags for
+ * every Stream, lzma_index_checks() can be used to get a bitmask to
+ * indicate which Check types have been used. It can be useful e.g. if
+ * showing the Check types to the user.
+ *
+ * The bitmask is 1 << check_id, e.g. CRC32 is 1 << 1 and SHA-256 is 1 << 10.
+ */
+extern LZMA_API(uint32_t) lzma_index_checks(const lzma_index *i)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Set the amount of Stream Padding
+ *
+ * Set the amount of Stream Padding of the last (and typically the only)
+ * Stream in the lzma_index. This is needed when planning to do random-access
+ * reading within multiple concatenated Streams.
+ *
+ * By default, the amount of Stream Padding is assumed to be zero bytes.
+ *
+ * \return      - LZMA_OK
+ *              - LZMA_DATA_ERROR: The file size would grow too big.
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_stream_padding(
+		lzma_index *i, lzma_vli stream_padding)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Get the number of Streams
+ */
+extern LZMA_API(lzma_vli) lzma_index_stream_count(const lzma_index *i)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Get the number of Blocks
+ *
+ * This returns the total number of Blocks in lzma_index. To get number
+ * of Blocks in individual Streams, use lzma_index_iter.
+ */
+extern LZMA_API(lzma_vli) lzma_index_block_count(const lzma_index *i)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Get the size of the Index field as bytes
+ *
+ * This is needed to verify the Backward Size field in the Stream Footer.
+ */
+extern LZMA_API(lzma_vli) lzma_index_size(const lzma_index *i)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Get the total size of the Stream
+ *
+ * If multiple lzma_indexes have been combined, this works as if the Blocks
+ * were in a single Stream. This is useful if you are going to combine
+ * Blocks from multiple Streams into a single new Stream.
+ */
+extern LZMA_API(lzma_vli) lzma_index_stream_size(const lzma_index *i)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Get the total size of the Blocks
+ *
+ * This doesn't include the Stream Header, Stream Footer, Stream Padding,
+ * or Index fields.
+ */
+extern LZMA_API(lzma_vli) lzma_index_total_size(const lzma_index *i)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Get the total size of the file
+ *
+ * When no lzma_indexes have been combined with lzma_index_cat() and there is
+ * no Stream Padding, this function is identical to lzma_index_stream_size().
+ * If multiple lzma_indexes have been combined, this includes also the headers
+ * of each separate Stream and the possible Stream Padding fields.
+ */
+extern LZMA_API(lzma_vli) lzma_index_file_size(const lzma_index *i)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Get the uncompressed size of the file
+ */
+extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i)
+		lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief       Initialize an iterator
+ *
+ * \param       iter    Pointer to a lzma_index_iter structure
+ * \param       i       lzma_index to which the iterator will be associated
+ *
+ * This function associates the iterator with the given lzma_index, and calls
+ * lzma_index_iter_rewind() on the iterator.
+ *
+ * This function doesn't allocate any memory, thus there is no
+ * lzma_index_iter_end(). The iterator is valid as long as the
+ * associated lzma_index is valid, that is, until lzma_index_end() or
+ * using it as source in lzma_index_cat(). Specifically, lzma_index doesn't
+ * become invalid if new Blocks are added to it with lzma_index_append() or
+ * if it is used as the destination in lzma_index_cat().
+ *
+ * It is safe to make copies of an initialized lzma_index_iter, for example,
+ * to easily restart reading at some particular position.
+ */
+extern LZMA_API(void) lzma_index_iter_init(
+		lzma_index_iter *iter, const lzma_index *i) lzma_nothrow;
+
+
+/**
+ * \brief       Rewind the iterator
+ *
+ * Rewind the iterator so that next call to lzma_index_iter_next() will
+ * return the first Block or Stream.
+ */
+extern LZMA_API(void) lzma_index_iter_rewind(lzma_index_iter *iter)
+		lzma_nothrow;
+
+
+/**
+ * \brief       Get the next Block or Stream
+ *
+ * \param       iter    Iterator initialized with lzma_index_iter_init()
+ * \param       mode    Specify what kind of information the caller wants
+ *                      to get. See lzma_index_iter_mode for details.
+ *
+ * \return      If next Block or Stream matching the mode was found, *iter
+ *              is updated and this function returns false. If no Block or
+ *              Stream matching the mode is found, *iter is not modified
+ *              and this function returns true. If mode is set to an unknown
+ *              value, *iter is not modified and this function returns true.
+ */
+extern LZMA_API(lzma_bool) lzma_index_iter_next(
+		lzma_index_iter *iter, lzma_index_iter_mode mode)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Locate a Block
+ *
+ * If it is possible to seek in the .xz file, it is possible to parse
+ * the Index field(s) and use lzma_index_iter_locate() to do random-access
+ * reading with granularity of Block size.
+ *
+ * \param       iter    Iterator that was earlier initialized with
+ *                      lzma_index_iter_init().
+ * \param       target  Uncompressed target offset which the caller would
+ *                      like to locate from the Stream
+ *
+ * If the target is smaller than the uncompressed size of the Stream (can be
+ * checked with lzma_index_uncompressed_size()):
+ *  - Information about the Stream and Block containing the requested
+ *    uncompressed offset is stored into *iter.
+ *  - Internal state of the iterator is adjusted so that
+ *    lzma_index_iter_next() can be used to read subsequent Blocks or Streams.
+ *  - This function returns false.
+ *
+ * If target is greater than the uncompressed size of the Stream, *iter
+ * is not modified, and this function returns true.
+ */
+extern LZMA_API(lzma_bool) lzma_index_iter_locate(
+		lzma_index_iter *iter, lzma_vli target) lzma_nothrow;
+
+
+/**
+ * \brief       Concatenate lzma_indexes
+ *
+ * Concatenating lzma_indexes is useful when doing random-access reading in
+ * multi-Stream .xz file, or when combining multiple Streams into single
+ * Stream.
+ *
+ * \param       dest      lzma_index after which src is appended
+ * \param       src       lzma_index to be appended after dest. If this
+ *                        function succeeds, the memory allocated for src
+ *                        is freed or moved to be part of dest, and all
+ *                        iterators pointing to src will become invalid.
+ * \param       allocator Custom memory allocator; can be NULL to use
+ *                        malloc() and free().
+ *
+ * \return      - LZMA_OK: lzma_indexes were concatenated successfully.
+ *                src is now a dangling pointer.
+ *              - LZMA_DATA_ERROR: *dest would grow too big.
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_cat(lzma_index *dest, lzma_index *src,
+		const lzma_allocator *allocator)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Duplicate lzma_index
+ *
+ * \return      A copy of the lzma_index, or NULL if memory allocation failed.
+ */
+extern LZMA_API(lzma_index *) lzma_index_dup(
+		const lzma_index *i, const lzma_allocator *allocator)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Initialize .xz Index encoder
+ *
+ * \param       strm        Pointer to properly prepared lzma_stream
+ * \param       i           Pointer to lzma_index which should be encoded.
+ *
+ * The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH.
+ * It is enough to use only one of them (you can choose freely; use LZMA_RUN
+ * to support liblzma versions older than 5.0.0).
+ *
+ * \return      - LZMA_OK: Initialization succeeded, continue with lzma_code().
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_encoder(
+		lzma_stream *strm, const lzma_index *i)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Initialize .xz Index decoder
+ *
+ * \param       strm        Pointer to properly prepared lzma_stream
+ * \param       i           The decoded Index will be made available via
+ *                          this pointer. Initially this function will
+ *                          set *i to NULL (the old value is ignored). If
+ *                          decoding succeeds (lzma_code() returns
+ *                          LZMA_STREAM_END), *i will be set to point
+ *                          to a new lzma_index, which the application
+ *                          has to later free with lzma_index_end().
+ * \param       memlimit    How much memory the resulting lzma_index is
+ *                          allowed to require.
+ *
+ * The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH.
+ * It is enough to use only one of them (you can choose freely; use LZMA_RUN
+ * to support liblzma versions older than 5.0.0).
+ *
+ * \return      - LZMA_OK: Initialization succeeded, continue with lzma_code().
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_MEMLIMIT_ERROR
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_decoder(
+		lzma_stream *strm, lzma_index **i, uint64_t memlimit)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Single-call .xz Index encoder
+ *
+ * \param       i         lzma_index to be encoded
+ * \param       out       Beginning of the output buffer
+ * \param       out_pos   The next byte will be written to out[*out_pos].
+ *                        *out_pos is updated only if encoding succeeds.
+ * \param       out_size  Size of the out buffer; the first byte into
+ *                        which no data is written to is out[out_size].
+ *
+ * \return      - LZMA_OK: Encoding was successful.
+ *              - LZMA_BUF_ERROR: Output buffer is too small. Use
+ *                lzma_index_size() to find out how much output
+ *                space is needed.
+ *              - LZMA_PROG_ERROR
+ *
+ * \note        This function doesn't take allocator argument since all
+ *              the internal data is allocated on stack.
+ */
+extern LZMA_API(lzma_ret) lzma_index_buffer_encode(const lzma_index *i,
+		uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
+
+
+/**
+ * \brief       Single-call .xz Index decoder
+ *
+ * \param       i           If decoding succeeds, *i will point to a new
+ *                          lzma_index, which the application has to
+ *                          later free with lzma_index_end(). If an error
+ *                          occurs, *i will be NULL. The old value of *i
+ *                          is always ignored and thus doesn't need to be
+ *                          initialized by the caller.
+ * \param       memlimit    Pointer to how much memory the resulting
+ *                          lzma_index is allowed to require. The value
+ *                          pointed by this pointer is modified if and only
+ *                          if LZMA_MEMLIMIT_ERROR is returned.
+ * \param       allocator   Pointer to lzma_allocator, or NULL to use malloc()
+ * \param       in          Beginning of the input buffer
+ * \param       in_pos      The next byte will be read from in[*in_pos].
+ *                          *in_pos is updated only if decoding succeeds.
+ * \param       in_size     Size of the input buffer; the first byte that
+ *                          won't be read is in[in_size].
+ *
+ * \return      - LZMA_OK: Decoding was successful.
+ *              - LZMA_MEM_ERROR
+ *              - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.
+ *                The minimum required memlimit value was stored to *memlimit.
+ *              - LZMA_DATA_ERROR
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_buffer_decode(lzma_index **i,
+		uint64_t *memlimit, const lzma_allocator *allocator,
+		const uint8_t *in, size_t *in_pos, size_t in_size)
+		lzma_nothrow;

Deleted: vendor/xz/5.2.3/src/liblzma/api/lzma/index_hash.h
===================================================================
--- vendor/xz/dist/src/liblzma/api/lzma/index_hash.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/index_hash.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,107 +0,0 @@
-/**
- * \file        lzma/index_hash.h
- * \brief       Validate Index by using a hash function
- *
- * Hashing makes it possible to use constant amount of memory to validate
- * Index of arbitrary size.
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-/**
- * \brief       Opaque data type to hold the Index hash
- */
-typedef struct lzma_index_hash_s lzma_index_hash;
-
-
-/**
- * \brief       Allocate and initialize a new lzma_index_hash structure
- *
- * If index_hash is NULL, a new lzma_index_hash structure is allocated,
- * initialized, and a pointer to it returned. If allocation fails, NULL
- * is returned.
- *
- * If index_hash is non-NULL, it is reinitialized and the same pointer
- * returned. In this case, return value cannot be NULL or a different
- * pointer than the index_hash that was given as an argument.
- */
-extern LZMA_API(lzma_index_hash *) lzma_index_hash_init(
-		lzma_index_hash *index_hash, lzma_allocator *allocator)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Deallocate lzma_index_hash structure
- */
-extern LZMA_API(void) lzma_index_hash_end(
-		lzma_index_hash *index_hash, lzma_allocator *allocator)
-		lzma_nothrow;
-
-
-/**
- * \brief       Add a new Record to an Index hash
- *
- * \param       index             Pointer to a lzma_index_hash structure
- * \param       unpadded_size     Unpadded Size of a Block
- * \param       uncompressed_size Uncompressed Size of a Block
- *
- * \return      - LZMA_OK
- *              - LZMA_DATA_ERROR: Compressed or uncompressed size of the
- *                Stream or size of the Index field would grow too big.
- *              - LZMA_PROG_ERROR: Invalid arguments or this function is being
- *                used when lzma_index_hash_decode() has already been used.
- */
-extern LZMA_API(lzma_ret) lzma_index_hash_append(lzma_index_hash *index_hash,
-		lzma_vli unpadded_size, lzma_vli uncompressed_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Decode and validate the Index field
- *
- * After telling the sizes of all Blocks with lzma_index_hash_append(),
- * the actual Index field is decoded with this function. Specifically,
- * once decoding of the Index field has been started, no more Records
- * can be added using lzma_index_hash_append().
- *
- * This function doesn't use lzma_stream structure to pass the input data.
- * Instead, the input buffer is specified using three arguments. This is
- * because it matches better the internal APIs of liblzma.
- *
- * \param       index_hash      Pointer to a lzma_index_hash structure
- * \param       in              Pointer to the beginning of the input buffer
- * \param       in_pos          in[*in_pos] is the next byte to process
- * \param       in_size         in[in_size] is the first byte not to process
- *
- * \return      - LZMA_OK: So far good, but more input is needed.
- *              - LZMA_STREAM_END: Index decoded successfully and it matches
- *                the Records given with lzma_index_hash_append().
- *              - LZMA_DATA_ERROR: Index is corrupt or doesn't match the
- *                information given with lzma_index_hash_append().
- *              - LZMA_BUF_ERROR: Cannot progress because *in_pos >= in_size.
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_hash_decode(lzma_index_hash *index_hash,
-		const uint8_t *in, size_t *in_pos, size_t in_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Get the size of the Index field as bytes
- *
- * This is needed to verify the Backward Size field in the Stream Footer.
- */
-extern LZMA_API(lzma_vli) lzma_index_hash_size(
-		const lzma_index_hash *index_hash)
-		lzma_nothrow lzma_attr_pure;

Copied: vendor/xz/5.2.3/src/liblzma/api/lzma/index_hash.h (from rev 9176, vendor/xz/dist/src/liblzma/api/lzma/index_hash.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/api/lzma/index_hash.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/index_hash.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,107 @@
+/**
+ * \file        lzma/index_hash.h
+ * \brief       Validate Index by using a hash function
+ *
+ * Hashing makes it possible to use constant amount of memory to validate
+ * Index of arbitrary size.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ *
+ * See ../lzma.h for information about liblzma as a whole.
+ */
+
+#ifndef LZMA_H_INTERNAL
+#	error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+/**
+ * \brief       Opaque data type to hold the Index hash
+ */
+typedef struct lzma_index_hash_s lzma_index_hash;
+
+
+/**
+ * \brief       Allocate and initialize a new lzma_index_hash structure
+ *
+ * If index_hash is NULL, a new lzma_index_hash structure is allocated,
+ * initialized, and a pointer to it returned. If allocation fails, NULL
+ * is returned.
+ *
+ * If index_hash is non-NULL, it is reinitialized and the same pointer
+ * returned. In this case, return value cannot be NULL or a different
+ * pointer than the index_hash that was given as an argument.
+ */
+extern LZMA_API(lzma_index_hash *) lzma_index_hash_init(
+		lzma_index_hash *index_hash, const lzma_allocator *allocator)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Deallocate lzma_index_hash structure
+ */
+extern LZMA_API(void) lzma_index_hash_end(
+		lzma_index_hash *index_hash, const lzma_allocator *allocator)
+		lzma_nothrow;
+
+
+/**
+ * \brief       Add a new Record to an Index hash
+ *
+ * \param       index             Pointer to a lzma_index_hash structure
+ * \param       unpadded_size     Unpadded Size of a Block
+ * \param       uncompressed_size Uncompressed Size of a Block
+ *
+ * \return      - LZMA_OK
+ *              - LZMA_DATA_ERROR: Compressed or uncompressed size of the
+ *                Stream or size of the Index field would grow too big.
+ *              - LZMA_PROG_ERROR: Invalid arguments or this function is being
+ *                used when lzma_index_hash_decode() has already been used.
+ */
+extern LZMA_API(lzma_ret) lzma_index_hash_append(lzma_index_hash *index_hash,
+		lzma_vli unpadded_size, lzma_vli uncompressed_size)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Decode and validate the Index field
+ *
+ * After telling the sizes of all Blocks with lzma_index_hash_append(),
+ * the actual Index field is decoded with this function. Specifically,
+ * once decoding of the Index field has been started, no more Records
+ * can be added using lzma_index_hash_append().
+ *
+ * This function doesn't use lzma_stream structure to pass the input data.
+ * Instead, the input buffer is specified using three arguments. This is
+ * because it matches better the internal APIs of liblzma.
+ *
+ * \param       index_hash      Pointer to a lzma_index_hash structure
+ * \param       in              Pointer to the beginning of the input buffer
+ * \param       in_pos          in[*in_pos] is the next byte to process
+ * \param       in_size         in[in_size] is the first byte not to process
+ *
+ * \return      - LZMA_OK: So far good, but more input is needed.
+ *              - LZMA_STREAM_END: Index decoded successfully and it matches
+ *                the Records given with lzma_index_hash_append().
+ *              - LZMA_DATA_ERROR: Index is corrupt or doesn't match the
+ *                information given with lzma_index_hash_append().
+ *              - LZMA_BUF_ERROR: Cannot progress because *in_pos >= in_size.
+ *              - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_hash_decode(lzma_index_hash *index_hash,
+		const uint8_t *in, size_t *in_pos, size_t in_size)
+		lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief       Get the size of the Index field as bytes
+ *
+ * This is needed to verify the Backward Size field in the Stream Footer.
+ */
+extern LZMA_API(lzma_vli) lzma_index_hash_size(
+		const lzma_index_hash *index_hash)
+		lzma_nothrow lzma_attr_pure;

Deleted: vendor/xz/5.2.3/src/liblzma/api/lzma/lzma.h
===================================================================
--- vendor/xz/dist/src/liblzma/api/lzma/lzma.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/lzma.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,420 +0,0 @@
-/**
- * \file        lzma/lzma.h
- * \brief       LZMA1 and LZMA2 filters
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       LZMA1 Filter ID
- *
- * LZMA1 is the very same thing as what was called just LZMA in LZMA Utils,
- * 7-Zip, and LZMA SDK. It's called LZMA1 here to prevent developers from
- * accidentally using LZMA when they actually want LZMA2.
- *
- * LZMA1 shouldn't be used for new applications unless you _really_ know
- * what you are doing. LZMA2 is almost always a better choice.
- */
-#define LZMA_FILTER_LZMA1       LZMA_VLI_C(0x4000000000000001)
-
-/**
- * \brief       LZMA2 Filter ID
- *
- * Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds
- * support for LZMA_SYNC_FLUSH, uncompressed chunks (smaller expansion
- * when trying to compress uncompressible data), possibility to change
- * lc/lp/pb in the middle of encoding, and some other internal improvements.
- */
-#define LZMA_FILTER_LZMA2       LZMA_VLI_C(0x21)
-
-
-/**
- * \brief       Match finders
- *
- * Match finder has major effect on both speed and compression ratio.
- * Usually hash chains are faster than binary trees.
- *
- * If you will use LZMA_SYNC_FLUSH often, the hash chains may be a better
- * choice, because binary trees get much higher compression ratio penalty
- * with LZMA_SYNC_FLUSH.
- *
- * The memory usage formulas are only rough estimates, which are closest to
- * reality when dict_size is a power of two. The formulas are  more complex
- * in reality, and can also change a little between liblzma versions. Use
- * lzma_raw_encoder_memusage() to get more accurate estimate of memory usage.
- */
-typedef enum {
-	LZMA_MF_HC3     = 0x03,
-		/**<
-		 * \brief       Hash Chain with 2- and 3-byte hashing
-		 *
-		 * Minimum nice_len: 3
-		 *
-		 * Memory usage:
-		 *  - dict_size <= 16 MiB: dict_size * 7.5
-		 *  - dict_size > 16 MiB: dict_size * 5.5 + 64 MiB
-		 */
-
-	LZMA_MF_HC4     = 0x04,
-		/**<
-		 * \brief       Hash Chain with 2-, 3-, and 4-byte hashing
-		 *
-		 * Minimum nice_len: 4
-		 *
-		 * Memory usage:
-		 *  - dict_size <= 32 MiB: dict_size * 7.5
-		 *  - dict_size > 32 MiB: dict_size * 6.5
-		 */
-
-	LZMA_MF_BT2     = 0x12,
-		/**<
-		 * \brief       Binary Tree with 2-byte hashing
-		 *
-		 * Minimum nice_len: 2
-		 *
-		 * Memory usage: dict_size * 9.5
-		 */
-
-	LZMA_MF_BT3     = 0x13,
-		/**<
-		 * \brief       Binary Tree with 2- and 3-byte hashing
-		 *
-		 * Minimum nice_len: 3
-		 *
-		 * Memory usage:
-		 *  - dict_size <= 16 MiB: dict_size * 11.5
-		 *  - dict_size > 16 MiB: dict_size * 9.5 + 64 MiB
-		 */
-
-	LZMA_MF_BT4     = 0x14
-		/**<
-		 * \brief       Binary Tree with 2-, 3-, and 4-byte hashing
-		 *
-		 * Minimum nice_len: 4
-		 *
-		 * Memory usage:
-		 *  - dict_size <= 32 MiB: dict_size * 11.5
-		 *  - dict_size > 32 MiB: dict_size * 10.5
-		 */
-} lzma_match_finder;
-
-
-/**
- * \brief       Test if given match finder is supported
- *
- * Return true if the given match finder is supported by this liblzma build.
- * Otherwise false is returned. It is safe to call this with a value that
- * isn't listed in lzma_match_finder enumeration; the return value will be
- * false.
- *
- * There is no way to list which match finders are available in this
- * particular liblzma version and build. It would be useless, because
- * a new match finder, which the application developer wasn't aware,
- * could require giving additional options to the encoder that the older
- * match finders don't need.
- */
-extern LZMA_API(lzma_bool) lzma_mf_is_supported(lzma_match_finder match_finder)
-		lzma_nothrow lzma_attr_const;
-
-
-/**
- * \brief       Compression modes
- *
- * This selects the function used to analyze the data produced by the match
- * finder.
- */
-typedef enum {
-	LZMA_MODE_FAST = 1,
-		/**<
-		 * \brief       Fast compression
-		 *
-		 * Fast mode is usually at its best when combined with
-		 * a hash chain match finder.
-		 */
-
-	LZMA_MODE_NORMAL = 2
-		/**<
-		 * \brief       Normal compression
-		 *
-		 * This is usually notably slower than fast mode. Use this
-		 * together with binary tree match finders to expose the
-		 * full potential of the LZMA1 or LZMA2 encoder.
-		 */
-} lzma_mode;
-
-
-/**
- * \brief       Test if given compression mode is supported
- *
- * Return true if the given compression mode is supported by this liblzma
- * build. Otherwise false is returned. It is safe to call this with a value
- * that isn't listed in lzma_mode enumeration; the return value will be false.
- *
- * There is no way to list which modes are available in this particular
- * liblzma version and build. It would be useless, because a new compression
- * mode, which the application developer wasn't aware, could require giving
- * additional options to the encoder that the older modes don't need.
- */
-extern LZMA_API(lzma_bool) lzma_mode_is_supported(lzma_mode mode)
-		lzma_nothrow lzma_attr_const;
-
-
-/**
- * \brief       Options specific to the LZMA1 and LZMA2 filters
- *
- * Since LZMA1 and LZMA2 share most of the code, it's simplest to share
- * the options structure too. For encoding, all but the reserved variables
- * need to be initialized unless specifically mentioned otherwise.
- * lzma_lzma_preset() can be used to get a good starting point.
- *
- * For raw decoding, both LZMA1 and LZMA2 need dict_size, preset_dict, and
- * preset_dict_size (if preset_dict != NULL). LZMA1 needs also lc, lp, and pb.
- */
-typedef struct {
-	/**
-	 * \brief       Dictionary size in bytes
-	 *
-	 * Dictionary size indicates how many bytes of the recently processed
-	 * uncompressed data is kept in memory. One method to reduce size of
-	 * the uncompressed data is to store distance-length pairs, which
-	 * indicate what data to repeat from the dictionary buffer. Thus,
-	 * the bigger the dictionary, the better the compression ratio
-	 * usually is.
-	 *
-	 * Maximum size of the dictionary depends on multiple things:
-	 *  - Memory usage limit
-	 *  - Available address space (not a problem on 64-bit systems)
-	 *  - Selected match finder (encoder only)
-	 *
-	 * Currently the maximum dictionary size for encoding is 1.5 GiB
-	 * (i.e. (UINT32_C(1) << 30) + (UINT32_C(1) << 29)) even on 64-bit
-	 * systems for certain match finder implementation reasons. In the
-	 * future, there may be match finders that support bigger
-	 * dictionaries.
-	 *
-	 * Decoder already supports dictionaries up to 4 GiB - 1 B (i.e.
-	 * UINT32_MAX), so increasing the maximum dictionary size of the
-	 * encoder won't cause problems for old decoders.
-	 *
-	 * Because extremely small dictionaries sizes would have unneeded
-	 * overhead in the decoder, the minimum dictionary size is 4096 bytes.
-	 *
-	 * \note        When decoding, too big dictionary does no other harm
-	 *              than wasting memory.
-	 */
-	uint32_t dict_size;
-#	define LZMA_DICT_SIZE_MIN       UINT32_C(4096)
-#	define LZMA_DICT_SIZE_DEFAULT   (UINT32_C(1) << 23)
-
-	/**
-	 * \brief       Pointer to an initial dictionary
-	 *
-	 * It is possible to initialize the LZ77 history window using
-	 * a preset dictionary. It is useful when compressing many
-	 * similar, relatively small chunks of data independently from
-	 * each other. The preset dictionary should contain typical
-	 * strings that occur in the files being compressed. The most
-	 * probable strings should be near the end of the preset dictionary.
-	 *
-	 * This feature should be used only in special situations. For
-	 * now, it works correctly only with raw encoding and decoding.
-	 * Currently none of the container formats supported by
-	 * liblzma allow preset dictionary when decoding, thus if
-	 * you create a .xz or .lzma file with preset dictionary, it
-	 * cannot be decoded with the regular decoder functions. In the
-	 * future, the .xz format will likely get support for preset
-	 * dictionary though.
-	 */
-	const uint8_t *preset_dict;
-
-	/**
-	 * \brief       Size of the preset dictionary
-	 *
-	 * Specifies the size of the preset dictionary. If the size is
-	 * bigger than dict_size, only the last dict_size bytes are
-	 * processed.
-	 *
-	 * This variable is read only when preset_dict is not NULL.
-	 * If preset_dict is not NULL but preset_dict_size is zero,
-	 * no preset dictionary is used (identical to only setting
-	 * preset_dict to NULL).
-	 */
-	uint32_t preset_dict_size;
-
-	/**
-	 * \brief       Number of literal context bits
-	 *
-	 * How many of the highest bits of the previous uncompressed
-	 * eight-bit byte (also known as `literal') are taken into
-	 * account when predicting the bits of the next literal.
-	 *
-	 * E.g. in typical English text, an upper-case letter is
-	 * often followed by a lower-case letter, and a lower-case
-	 * letter is usually followed by another lower-case letter.
-	 * In the US-ASCII character set, the highest three bits are 010
-	 * for upper-case letters and 011 for lower-case letters.
-	 * When lc is at least 3, the literal coding can take advantage of
-	 * this property in the uncompressed data.
-	 *
-	 * There is a limit that applies to literal context bits and literal
-	 * position bits together: lc + lp <= 4. Without this limit the
-	 * decoding could become very slow, which could have security related
-	 * results in some cases like email servers doing virus scanning.
-	 * This limit also simplifies the internal implementation in liblzma.
-	 *
-	 * There may be LZMA1 streams that have lc + lp > 4 (maximum possible
-	 * lc would be 8). It is not possible to decode such streams with
-	 * liblzma.
-	 */
-	uint32_t lc;
-#	define LZMA_LCLP_MIN    0
-#	define LZMA_LCLP_MAX    4
-#	define LZMA_LC_DEFAULT  3
-
-	/**
-	 * \brief       Number of literal position bits
-	 *
-	 * lp affects what kind of alignment in the uncompressed data is
-	 * assumed when encoding literals. A literal is a single 8-bit byte.
-	 * See pb below for more information about alignment.
-	 */
-	uint32_t lp;
-#	define LZMA_LP_DEFAULT  0
-
-	/**
-	 * \brief       Number of position bits
-	 *
-	 * pb affects what kind of alignment in the uncompressed data is
-	 * assumed in general. The default means four-byte alignment
-	 * (2^ pb =2^2=4), which is often a good choice when there's
-	 * no better guess.
-	 *
-	 * When the aligment is known, setting pb accordingly may reduce
-	 * the file size a little. E.g. with text files having one-byte
-	 * alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can
-	 * improve compression slightly. For UTF-16 text, pb=1 is a good
-	 * choice. If the alignment is an odd number like 3 bytes, pb=0
-	 * might be the best choice.
-	 *
-	 * Even though the assumed alignment can be adjusted with pb and
-	 * lp, LZMA1 and LZMA2 still slightly favor 16-byte alignment.
-	 * It might be worth taking into account when designing file formats
-	 * that are likely to be often compressed with LZMA1 or LZMA2.
-	 */
-	uint32_t pb;
-#	define LZMA_PB_MIN      0
-#	define LZMA_PB_MAX      4
-#	define LZMA_PB_DEFAULT  2
-
-	/** Compression mode */
-	lzma_mode mode;
-
-	/**
-	 * \brief       Nice length of a match
-	 *
-	 * This determines how many bytes the encoder compares from the match
-	 * candidates when looking for the best match. Once a match of at
-	 * least nice_len bytes long is found, the encoder stops looking for
-	 * better candidates and encodes the match. (Naturally, if the found
-	 * match is actually longer than nice_len, the actual length is
-	 * encoded; it's not truncated to nice_len.)
-	 *
-	 * Bigger values usually increase the compression ratio and
-	 * compression time. For most files, 32 to 128 is a good value,
-	 * which gives very good compression ratio at good speed.
-	 *
-	 * The exact minimum value depends on the match finder. The maximum
-	 * is 273, which is the maximum length of a match that LZMA1 and
-	 * LZMA2 can encode.
-	 */
-	uint32_t nice_len;
-
-	/** Match finder ID */
-	lzma_match_finder mf;
-
-	/**
-	 * \brief       Maximum search depth in the match finder
-	 *
-	 * For every input byte, match finder searches through the hash chain
-	 * or binary tree in a loop, each iteration going one step deeper in
-	 * the chain or tree. The searching stops if
-	 *  - a match of at least nice_len bytes long is found;
-	 *  - all match candidates from the hash chain or binary tree have
-	 *    been checked; or
-	 *  - maximum search depth is reached.
-	 *
-	 * Maximum search depth is needed to prevent the match finder from
-	 * wasting too much time in case there are lots of short match
-	 * candidates. On the other hand, stopping the search before all
-	 * candidates have been checked can reduce compression ratio.
-	 *
-	 * Setting depth to zero tells liblzma to use an automatic default
-	 * value, that depends on the selected match finder and nice_len.
-	 * The default is in the range [4, 200] or so (it may vary between
-	 * liblzma versions).
-	 *
-	 * Using a bigger depth value than the default can increase
-	 * compression ratio in some cases. There is no strict maximum value,
-	 * but high values (thousands or millions) should be used with care:
-	 * the encoder could remain fast enough with typical input, but
-	 * malicious input could cause the match finder to slow down
-	 * dramatically, possibly creating a denial of service attack.
-	 */
-	uint32_t depth;
-
-	/*
-	 * 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.
-	 */
-	uint32_t reserved_int1;
-	uint32_t reserved_int2;
-	uint32_t reserved_int3;
-	uint32_t reserved_int4;
-	uint32_t reserved_int5;
-	uint32_t reserved_int6;
-	uint32_t reserved_int7;
-	uint32_t reserved_int8;
-	lzma_reserved_enum reserved_enum1;
-	lzma_reserved_enum reserved_enum2;
-	lzma_reserved_enum reserved_enum3;
-	lzma_reserved_enum reserved_enum4;
-	void *reserved_ptr1;
-	void *reserved_ptr2;
-
-} lzma_options_lzma;
-
-
-/**
- * \brief       Set a compression preset to lzma_options_lzma structure
- *
- * 0 is the fastest and 9 is the slowest. These match the switches -0 .. -9
- * of the xz command line tool. In addition, it is possible to bitwise-or
- * flags to the preset. Currently only LZMA_PRESET_EXTREME is supported.
- * The flags are defined in container.h, because the flags are used also
- * with lzma_easy_encoder().
- *
- * The preset values are subject to changes between liblzma versions.
- *
- * This function is available only if LZMA1 or LZMA2 encoder has been enabled
- * when building liblzma.
- *
- * \return      On success, false is returned. If the preset is not
- *              supported, true is returned.
- */
-extern LZMA_API(lzma_bool) lzma_lzma_preset(
-		lzma_options_lzma *options, uint32_t preset) lzma_nothrow;

Copied: vendor/xz/5.2.3/src/liblzma/api/lzma/lzma12.h (from rev 9176, vendor/xz/dist/src/liblzma/api/lzma/lzma12.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/api/lzma/lzma12.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/lzma12.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,420 @@
+/**
+ * \file        lzma/lzma12.h
+ * \brief       LZMA1 and LZMA2 filters
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ *
+ * See ../lzma.h for information about liblzma as a whole.
+ */
+
+#ifndef LZMA_H_INTERNAL
+#	error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief       LZMA1 Filter ID
+ *
+ * LZMA1 is the very same thing as what was called just LZMA in LZMA Utils,
+ * 7-Zip, and LZMA SDK. It's called LZMA1 here to prevent developers from
+ * accidentally using LZMA when they actually want LZMA2.
+ *
+ * LZMA1 shouldn't be used for new applications unless you _really_ know
+ * what you are doing. LZMA2 is almost always a better choice.
+ */
+#define LZMA_FILTER_LZMA1       LZMA_VLI_C(0x4000000000000001)
+
+/**
+ * \brief       LZMA2 Filter ID
+ *
+ * Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds
+ * support for LZMA_SYNC_FLUSH, uncompressed chunks (smaller expansion
+ * when trying to compress uncompressible data), possibility to change
+ * lc/lp/pb in the middle of encoding, and some other internal improvements.
+ */
+#define LZMA_FILTER_LZMA2       LZMA_VLI_C(0x21)
+
+
+/**
+ * \brief       Match finders
+ *
+ * Match finder has major effect on both speed and compression ratio.
+ * Usually hash chains are faster than binary trees.
+ *
+ * If you will use LZMA_SYNC_FLUSH often, the hash chains may be a better
+ * choice, because binary trees get much higher compression ratio penalty
+ * with LZMA_SYNC_FLUSH.
+ *
+ * The memory usage formulas are only rough estimates, which are closest to
+ * reality when dict_size is a power of two. The formulas are  more complex
+ * in reality, and can also change a little between liblzma versions. Use
+ * lzma_raw_encoder_memusage() to get more accurate estimate of memory usage.
+ */
+typedef enum {
+	LZMA_MF_HC3     = 0x03,
+		/**<
+		 * \brief       Hash Chain with 2- and 3-byte hashing
+		 *
+		 * Minimum nice_len: 3
+		 *
+		 * Memory usage:
+		 *  - dict_size <= 16 MiB: dict_size * 7.5
+		 *  - dict_size > 16 MiB: dict_size * 5.5 + 64 MiB
+		 */
+
+	LZMA_MF_HC4     = 0x04,
+		/**<
+		 * \brief       Hash Chain with 2-, 3-, and 4-byte hashing
+		 *
+		 * Minimum nice_len: 4
+		 *
+		 * Memory usage:
+		 *  - dict_size <= 32 MiB: dict_size * 7.5
+		 *  - dict_size > 32 MiB: dict_size * 6.5
+		 */
+
+	LZMA_MF_BT2     = 0x12,
+		/**<
+		 * \brief       Binary Tree with 2-byte hashing
+		 *
+		 * Minimum nice_len: 2
+		 *
+		 * Memory usage: dict_size * 9.5
+		 */
+
+	LZMA_MF_BT3     = 0x13,
+		/**<
+		 * \brief       Binary Tree with 2- and 3-byte hashing
+		 *
+		 * Minimum nice_len: 3
+		 *
+		 * Memory usage:
+		 *  - dict_size <= 16 MiB: dict_size * 11.5
+		 *  - dict_size > 16 MiB: dict_size * 9.5 + 64 MiB
+		 */
+
+	LZMA_MF_BT4     = 0x14
+		/**<
+		 * \brief       Binary Tree with 2-, 3-, and 4-byte hashing
+		 *
+		 * Minimum nice_len: 4
+		 *
+		 * Memory usage:
+		 *  - dict_size <= 32 MiB: dict_size * 11.5
+		 *  - dict_size > 32 MiB: dict_size * 10.5
+		 */
+} lzma_match_finder;
+
+
+/**
+ * \brief       Test if given match finder is supported
+ *
+ * Return true if the given match finder is supported by this liblzma build.
+ * Otherwise false is returned. It is safe to call this with a value that
+ * isn't listed in lzma_match_finder enumeration; the return value will be
+ * false.
+ *
+ * There is no way to list which match finders are available in this
+ * particular liblzma version and build. It would be useless, because
+ * a new match finder, which the application developer wasn't aware,
+ * could require giving additional options to the encoder that the older
+ * match finders don't need.
+ */
+extern LZMA_API(lzma_bool) lzma_mf_is_supported(lzma_match_finder match_finder)
+		lzma_nothrow lzma_attr_const;
+
+
+/**
+ * \brief       Compression modes
+ *
+ * This selects the function used to analyze the data produced by the match
+ * finder.
+ */
+typedef enum {
+	LZMA_MODE_FAST = 1,
+		/**<
+		 * \brief       Fast compression
+		 *
+		 * Fast mode is usually at its best when combined with
+		 * a hash chain match finder.
+		 */
+
+	LZMA_MODE_NORMAL = 2
+		/**<
+		 * \brief       Normal compression
+		 *
+		 * This is usually notably slower than fast mode. Use this
+		 * together with binary tree match finders to expose the
+		 * full potential of the LZMA1 or LZMA2 encoder.
+		 */
+} lzma_mode;
+
+
+/**
+ * \brief       Test if given compression mode is supported
+ *
+ * Return true if the given compression mode is supported by this liblzma
+ * build. Otherwise false is returned. It is safe to call this with a value
+ * that isn't listed in lzma_mode enumeration; the return value will be false.
+ *
+ * There is no way to list which modes are available in this particular
+ * liblzma version and build. It would be useless, because a new compression
+ * mode, which the application developer wasn't aware, could require giving
+ * additional options to the encoder that the older modes don't need.
+ */
+extern LZMA_API(lzma_bool) lzma_mode_is_supported(lzma_mode mode)
+		lzma_nothrow lzma_attr_const;
+
+
+/**
+ * \brief       Options specific to the LZMA1 and LZMA2 filters
+ *
+ * Since LZMA1 and LZMA2 share most of the code, it's simplest to share
+ * the options structure too. For encoding, all but the reserved variables
+ * need to be initialized unless specifically mentioned otherwise.
+ * lzma_lzma_preset() can be used to get a good starting point.
+ *
+ * For raw decoding, both LZMA1 and LZMA2 need dict_size, preset_dict, and
+ * preset_dict_size (if preset_dict != NULL). LZMA1 needs also lc, lp, and pb.
+ */
+typedef struct {
+	/**
+	 * \brief       Dictionary size in bytes
+	 *
+	 * Dictionary size indicates how many bytes of the recently processed
+	 * uncompressed data is kept in memory. One method to reduce size of
+	 * the uncompressed data is to store distance-length pairs, which
+	 * indicate what data to repeat from the dictionary buffer. Thus,
+	 * the bigger the dictionary, the better the compression ratio
+	 * usually is.
+	 *
+	 * Maximum size of the dictionary depends on multiple things:
+	 *  - Memory usage limit
+	 *  - Available address space (not a problem on 64-bit systems)
+	 *  - Selected match finder (encoder only)
+	 *
+	 * Currently the maximum dictionary size for encoding is 1.5 GiB
+	 * (i.e. (UINT32_C(1) << 30) + (UINT32_C(1) << 29)) even on 64-bit
+	 * systems for certain match finder implementation reasons. In the
+	 * future, there may be match finders that support bigger
+	 * dictionaries.
+	 *
+	 * Decoder already supports dictionaries up to 4 GiB - 1 B (i.e.
+	 * UINT32_MAX), so increasing the maximum dictionary size of the
+	 * encoder won't cause problems for old decoders.
+	 *
+	 * Because extremely small dictionaries sizes would have unneeded
+	 * overhead in the decoder, the minimum dictionary size is 4096 bytes.
+	 *
+	 * \note        When decoding, too big dictionary does no other harm
+	 *              than wasting memory.
+	 */
+	uint32_t dict_size;
+#	define LZMA_DICT_SIZE_MIN       UINT32_C(4096)
+#	define LZMA_DICT_SIZE_DEFAULT   (UINT32_C(1) << 23)
+
+	/**
+	 * \brief       Pointer to an initial dictionary
+	 *
+	 * It is possible to initialize the LZ77 history window using
+	 * a preset dictionary. It is useful when compressing many
+	 * similar, relatively small chunks of data independently from
+	 * each other. The preset dictionary should contain typical
+	 * strings that occur in the files being compressed. The most
+	 * probable strings should be near the end of the preset dictionary.
+	 *
+	 * This feature should be used only in special situations. For
+	 * now, it works correctly only with raw encoding and decoding.
+	 * Currently none of the container formats supported by
+	 * liblzma allow preset dictionary when decoding, thus if
+	 * you create a .xz or .lzma file with preset dictionary, it
+	 * cannot be decoded with the regular decoder functions. In the
+	 * future, the .xz format will likely get support for preset
+	 * dictionary though.
+	 */
+	const uint8_t *preset_dict;
+
+	/**
+	 * \brief       Size of the preset dictionary
+	 *
+	 * Specifies the size of the preset dictionary. If the size is
+	 * bigger than dict_size, only the last dict_size bytes are
+	 * processed.
+	 *
+	 * This variable is read only when preset_dict is not NULL.
+	 * If preset_dict is not NULL but preset_dict_size is zero,
+	 * no preset dictionary is used (identical to only setting
+	 * preset_dict to NULL).
+	 */
+	uint32_t preset_dict_size;
+
+	/**
+	 * \brief       Number of literal context bits
+	 *
+	 * How many of the highest bits of the previous uncompressed
+	 * eight-bit byte (also known as `literal') are taken into
+	 * account when predicting the bits of the next literal.
+	 *
+	 * E.g. in typical English text, an upper-case letter is
+	 * often followed by a lower-case letter, and a lower-case
+	 * letter is usually followed by another lower-case letter.
+	 * In the US-ASCII character set, the highest three bits are 010
+	 * for upper-case letters and 011 for lower-case letters.
+	 * When lc is at least 3, the literal coding can take advantage of
+	 * this property in the uncompressed data.
+	 *
+	 * There is a limit that applies to literal context bits and literal
+	 * position bits together: lc + lp <= 4. Without this limit the
+	 * decoding could become very slow, which could have security related
+	 * results in some cases like email servers doing virus scanning.
+	 * This limit also simplifies the internal implementation in liblzma.
+	 *
+	 * There may be LZMA1 streams that have lc + lp > 4 (maximum possible
+	 * lc would be 8). It is not possible to decode such streams with
+	 * liblzma.
+	 */
+	uint32_t lc;
+#	define LZMA_LCLP_MIN    0
+#	define LZMA_LCLP_MAX    4
+#	define LZMA_LC_DEFAULT  3
+
+	/**
+	 * \brief       Number of literal position bits
+	 *
+	 * lp affects what kind of alignment in the uncompressed data is
+	 * assumed when encoding literals. A literal is a single 8-bit byte.
+	 * See pb below for more information about alignment.
+	 */
+	uint32_t lp;
+#	define LZMA_LP_DEFAULT  0
+
+	/**
+	 * \brief       Number of position bits
+	 *
+	 * pb affects what kind of alignment in the uncompressed data is
+	 * assumed in general. The default means four-byte alignment
+	 * (2^ pb =2^2=4), which is often a good choice when there's
+	 * no better guess.
+	 *
+	 * When the aligment is known, setting pb accordingly may reduce
+	 * the file size a little. E.g. with text files having one-byte
+	 * alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can
+	 * improve compression slightly. For UTF-16 text, pb=1 is a good
+	 * choice. If the alignment is an odd number like 3 bytes, pb=0
+	 * might be the best choice.
+	 *
+	 * Even though the assumed alignment can be adjusted with pb and
+	 * lp, LZMA1 and LZMA2 still slightly favor 16-byte alignment.
+	 * It might be worth taking into account when designing file formats
+	 * that are likely to be often compressed with LZMA1 or LZMA2.
+	 */
+	uint32_t pb;
+#	define LZMA_PB_MIN      0
+#	define LZMA_PB_MAX      4
+#	define LZMA_PB_DEFAULT  2
+
+	/** Compression mode */
+	lzma_mode mode;
+
+	/**
+	 * \brief       Nice length of a match
+	 *
+	 * This determines how many bytes the encoder compares from the match
+	 * candidates when looking for the best match. Once a match of at
+	 * least nice_len bytes long is found, the encoder stops looking for
+	 * better candidates and encodes the match. (Naturally, if the found
+	 * match is actually longer than nice_len, the actual length is
+	 * encoded; it's not truncated to nice_len.)
+	 *
+	 * Bigger values usually increase the compression ratio and
+	 * compression time. For most files, 32 to 128 is a good value,
+	 * which gives very good compression ratio at good speed.
+	 *
+	 * The exact minimum value depends on the match finder. The maximum
+	 * is 273, which is the maximum length of a match that LZMA1 and
+	 * LZMA2 can encode.
+	 */
+	uint32_t nice_len;
+
+	/** Match finder ID */
+	lzma_match_finder mf;
+
+	/**
+	 * \brief       Maximum search depth in the match finder
+	 *
+	 * For every input byte, match finder searches through the hash chain
+	 * or binary tree in a loop, each iteration going one step deeper in
+	 * the chain or tree. The searching stops if
+	 *  - a match of at least nice_len bytes long is found;
+	 *  - all match candidates from the hash chain or binary tree have
+	 *    been checked; or
+	 *  - maximum search depth is reached.
+	 *
+	 * Maximum search depth is needed to prevent the match finder from
+	 * wasting too much time in case there are lots of short match
+	 * candidates. On the other hand, stopping the search before all
+	 * candidates have been checked can reduce compression ratio.
+	 *
+	 * Setting depth to zero tells liblzma to use an automatic default
+	 * value, that depends on the selected match finder and nice_len.
+	 * The default is in the range [4, 200] or so (it may vary between
+	 * liblzma versions).
+	 *
+	 * Using a bigger depth value than the default can increase
+	 * compression ratio in some cases. There is no strict maximum value,
+	 * but high values (thousands or millions) should be used with care:
+	 * the encoder could remain fast enough with typical input, but
+	 * malicious input could cause the match finder to slow down
+	 * dramatically, possibly creating a denial of service attack.
+	 */
+	uint32_t depth;
+
+	/*
+	 * 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.
+	 */
+	uint32_t reserved_int1;
+	uint32_t reserved_int2;
+	uint32_t reserved_int3;
+	uint32_t reserved_int4;
+	uint32_t reserved_int5;
+	uint32_t reserved_int6;
+	uint32_t reserved_int7;
+	uint32_t reserved_int8;
+	lzma_reserved_enum reserved_enum1;
+	lzma_reserved_enum reserved_enum2;
+	lzma_reserved_enum reserved_enum3;
+	lzma_reserved_enum reserved_enum4;
+	void *reserved_ptr1;
+	void *reserved_ptr2;
+
+} lzma_options_lzma;
+
+
+/**
+ * \brief       Set a compression preset to lzma_options_lzma structure
+ *
+ * 0 is the fastest and 9 is the slowest. These match the switches -0 .. -9
+ * of the xz command line tool. In addition, it is possible to bitwise-or
+ * flags to the preset. Currently only LZMA_PRESET_EXTREME is supported.
+ * The flags are defined in container.h, because the flags are used also
+ * with lzma_easy_encoder().
+ *
+ * The preset values are subject to changes between liblzma versions.
+ *
+ * This function is available only if LZMA1 or LZMA2 encoder has been enabled
+ * when building liblzma.
+ *
+ * \return      On success, false is returned. If the preset is not
+ *              supported, true is returned.
+ */
+extern LZMA_API(lzma_bool) lzma_lzma_preset(
+		lzma_options_lzma *options, uint32_t preset) lzma_nothrow;

Deleted: vendor/xz/5.2.3/src/liblzma/api/lzma/version.h
===================================================================
--- vendor/xz/dist/src/liblzma/api/lzma/version.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/version.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,121 +0,0 @@
-/**
- * \file        lzma/version.h
- * \brief       Version number
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/*
- * Version number split into components
- */
-#define LZMA_VERSION_MAJOR 5
-#define LZMA_VERSION_MINOR 0
-#define LZMA_VERSION_PATCH 8
-#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
-
-#ifndef LZMA_VERSION_COMMIT
-#	define LZMA_VERSION_COMMIT ""
-#endif
-
-
-/*
- * Map symbolic stability levels to integers.
- */
-#define LZMA_VERSION_STABILITY_ALPHA 0
-#define LZMA_VERSION_STABILITY_BETA 1
-#define LZMA_VERSION_STABILITY_STABLE 2
-
-
-/**
- * \brief       Compile-time version number
- *
- * The version number is of format xyyyzzzs where
- *  - x = major
- *  - yyy = minor
- *  - zzz = revision
- *  - s indicates stability: 0 = alpha, 1 = beta, 2 = stable
- *
- * The same xyyyzzz triplet is never reused with different stability levels.
- * For example, if 5.1.0alpha has been released, there will never be 5.1.0beta
- * or 5.1.0 stable.
- *
- * \note        The version number of liblzma has nothing to with
- *              the version number of Igor Pavlov's LZMA SDK.
- */
-#define LZMA_VERSION (LZMA_VERSION_MAJOR * UINT32_C(10000000) \
-		+ LZMA_VERSION_MINOR * UINT32_C(10000) \
-		+ LZMA_VERSION_PATCH * UINT32_C(10) \
-		+ LZMA_VERSION_STABILITY)
-
-
-/*
- * Macros to construct the compile-time version string
- */
-#if LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_ALPHA
-#	define LZMA_VERSION_STABILITY_STRING "alpha"
-#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_BETA
-#	define LZMA_VERSION_STABILITY_STRING "beta"
-#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_STABLE
-#	define LZMA_VERSION_STABILITY_STRING ""
-#else
-#	error Incorrect LZMA_VERSION_STABILITY
-#endif
-
-#define LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) \
-		#major "." #minor "." #patch stability commit
-
-#define LZMA_VERSION_STRING_C(major, minor, patch, stability, commit) \
-		LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit)
-
-
-/**
- * \brief       Compile-time version as a string
- *
- * This can be for example "4.999.5alpha", "4.999.8beta", or "5.0.0" (stable
- * versions don't have any "stable" suffix). In future, a snapshot built
- * from source code repository may include an additional suffix, for example
- * "4.999.8beta-21-g1d92". The commit ID won't be available in numeric form
- * in LZMA_VERSION macro.
- */
-#define LZMA_VERSION_STRING LZMA_VERSION_STRING_C( \
-		LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, \
-		LZMA_VERSION_PATCH, LZMA_VERSION_STABILITY_STRING, \
-		LZMA_VERSION_COMMIT)
-
-
-/* #ifndef is needed for use with windres (MinGW or Cygwin). */
-#ifndef LZMA_H_INTERNAL_RC
-
-/**
- * \brief       Run-time version number as an integer
- *
- * Return the value of LZMA_VERSION macro at the compile time of liblzma.
- * This allows the application to compare if it was built against the same,
- * older, or newer version of liblzma that is currently running.
- */
-extern LZMA_API(uint32_t) lzma_version_number(void)
-		lzma_nothrow lzma_attr_const;
-
-
-/**
- * \brief       Run-time version as a string
- *
- * This function may be useful if you want to display which version of
- * liblzma your application is currently using.
- */
-extern LZMA_API(const char *) lzma_version_string(void)
-		lzma_nothrow lzma_attr_const;
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/api/lzma/version.h (from rev 11013, vendor/xz/dist/src/liblzma/api/lzma/version.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/api/lzma/version.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma/version.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,121 @@
+/**
+ * \file        lzma/version.h
+ * \brief       Version number
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ *
+ * See ../lzma.h for information about liblzma as a whole.
+ */
+
+#ifndef LZMA_H_INTERNAL
+#	error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/*
+ * Version number split into components
+ */
+#define LZMA_VERSION_MAJOR 5
+#define LZMA_VERSION_MINOR 2
+#define LZMA_VERSION_PATCH 3
+#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
+
+#ifndef LZMA_VERSION_COMMIT
+#	define LZMA_VERSION_COMMIT ""
+#endif
+
+
+/*
+ * Map symbolic stability levels to integers.
+ */
+#define LZMA_VERSION_STABILITY_ALPHA 0
+#define LZMA_VERSION_STABILITY_BETA 1
+#define LZMA_VERSION_STABILITY_STABLE 2
+
+
+/**
+ * \brief       Compile-time version number
+ *
+ * The version number is of format xyyyzzzs where
+ *  - x = major
+ *  - yyy = minor
+ *  - zzz = revision
+ *  - s indicates stability: 0 = alpha, 1 = beta, 2 = stable
+ *
+ * The same xyyyzzz triplet is never reused with different stability levels.
+ * For example, if 5.1.0alpha has been released, there will never be 5.1.0beta
+ * or 5.1.0 stable.
+ *
+ * \note        The version number of liblzma has nothing to with
+ *              the version number of Igor Pavlov's LZMA SDK.
+ */
+#define LZMA_VERSION (LZMA_VERSION_MAJOR * UINT32_C(10000000) \
+		+ LZMA_VERSION_MINOR * UINT32_C(10000) \
+		+ LZMA_VERSION_PATCH * UINT32_C(10) \
+		+ LZMA_VERSION_STABILITY)
+
+
+/*
+ * Macros to construct the compile-time version string
+ */
+#if LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_ALPHA
+#	define LZMA_VERSION_STABILITY_STRING "alpha"
+#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_BETA
+#	define LZMA_VERSION_STABILITY_STRING "beta"
+#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_STABLE
+#	define LZMA_VERSION_STABILITY_STRING ""
+#else
+#	error Incorrect LZMA_VERSION_STABILITY
+#endif
+
+#define LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) \
+		#major "." #minor "." #patch stability commit
+
+#define LZMA_VERSION_STRING_C(major, minor, patch, stability, commit) \
+		LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit)
+
+
+/**
+ * \brief       Compile-time version as a string
+ *
+ * This can be for example "4.999.5alpha", "4.999.8beta", or "5.0.0" (stable
+ * versions don't have any "stable" suffix). In future, a snapshot built
+ * from source code repository may include an additional suffix, for example
+ * "4.999.8beta-21-g1d92". The commit ID won't be available in numeric form
+ * in LZMA_VERSION macro.
+ */
+#define LZMA_VERSION_STRING LZMA_VERSION_STRING_C( \
+		LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, \
+		LZMA_VERSION_PATCH, LZMA_VERSION_STABILITY_STRING, \
+		LZMA_VERSION_COMMIT)
+
+
+/* #ifndef is needed for use with windres (MinGW or Cygwin). */
+#ifndef LZMA_H_INTERNAL_RC
+
+/**
+ * \brief       Run-time version number as an integer
+ *
+ * Return the value of LZMA_VERSION macro at the compile time of liblzma.
+ * This allows the application to compare if it was built against the same,
+ * older, or newer version of liblzma that is currently running.
+ */
+extern LZMA_API(uint32_t) lzma_version_number(void)
+		lzma_nothrow lzma_attr_const;
+
+
+/**
+ * \brief       Run-time version as a string
+ *
+ * This function may be useful if you want to display which version of
+ * liblzma your application is currently using.
+ */
+extern LZMA_API(const char *) lzma_version_string(void)
+		lzma_nothrow lzma_attr_const;
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/api/lzma.h
===================================================================
--- vendor/xz/dist/src/liblzma/api/lzma.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,313 +0,0 @@
-/**
- * \file        api/lzma.h
- * \brief       The public API of liblzma data compression library
- *
- * liblzma is a public domain general-purpose data compression library with
- * a zlib-like API. The native file format is .xz, but also the old .lzma
- * format and raw (no headers) streams are supported. Multiple compression
- * algorithms (filters) are supported. Currently LZMA2 is the primary filter.
- *
- * liblzma is part of XZ Utils <http://tukaani.org/xz/>. XZ Utils includes
- * a gzip-like command line tool named xz and some other tools. XZ Utils
- * is developed and maintained by Lasse Collin.
- *
- * Major parts of liblzma are based on Igor Pavlov's public domain LZMA SDK
- * <http://7-zip.org/sdk.html>.
- *
- * The SHA-256 implementation is based on the public domain code found from
- * 7-Zip <http://7-zip.org/>, which has a modified version of the public
- * domain SHA-256 code found from Crypto++ <http://www.cryptopp.com/>.
- * The SHA-256 code in Crypto++ was written by Kevin Springle and Wei Dai.
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#ifndef LZMA_H
-#define LZMA_H
-
-/*****************************
- * Required standard headers *
- *****************************/
-
-/*
- * liblzma API headers need some standard types and macros. To allow
- * including lzma.h without requiring the application to include other
- * headers first, lzma.h includes the required standard headers unless
- * they already seem to be included already or if LZMA_MANUAL_HEADERS
- * has been defined.
- *
- * Here's what types and macros are needed and from which headers:
- *  - stddef.h: size_t, NULL
- *  - stdint.h: uint8_t, uint32_t, uint64_t, UINT32_C(n), uint64_C(n),
- *    UINT32_MAX, UINT64_MAX
- *
- * However, inttypes.h is a little more portable than stdint.h, although
- * inttypes.h declares some unneeded things compared to plain stdint.h.
- *
- * The hacks below aren't perfect, specifically they assume that inttypes.h
- * exists and that it typedefs at least uint8_t, uint32_t, and uint64_t,
- * and that, in case of incomplete inttypes.h, unsigned int is 32-bit.
- * If the application already takes care of setting up all the types and
- * macros properly (for example by using gnulib's stdint.h or inttypes.h),
- * we try to detect that the macros are already defined and don't include
- * inttypes.h here again. However, you may define LZMA_MANUAL_HEADERS to
- * force this file to never include any system headers.
- *
- * Some could argue that liblzma API should provide all the required types,
- * for example lzma_uint64, LZMA_UINT64_C(n), and LZMA_UINT64_MAX. This was
- * seen as an unnecessary mess, since most systems already provide all the
- * necessary types and macros in the standard headers.
- *
- * Note that liblzma API still has lzma_bool, because using stdbool.h would
- * break C89 and C++ programs on many systems. sizeof(bool) in C99 isn't
- * necessarily the same as sizeof(bool) in C++.
- */
-
-#ifndef LZMA_MANUAL_HEADERS
-	/*
-	 * I suppose this works portably also in C++. Note that in C++,
-	 * we need to get size_t into the global namespace.
-	 */
-#	include <stddef.h>
-
-	/*
-	 * Skip inttypes.h if we already have all the required macros. If we
-	 * have the macros, we assume that we have the matching typedefs too.
-	 */
-#	if !defined(UINT32_C) || !defined(UINT64_C) \
-			|| !defined(UINT32_MAX) || !defined(UINT64_MAX)
-		/*
-		 * MSVC has no C99 support, and thus it cannot be used to
-		 * compile liblzma. The liblzma API has to still be usable
-		 * from MSVC, so we need to define the required standard
-		 * integer types here.
-		 */
-#		if defined(_WIN32) && defined(_MSC_VER)
-			typedef unsigned __int8 uint8_t;
-			typedef unsigned __int32 uint32_t;
-			typedef unsigned __int64 uint64_t;
-#		else
-			/* Use the standard inttypes.h. */
-#			ifdef __cplusplus
-				/*
-				 * C99 sections 7.18.2 and 7.18.4 specify
-				 * that C++ implementations define the limit
-				 * and constant macros only if specifically
-				 * requested. Note that if you want the
-				 * format macros (PRIu64 etc.) too, you need
-				 * to define __STDC_FORMAT_MACROS before
-				 * including lzma.h, since re-including
-				 * inttypes.h with __STDC_FORMAT_MACROS
-				 * defined doesn't necessarily work.
-				 */
-#				ifndef __STDC_LIMIT_MACROS
-#					define __STDC_LIMIT_MACROS 1
-#				endif
-#				ifndef __STDC_CONSTANT_MACROS
-#					define __STDC_CONSTANT_MACROS 1
-#				endif
-#			endif
-
-#			include <inttypes.h>
-#		endif
-
-		/*
-		 * Some old systems have only the typedefs in inttypes.h, and
-		 * lack all the macros. For those systems, we need a few more
-		 * hacks. We assume that unsigned int is 32-bit and unsigned
-		 * long is either 32-bit or 64-bit. If these hacks aren't
-		 * enough, the application has to setup the types manually
-		 * before including lzma.h.
-		 */
-#		ifndef UINT32_C
-#			if defined(_WIN32) && defined(_MSC_VER)
-#				define UINT32_C(n) n ## UI32
-#			else
-#				define UINT32_C(n) n ## U
-#			endif
-#		endif
-
-#		ifndef UINT64_C
-#			if defined(_WIN32) && defined(_MSC_VER)
-#				define UINT64_C(n) n ## UI64
-#			else
-				/* Get ULONG_MAX. */
-#				include <limits.h>
-#				if ULONG_MAX == 4294967295UL
-#					define UINT64_C(n) n ## ULL
-#				else
-#					define UINT64_C(n) n ## UL
-#				endif
-#			endif
-#		endif
-
-#		ifndef UINT32_MAX
-#			define UINT32_MAX (UINT32_C(4294967295))
-#		endif
-
-#		ifndef UINT64_MAX
-#			define UINT64_MAX (UINT64_C(18446744073709551615))
-#		endif
-#	endif
-#endif /* ifdef LZMA_MANUAL_HEADERS */
-
-
-/******************
- * LZMA_API macro *
- ******************/
-
-/*
- * Some systems require that the functions and function pointers are
- * declared specially in the headers. LZMA_API_IMPORT is for importing
- * symbols and LZMA_API_CALL is to specify the calling convention.
- *
- * By default it is assumed that the application will link dynamically
- * against liblzma. #define LZMA_API_STATIC in your application if you
- * want to link against static liblzma. If you don't care about portability
- * to operating systems like Windows, or at least don't care about linking
- * against static liblzma on them, don't worry about LZMA_API_STATIC. That
- * is, most developers will never need to use LZMA_API_STATIC.
- *
- * The GCC variants are a special case on Windows (Cygwin and MinGW).
- * We rely on GCC doing the right thing with its auto-import feature,
- * and thus don't use __declspec(dllimport). This way developers don't
- * need to worry about LZMA_API_STATIC. Also the calling convention is
- * omitted on Cygwin but not on MinGW.
- */
-#ifndef LZMA_API_IMPORT
-#	if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
-#		define LZMA_API_IMPORT __declspec(dllimport)
-#	else
-#		define LZMA_API_IMPORT
-#	endif
-#endif
-
-#ifndef LZMA_API_CALL
-#	if defined(_WIN32) && !defined(__CYGWIN__)
-#		define LZMA_API_CALL __cdecl
-#	else
-#		define LZMA_API_CALL
-#	endif
-#endif
-
-#ifndef LZMA_API
-#	define LZMA_API(type) LZMA_API_IMPORT type LZMA_API_CALL
-#endif
-
-
-/***********
- * nothrow *
- ***********/
-
-/*
- * None of the functions in liblzma may throw an exception. Even
- * the functions that use callback functions won't throw exceptions,
- * because liblzma would break if a callback function threw an exception.
- */
-#ifndef lzma_nothrow
-#	if defined(__cplusplus)
-#		define lzma_nothrow throw()
-#	elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
-#		define lzma_nothrow __attribute__((__nothrow__))
-#	else
-#		define lzma_nothrow
-#	endif
-#endif
-
-
-/********************
- * GNU C extensions *
- ********************/
-
-/*
- * GNU C extensions are used conditionally in the public API. It doesn't
- * break anything if these are sometimes enabled and sometimes not, only
- * affects warnings and optimizations.
- */
-#if __GNUC__ >= 3
-#	ifndef lzma_attribute
-#		define lzma_attribute(attr) __attribute__(attr)
-#	endif
-
-	/* warn_unused_result was added in GCC 3.4. */
-#	ifndef lzma_attr_warn_unused_result
-#		if __GNUC__ == 3 && __GNUC_MINOR__ < 4
-#			define lzma_attr_warn_unused_result
-#		endif
-#	endif
-
-#else
-#	ifndef lzma_attribute
-#		define lzma_attribute(attr)
-#	endif
-#endif
-
-
-#ifndef lzma_attr_pure
-#	define lzma_attr_pure lzma_attribute((__pure__))
-#endif
-
-#ifndef lzma_attr_const
-#	define lzma_attr_const lzma_attribute((__const__))
-#endif
-
-#ifndef lzma_attr_warn_unused_result
-#	define lzma_attr_warn_unused_result \
-		lzma_attribute((__warn_unused_result__))
-#endif
-
-
-/**************
- * Subheaders *
- **************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Subheaders check that this is defined. It is to prevent including
- * them directly from applications.
- */
-#define LZMA_H_INTERNAL 1
-
-/* Basic features */
-#include "lzma/version.h"
-#include "lzma/base.h"
-#include "lzma/vli.h"
-#include "lzma/check.h"
-
-/* Filters */
-#include "lzma/filter.h"
-#include "lzma/bcj.h"
-#include "lzma/delta.h"
-#include "lzma/lzma.h"
-
-/* Container formats */
-#include "lzma/container.h"
-
-/* Advanced features */
-#include "lzma/stream_flags.h"
-#include "lzma/block.h"
-#include "lzma/index.h"
-#include "lzma/index_hash.h"
-
-/* Hardware information */
-#include "lzma/hardware.h"
-
-/*
- * All subheaders included. Undefine LZMA_H_INTERNAL to prevent applications
- * re-including the subheaders.
- */
-#undef LZMA_H_INTERNAL
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ifndef LZMA_H */

Copied: vendor/xz/5.2.3/src/liblzma/api/lzma.h (from rev 9176, vendor/xz/dist/src/liblzma/api/lzma.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/api/lzma.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/api/lzma.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,321 @@
+/**
+ * \file        api/lzma.h
+ * \brief       The public API of liblzma data compression library
+ *
+ * liblzma is a public domain general-purpose data compression library with
+ * a zlib-like API. The native file format is .xz, but also the old .lzma
+ * format and raw (no headers) streams are supported. Multiple compression
+ * algorithms (filters) are supported. Currently LZMA2 is the primary filter.
+ *
+ * liblzma is part of XZ Utils <http://tukaani.org/xz/>. XZ Utils includes
+ * a gzip-like command line tool named xz and some other tools. XZ Utils
+ * is developed and maintained by Lasse Collin.
+ *
+ * Major parts of liblzma are based on Igor Pavlov's public domain LZMA SDK
+ * <http://7-zip.org/sdk.html>.
+ *
+ * The SHA-256 implementation is based on the public domain code found from
+ * 7-Zip <http://7-zip.org/>, which has a modified version of the public
+ * domain SHA-256 code found from Crypto++ <http://www.cryptopp.com/>.
+ * The SHA-256 code in Crypto++ was written by Kevin Springle and Wei Dai.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H
+#define LZMA_H
+
+/*****************************
+ * Required standard headers *
+ *****************************/
+
+/*
+ * liblzma API headers need some standard types and macros. To allow
+ * including lzma.h without requiring the application to include other
+ * headers first, lzma.h includes the required standard headers unless
+ * they already seem to be included already or if LZMA_MANUAL_HEADERS
+ * has been defined.
+ *
+ * Here's what types and macros are needed and from which headers:
+ *  - stddef.h: size_t, NULL
+ *  - stdint.h: uint8_t, uint32_t, uint64_t, UINT32_C(n), uint64_C(n),
+ *    UINT32_MAX, UINT64_MAX
+ *
+ * However, inttypes.h is a little more portable than stdint.h, although
+ * inttypes.h declares some unneeded things compared to plain stdint.h.
+ *
+ * The hacks below aren't perfect, specifically they assume that inttypes.h
+ * exists and that it typedefs at least uint8_t, uint32_t, and uint64_t,
+ * and that, in case of incomplete inttypes.h, unsigned int is 32-bit.
+ * If the application already takes care of setting up all the types and
+ * macros properly (for example by using gnulib's stdint.h or inttypes.h),
+ * we try to detect that the macros are already defined and don't include
+ * inttypes.h here again. However, you may define LZMA_MANUAL_HEADERS to
+ * force this file to never include any system headers.
+ *
+ * Some could argue that liblzma API should provide all the required types,
+ * for example lzma_uint64, LZMA_UINT64_C(n), and LZMA_UINT64_MAX. This was
+ * seen as an unnecessary mess, since most systems already provide all the
+ * necessary types and macros in the standard headers.
+ *
+ * Note that liblzma API still has lzma_bool, because using stdbool.h would
+ * break C89 and C++ programs on many systems. sizeof(bool) in C99 isn't
+ * necessarily the same as sizeof(bool) in C++.
+ */
+
+#ifndef LZMA_MANUAL_HEADERS
+	/*
+	 * I suppose this works portably also in C++. Note that in C++,
+	 * we need to get size_t into the global namespace.
+	 */
+#	include <stddef.h>
+
+	/*
+	 * Skip inttypes.h if we already have all the required macros. If we
+	 * have the macros, we assume that we have the matching typedefs too.
+	 */
+#	if !defined(UINT32_C) || !defined(UINT64_C) \
+			|| !defined(UINT32_MAX) || !defined(UINT64_MAX)
+		/*
+		 * MSVC versions older than 2013 have no C99 support, and
+		 * thus they cannot be used to compile liblzma. Using an
+		 * existing liblzma.dll with old MSVC can work though(*),
+		 * but we need to define the required standard integer
+		 * types here in a MSVC-specific way.
+		 *
+		 * (*) If you do this, the existing liblzma.dll probably uses
+		 *     a different runtime library than your MSVC-built
+		 *     application. Mixing runtimes is generally bad, but
+		 *     in this case it should work as long as you avoid
+		 *     the few rarely-needed liblzma functions that allocate
+		 *     memory and expect the caller to free it using free().
+		 */
+#		if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1800
+			typedef unsigned __int8 uint8_t;
+			typedef unsigned __int32 uint32_t;
+			typedef unsigned __int64 uint64_t;
+#		else
+			/* Use the standard inttypes.h. */
+#			ifdef __cplusplus
+				/*
+				 * C99 sections 7.18.2 and 7.18.4 specify
+				 * that C++ implementations define the limit
+				 * and constant macros only if specifically
+				 * requested. Note that if you want the
+				 * format macros (PRIu64 etc.) too, you need
+				 * to define __STDC_FORMAT_MACROS before
+				 * including lzma.h, since re-including
+				 * inttypes.h with __STDC_FORMAT_MACROS
+				 * defined doesn't necessarily work.
+				 */
+#				ifndef __STDC_LIMIT_MACROS
+#					define __STDC_LIMIT_MACROS 1
+#				endif
+#				ifndef __STDC_CONSTANT_MACROS
+#					define __STDC_CONSTANT_MACROS 1
+#				endif
+#			endif
+
+#			include <inttypes.h>
+#		endif
+
+		/*
+		 * Some old systems have only the typedefs in inttypes.h, and
+		 * lack all the macros. For those systems, we need a few more
+		 * hacks. We assume that unsigned int is 32-bit and unsigned
+		 * long is either 32-bit or 64-bit. If these hacks aren't
+		 * enough, the application has to setup the types manually
+		 * before including lzma.h.
+		 */
+#		ifndef UINT32_C
+#			if defined(_WIN32) && defined(_MSC_VER)
+#				define UINT32_C(n) n ## UI32
+#			else
+#				define UINT32_C(n) n ## U
+#			endif
+#		endif
+
+#		ifndef UINT64_C
+#			if defined(_WIN32) && defined(_MSC_VER)
+#				define UINT64_C(n) n ## UI64
+#			else
+				/* Get ULONG_MAX. */
+#				include <limits.h>
+#				if ULONG_MAX == 4294967295UL
+#					define UINT64_C(n) n ## ULL
+#				else
+#					define UINT64_C(n) n ## UL
+#				endif
+#			endif
+#		endif
+
+#		ifndef UINT32_MAX
+#			define UINT32_MAX (UINT32_C(4294967295))
+#		endif
+
+#		ifndef UINT64_MAX
+#			define UINT64_MAX (UINT64_C(18446744073709551615))
+#		endif
+#	endif
+#endif /* ifdef LZMA_MANUAL_HEADERS */
+
+
+/******************
+ * LZMA_API macro *
+ ******************/
+
+/*
+ * Some systems require that the functions and function pointers are
+ * declared specially in the headers. LZMA_API_IMPORT is for importing
+ * symbols and LZMA_API_CALL is to specify the calling convention.
+ *
+ * By default it is assumed that the application will link dynamically
+ * against liblzma. #define LZMA_API_STATIC in your application if you
+ * want to link against static liblzma. If you don't care about portability
+ * to operating systems like Windows, or at least don't care about linking
+ * against static liblzma on them, don't worry about LZMA_API_STATIC. That
+ * is, most developers will never need to use LZMA_API_STATIC.
+ *
+ * The GCC variants are a special case on Windows (Cygwin and MinGW).
+ * We rely on GCC doing the right thing with its auto-import feature,
+ * and thus don't use __declspec(dllimport). This way developers don't
+ * need to worry about LZMA_API_STATIC. Also the calling convention is
+ * omitted on Cygwin but not on MinGW.
+ */
+#ifndef LZMA_API_IMPORT
+#	if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
+#		define LZMA_API_IMPORT __declspec(dllimport)
+#	else
+#		define LZMA_API_IMPORT
+#	endif
+#endif
+
+#ifndef LZMA_API_CALL
+#	if defined(_WIN32) && !defined(__CYGWIN__)
+#		define LZMA_API_CALL __cdecl
+#	else
+#		define LZMA_API_CALL
+#	endif
+#endif
+
+#ifndef LZMA_API
+#	define LZMA_API(type) LZMA_API_IMPORT type LZMA_API_CALL
+#endif
+
+
+/***********
+ * nothrow *
+ ***********/
+
+/*
+ * None of the functions in liblzma may throw an exception. Even
+ * the functions that use callback functions won't throw exceptions,
+ * because liblzma would break if a callback function threw an exception.
+ */
+#ifndef lzma_nothrow
+#	if defined(__cplusplus)
+#		define lzma_nothrow throw()
+#	elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
+#		define lzma_nothrow __attribute__((__nothrow__))
+#	else
+#		define lzma_nothrow
+#	endif
+#endif
+
+
+/********************
+ * GNU C extensions *
+ ********************/
+
+/*
+ * GNU C extensions are used conditionally in the public API. It doesn't
+ * break anything if these are sometimes enabled and sometimes not, only
+ * affects warnings and optimizations.
+ */
+#if __GNUC__ >= 3
+#	ifndef lzma_attribute
+#		define lzma_attribute(attr) __attribute__(attr)
+#	endif
+
+	/* warn_unused_result was added in GCC 3.4. */
+#	ifndef lzma_attr_warn_unused_result
+#		if __GNUC__ == 3 && __GNUC_MINOR__ < 4
+#			define lzma_attr_warn_unused_result
+#		endif
+#	endif
+
+#else
+#	ifndef lzma_attribute
+#		define lzma_attribute(attr)
+#	endif
+#endif
+
+
+#ifndef lzma_attr_pure
+#	define lzma_attr_pure lzma_attribute((__pure__))
+#endif
+
+#ifndef lzma_attr_const
+#	define lzma_attr_const lzma_attribute((__const__))
+#endif
+
+#ifndef lzma_attr_warn_unused_result
+#	define lzma_attr_warn_unused_result \
+		lzma_attribute((__warn_unused_result__))
+#endif
+
+
+/**************
+ * Subheaders *
+ **************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Subheaders check that this is defined. It is to prevent including
+ * them directly from applications.
+ */
+#define LZMA_H_INTERNAL 1
+
+/* Basic features */
+#include "lzma/version.h"
+#include "lzma/base.h"
+#include "lzma/vli.h"
+#include "lzma/check.h"
+
+/* Filters */
+#include "lzma/filter.h"
+#include "lzma/bcj.h"
+#include "lzma/delta.h"
+#include "lzma/lzma12.h"
+
+/* Container formats */
+#include "lzma/container.h"
+
+/* Advanced features */
+#include "lzma/stream_flags.h"
+#include "lzma/block.h"
+#include "lzma/index.h"
+#include "lzma/index_hash.h"
+
+/* Hardware information */
+#include "lzma/hardware.h"
+
+/*
+ * All subheaders included. Undefine LZMA_H_INTERNAL to prevent applications
+ * re-including the subheaders.
+ */
+#undef LZMA_H_INTERNAL
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ifndef LZMA_H */

Deleted: vendor/xz/5.2.3/src/liblzma/check/Makefile.inc
===================================================================
--- vendor/xz/dist/src/liblzma/check/Makefile.inc	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/check/Makefile.inc	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,51 +0,0 @@
-##
-## Author: Lasse Collin
-##
-## This file has been put into the public domain.
-## You can do whatever you want with this file.
-##
-
-EXTRA_DIST += \
-	check/crc32_tablegen.c \
-	check/crc64_tablegen.c
-
-liblzma_la_SOURCES += \
-	check/check.c \
-	check/check.h \
-	check/crc_macros.h
-
-if COND_CHECK_CRC32
-if COND_SMALL
-liblzma_la_SOURCES += check/crc32_small.c
-else
-liblzma_la_SOURCES += \
-	check/crc32_table.c \
-	check/crc32_table_le.h \
-	check/crc32_table_be.h
-if COND_ASM_X86
-liblzma_la_SOURCES += check/crc32_x86.S
-else
-liblzma_la_SOURCES += check/crc32_fast.c
-endif
-endif
-endif
-
-if COND_CHECK_CRC64
-if COND_SMALL
-liblzma_la_SOURCES += check/crc64_small.c
-else
-liblzma_la_SOURCES += \
-	check/crc64_table.c \
-	check/crc64_table_le.h \
-	check/crc64_table_be.h
-if COND_ASM_X86
-liblzma_la_SOURCES += check/crc64_x86.S
-else
-liblzma_la_SOURCES += check/crc64_fast.c
-endif
-endif
-endif
-
-if COND_CHECK_SHA256
-liblzma_la_SOURCES += check/sha256.c
-endif

Deleted: vendor/xz/5.2.3/src/liblzma/check/check.h
===================================================================
--- vendor/xz/dist/src/liblzma/check/check.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/check/check.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,95 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       check.h
-/// \brief      Internal API to different integrity check functions
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_CHECK_H
-#define LZMA_CHECK_H
-
-#include "common.h"
-
-
-// Index hashing needs the best possible hash function (preferably
-// a cryptographic hash) for maximum reliability.
-#if defined(HAVE_CHECK_SHA256)
-#	define LZMA_CHECK_BEST LZMA_CHECK_SHA256
-#elif defined(HAVE_CHECK_CRC64)
-#	define LZMA_CHECK_BEST LZMA_CHECK_CRC64
-#else
-#	define LZMA_CHECK_BEST LZMA_CHECK_CRC32
-#endif
-
-
-/// \brief      Structure to hold internal state of the check being calculated
-///
-/// \note       This is not in the public API because this structure may
-///             change in future if new integrity check algorithms are added.
-typedef struct {
-	/// Buffer to hold the final result and a temporary buffer for SHA256.
-	union {
-		uint8_t u8[64];
-		uint32_t u32[16];
-		uint64_t u64[8];
-	} buffer;
-
-	/// Check-specific data
-	union {
-		uint32_t crc32;
-		uint64_t crc64;
-
-		struct {
-			/// Internal state
-			uint32_t state[8];
-
-			/// Size of the message excluding padding
-			uint64_t size;
-		} sha256;
-	} state;
-
-} lzma_check_state;
-
-
-/// lzma_crc32_table[0] is needed by LZ encoder so we need to keep
-/// the array two-dimensional.
-#ifdef HAVE_SMALL
-extern uint32_t lzma_crc32_table[1][256];
-extern void lzma_crc32_init(void);
-#else
-extern const uint32_t lzma_crc32_table[8][256];
-extern const uint64_t lzma_crc64_table[4][256];
-#endif
-
-
-/// \brief      Initialize *check depending on type
-///
-/// \return     LZMA_OK on success. LZMA_UNSUPPORTED_CHECK if the type is not
-///             supported by the current version or build of liblzma.
-///             LZMA_PROG_ERROR if type > LZMA_CHECK_ID_MAX.
-extern void lzma_check_init(lzma_check_state *check, lzma_check type);
-
-/// Update the check state
-extern void lzma_check_update(lzma_check_state *check, lzma_check type,
-		const uint8_t *buf, size_t size);
-
-/// Finish the check calculation and store the result to check->buffer.u8.
-extern void lzma_check_finish(lzma_check_state *check, lzma_check type);
-
-
-/// Prepare SHA-256 state for new input.
-extern void lzma_sha256_init(lzma_check_state *check);
-
-/// Update the SHA-256 hash state
-extern void lzma_sha256_update(
-		const uint8_t *buf, size_t size, lzma_check_state *check);
-
-/// Finish the SHA-256 calculation and store the result to check->buffer.u8.
-extern void lzma_sha256_finish(lzma_check_state *check);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/check/check.h (from rev 11013, vendor/xz/dist/src/liblzma/check/check.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/check/check.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/check/check.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,172 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       check.h
+/// \brief      Internal API to different integrity check functions
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_CHECK_H
+#define LZMA_CHECK_H
+
+#include "common.h"
+
+// If the function for external SHA-256 is missing, use the internal SHA-256
+// code. Due to how configure works, these defines can only get defined when
+// both a usable header and a type have already been found.
+#if !(defined(HAVE_CC_SHA256_INIT) \
+		|| defined(HAVE_SHA256_INIT) \
+		|| defined(HAVE_SHA256INIT))
+#	define HAVE_INTERNAL_SHA256 1
+#endif
+
+#if defined(HAVE_INTERNAL_SHA256)
+// Nothing
+#elif defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
+#	include <CommonCrypto/CommonDigest.h>
+#elif defined(HAVE_SHA256_H)
+#	include <sys/types.h>
+#	include <sha256.h>
+#elif defined(HAVE_SHA2_H)
+#	include <sys/types.h>
+#	include <sha2.h>
+#endif
+
+#if defined(HAVE_INTERNAL_SHA256)
+/// State for the internal SHA-256 implementation
+typedef struct {
+	/// Internal state
+	uint32_t state[8];
+
+	/// Size of the message excluding padding
+	uint64_t size;
+} lzma_sha256_state;
+#elif defined(HAVE_CC_SHA256_CTX)
+typedef CC_SHA256_CTX lzma_sha256_state;
+#elif defined(HAVE_SHA256_CTX)
+typedef SHA256_CTX lzma_sha256_state;
+#elif defined(HAVE_SHA2_CTX)
+typedef SHA2_CTX lzma_sha256_state;
+#endif
+
+#if defined(HAVE_INTERNAL_SHA256)
+// Nothing
+#elif defined(HAVE_CC_SHA256_INIT)
+#	define LZMA_SHA256FUNC(x) CC_SHA256_ ## x
+#elif defined(HAVE_SHA256_INIT)
+#	define LZMA_SHA256FUNC(x) SHA256_ ## x
+#elif defined(HAVE_SHA256INIT)
+#	define LZMA_SHA256FUNC(x) SHA256 ## x
+#endif
+
+// Index hashing needs the best possible hash function (preferably
+// a cryptographic hash) for maximum reliability.
+#if defined(HAVE_CHECK_SHA256)
+#	define LZMA_CHECK_BEST LZMA_CHECK_SHA256
+#elif defined(HAVE_CHECK_CRC64)
+#	define LZMA_CHECK_BEST LZMA_CHECK_CRC64
+#else
+#	define LZMA_CHECK_BEST LZMA_CHECK_CRC32
+#endif
+
+
+/// \brief      Structure to hold internal state of the check being calculated
+///
+/// \note       This is not in the public API because this structure may
+///             change in future if new integrity check algorithms are added.
+typedef struct {
+	/// Buffer to hold the final result and a temporary buffer for SHA256.
+	union {
+		uint8_t u8[64];
+		uint32_t u32[16];
+		uint64_t u64[8];
+	} buffer;
+
+	/// Check-specific data
+	union {
+		uint32_t crc32;
+		uint64_t crc64;
+		lzma_sha256_state sha256;
+	} state;
+
+} lzma_check_state;
+
+
+/// lzma_crc32_table[0] is needed by LZ encoder so we need to keep
+/// the array two-dimensional.
+#ifdef HAVE_SMALL
+extern uint32_t lzma_crc32_table[1][256];
+extern void lzma_crc32_init(void);
+#else
+extern const uint32_t lzma_crc32_table[8][256];
+extern const uint64_t lzma_crc64_table[4][256];
+#endif
+
+
+/// \brief      Initialize *check depending on type
+///
+/// \return     LZMA_OK on success. LZMA_UNSUPPORTED_CHECK if the type is not
+///             supported by the current version or build of liblzma.
+///             LZMA_PROG_ERROR if type > LZMA_CHECK_ID_MAX.
+extern void lzma_check_init(lzma_check_state *check, lzma_check type);
+
+/// Update the check state
+extern void lzma_check_update(lzma_check_state *check, lzma_check type,
+		const uint8_t *buf, size_t size);
+
+/// Finish the check calculation and store the result to check->buffer.u8.
+extern void lzma_check_finish(lzma_check_state *check, lzma_check type);
+
+
+#ifndef LZMA_SHA256FUNC
+
+/// Prepare SHA-256 state for new input.
+extern void lzma_sha256_init(lzma_check_state *check);
+
+/// Update the SHA-256 hash state
+extern void lzma_sha256_update(
+		const uint8_t *buf, size_t size, lzma_check_state *check);
+
+/// Finish the SHA-256 calculation and store the result to check->buffer.u8.
+extern void lzma_sha256_finish(lzma_check_state *check);
+
+
+#else
+
+static inline void
+lzma_sha256_init(lzma_check_state *check)
+{
+	LZMA_SHA256FUNC(Init)(&check->state.sha256);
+}
+
+
+static inline void
+lzma_sha256_update(const uint8_t *buf, size_t size, lzma_check_state *check)
+{
+#if defined(HAVE_CC_SHA256_INIT) && SIZE_MAX > UINT32_MAX
+	// Darwin's CC_SHA256_Update takes uint32_t as the buffer size,
+	// so use a loop to support size_t.
+	while (size > UINT32_MAX) {
+		LZMA_SHA256FUNC(Update)(&check->state.sha256, buf, UINT32_MAX);
+		buf += UINT32_MAX;
+		size -= UINT32_MAX;
+	}
+#endif
+
+	LZMA_SHA256FUNC(Update)(&check->state.sha256, buf, size);
+}
+
+
+static inline void
+lzma_sha256_finish(lzma_check_state *check)
+{
+	LZMA_SHA256FUNC(Final)(check->buffer.u8, &check->state.sha256);
+}
+
+#endif
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/check/sha256.c
===================================================================
--- vendor/xz/dist/src/liblzma/check/sha256.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/check/sha256.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,200 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       sha256.c
-/// \brief      SHA-256
-///
-/// \todo       Crypto++ has x86 ASM optimizations. They use SSE so if they
-///             are imported to liblzma, SSE instructions need to be used
-///             conditionally to keep the code working on older boxes.
-//
-//  This code is based on the code found from 7-Zip, which has a modified
-//  version of the SHA-256 found from Crypto++ <http://www.cryptopp.com/>.
-//  The code was modified a little to fit into liblzma.
-//
-//  Authors:    Kevin Springle
-//              Wei Dai
-//              Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-// Avoid bogus warnings in transform().
-#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || __GNUC__ > 4
-#	pragma GCC diagnostic ignored "-Wuninitialized"
-#endif
-
-#include "check.h"
-
-// At least on x86, GCC is able to optimize this to a rotate instruction.
-#define rotr_32(num, amount) ((num) >> (amount) | (num) << (32 - (amount)))
-
-#define blk0(i) (W[i] = data[i])
-#define blk2(i) (W[i & 15] += s1(W[(i - 2) & 15]) + W[(i - 7) & 15] \
-		+ s0(W[(i - 15) & 15]))
-
-#define Ch(x, y, z) (z ^ (x & (y ^ z)))
-#define Maj(x, y, z) ((x & y) | (z & (x | y)))
-
-#define a(i) T[(0 - i) & 7]
-#define b(i) T[(1 - i) & 7]
-#define c(i) T[(2 - i) & 7]
-#define d(i) T[(3 - i) & 7]
-#define e(i) T[(4 - i) & 7]
-#define f(i) T[(5 - i) & 7]
-#define g(i) T[(6 - i) & 7]
-#define h(i) T[(7 - i) & 7]
-
-#define R(i) \
-	h(i) += S1(e(i)) + Ch(e(i), f(i), g(i)) + SHA256_K[i + j] \
-		+ (j ? blk2(i) : blk0(i)); \
-	d(i) += h(i); \
-	h(i) += S0(a(i)) + Maj(a(i), b(i), c(i))
-
-#define S0(x) (rotr_32(x, 2) ^ rotr_32(x, 13) ^ rotr_32(x, 22))
-#define S1(x) (rotr_32(x, 6) ^ rotr_32(x, 11) ^ rotr_32(x, 25))
-#define s0(x) (rotr_32(x, 7) ^ rotr_32(x, 18) ^ (x >> 3))
-#define s1(x) (rotr_32(x, 17) ^ rotr_32(x, 19) ^ (x >> 10))
-
-
-static const uint32_t SHA256_K[64] = {
-	0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
-	0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
-	0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,
-	0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,
-	0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,
-	0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,
-	0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,
-	0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,
-	0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,
-	0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,
-	0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,
-	0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,
-	0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,
-	0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,
-	0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,
-	0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2,
-};
-
-
-static void
-transform(uint32_t state[8], const uint32_t data[16])
-{
-	uint32_t W[16];
-	uint32_t T[8];
-
-	// Copy state[] to working vars.
-	memcpy(T, state, sizeof(T));
-
-	// 64 operations, partially loop unrolled
-	for (unsigned int j = 0; j < 64; j += 16) {
-		R( 0); R( 1); R( 2); R( 3);
-		R( 4); R( 5); R( 6); R( 7);
-		R( 8); R( 9); R(10); R(11);
-		R(12); R(13); R(14); R(15);
-	}
-
-	// Add the working vars back into state[].
-	state[0] += a(0);
-	state[1] += b(0);
-	state[2] += c(0);
-	state[3] += d(0);
-	state[4] += e(0);
-	state[5] += f(0);
-	state[6] += g(0);
-	state[7] += h(0);
-}
-
-
-static void
-process(lzma_check_state *check)
-{
-#ifdef WORDS_BIGENDIAN
-	transform(check->state.sha256.state, check->buffer.u32);
-
-#else
-	uint32_t data[16];
-
-	for (size_t i = 0; i < 16; ++i)
-		data[i] = bswap32(check->buffer.u32[i]);
-
-	transform(check->state.sha256.state, data);
-#endif
-
-	return;
-}
-
-
-extern void
-lzma_sha256_init(lzma_check_state *check)
-{
-	static const uint32_t s[8] = {
-		0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A,
-		0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19,
-	};
-
-	memcpy(check->state.sha256.state, s, sizeof(s));
-	check->state.sha256.size = 0;
-
-	return;
-}
-
-
-extern void
-lzma_sha256_update(const uint8_t *buf, size_t size, lzma_check_state *check)
-{
-	// Copy the input data into a properly aligned temporary buffer.
-	// This way we can be called with arbitrarily sized buffers
-	// (no need to be multiple of 64 bytes), and the code works also
-	// on architectures that don't allow unaligned memory access.
-	while (size > 0) {
-		const size_t copy_start = check->state.sha256.size & 0x3F;
-		size_t copy_size = 64 - copy_start;
-		if (copy_size > size)
-			copy_size = size;
-
-		memcpy(check->buffer.u8 + copy_start, buf, copy_size);
-
-		buf += copy_size;
-		size -= copy_size;
-		check->state.sha256.size += copy_size;
-
-		if ((check->state.sha256.size & 0x3F) == 0)
-			process(check);
-	}
-
-	return;
-}
-
-
-extern void
-lzma_sha256_finish(lzma_check_state *check)
-{
-	// Add padding as described in RFC 3174 (it describes SHA-1 but
-	// the same padding style is used for SHA-256 too).
-	size_t pos = check->state.sha256.size & 0x3F;
-	check->buffer.u8[pos++] = 0x80;
-
-	while (pos != 64 - 8) {
-		if (pos == 64) {
-			process(check);
-			pos = 0;
-		}
-
-		check->buffer.u8[pos++] = 0x00;
-	}
-
-	// Convert the message size from bytes to bits.
-	check->state.sha256.size *= 8;
-
-	check->buffer.u64[(64 - 8) / 8] = conv64be(check->state.sha256.size);
-
-	process(check);
-
-	for (size_t i = 0; i < 8; ++i)
-		check->buffer.u32[i] = conv32be(check->state.sha256.state[i]);
-
-	return;
-}

Copied: vendor/xz/5.2.3/src/liblzma/check/sha256.c (from rev 9176, vendor/xz/dist/src/liblzma/check/sha256.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/check/sha256.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/check/sha256.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,196 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       sha256.c
+/// \brief      SHA-256
+///
+/// \todo       Crypto++ has x86 ASM optimizations. They use SSE so if they
+///             are imported to liblzma, SSE instructions need to be used
+///             conditionally to keep the code working on older boxes.
+//
+//  This code is based on the code found from 7-Zip, which has a modified
+//  version of the SHA-256 found from Crypto++ <http://www.cryptopp.com/>.
+//  The code was modified a little to fit into liblzma.
+//
+//  Authors:    Kevin Springle
+//              Wei Dai
+//              Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "check.h"
+
+// Rotate a uint32_t. GCC can optimize this to a rotate instruction
+// at least on x86.
+static inline uint32_t
+rotr_32(uint32_t num, unsigned amount)
+{
+        return (num >> amount) | (num << (32 - amount));
+}
+
+#define blk0(i) (W[i] = conv32be(data[i]))
+#define blk2(i) (W[i & 15] += s1(W[(i - 2) & 15]) + W[(i - 7) & 15] \
+		+ s0(W[(i - 15) & 15]))
+
+#define Ch(x, y, z) (z ^ (x & (y ^ z)))
+#define Maj(x, y, z) ((x & (y ^ z)) + (y & z))
+
+#define a(i) T[(0 - i) & 7]
+#define b(i) T[(1 - i) & 7]
+#define c(i) T[(2 - i) & 7]
+#define d(i) T[(3 - i) & 7]
+#define e(i) T[(4 - i) & 7]
+#define f(i) T[(5 - i) & 7]
+#define g(i) T[(6 - i) & 7]
+#define h(i) T[(7 - i) & 7]
+
+#define R(i, j, blk) \
+	h(i) += S1(e(i)) + Ch(e(i), f(i), g(i)) + SHA256_K[i + j] + blk; \
+	d(i) += h(i); \
+	h(i) += S0(a(i)) + Maj(a(i), b(i), c(i))
+#define R0(i) R(i, 0, blk0(i))
+#define R2(i) R(i, j, blk2(i))
+
+#define S0(x) rotr_32(x ^ rotr_32(x ^ rotr_32(x, 9), 11), 2)
+#define S1(x) rotr_32(x ^ rotr_32(x ^ rotr_32(x, 14), 5), 6)
+#define s0(x) (rotr_32(x ^ rotr_32(x, 11), 7) ^ (x >> 3))
+#define s1(x) (rotr_32(x ^ rotr_32(x, 2), 17) ^ (x >> 10))
+
+
+static const uint32_t SHA256_K[64] = {
+	0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
+	0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
+	0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,
+	0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,
+	0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,
+	0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,
+	0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,
+	0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,
+	0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,
+	0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,
+	0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,
+	0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,
+	0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,
+	0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,
+	0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,
+	0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2,
+};
+
+
+static void
+transform(uint32_t state[8], const uint32_t data[16])
+{
+	uint32_t W[16];
+	uint32_t T[8];
+
+	// Copy state[] to working vars.
+	memcpy(T, state, sizeof(T));
+
+	// The first 16 operations unrolled
+	R0( 0); R0( 1); R0( 2); R0( 3);
+	R0( 4); R0( 5); R0( 6); R0( 7);
+	R0( 8); R0( 9); R0(10); R0(11);
+	R0(12); R0(13); R0(14); R0(15);
+
+	// The remaining 48 operations partially unrolled
+	for (unsigned int j = 16; j < 64; j += 16) {
+		R2( 0); R2( 1); R2( 2); R2( 3);
+		R2( 4); R2( 5); R2( 6); R2( 7);
+		R2( 8); R2( 9); R2(10); R2(11);
+		R2(12); R2(13); R2(14); R2(15);
+	}
+
+	// Add the working vars back into state[].
+	state[0] += a(0);
+	state[1] += b(0);
+	state[2] += c(0);
+	state[3] += d(0);
+	state[4] += e(0);
+	state[5] += f(0);
+	state[6] += g(0);
+	state[7] += h(0);
+}
+
+
+static void
+process(lzma_check_state *check)
+{
+	transform(check->state.sha256.state, check->buffer.u32);
+	return;
+}
+
+
+extern void
+lzma_sha256_init(lzma_check_state *check)
+{
+	static const uint32_t s[8] = {
+		0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A,
+		0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19,
+	};
+
+	memcpy(check->state.sha256.state, s, sizeof(s));
+	check->state.sha256.size = 0;
+
+	return;
+}
+
+
+extern void
+lzma_sha256_update(const uint8_t *buf, size_t size, lzma_check_state *check)
+{
+	// Copy the input data into a properly aligned temporary buffer.
+	// This way we can be called with arbitrarily sized buffers
+	// (no need to be multiple of 64 bytes), and the code works also
+	// on architectures that don't allow unaligned memory access.
+	while (size > 0) {
+		const size_t copy_start = check->state.sha256.size & 0x3F;
+		size_t copy_size = 64 - copy_start;
+		if (copy_size > size)
+			copy_size = size;
+
+		memcpy(check->buffer.u8 + copy_start, buf, copy_size);
+
+		buf += copy_size;
+		size -= copy_size;
+		check->state.sha256.size += copy_size;
+
+		if ((check->state.sha256.size & 0x3F) == 0)
+			process(check);
+	}
+
+	return;
+}
+
+
+extern void
+lzma_sha256_finish(lzma_check_state *check)
+{
+	// Add padding as described in RFC 3174 (it describes SHA-1 but
+	// the same padding style is used for SHA-256 too).
+	size_t pos = check->state.sha256.size & 0x3F;
+	check->buffer.u8[pos++] = 0x80;
+
+	while (pos != 64 - 8) {
+		if (pos == 64) {
+			process(check);
+			pos = 0;
+		}
+
+		check->buffer.u8[pos++] = 0x00;
+	}
+
+	// Convert the message size from bytes to bits.
+	check->state.sha256.size *= 8;
+
+	check->buffer.u64[(64 - 8) / 8] = conv64be(check->state.sha256.size);
+
+	process(check);
+
+	for (size_t i = 0; i < 8; ++i)
+		check->buffer.u32[i] = conv32be(check->state.sha256.state[i]);
+
+	return;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/Makefile.inc
===================================================================
--- vendor/xz/dist/src/liblzma/common/Makefile.inc	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/Makefile.inc	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,67 +0,0 @@
-##
-## Author: Lasse Collin
-##
-## This file has been put into the public domain.
-## You can do whatever you want with this file.
-##
-
-liblzma_la_SOURCES += \
-	common/common.c \
-	common/common.h \
-	common/block_util.c \
-	common/easy_preset.c \
-	common/easy_preset.h \
-	common/filter_common.c \
-	common/filter_common.h \
-	common/hardware_physmem.c \
-	common/index.c \
-	common/index.h \
-	common/stream_flags_common.c \
-	common/stream_flags_common.h \
-	common/vli_size.c
-
-if COND_MAIN_ENCODER
-liblzma_la_SOURCES += \
-	common/alone_encoder.c \
-	common/block_buffer_encoder.c \
-	common/block_encoder.c \
-	common/block_encoder.h \
-	common/block_header_encoder.c \
-	common/easy_buffer_encoder.c \
-	common/easy_encoder.c \
-	common/easy_encoder_memusage.c \
-	common/filter_buffer_encoder.c \
-	common/filter_encoder.c \
-	common/filter_encoder.h \
-	common/filter_flags_encoder.c \
-	common/index_encoder.c \
-	common/index_encoder.h \
-	common/stream_buffer_encoder.c \
-	common/stream_encoder.c \
-	common/stream_encoder.h \
-	common/stream_flags_encoder.c \
-	common/vli_encoder.c
-endif
-
-if COND_MAIN_DECODER
-liblzma_la_SOURCES += \
-	common/alone_decoder.c \
-	common/alone_decoder.h \
-	common/auto_decoder.c \
-	common/block_buffer_decoder.c \
-	common/block_decoder.c \
-	common/block_decoder.h \
-	common/block_header_decoder.c \
-	common/easy_decoder_memusage.c \
-	common/filter_buffer_decoder.c \
-	common/filter_decoder.c \
-	common/filter_decoder.h \
-	common/filter_flags_decoder.c \
-	common/index_decoder.c \
-	common/index_hash.c \
-	common/stream_buffer_decoder.c \
-	common/stream_decoder.c \
-	common/stream_decoder.h \
-	common/stream_flags_decoder.c \
-	common/vli_decoder.c
-endif

Deleted: vendor/xz/5.2.3/src/liblzma/common/alone_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/alone_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/alone_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,238 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       alone_decoder.c
-/// \brief      Decoder for LZMA_Alone files
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "alone_decoder.h"
-#include "lzma_decoder.h"
-#include "lz_decoder.h"
-
-
-struct lzma_coder_s {
-	lzma_next_coder next;
-
-	enum {
-		SEQ_PROPERTIES,
-		SEQ_DICTIONARY_SIZE,
-		SEQ_UNCOMPRESSED_SIZE,
-		SEQ_CODER_INIT,
-		SEQ_CODE,
-	} sequence;
-
-	/// If true, reject files that are unlikely to be .lzma files.
-	/// If false, more non-.lzma files get accepted and will give
-	/// LZMA_DATA_ERROR either immediately or after a few output bytes.
-	bool picky;
-
-	/// Position in the header fields
-	size_t pos;
-
-	/// Uncompressed size decoded from the header
-	lzma_vli uncompressed_size;
-
-	/// Memory usage limit
-	uint64_t memlimit;
-
-	/// Amount of memory actually needed (only an estimate)
-	uint64_t memusage;
-
-	/// Options decoded from the header needed to initialize
-	/// the LZMA decoder
-	lzma_options_lzma options;
-};
-
-
-static lzma_ret
-alone_decode(lzma_coder *coder,
-		lzma_allocator *allocator lzma_attribute((__unused__)),
-		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)
-{
-	while (*out_pos < out_size
-			&& (coder->sequence == SEQ_CODE || *in_pos < in_size))
-	switch (coder->sequence) {
-	case SEQ_PROPERTIES:
-		if (lzma_lzma_lclppb_decode(&coder->options, in[*in_pos]))
-			return LZMA_FORMAT_ERROR;
-
-		coder->sequence = SEQ_DICTIONARY_SIZE;
-		++*in_pos;
-		break;
-
-	case SEQ_DICTIONARY_SIZE:
-		coder->options.dict_size
-				|= (size_t)(in[*in_pos]) << (coder->pos * 8);
-
-		if (++coder->pos == 4) {
-			if (coder->picky && coder->options.dict_size
-					!= UINT32_MAX) {
-				// A hack to ditch tons of false positives:
-				// We allow only dictionary sizes that are
-				// 2^n or 2^n + 2^(n-1). LZMA_Alone created
-				// only files with 2^n, but accepts any
-				// dictionary size.
-				uint32_t d = coder->options.dict_size - 1;
-				d |= d >> 2;
-				d |= d >> 3;
-				d |= d >> 4;
-				d |= d >> 8;
-				d |= d >> 16;
-				++d;
-
-				if (d != coder->options.dict_size)
-					return LZMA_FORMAT_ERROR;
-			}
-
-			coder->pos = 0;
-			coder->sequence = SEQ_UNCOMPRESSED_SIZE;
-		}
-
-		++*in_pos;
-		break;
-
-	case SEQ_UNCOMPRESSED_SIZE:
-		coder->uncompressed_size
-				|= (lzma_vli)(in[*in_pos]) << (coder->pos * 8);
-		++*in_pos;
-		if (++coder->pos < 8)
-			break;
-
-		// Another hack to ditch false positives: Assume that
-		// if the uncompressed size is known, it must be less
-		// than 256 GiB.
-		if (coder->picky
-				&& coder->uncompressed_size != LZMA_VLI_UNKNOWN
-				&& coder->uncompressed_size
-					>= (LZMA_VLI_C(1) << 38))
-			return LZMA_FORMAT_ERROR;
-
-		// Calculate the memory usage so that it is ready
-		// for SEQ_CODER_INIT.
-		coder->memusage = lzma_lzma_decoder_memusage(&coder->options)
-				+ LZMA_MEMUSAGE_BASE;
-
-		coder->pos = 0;
-		coder->sequence = SEQ_CODER_INIT;
-
-	// Fall through
-
-	case SEQ_CODER_INIT: {
-		if (coder->memusage > coder->memlimit)
-			return LZMA_MEMLIMIT_ERROR;
-
-		lzma_filter_info filters[2] = {
-			{
-				.init = &lzma_lzma_decoder_init,
-				.options = &coder->options,
-			}, {
-				.init = NULL,
-			}
-		};
-
-		const lzma_ret ret = lzma_next_filter_init(&coder->next,
-				allocator, filters);
-		if (ret != LZMA_OK)
-			return ret;
-
-		// Use a hack to set the uncompressed size.
-		lzma_lz_decoder_uncompressed(coder->next.coder,
-				coder->uncompressed_size);
-
-		coder->sequence = SEQ_CODE;
-		break;
-	}
-
-	case SEQ_CODE: {
-		return coder->next.code(coder->next.coder,
-				allocator, in, in_pos, in_size,
-				out, out_pos, out_size, action);
-	}
-
-	default:
-		return LZMA_PROG_ERROR;
-	}
-
-	return LZMA_OK;
-}
-
-
-static void
-alone_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_ret
-alone_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
-		uint64_t *old_memlimit, uint64_t new_memlimit)
-{
-	*memusage = coder->memusage;
-	*old_memlimit = coder->memlimit;
-
-	if (new_memlimit != 0) {
-		if (new_memlimit < coder->memusage)
-			return LZMA_MEMLIMIT_ERROR;
-
-		coder->memlimit = new_memlimit;
-	}
-
-	return LZMA_OK;
-}
-
-
-extern lzma_ret
-lzma_alone_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		uint64_t memlimit, bool picky)
-{
-	lzma_next_coder_init(&lzma_alone_decoder_init, next, allocator);
-
-	if (memlimit == 0)
-		return LZMA_PROG_ERROR;
-
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &alone_decode;
-		next->end = &alone_decoder_end;
-		next->memconfig = &alone_decoder_memconfig;
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	next->coder->sequence = SEQ_PROPERTIES;
-	next->coder->picky = picky;
-	next->coder->pos = 0;
-	next->coder->options.dict_size = 0;
-	next->coder->options.preset_dict = NULL;
-	next->coder->options.preset_dict_size = 0;
-	next->coder->uncompressed_size = 0;
-	next->coder->memlimit = memlimit;
-	next->coder->memusage = LZMA_MEMUSAGE_BASE;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_alone_decoder(lzma_stream *strm, uint64_t memlimit)
-{
-	lzma_next_strm_init(lzma_alone_decoder_init, strm, memlimit, false);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/alone_decoder.c (from rev 11013, vendor/xz/dist/src/liblzma/common/alone_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/alone_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/alone_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,246 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       alone_decoder.c
+/// \brief      Decoder for LZMA_Alone files
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "alone_decoder.h"
+#include "lzma_decoder.h"
+#include "lz_decoder.h"
+
+
+typedef struct {
+	lzma_next_coder next;
+
+	enum {
+		SEQ_PROPERTIES,
+		SEQ_DICTIONARY_SIZE,
+		SEQ_UNCOMPRESSED_SIZE,
+		SEQ_CODER_INIT,
+		SEQ_CODE,
+	} sequence;
+
+	/// If true, reject files that are unlikely to be .lzma files.
+	/// If false, more non-.lzma files get accepted and will give
+	/// LZMA_DATA_ERROR either immediately or after a few output bytes.
+	bool picky;
+
+	/// Position in the header fields
+	size_t pos;
+
+	/// Uncompressed size decoded from the header
+	lzma_vli uncompressed_size;
+
+	/// Memory usage limit
+	uint64_t memlimit;
+
+	/// Amount of memory actually needed (only an estimate)
+	uint64_t memusage;
+
+	/// Options decoded from the header needed to initialize
+	/// the LZMA decoder
+	lzma_options_lzma options;
+} lzma_alone_coder;
+
+
+static lzma_ret
+alone_decode(void *coder_ptr,
+		const lzma_allocator *allocator lzma_attribute((__unused__)),
+		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)
+{
+	lzma_alone_coder *coder = coder_ptr;
+
+	while (*out_pos < out_size
+			&& (coder->sequence == SEQ_CODE || *in_pos < in_size))
+	switch (coder->sequence) {
+	case SEQ_PROPERTIES:
+		if (lzma_lzma_lclppb_decode(&coder->options, in[*in_pos]))
+			return LZMA_FORMAT_ERROR;
+
+		coder->sequence = SEQ_DICTIONARY_SIZE;
+		++*in_pos;
+		break;
+
+	case SEQ_DICTIONARY_SIZE:
+		coder->options.dict_size
+				|= (size_t)(in[*in_pos]) << (coder->pos * 8);
+
+		if (++coder->pos == 4) {
+			if (coder->picky && coder->options.dict_size
+					!= UINT32_MAX) {
+				// A hack to ditch tons of false positives:
+				// We allow only dictionary sizes that are
+				// 2^n or 2^n + 2^(n-1). LZMA_Alone created
+				// only files with 2^n, but accepts any
+				// dictionary size.
+				uint32_t d = coder->options.dict_size - 1;
+				d |= d >> 2;
+				d |= d >> 3;
+				d |= d >> 4;
+				d |= d >> 8;
+				d |= d >> 16;
+				++d;
+
+				if (d != coder->options.dict_size)
+					return LZMA_FORMAT_ERROR;
+			}
+
+			coder->pos = 0;
+			coder->sequence = SEQ_UNCOMPRESSED_SIZE;
+		}
+
+		++*in_pos;
+		break;
+
+	case SEQ_UNCOMPRESSED_SIZE:
+		coder->uncompressed_size
+				|= (lzma_vli)(in[*in_pos]) << (coder->pos * 8);
+		++*in_pos;
+		if (++coder->pos < 8)
+			break;
+
+		// Another hack to ditch false positives: Assume that
+		// if the uncompressed size is known, it must be less
+		// than 256 GiB.
+		if (coder->picky
+				&& coder->uncompressed_size != LZMA_VLI_UNKNOWN
+				&& coder->uncompressed_size
+					>= (LZMA_VLI_C(1) << 38))
+			return LZMA_FORMAT_ERROR;
+
+		// Calculate the memory usage so that it is ready
+		// for SEQ_CODER_INIT.
+		coder->memusage = lzma_lzma_decoder_memusage(&coder->options)
+				+ LZMA_MEMUSAGE_BASE;
+
+		coder->pos = 0;
+		coder->sequence = SEQ_CODER_INIT;
+
+	// Fall through
+
+	case SEQ_CODER_INIT: {
+		if (coder->memusage > coder->memlimit)
+			return LZMA_MEMLIMIT_ERROR;
+
+		lzma_filter_info filters[2] = {
+			{
+				.init = &lzma_lzma_decoder_init,
+				.options = &coder->options,
+			}, {
+				.init = NULL,
+			}
+		};
+
+		const lzma_ret ret = lzma_next_filter_init(&coder->next,
+				allocator, filters);
+		if (ret != LZMA_OK)
+			return ret;
+
+		// Use a hack to set the uncompressed size.
+		lzma_lz_decoder_uncompressed(coder->next.coder,
+				coder->uncompressed_size);
+
+		coder->sequence = SEQ_CODE;
+		break;
+	}
+
+	case SEQ_CODE: {
+		return coder->next.code(coder->next.coder,
+				allocator, in, in_pos, in_size,
+				out, out_pos, out_size, action);
+	}
+
+	default:
+		return LZMA_PROG_ERROR;
+	}
+
+	return LZMA_OK;
+}
+
+
+static void
+alone_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_alone_coder *coder = coder_ptr;
+	lzma_next_end(&coder->next, allocator);
+	lzma_free(coder, allocator);
+	return;
+}
+
+
+static lzma_ret
+alone_decoder_memconfig(void *coder_ptr, uint64_t *memusage,
+		uint64_t *old_memlimit, uint64_t new_memlimit)
+{
+	lzma_alone_coder *coder = coder_ptr;
+
+	*memusage = coder->memusage;
+	*old_memlimit = coder->memlimit;
+
+	if (new_memlimit != 0) {
+		if (new_memlimit < coder->memusage)
+			return LZMA_MEMLIMIT_ERROR;
+
+		coder->memlimit = new_memlimit;
+	}
+
+	return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_alone_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		uint64_t memlimit, bool picky)
+{
+	lzma_next_coder_init(&lzma_alone_decoder_init, next, allocator);
+
+	if (memlimit == 0)
+		return LZMA_PROG_ERROR;
+
+	lzma_alone_coder *coder = next->coder;
+
+	if (coder == NULL) {
+		coder = lzma_alloc(sizeof(lzma_alone_coder), allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		next->coder = coder;
+		next->code = &alone_decode;
+		next->end = &alone_decoder_end;
+		next->memconfig = &alone_decoder_memconfig;
+		coder->next = LZMA_NEXT_CODER_INIT;
+	}
+
+	coder->sequence = SEQ_PROPERTIES;
+	coder->picky = picky;
+	coder->pos = 0;
+	coder->options.dict_size = 0;
+	coder->options.preset_dict = NULL;
+	coder->options.preset_dict_size = 0;
+	coder->uncompressed_size = 0;
+	coder->memlimit = memlimit;
+	coder->memusage = LZMA_MEMUSAGE_BASE;
+
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_alone_decoder(lzma_stream *strm, uint64_t memlimit)
+{
+	lzma_next_strm_init(lzma_alone_decoder_init, strm, memlimit, false);
+
+	strm->internal->supported_actions[LZMA_RUN] = true;
+	strm->internal->supported_actions[LZMA_FINISH] = true;
+
+	return LZMA_OK;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/alone_decoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/common/alone_decoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/alone_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,23 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       alone_decoder.h
-/// \brief      Decoder for LZMA_Alone files
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_ALONE_DECODER_H
-#define LZMA_ALONE_DECODER_H
-
-#include "common.h"
-
-
-extern lzma_ret lzma_alone_decoder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		uint64_t memlimit, bool picky);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/common/alone_decoder.h (from rev 9176, vendor/xz/dist/src/liblzma/common/alone_decoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/alone_decoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/alone_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       alone_decoder.h
+/// \brief      Decoder for LZMA_Alone files
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_ALONE_DECODER_H
+#define LZMA_ALONE_DECODER_H
+
+#include "common.h"
+
+
+extern lzma_ret lzma_alone_decoder_init(
+		lzma_next_coder *next, const lzma_allocator *allocator,
+		uint64_t memlimit, bool picky);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/common/alone_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/alone_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/alone_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,157 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       alone_decoder.c
-/// \brief      Decoder for LZMA_Alone files
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-#include "lzma_encoder.h"
-
-
-#define ALONE_HEADER_SIZE (1 + 4 + 8)
-
-
-struct lzma_coder_s {
-	lzma_next_coder next;
-
-	enum {
-		SEQ_HEADER,
-		SEQ_CODE,
-	} sequence;
-
-	size_t header_pos;
-	uint8_t header[ALONE_HEADER_SIZE];
-};
-
-
-static lzma_ret
-alone_encode(lzma_coder *coder,
-		lzma_allocator *allocator lzma_attribute((__unused__)),
-		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)
-{
-	while (*out_pos < out_size)
-	switch (coder->sequence) {
-	case SEQ_HEADER:
-		lzma_bufcpy(coder->header, &coder->header_pos,
-				ALONE_HEADER_SIZE,
-				out, out_pos, out_size);
-		if (coder->header_pos < ALONE_HEADER_SIZE)
-			return LZMA_OK;
-
-		coder->sequence = SEQ_CODE;
-		break;
-
-	case SEQ_CODE:
-		return coder->next.code(coder->next.coder,
-				allocator, in, in_pos, in_size,
-				out, out_pos, out_size, action);
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-
-	return LZMA_OK;
-}
-
-
-static void
-alone_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-// At least for now, this is not used by any internal function.
-static lzma_ret
-alone_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_options_lzma *options)
-{
-	lzma_next_coder_init(&alone_encoder_init, next, allocator);
-
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &alone_encode;
-		next->end = &alone_encoder_end;
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	// Basic initializations
-	next->coder->sequence = SEQ_HEADER;
-	next->coder->header_pos = 0;
-
-	// Encode the header:
-	// - Properties (1 byte)
-	if (lzma_lzma_lclppb_encode(options, next->coder->header))
-		return LZMA_OPTIONS_ERROR;
-
-	// - Dictionary size (4 bytes)
-	if (options->dict_size < LZMA_DICT_SIZE_MIN)
-		return LZMA_OPTIONS_ERROR;
-
-	// Round up to the next 2^n or 2^n + 2^(n - 1) depending on which
-	// one is the next unless it is UINT32_MAX. While the header would
-	// allow any 32-bit integer, we do this to keep the decoder of liblzma
-	// accepting the resulting files.
-	uint32_t d = options->dict_size - 1;
-	d |= d >> 2;
-	d |= d >> 3;
-	d |= d >> 4;
-	d |= d >> 8;
-	d |= d >> 16;
-	if (d != UINT32_MAX)
-		++d;
-
-	unaligned_write32le(next->coder->header + 1, d);
-
-	// - Uncompressed size (always unknown and using EOPM)
-	memset(next->coder->header + 1 + 4, 0xFF, 8);
-
-	// Initialize the LZMA encoder.
-	const lzma_filter_info filters[2] = {
-		{
-			.init = &lzma_lzma_encoder_init,
-			.options = (void *)(options),
-		}, {
-			.init = NULL,
-		}
-	};
-
-	return lzma_next_filter_init(&next->coder->next, allocator, filters);
-}
-
-
-/*
-extern lzma_ret
-lzma_alone_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_options_alone *options)
-{
-	lzma_next_coder_init(&alone_encoder_init, next, allocator, options);
-}
-*/
-
-
-extern LZMA_API(lzma_ret)
-lzma_alone_encoder(lzma_stream *strm, const lzma_options_lzma *options)
-{
-	lzma_next_strm_init(alone_encoder_init, strm, options);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/alone_encoder.c (from rev 11013, vendor/xz/dist/src/liblzma/common/alone_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/alone_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/alone_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,163 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       alone_decoder.c
+/// \brief      Decoder for LZMA_Alone files
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+#include "lzma_encoder.h"
+
+
+#define ALONE_HEADER_SIZE (1 + 4 + 8)
+
+
+typedef struct {
+	lzma_next_coder next;
+
+	enum {
+		SEQ_HEADER,
+		SEQ_CODE,
+	} sequence;
+
+	size_t header_pos;
+	uint8_t header[ALONE_HEADER_SIZE];
+} lzma_alone_coder;
+
+
+static lzma_ret
+alone_encode(void *coder_ptr,
+		const lzma_allocator *allocator lzma_attribute((__unused__)),
+		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)
+{
+	lzma_alone_coder *coder = coder_ptr;
+
+	while (*out_pos < out_size)
+	switch (coder->sequence) {
+	case SEQ_HEADER:
+		lzma_bufcpy(coder->header, &coder->header_pos,
+				ALONE_HEADER_SIZE,
+				out, out_pos, out_size);
+		if (coder->header_pos < ALONE_HEADER_SIZE)
+			return LZMA_OK;
+
+		coder->sequence = SEQ_CODE;
+		break;
+
+	case SEQ_CODE:
+		return coder->next.code(coder->next.coder,
+				allocator, in, in_pos, in_size,
+				out, out_pos, out_size, action);
+
+	default:
+		assert(0);
+		return LZMA_PROG_ERROR;
+	}
+
+	return LZMA_OK;
+}
+
+
+static void
+alone_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_alone_coder *coder = coder_ptr;
+	lzma_next_end(&coder->next, allocator);
+	lzma_free(coder, allocator);
+	return;
+}
+
+
+// At least for now, this is not used by any internal function.
+static lzma_ret
+alone_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_options_lzma *options)
+{
+	lzma_next_coder_init(&alone_encoder_init, next, allocator);
+
+	lzma_alone_coder *coder = next->coder;
+
+	if (coder == NULL) {
+		coder = lzma_alloc(sizeof(lzma_alone_coder), allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		next->coder = coder;
+		next->code = &alone_encode;
+		next->end = &alone_encoder_end;
+		coder->next = LZMA_NEXT_CODER_INIT;
+	}
+
+	// Basic initializations
+	coder->sequence = SEQ_HEADER;
+	coder->header_pos = 0;
+
+	// Encode the header:
+	// - Properties (1 byte)
+	if (lzma_lzma_lclppb_encode(options, coder->header))
+		return LZMA_OPTIONS_ERROR;
+
+	// - Dictionary size (4 bytes)
+	if (options->dict_size < LZMA_DICT_SIZE_MIN)
+		return LZMA_OPTIONS_ERROR;
+
+	// Round up to the next 2^n or 2^n + 2^(n - 1) depending on which
+	// one is the next unless it is UINT32_MAX. While the header would
+	// allow any 32-bit integer, we do this to keep the decoder of liblzma
+	// accepting the resulting files.
+	uint32_t d = options->dict_size - 1;
+	d |= d >> 2;
+	d |= d >> 3;
+	d |= d >> 4;
+	d |= d >> 8;
+	d |= d >> 16;
+	if (d != UINT32_MAX)
+		++d;
+
+	unaligned_write32le(coder->header + 1, d);
+
+	// - Uncompressed size (always unknown and using EOPM)
+	memset(coder->header + 1 + 4, 0xFF, 8);
+
+	// Initialize the LZMA encoder.
+	const lzma_filter_info filters[2] = {
+		{
+			.init = &lzma_lzma_encoder_init,
+			.options = (void *)(options),
+		}, {
+			.init = NULL,
+		}
+	};
+
+	return lzma_next_filter_init(&coder->next, allocator, filters);
+}
+
+
+/*
+extern lzma_ret
+lzma_alone_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_options_alone *options)
+{
+	lzma_next_coder_init(&alone_encoder_init, next, allocator, options);
+}
+*/
+
+
+extern LZMA_API(lzma_ret)
+lzma_alone_encoder(lzma_stream *strm, const lzma_options_lzma *options)
+{
+	lzma_next_strm_init(alone_encoder_init, strm, options);
+
+	strm->internal->supported_actions[LZMA_RUN] = true;
+	strm->internal->supported_actions[LZMA_FINISH] = true;
+
+	return LZMA_OK;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/auto_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/auto_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/auto_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,186 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       auto_decoder.c
-/// \brief      Autodetect between .xz Stream and .lzma (LZMA_Alone) formats
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "stream_decoder.h"
-#include "alone_decoder.h"
-
-
-struct lzma_coder_s {
-	/// Stream decoder or LZMA_Alone decoder
-	lzma_next_coder next;
-
-	uint64_t memlimit;
-	uint32_t flags;
-
-	enum {
-		SEQ_INIT,
-		SEQ_CODE,
-		SEQ_FINISH,
-	} sequence;
-};
-
-
-static lzma_ret
-auto_decode(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_INIT:
-		if (*in_pos >= in_size)
-			return LZMA_OK;
-
-		// Update the sequence now, because we want to continue from
-		// SEQ_CODE even if we return some LZMA_*_CHECK.
-		coder->sequence = SEQ_CODE;
-
-		// Detect the file format. For now this is simple, since if
-		// it doesn't start with 0xFD (the first magic byte of the
-		// new format), it has to be LZMA_Alone, or something that
-		// we don't support at all.
-		if (in[*in_pos] == 0xFD) {
-			return_if_error(lzma_stream_decoder_init(
-					&coder->next, allocator,
-					coder->memlimit, coder->flags));
-		} else {
-			return_if_error(lzma_alone_decoder_init(&coder->next,
-					allocator, coder->memlimit, true));
-
-			// If the application wants to know about missing
-			// integrity check or about the check in general, we
-			// need to handle it here, because LZMA_Alone decoder
-			// doesn't accept any flags.
-			if (coder->flags & LZMA_TELL_NO_CHECK)
-				return LZMA_NO_CHECK;
-
-			if (coder->flags & LZMA_TELL_ANY_CHECK)
-				return LZMA_GET_CHECK;
-		}
-
-	// Fall through
-
-	case SEQ_CODE: {
-		const lzma_ret ret = coder->next.code(
-				coder->next.coder, allocator,
-				in, in_pos, in_size,
-				out, out_pos, out_size, action);
-		if (ret != LZMA_STREAM_END
-				|| (coder->flags & LZMA_CONCATENATED) == 0)
-			return ret;
-
-		coder->sequence = SEQ_FINISH;
-	}
-
-	// Fall through
-
-	case SEQ_FINISH:
-		// When LZMA_DECODE_CONCATENATED was used and we were decoding
-		// LZMA_Alone file, we need to check check that there is no
-		// trailing garbage and wait for LZMA_FINISH.
-		if (*in_pos < in_size)
-			return LZMA_DATA_ERROR;
-
-		return action == LZMA_FINISH ? LZMA_STREAM_END : LZMA_OK;
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-}
-
-
-static void
-auto_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_check
-auto_decoder_get_check(const lzma_coder *coder)
-{
-	// It is LZMA_Alone if get_check is NULL.
-	return coder->next.get_check == NULL ? LZMA_CHECK_NONE
-			: coder->next.get_check(coder->next.coder);
-}
-
-
-static lzma_ret
-auto_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
-		uint64_t *old_memlimit, uint64_t new_memlimit)
-{
-	lzma_ret ret;
-
-	if (coder->next.memconfig != NULL) {
-		ret = coder->next.memconfig(coder->next.coder,
-				memusage, old_memlimit, new_memlimit);
-		assert(*old_memlimit == coder->memlimit);
-	} else {
-		// No coder is configured yet. Use the base value as
-		// the current memory usage.
-		*memusage = LZMA_MEMUSAGE_BASE;
-		*old_memlimit = coder->memlimit;
-		ret = LZMA_OK;
-	}
-
-	if (ret == LZMA_OK && new_memlimit != 0)
-		coder->memlimit = new_memlimit;
-
-	return ret;
-}
-
-
-static lzma_ret
-auto_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		uint64_t memlimit, uint32_t flags)
-{
-	lzma_next_coder_init(&auto_decoder_init, next, allocator);
-
-	if (memlimit == 0)
-		return LZMA_PROG_ERROR;
-
-	if (flags & ~LZMA_SUPPORTED_FLAGS)
-		return LZMA_OPTIONS_ERROR;
-
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &auto_decode;
-		next->end = &auto_decoder_end;
-		next->get_check = &auto_decoder_get_check;
-		next->memconfig = &auto_decoder_memconfig;
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	next->coder->memlimit = memlimit;
-	next->coder->flags = flags;
-	next->coder->sequence = SEQ_INIT;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_auto_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags)
-{
-	lzma_next_strm_init(auto_decoder_init, strm, memlimit, flags);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/auto_decoder.c (from rev 11013, vendor/xz/dist/src/liblzma/common/auto_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/auto_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/auto_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,195 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       auto_decoder.c
+/// \brief      Autodetect between .xz Stream and .lzma (LZMA_Alone) formats
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "stream_decoder.h"
+#include "alone_decoder.h"
+
+
+typedef struct {
+	/// Stream decoder or LZMA_Alone decoder
+	lzma_next_coder next;
+
+	uint64_t memlimit;
+	uint32_t flags;
+
+	enum {
+		SEQ_INIT,
+		SEQ_CODE,
+		SEQ_FINISH,
+	} sequence;
+} lzma_auto_coder;
+
+
+static lzma_ret
+auto_decode(void *coder_ptr, const 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)
+{
+	lzma_auto_coder *coder = coder_ptr;
+
+	switch (coder->sequence) {
+	case SEQ_INIT:
+		if (*in_pos >= in_size)
+			return LZMA_OK;
+
+		// Update the sequence now, because we want to continue from
+		// SEQ_CODE even if we return some LZMA_*_CHECK.
+		coder->sequence = SEQ_CODE;
+
+		// Detect the file format. For now this is simple, since if
+		// it doesn't start with 0xFD (the first magic byte of the
+		// new format), it has to be LZMA_Alone, or something that
+		// we don't support at all.
+		if (in[*in_pos] == 0xFD) {
+			return_if_error(lzma_stream_decoder_init(
+					&coder->next, allocator,
+					coder->memlimit, coder->flags));
+		} else {
+			return_if_error(lzma_alone_decoder_init(&coder->next,
+					allocator, coder->memlimit, true));
+
+			// If the application wants to know about missing
+			// integrity check or about the check in general, we
+			// need to handle it here, because LZMA_Alone decoder
+			// doesn't accept any flags.
+			if (coder->flags & LZMA_TELL_NO_CHECK)
+				return LZMA_NO_CHECK;
+
+			if (coder->flags & LZMA_TELL_ANY_CHECK)
+				return LZMA_GET_CHECK;
+		}
+
+	// Fall through
+
+	case SEQ_CODE: {
+		const lzma_ret ret = coder->next.code(
+				coder->next.coder, allocator,
+				in, in_pos, in_size,
+				out, out_pos, out_size, action);
+		if (ret != LZMA_STREAM_END
+				|| (coder->flags & LZMA_CONCATENATED) == 0)
+			return ret;
+
+		coder->sequence = SEQ_FINISH;
+	}
+
+	// Fall through
+
+	case SEQ_FINISH:
+		// When LZMA_DECODE_CONCATENATED was used and we were decoding
+		// LZMA_Alone file, we need to check check that there is no
+		// trailing garbage and wait for LZMA_FINISH.
+		if (*in_pos < in_size)
+			return LZMA_DATA_ERROR;
+
+		return action == LZMA_FINISH ? LZMA_STREAM_END : LZMA_OK;
+
+	default:
+		assert(0);
+		return LZMA_PROG_ERROR;
+	}
+}
+
+
+static void
+auto_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_auto_coder *coder = coder_ptr;
+	lzma_next_end(&coder->next, allocator);
+	lzma_free(coder, allocator);
+	return;
+}
+
+
+static lzma_check
+auto_decoder_get_check(const void *coder_ptr)
+{
+	const lzma_auto_coder *coder = coder_ptr;
+
+	// It is LZMA_Alone if get_check is NULL.
+	return coder->next.get_check == NULL ? LZMA_CHECK_NONE
+			: coder->next.get_check(coder->next.coder);
+}
+
+
+static lzma_ret
+auto_decoder_memconfig(void *coder_ptr, uint64_t *memusage,
+		uint64_t *old_memlimit, uint64_t new_memlimit)
+{
+	lzma_auto_coder *coder = coder_ptr;
+
+	lzma_ret ret;
+
+	if (coder->next.memconfig != NULL) {
+		ret = coder->next.memconfig(coder->next.coder,
+				memusage, old_memlimit, new_memlimit);
+		assert(*old_memlimit == coder->memlimit);
+	} else {
+		// No coder is configured yet. Use the base value as
+		// the current memory usage.
+		*memusage = LZMA_MEMUSAGE_BASE;
+		*old_memlimit = coder->memlimit;
+		ret = LZMA_OK;
+	}
+
+	if (ret == LZMA_OK && new_memlimit != 0)
+		coder->memlimit = new_memlimit;
+
+	return ret;
+}
+
+
+static lzma_ret
+auto_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		uint64_t memlimit, uint32_t flags)
+{
+	lzma_next_coder_init(&auto_decoder_init, next, allocator);
+
+	if (memlimit == 0)
+		return LZMA_PROG_ERROR;
+
+	if (flags & ~LZMA_SUPPORTED_FLAGS)
+		return LZMA_OPTIONS_ERROR;
+
+	lzma_auto_coder *coder = next->coder;
+	if (coder == NULL) {
+		coder = lzma_alloc(sizeof(lzma_auto_coder), allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		next->coder = coder;
+		next->code = &auto_decode;
+		next->end = &auto_decoder_end;
+		next->get_check = &auto_decoder_get_check;
+		next->memconfig = &auto_decoder_memconfig;
+		coder->next = LZMA_NEXT_CODER_INIT;
+	}
+
+	coder->memlimit = memlimit;
+	coder->flags = flags;
+	coder->sequence = SEQ_INIT;
+
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_auto_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags)
+{
+	lzma_next_strm_init(auto_decoder_init, strm, memlimit, flags);
+
+	strm->internal->supported_actions[LZMA_RUN] = true;
+	strm->internal->supported_actions[LZMA_FINISH] = true;
+
+	return LZMA_OK;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/block_buffer_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/block_buffer_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/block_buffer_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,80 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_buffer_decoder.c
-/// \brief      Single-call .xz Block decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "block_decoder.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_buffer_decode(lzma_block *block, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	if (in_pos == NULL || (in == NULL && *in_pos != in_size)
-			|| *in_pos > in_size || out_pos == NULL
-			|| (out == NULL && *out_pos != out_size)
-			|| *out_pos > out_size)
-		return LZMA_PROG_ERROR;
-
-	// Initialize the Block decoder.
-	lzma_next_coder block_decoder = LZMA_NEXT_CODER_INIT;
-	lzma_ret ret = lzma_block_decoder_init(
-			&block_decoder, allocator, block);
-
-	if (ret == LZMA_OK) {
-		// Save the positions so that we can restore them in case
-		// an error occurs.
-		const size_t in_start = *in_pos;
-		const size_t out_start = *out_pos;
-
-		// Do the actual decoding.
-		ret = block_decoder.code(block_decoder.coder, allocator,
-				in, in_pos, in_size, out, out_pos, out_size,
-				LZMA_FINISH);
-
-		if (ret == LZMA_STREAM_END) {
-			ret = LZMA_OK;
-		} else {
-			if (ret == LZMA_OK) {
-				// Either the input was truncated or the
-				// output buffer was too small.
-				assert(*in_pos == in_size
-						|| *out_pos == out_size);
-
-				// If all the input was consumed, then the
-				// input is truncated, even if the output
-				// buffer is also full. This is because
-				// processing the last byte of the Block
-				// never produces output.
-				//
-				// NOTE: This assumption may break when new
-				// filters are added, if the end marker of
-				// the filter doesn't consume at least one
-				// complete byte.
-				if (*in_pos == in_size)
-					ret = LZMA_DATA_ERROR;
-				else
-					ret = LZMA_BUF_ERROR;
-			}
-
-			// Restore the positions.
-			*in_pos = in_start;
-			*out_pos = out_start;
-		}
-	}
-
-	// Free the decoder memory. This needs to be done even if
-	// initialization fails, because the internal API doesn't
-	// require the initialization function to free its memory on error.
-	lzma_next_end(&block_decoder, allocator);
-
-	return ret;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/block_buffer_decoder.c (from rev 9176, vendor/xz/dist/src/liblzma/common/block_buffer_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/block_buffer_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/block_buffer_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,80 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       block_buffer_decoder.c
+/// \brief      Single-call .xz Block decoder
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "block_decoder.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_buffer_decode(lzma_block *block, const lzma_allocator *allocator,
+		const uint8_t *in, size_t *in_pos, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+{
+	if (in_pos == NULL || (in == NULL && *in_pos != in_size)
+			|| *in_pos > in_size || out_pos == NULL
+			|| (out == NULL && *out_pos != out_size)
+			|| *out_pos > out_size)
+		return LZMA_PROG_ERROR;
+
+	// Initialize the Block decoder.
+	lzma_next_coder block_decoder = LZMA_NEXT_CODER_INIT;
+	lzma_ret ret = lzma_block_decoder_init(
+			&block_decoder, allocator, block);
+
+	if (ret == LZMA_OK) {
+		// Save the positions so that we can restore them in case
+		// an error occurs.
+		const size_t in_start = *in_pos;
+		const size_t out_start = *out_pos;
+
+		// Do the actual decoding.
+		ret = block_decoder.code(block_decoder.coder, allocator,
+				in, in_pos, in_size, out, out_pos, out_size,
+				LZMA_FINISH);
+
+		if (ret == LZMA_STREAM_END) {
+			ret = LZMA_OK;
+		} else {
+			if (ret == LZMA_OK) {
+				// Either the input was truncated or the
+				// output buffer was too small.
+				assert(*in_pos == in_size
+						|| *out_pos == out_size);
+
+				// If all the input was consumed, then the
+				// input is truncated, even if the output
+				// buffer is also full. This is because
+				// processing the last byte of the Block
+				// never produces output.
+				//
+				// NOTE: This assumption may break when new
+				// filters are added, if the end marker of
+				// the filter doesn't consume at least one
+				// complete byte.
+				if (*in_pos == in_size)
+					ret = LZMA_DATA_ERROR;
+				else
+					ret = LZMA_BUF_ERROR;
+			}
+
+			// Restore the positions.
+			*in_pos = in_start;
+			*out_pos = out_start;
+		}
+	}
+
+	// Free the decoder memory. This needs to be done even if
+	// initialization fails, because the internal API doesn't
+	// require the initialization function to free its memory on error.
+	lzma_next_end(&block_decoder, allocator);
+
+	return ret;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/block_buffer_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/block_buffer_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/block_buffer_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,305 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_buffer_encoder.c
-/// \brief      Single-call .xz Block encoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "block_encoder.h"
-#include "filter_encoder.h"
-#include "lzma2_encoder.h"
-#include "check.h"
-
-
-/// Estimate the maximum size of the Block Header and Check fields for
-/// a Block that uses LZMA2 uncompressed chunks. We could use
-/// lzma_block_header_size() but this is simpler.
-///
-/// Block Header Size + Block Flags + Compressed Size
-/// + Uncompressed Size + Filter Flags for LZMA2 + CRC32 + Check
-/// and round up to the next multiple of four to take Header Padding
-/// into account.
-#define HEADERS_BOUND ((1 + 1 + 2 * LZMA_VLI_BYTES_MAX + 3 + 4 \
-		+ LZMA_CHECK_SIZE_MAX + 3) & ~3)
-
-
-static lzma_vli
-lzma2_bound(lzma_vli uncompressed_size)
-{
-	// Prevent integer overflow in overhead calculation.
-	if (uncompressed_size > COMPRESSED_SIZE_MAX)
-		return 0;
-
-	// Calculate the exact overhead of the LZMA2 headers: Round
-	// uncompressed_size up to the next multiple of LZMA2_CHUNK_MAX,
-	// multiply by the size of per-chunk header, and add one byte for
-	// the end marker.
-	const lzma_vli overhead = ((uncompressed_size + LZMA2_CHUNK_MAX - 1)
-				/ LZMA2_CHUNK_MAX)
-			* LZMA2_HEADER_UNCOMPRESSED + 1;
-
-	// Catch the possible integer overflow.
-	if (COMPRESSED_SIZE_MAX - overhead < uncompressed_size)
-		return 0;
-
-	return uncompressed_size + overhead;
-}
-
-
-extern LZMA_API(size_t)
-lzma_block_buffer_bound(size_t uncompressed_size)
-{
-	// For now, if the data doesn't compress, we always use uncompressed
-	// chunks of LZMA2. In future we may use Subblock filter too, but
-	// but for simplicity we probably will still use the same bound
-	// calculation even though Subblock filter would have slightly less
-	// overhead.
-	lzma_vli lzma2_size = lzma2_bound(uncompressed_size);
-	if (lzma2_size == 0)
-		return 0;
-
-	// Take Block Padding into account.
-	lzma2_size = (lzma2_size + 3) & ~LZMA_VLI_C(3);
-
-#if SIZE_MAX < LZMA_VLI_MAX
-	// Catch the possible integer overflow on 32-bit systems. There's no
-	// overflow on 64-bit systems, because lzma2_bound() already takes
-	// into account the size of the headers in the Block.
-	if (SIZE_MAX - HEADERS_BOUND < lzma2_size)
-		return 0;
-#endif
-
-	return HEADERS_BOUND + lzma2_size;
-}
-
-
-static lzma_ret
-block_encode_uncompressed(lzma_block *block, const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	// TODO: Figure out if the last filter is LZMA2 or Subblock and use
-	// that filter to encode the uncompressed chunks.
-
-	// Use LZMA2 uncompressed chunks. We wouldn't need a dictionary at
-	// all, but LZMA2 always requires a dictionary, so use the minimum
-	// value to minimize memory usage of the decoder.
-	lzma_options_lzma lzma2 = {
-		.dict_size = LZMA_DICT_SIZE_MIN,
-	};
-
-	lzma_filter filters[2];
-	filters[0].id = LZMA_FILTER_LZMA2;
-	filters[0].options = &lzma2;
-	filters[1].id = LZMA_VLI_UNKNOWN;
-
-	// Set the above filter options to *block temporarily so that we can
-	// encode the Block Header.
-	lzma_filter *filters_orig = block->filters;
-	block->filters = filters;
-
-	if (lzma_block_header_size(block) != LZMA_OK) {
-		block->filters = filters_orig;
-		return LZMA_PROG_ERROR;
-	}
-
-	// Check that there's enough output space. The caller has already
-	// set block->compressed_size to what lzma2_bound() has returned,
-	// so we can reuse that value. We know that compressed_size is a
-	// known valid VLI and header_size is a small value so their sum
-	// will never overflow.
-	assert(block->compressed_size == lzma2_bound(in_size));
-	if (out_size - *out_pos
-			< block->header_size + block->compressed_size) {
-		block->filters = filters_orig;
-		return LZMA_BUF_ERROR;
-	}
-
-	if (lzma_block_header_encode(block, out + *out_pos) != LZMA_OK) {
-		block->filters = filters_orig;
-		return LZMA_PROG_ERROR;
-	}
-
-	block->filters = filters_orig;
-	*out_pos += block->header_size;
-
-	// Encode the data using LZMA2 uncompressed chunks.
-	size_t in_pos = 0;
-	uint8_t control = 0x01; // Dictionary reset
-
-	while (in_pos < in_size) {
-		// Control byte: Indicate uncompressed chunk, of which
-		// the first resets the dictionary.
-		out[(*out_pos)++] = control;
-		control = 0x02; // No dictionary reset
-
-		// Size of the uncompressed chunk
-		const size_t copy_size
-				= my_min(in_size - in_pos, LZMA2_CHUNK_MAX);
-		out[(*out_pos)++] = (copy_size - 1) >> 8;
-		out[(*out_pos)++] = (copy_size - 1) & 0xFF;
-
-		// The actual data
-		assert(*out_pos + copy_size <= out_size);
-		memcpy(out + *out_pos, in + in_pos, copy_size);
-
-		in_pos += copy_size;
-		*out_pos += copy_size;
-	}
-
-	// End marker
-	out[(*out_pos)++] = 0x00;
-	assert(*out_pos <= out_size);
-
-	return LZMA_OK;
-}
-
-
-static lzma_ret
-block_encode_normal(lzma_block *block, lzma_allocator *allocator,
-		const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	// Find out the size of the Block Header.
-	block->compressed_size = lzma2_bound(in_size);
-	if (block->compressed_size == 0)
-		return LZMA_DATA_ERROR;
-
-	block->uncompressed_size = in_size;
-	return_if_error(lzma_block_header_size(block));
-
-	// Reserve space for the Block Header and skip it for now.
-	if (out_size - *out_pos <= block->header_size)
-		return LZMA_BUF_ERROR;
-
-	const size_t out_start = *out_pos;
-	*out_pos += block->header_size;
-
-	// Limit out_size so that we stop encoding if the output would grow
-	// bigger than what uncompressed Block would be.
-	if (out_size - *out_pos > block->compressed_size)
-		out_size = *out_pos + block->compressed_size;
-
-	// TODO: In many common cases this could be optimized to use
-	// significantly less memory.
-	lzma_next_coder raw_encoder = LZMA_NEXT_CODER_INIT;
-	lzma_ret ret = lzma_raw_encoder_init(
-			&raw_encoder, allocator, block->filters);
-
-	if (ret == LZMA_OK) {
-		size_t in_pos = 0;
-		ret = raw_encoder.code(raw_encoder.coder, allocator,
-				in, &in_pos, in_size, out, out_pos, out_size,
-				LZMA_FINISH);
-	}
-
-	// NOTE: This needs to be run even if lzma_raw_encoder_init() failed.
-	lzma_next_end(&raw_encoder, allocator);
-
-	if (ret == LZMA_STREAM_END) {
-		// Compression was successful. Write the Block Header.
-		block->compressed_size
-				= *out_pos - (out_start + block->header_size);
-		ret = lzma_block_header_encode(block, out + out_start);
-		if (ret != LZMA_OK)
-			ret = LZMA_PROG_ERROR;
-
-	} else if (ret == LZMA_OK) {
-		// Output buffer became full.
-		ret = LZMA_BUF_ERROR;
-	}
-
-	// Reset *out_pos if something went wrong.
-	if (ret != LZMA_OK)
-		*out_pos = out_start;
-
-	return ret;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_buffer_encode(lzma_block *block, lzma_allocator *allocator,
-		const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	// Validate the arguments.
-	if (block == NULL || (in == NULL && in_size != 0) || out == NULL
-			|| out_pos == NULL || *out_pos > out_size)
-		return LZMA_PROG_ERROR;
-
-	// The contents of the structure may depend on the version so
-	// check the version before validating the contents of *block.
-	if (block->version != 0)
-		return LZMA_OPTIONS_ERROR;
-
-	if ((unsigned int)(block->check) > LZMA_CHECK_ID_MAX
-			|| block->filters == NULL)
-		return LZMA_PROG_ERROR;
-
-	if (!lzma_check_is_supported(block->check))
-		return LZMA_UNSUPPORTED_CHECK;
-
-	// Size of a Block has to be a multiple of four, so limit the size
-	// here already. This way we don't need to check it again when adding
-	// Block Padding.
-	out_size -= (out_size - *out_pos) & 3;
-
-	// Get the size of the Check field.
-	const size_t check_size = lzma_check_size(block->check);
-	assert(check_size != UINT32_MAX);
-
-	// Reserve space for the Check field.
-	if (out_size - *out_pos <= check_size)
-		return LZMA_BUF_ERROR;
-
-	out_size -= check_size;
-
-	// Do the actual compression.
-	const lzma_ret ret = block_encode_normal(block, allocator,
-			in, in_size, out, out_pos, out_size);
-	if (ret != LZMA_OK) {
-		// If the error was something else than output buffer
-		// becoming full, return the error now.
-		if (ret != LZMA_BUF_ERROR)
-			return ret;
-
-		// The data was uncompressible (at least with the options
-		// given to us) or the output buffer was too small. Use the
-		// uncompressed chunks of LZMA2 to wrap the data into a valid
-		// Block. If we haven't been given enough output space, even
-		// this may fail.
-		return_if_error(block_encode_uncompressed(block, in, in_size,
-				out, out_pos, out_size));
-	}
-
-	assert(*out_pos <= out_size);
-
-	// Block Padding. No buffer overflow here, because we already adjusted
-	// out_size so that (out_size - out_start) is a multiple of four.
-	// Thus, if the buffer is full, the loop body can never run.
-	for (size_t i = (size_t)(block->compressed_size); i & 3; ++i) {
-		assert(*out_pos < out_size);
-		out[(*out_pos)++] = 0x00;
-	}
-
-	// If there's no Check field, we are done now.
-	if (check_size > 0) {
-		// Calculate the integrity check. We reserved space for
-		// the Check field earlier so we don't need to check for
-		// available output space here.
-		lzma_check_state check;
-		lzma_check_init(&check, block->check);
-		lzma_check_update(&check, block->check, in, in_size);
-		lzma_check_finish(&check, block->check);
-
-		memcpy(block->raw_check, check.buffer.u8, check_size);
-		memcpy(out + *out_pos, check.buffer.u8, check_size);
-		*out_pos += check_size;
-	}
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/block_buffer_encoder.c (from rev 9176, vendor/xz/dist/src/liblzma/common/block_buffer_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/block_buffer_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/block_buffer_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,337 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       block_buffer_encoder.c
+/// \brief      Single-call .xz Block encoder
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "block_buffer_encoder.h"
+#include "block_encoder.h"
+#include "filter_encoder.h"
+#include "lzma2_encoder.h"
+#include "check.h"
+
+
+/// Estimate the maximum size of the Block Header and Check fields for
+/// a Block that uses LZMA2 uncompressed chunks. We could use
+/// lzma_block_header_size() but this is simpler.
+///
+/// Block Header Size + Block Flags + Compressed Size
+/// + Uncompressed Size + Filter Flags for LZMA2 + CRC32 + Check
+/// and round up to the next multiple of four to take Header Padding
+/// into account.
+#define HEADERS_BOUND ((1 + 1 + 2 * LZMA_VLI_BYTES_MAX + 3 + 4 \
+		+ LZMA_CHECK_SIZE_MAX + 3) & ~3)
+
+
+static uint64_t
+lzma2_bound(uint64_t uncompressed_size)
+{
+	// Prevent integer overflow in overhead calculation.
+	if (uncompressed_size > COMPRESSED_SIZE_MAX)
+		return 0;
+
+	// Calculate the exact overhead of the LZMA2 headers: Round
+	// uncompressed_size up to the next multiple of LZMA2_CHUNK_MAX,
+	// multiply by the size of per-chunk header, and add one byte for
+	// the end marker.
+	const uint64_t overhead = ((uncompressed_size + LZMA2_CHUNK_MAX - 1)
+				/ LZMA2_CHUNK_MAX)
+			* LZMA2_HEADER_UNCOMPRESSED + 1;
+
+	// Catch the possible integer overflow.
+	if (COMPRESSED_SIZE_MAX - overhead < uncompressed_size)
+		return 0;
+
+	return uncompressed_size + overhead;
+}
+
+
+extern uint64_t
+lzma_block_buffer_bound64(uint64_t uncompressed_size)
+{
+	// If the data doesn't compress, we always use uncompressed
+	// LZMA2 chunks.
+	uint64_t lzma2_size = lzma2_bound(uncompressed_size);
+	if (lzma2_size == 0)
+		return 0;
+
+	// Take Block Padding into account.
+	lzma2_size = (lzma2_size + 3) & ~UINT64_C(3);
+
+	// No risk of integer overflow because lzma2_bound() already takes
+	// into account the size of the headers in the Block.
+	return HEADERS_BOUND + lzma2_size;
+}
+
+
+extern LZMA_API(size_t)
+lzma_block_buffer_bound(size_t uncompressed_size)
+{
+	uint64_t ret = lzma_block_buffer_bound64(uncompressed_size);
+
+#if SIZE_MAX < UINT64_MAX
+	// Catch the possible integer overflow on 32-bit systems.
+	if (ret > SIZE_MAX)
+		return 0;
+#endif
+
+	return ret;
+}
+
+
+static lzma_ret
+block_encode_uncompressed(lzma_block *block, const uint8_t *in, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+{
+	// Use LZMA2 uncompressed chunks. We wouldn't need a dictionary at
+	// all, but LZMA2 always requires a dictionary, so use the minimum
+	// value to minimize memory usage of the decoder.
+	lzma_options_lzma lzma2 = {
+		.dict_size = LZMA_DICT_SIZE_MIN,
+	};
+
+	lzma_filter filters[2];
+	filters[0].id = LZMA_FILTER_LZMA2;
+	filters[0].options = &lzma2;
+	filters[1].id = LZMA_VLI_UNKNOWN;
+
+	// Set the above filter options to *block temporarily so that we can
+	// encode the Block Header.
+	lzma_filter *filters_orig = block->filters;
+	block->filters = filters;
+
+	if (lzma_block_header_size(block) != LZMA_OK) {
+		block->filters = filters_orig;
+		return LZMA_PROG_ERROR;
+	}
+
+	// Check that there's enough output space. The caller has already
+	// set block->compressed_size to what lzma2_bound() has returned,
+	// so we can reuse that value. We know that compressed_size is a
+	// known valid VLI and header_size is a small value so their sum
+	// will never overflow.
+	assert(block->compressed_size == lzma2_bound(in_size));
+	if (out_size - *out_pos
+			< block->header_size + block->compressed_size) {
+		block->filters = filters_orig;
+		return LZMA_BUF_ERROR;
+	}
+
+	if (lzma_block_header_encode(block, out + *out_pos) != LZMA_OK) {
+		block->filters = filters_orig;
+		return LZMA_PROG_ERROR;
+	}
+
+	block->filters = filters_orig;
+	*out_pos += block->header_size;
+
+	// Encode the data using LZMA2 uncompressed chunks.
+	size_t in_pos = 0;
+	uint8_t control = 0x01; // Dictionary reset
+
+	while (in_pos < in_size) {
+		// Control byte: Indicate uncompressed chunk, of which
+		// the first resets the dictionary.
+		out[(*out_pos)++] = control;
+		control = 0x02; // No dictionary reset
+
+		// Size of the uncompressed chunk
+		const size_t copy_size
+				= my_min(in_size - in_pos, LZMA2_CHUNK_MAX);
+		out[(*out_pos)++] = (copy_size - 1) >> 8;
+		out[(*out_pos)++] = (copy_size - 1) & 0xFF;
+
+		// The actual data
+		assert(*out_pos + copy_size <= out_size);
+		memcpy(out + *out_pos, in + in_pos, copy_size);
+
+		in_pos += copy_size;
+		*out_pos += copy_size;
+	}
+
+	// End marker
+	out[(*out_pos)++] = 0x00;
+	assert(*out_pos <= out_size);
+
+	return LZMA_OK;
+}
+
+
+static lzma_ret
+block_encode_normal(lzma_block *block, const lzma_allocator *allocator,
+		const uint8_t *in, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+{
+	// Find out the size of the Block Header.
+	return_if_error(lzma_block_header_size(block));
+
+	// Reserve space for the Block Header and skip it for now.
+	if (out_size - *out_pos <= block->header_size)
+		return LZMA_BUF_ERROR;
+
+	const size_t out_start = *out_pos;
+	*out_pos += block->header_size;
+
+	// Limit out_size so that we stop encoding if the output would grow
+	// bigger than what uncompressed Block would be.
+	if (out_size - *out_pos > block->compressed_size)
+		out_size = *out_pos + block->compressed_size;
+
+	// TODO: In many common cases this could be optimized to use
+	// significantly less memory.
+	lzma_next_coder raw_encoder = LZMA_NEXT_CODER_INIT;
+	lzma_ret ret = lzma_raw_encoder_init(
+			&raw_encoder, allocator, block->filters);
+
+	if (ret == LZMA_OK) {
+		size_t in_pos = 0;
+		ret = raw_encoder.code(raw_encoder.coder, allocator,
+				in, &in_pos, in_size, out, out_pos, out_size,
+				LZMA_FINISH);
+	}
+
+	// NOTE: This needs to be run even if lzma_raw_encoder_init() failed.
+	lzma_next_end(&raw_encoder, allocator);
+
+	if (ret == LZMA_STREAM_END) {
+		// Compression was successful. Write the Block Header.
+		block->compressed_size
+				= *out_pos - (out_start + block->header_size);
+		ret = lzma_block_header_encode(block, out + out_start);
+		if (ret != LZMA_OK)
+			ret = LZMA_PROG_ERROR;
+
+	} else if (ret == LZMA_OK) {
+		// Output buffer became full.
+		ret = LZMA_BUF_ERROR;
+	}
+
+	// Reset *out_pos if something went wrong.
+	if (ret != LZMA_OK)
+		*out_pos = out_start;
+
+	return ret;
+}
+
+
+static lzma_ret
+block_buffer_encode(lzma_block *block, const lzma_allocator *allocator,
+		const uint8_t *in, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size,
+		bool try_to_compress)
+{
+	// Validate the arguments.
+	if (block == NULL || (in == NULL && in_size != 0) || out == NULL
+			|| out_pos == NULL || *out_pos > out_size)
+		return LZMA_PROG_ERROR;
+
+	// The contents of the structure may depend on the version so
+	// check the version before validating the contents of *block.
+	if (block->version > 1)
+		return LZMA_OPTIONS_ERROR;
+
+	if ((unsigned int)(block->check) > LZMA_CHECK_ID_MAX
+			|| (try_to_compress && block->filters == NULL))
+		return LZMA_PROG_ERROR;
+
+	if (!lzma_check_is_supported(block->check))
+		return LZMA_UNSUPPORTED_CHECK;
+
+	// Size of a Block has to be a multiple of four, so limit the size
+	// here already. This way we don't need to check it again when adding
+	// Block Padding.
+	out_size -= (out_size - *out_pos) & 3;
+
+	// Get the size of the Check field.
+	const size_t check_size = lzma_check_size(block->check);
+	assert(check_size != UINT32_MAX);
+
+	// Reserve space for the Check field.
+	if (out_size - *out_pos <= check_size)
+		return LZMA_BUF_ERROR;
+
+	out_size -= check_size;
+
+	// Initialize block->uncompressed_size and calculate the worst-case
+	// value for block->compressed_size.
+	block->uncompressed_size = in_size;
+	block->compressed_size = lzma2_bound(in_size);
+	if (block->compressed_size == 0)
+		return LZMA_DATA_ERROR;
+
+	// Do the actual compression.
+	lzma_ret ret = LZMA_BUF_ERROR;
+	if (try_to_compress)
+		ret = block_encode_normal(block, allocator,
+				in, in_size, out, out_pos, out_size);
+
+	if (ret != LZMA_OK) {
+		// If the error was something else than output buffer
+		// becoming full, return the error now.
+		if (ret != LZMA_BUF_ERROR)
+			return ret;
+
+		// The data was uncompressible (at least with the options
+		// given to us) or the output buffer was too small. Use the
+		// uncompressed chunks of LZMA2 to wrap the data into a valid
+		// Block. If we haven't been given enough output space, even
+		// this may fail.
+		return_if_error(block_encode_uncompressed(block, in, in_size,
+				out, out_pos, out_size));
+	}
+
+	assert(*out_pos <= out_size);
+
+	// Block Padding. No buffer overflow here, because we already adjusted
+	// out_size so that (out_size - out_start) is a multiple of four.
+	// Thus, if the buffer is full, the loop body can never run.
+	for (size_t i = (size_t)(block->compressed_size); i & 3; ++i) {
+		assert(*out_pos < out_size);
+		out[(*out_pos)++] = 0x00;
+	}
+
+	// If there's no Check field, we are done now.
+	if (check_size > 0) {
+		// Calculate the integrity check. We reserved space for
+		// the Check field earlier so we don't need to check for
+		// available output space here.
+		lzma_check_state check;
+		lzma_check_init(&check, block->check);
+		lzma_check_update(&check, block->check, in, in_size);
+		lzma_check_finish(&check, block->check);
+
+		memcpy(block->raw_check, check.buffer.u8, check_size);
+		memcpy(out + *out_pos, check.buffer.u8, check_size);
+		*out_pos += check_size;
+	}
+
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_buffer_encode(lzma_block *block, const lzma_allocator *allocator,
+		const uint8_t *in, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+{
+	return block_buffer_encode(block, allocator,
+			in, in_size, out, out_pos, out_size, true);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_uncomp_encode(lzma_block *block,
+		const uint8_t *in, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+{
+	// It won't allocate any memory from heap so no need
+	// for lzma_allocator.
+	return block_buffer_encode(block, NULL,
+			in, in_size, out, out_pos, out_size, false);
+}

Copied: vendor/xz/5.2.3/src/liblzma/common/block_buffer_encoder.h (from rev 9176, vendor/xz/dist/src/liblzma/common/block_buffer_encoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/block_buffer_encoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/block_buffer_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,24 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       block_buffer_encoder.h
+/// \brief      Single-call .xz Block encoder
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_BLOCK_BUFFER_ENCODER_H
+#define LZMA_BLOCK_BUFFER_ENCODER_H
+
+#include "common.h"
+
+
+/// uint64_t version of lzma_block_buffer_bound(). It is used by
+/// stream_encoder_mt.c. Probably the original lzma_block_buffer_bound()
+/// should have been 64-bit, but fixing it would break the ABI.
+extern uint64_t lzma_block_buffer_bound64(uint64_t uncompressed_size);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/common/block_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/block_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/block_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,242 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_decoder.c
-/// \brief      Decodes .xz Blocks
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "block_decoder.h"
-#include "filter_decoder.h"
-#include "check.h"
-
-
-struct lzma_coder_s {
-	enum {
-		SEQ_CODE,
-		SEQ_PADDING,
-		SEQ_CHECK,
-	} sequence;
-
-	/// The filters in the chain; initialized with lzma_raw_decoder_init().
-	lzma_next_coder next;
-
-	/// Decoding options; we also write Compressed Size and Uncompressed
-	/// Size back to this structure when the decoding has been finished.
-	lzma_block *block;
-
-	/// Compressed Size calculated while decoding
-	lzma_vli compressed_size;
-
-	/// Uncompressed Size calculated while decoding
-	lzma_vli uncompressed_size;
-
-	/// Maximum allowed Compressed Size; this takes into account the
-	/// size of the Block Header and Check fields when Compressed Size
-	/// is unknown.
-	lzma_vli compressed_limit;
-
-	/// Position when reading the Check field
-	size_t check_pos;
-
-	/// Check of the uncompressed data
-	lzma_check_state check;
-};
-
-
-static inline bool
-update_size(lzma_vli *size, lzma_vli add, lzma_vli limit)
-{
-	if (limit > LZMA_VLI_MAX)
-		limit = LZMA_VLI_MAX;
-
-	if (limit < *size || limit - *size < add)
-		return true;
-
-	*size += add;
-
-	return false;
-}
-
-
-static inline bool
-is_size_valid(lzma_vli size, lzma_vli reference)
-{
-	return reference == LZMA_VLI_UNKNOWN || reference == size;
-}
-
-
-static lzma_ret
-block_decode(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_CODE: {
-		const size_t in_start = *in_pos;
-		const size_t out_start = *out_pos;
-
-		const lzma_ret ret = coder->next.code(coder->next.coder,
-				allocator, in, in_pos, in_size,
-				out, out_pos, out_size, action);
-
-		const size_t in_used = *in_pos - in_start;
-		const size_t out_used = *out_pos - out_start;
-
-		// NOTE: We compare to compressed_limit here, which prevents
-		// the total size of the Block growing past LZMA_VLI_MAX.
-		if (update_size(&coder->compressed_size, in_used,
-					coder->compressed_limit)
-				|| update_size(&coder->uncompressed_size,
-					out_used,
-					coder->block->uncompressed_size))
-			return LZMA_DATA_ERROR;
-
-		lzma_check_update(&coder->check, coder->block->check,
-				out + out_start, out_used);
-
-		if (ret != LZMA_STREAM_END)
-			return ret;
-
-		// Compressed and Uncompressed Sizes are now at their final
-		// values. Verify that they match the values given to us.
-		if (!is_size_valid(coder->compressed_size,
-					coder->block->compressed_size)
-				|| !is_size_valid(coder->uncompressed_size,
-					coder->block->uncompressed_size))
-			return LZMA_DATA_ERROR;
-
-		// Copy the values into coder->block. The caller
-		// may use this information to construct Index.
-		coder->block->compressed_size = coder->compressed_size;
-		coder->block->uncompressed_size = coder->uncompressed_size;
-
-		coder->sequence = SEQ_PADDING;
-	}
-
-	// Fall through
-
-	case SEQ_PADDING:
-		// Compressed Data is padded to a multiple of four bytes.
-		while (coder->compressed_size & 3) {
-			if (*in_pos >= in_size)
-				return LZMA_OK;
-
-			// We use compressed_size here just get the Padding
-			// right. The actual Compressed Size was stored to
-			// coder->block already, and won't be modified by
-			// us anymore.
-			++coder->compressed_size;
-
-			if (in[(*in_pos)++] != 0x00)
-				return LZMA_DATA_ERROR;
-		}
-
-		if (coder->block->check == LZMA_CHECK_NONE)
-			return LZMA_STREAM_END;
-
-		lzma_check_finish(&coder->check, coder->block->check);
-		coder->sequence = SEQ_CHECK;
-
-	// Fall through
-
-	case SEQ_CHECK: {
-		const size_t check_size = lzma_check_size(coder->block->check);
-		lzma_bufcpy(in, in_pos, in_size, coder->block->raw_check,
-				&coder->check_pos, check_size);
-		if (coder->check_pos < check_size)
-			return LZMA_OK;
-
-		// Validate the Check only if we support it.
-		// coder->check.buffer may be uninitialized
-		// when the Check ID is not supported.
-		if (lzma_check_is_supported(coder->block->check)
-				&& memcmp(coder->block->raw_check,
-					coder->check.buffer.u8,
-					check_size) != 0)
-			return LZMA_DATA_ERROR;
-
-		return LZMA_STREAM_END;
-	}
-	}
-
-	return LZMA_PROG_ERROR;
-}
-
-
-static void
-block_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-extern lzma_ret
-lzma_block_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		lzma_block *block)
-{
-	lzma_next_coder_init(&lzma_block_decoder_init, next, allocator);
-
-	// Validate the options. lzma_block_unpadded_size() does that for us
-	// except for Uncompressed Size and filters. Filters are validated
-	// by the raw decoder.
-	if (lzma_block_unpadded_size(block) == 0
-			|| !lzma_vli_is_valid(block->uncompressed_size))
-		return LZMA_PROG_ERROR;
-
-	// Allocate and initialize *next->coder if needed.
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &block_decode;
-		next->end = &block_decoder_end;
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	// Basic initializations
-	next->coder->sequence = SEQ_CODE;
-	next->coder->block = block;
-	next->coder->compressed_size = 0;
-	next->coder->uncompressed_size = 0;
-
-	// If Compressed Size is not known, we calculate the maximum allowed
-	// value so that encoded size of the Block (including Block Padding)
-	// is still a valid VLI and a multiple of four.
-	next->coder->compressed_limit
-			= block->compressed_size == LZMA_VLI_UNKNOWN
-				? (LZMA_VLI_MAX & ~LZMA_VLI_C(3))
-					- block->header_size
-					- lzma_check_size(block->check)
-				: block->compressed_size;
-
-	// Initialize the check. It's caller's problem if the Check ID is not
-	// supported, and the Block decoder cannot verify the Check field.
-	// Caller can test lzma_check_is_supported(block->check).
-	next->coder->check_pos = 0;
-	lzma_check_init(&next->coder->check, block->check);
-
-	// Initialize the filter chain.
-	return lzma_raw_decoder_init(&next->coder->next, allocator,
-			block->filters);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_decoder(lzma_stream *strm, lzma_block *block)
-{
-	lzma_next_strm_init(lzma_block_decoder_init, strm, block);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/block_decoder.c (from rev 11013, vendor/xz/dist/src/liblzma/common/block_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/block_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/block_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,257 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       block_decoder.c
+/// \brief      Decodes .xz Blocks
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "block_decoder.h"
+#include "filter_decoder.h"
+#include "check.h"
+
+
+typedef struct {
+	enum {
+		SEQ_CODE,
+		SEQ_PADDING,
+		SEQ_CHECK,
+	} sequence;
+
+	/// The filters in the chain; initialized with lzma_raw_decoder_init().
+	lzma_next_coder next;
+
+	/// Decoding options; we also write Compressed Size and Uncompressed
+	/// Size back to this structure when the decoding has been finished.
+	lzma_block *block;
+
+	/// Compressed Size calculated while decoding
+	lzma_vli compressed_size;
+
+	/// Uncompressed Size calculated while decoding
+	lzma_vli uncompressed_size;
+
+	/// Maximum allowed Compressed Size; this takes into account the
+	/// size of the Block Header and Check fields when Compressed Size
+	/// is unknown.
+	lzma_vli compressed_limit;
+
+	/// Position when reading the Check field
+	size_t check_pos;
+
+	/// Check of the uncompressed data
+	lzma_check_state check;
+
+	/// True if the integrity check won't be calculated and verified.
+	bool ignore_check;
+} lzma_block_coder;
+
+
+static inline bool
+update_size(lzma_vli *size, lzma_vli add, lzma_vli limit)
+{
+	if (limit > LZMA_VLI_MAX)
+		limit = LZMA_VLI_MAX;
+
+	if (limit < *size || limit - *size < add)
+		return true;
+
+	*size += add;
+
+	return false;
+}
+
+
+static inline bool
+is_size_valid(lzma_vli size, lzma_vli reference)
+{
+	return reference == LZMA_VLI_UNKNOWN || reference == size;
+}
+
+
+static lzma_ret
+block_decode(void *coder_ptr, const 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)
+{
+	lzma_block_coder *coder = coder_ptr;
+
+	switch (coder->sequence) {
+	case SEQ_CODE: {
+		const size_t in_start = *in_pos;
+		const size_t out_start = *out_pos;
+
+		const lzma_ret ret = coder->next.code(coder->next.coder,
+				allocator, in, in_pos, in_size,
+				out, out_pos, out_size, action);
+
+		const size_t in_used = *in_pos - in_start;
+		const size_t out_used = *out_pos - out_start;
+
+		// NOTE: We compare to compressed_limit here, which prevents
+		// the total size of the Block growing past LZMA_VLI_MAX.
+		if (update_size(&coder->compressed_size, in_used,
+					coder->compressed_limit)
+				|| update_size(&coder->uncompressed_size,
+					out_used,
+					coder->block->uncompressed_size))
+			return LZMA_DATA_ERROR;
+
+		if (!coder->ignore_check)
+			lzma_check_update(&coder->check, coder->block->check,
+					out + out_start, out_used);
+
+		if (ret != LZMA_STREAM_END)
+			return ret;
+
+		// Compressed and Uncompressed Sizes are now at their final
+		// values. Verify that they match the values given to us.
+		if (!is_size_valid(coder->compressed_size,
+					coder->block->compressed_size)
+				|| !is_size_valid(coder->uncompressed_size,
+					coder->block->uncompressed_size))
+			return LZMA_DATA_ERROR;
+
+		// Copy the values into coder->block. The caller
+		// may use this information to construct Index.
+		coder->block->compressed_size = coder->compressed_size;
+		coder->block->uncompressed_size = coder->uncompressed_size;
+
+		coder->sequence = SEQ_PADDING;
+	}
+
+	// Fall through
+
+	case SEQ_PADDING:
+		// Compressed Data is padded to a multiple of four bytes.
+		while (coder->compressed_size & 3) {
+			if (*in_pos >= in_size)
+				return LZMA_OK;
+
+			// We use compressed_size here just get the Padding
+			// right. The actual Compressed Size was stored to
+			// coder->block already, and won't be modified by
+			// us anymore.
+			++coder->compressed_size;
+
+			if (in[(*in_pos)++] != 0x00)
+				return LZMA_DATA_ERROR;
+		}
+
+		if (coder->block->check == LZMA_CHECK_NONE)
+			return LZMA_STREAM_END;
+
+		if (!coder->ignore_check)
+			lzma_check_finish(&coder->check, coder->block->check);
+
+		coder->sequence = SEQ_CHECK;
+
+	// Fall through
+
+	case SEQ_CHECK: {
+		const size_t check_size = lzma_check_size(coder->block->check);
+		lzma_bufcpy(in, in_pos, in_size, coder->block->raw_check,
+				&coder->check_pos, check_size);
+		if (coder->check_pos < check_size)
+			return LZMA_OK;
+
+		// Validate the Check only if we support it.
+		// coder->check.buffer may be uninitialized
+		// when the Check ID is not supported.
+		if (!coder->ignore_check
+				&& lzma_check_is_supported(coder->block->check)
+				&& memcmp(coder->block->raw_check,
+					coder->check.buffer.u8,
+					check_size) != 0)
+			return LZMA_DATA_ERROR;
+
+		return LZMA_STREAM_END;
+	}
+	}
+
+	return LZMA_PROG_ERROR;
+}
+
+
+static void
+block_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_block_coder *coder = coder_ptr;
+	lzma_next_end(&coder->next, allocator);
+	lzma_free(coder, allocator);
+	return;
+}
+
+
+extern lzma_ret
+lzma_block_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		lzma_block *block)
+{
+	lzma_next_coder_init(&lzma_block_decoder_init, next, allocator);
+
+	// Validate the options. lzma_block_unpadded_size() does that for us
+	// except for Uncompressed Size and filters. Filters are validated
+	// by the raw decoder.
+	if (lzma_block_unpadded_size(block) == 0
+			|| !lzma_vli_is_valid(block->uncompressed_size))
+		return LZMA_PROG_ERROR;
+
+	// Allocate *next->coder if needed.
+	lzma_block_coder *coder = next->coder;
+	if (coder == NULL) {
+		coder = lzma_alloc(sizeof(lzma_block_coder), allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		next->coder = coder;
+		next->code = &block_decode;
+		next->end = &block_decoder_end;
+		coder->next = LZMA_NEXT_CODER_INIT;
+	}
+
+	// Basic initializations
+	coder->sequence = SEQ_CODE;
+	coder->block = block;
+	coder->compressed_size = 0;
+	coder->uncompressed_size = 0;
+
+	// If Compressed Size is not known, we calculate the maximum allowed
+	// value so that encoded size of the Block (including Block Padding)
+	// is still a valid VLI and a multiple of four.
+	coder->compressed_limit
+			= block->compressed_size == LZMA_VLI_UNKNOWN
+				? (LZMA_VLI_MAX & ~LZMA_VLI_C(3))
+					- block->header_size
+					- lzma_check_size(block->check)
+				: block->compressed_size;
+
+	// Initialize the check. It's caller's problem if the Check ID is not
+	// supported, and the Block decoder cannot verify the Check field.
+	// Caller can test lzma_check_is_supported(block->check).
+	coder->check_pos = 0;
+	lzma_check_init(&coder->check, block->check);
+
+	coder->ignore_check = block->version >= 1
+			? block->ignore_check : false;
+
+	// Initialize the filter chain.
+	return lzma_raw_decoder_init(&coder->next, allocator,
+			block->filters);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_decoder(lzma_stream *strm, lzma_block *block)
+{
+	lzma_next_strm_init(lzma_block_decoder_init, strm, block);
+
+	strm->internal->supported_actions[LZMA_RUN] = true;
+	strm->internal->supported_actions[LZMA_FINISH] = true;
+
+	return LZMA_OK;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/block_decoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/common/block_decoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/block_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,22 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_decoder.h
-/// \brief      Decodes .xz Blocks
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_BLOCK_DECODER_H
-#define LZMA_BLOCK_DECODER_H
-
-#include "common.h"
-
-
-extern lzma_ret lzma_block_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, lzma_block *block);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/common/block_decoder.h (from rev 9176, vendor/xz/dist/src/liblzma/common/block_decoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/block_decoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/block_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       block_decoder.h
+/// \brief      Decodes .xz Blocks
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_BLOCK_DECODER_H
+#define LZMA_BLOCK_DECODER_H
+
+#include "common.h"
+
+
+extern lzma_ret lzma_block_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator, lzma_block *block);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/common/block_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/block_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/block_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,217 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_encoder.c
-/// \brief      Encodes .xz Blocks
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "block_encoder.h"
-#include "filter_encoder.h"
-#include "check.h"
-
-
-struct lzma_coder_s {
-	/// The filters in the chain; initialized with lzma_raw_decoder_init().
-	lzma_next_coder next;
-
-	/// Encoding options; we also write Unpadded Size, Compressed Size,
-	/// and Uncompressed Size back to this structure when the encoding
-	/// has been finished.
-	lzma_block *block;
-
-	enum {
-		SEQ_CODE,
-		SEQ_PADDING,
-		SEQ_CHECK,
-	} sequence;
-
-	/// Compressed Size calculated while encoding
-	lzma_vli compressed_size;
-
-	/// Uncompressed Size calculated while encoding
-	lzma_vli uncompressed_size;
-
-	/// Position in the Check field
-	size_t pos;
-
-	/// Check of the uncompressed data
-	lzma_check_state check;
-};
-
-
-static lzma_ret
-block_encode(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)
-{
-	// Check that our amount of input stays in proper limits.
-	if (LZMA_VLI_MAX - coder->uncompressed_size < in_size - *in_pos)
-		return LZMA_DATA_ERROR;
-
-	switch (coder->sequence) {
-	case SEQ_CODE: {
-		const size_t in_start = *in_pos;
-		const size_t out_start = *out_pos;
-
-		const lzma_ret ret = coder->next.code(coder->next.coder,
-				allocator, in, in_pos, in_size,
-				out, out_pos, out_size, action);
-
-		const size_t in_used = *in_pos - in_start;
-		const size_t out_used = *out_pos - out_start;
-
-		if (COMPRESSED_SIZE_MAX - coder->compressed_size < out_used)
-			return LZMA_DATA_ERROR;
-
-		coder->compressed_size += out_used;
-
-		// No need to check for overflow because we have already
-		// checked it at the beginning of this function.
-		coder->uncompressed_size += in_used;
-
-		lzma_check_update(&coder->check, coder->block->check,
-				in + in_start, in_used);
-
-		if (ret != LZMA_STREAM_END || action == LZMA_SYNC_FLUSH)
-			return ret;
-
-		assert(*in_pos == in_size);
-		assert(action == LZMA_FINISH);
-
-		// Copy the values into coder->block. The caller
-		// may use this information to construct Index.
-		coder->block->compressed_size = coder->compressed_size;
-		coder->block->uncompressed_size = coder->uncompressed_size;
-
-		coder->sequence = SEQ_PADDING;
-	}
-
-	// Fall through
-
-	case SEQ_PADDING:
-		// Pad Compressed Data to a multiple of four bytes. We can
-		// use coder->compressed_size for this since we don't need
-		// it for anything else anymore.
-		while (coder->compressed_size & 3) {
-			if (*out_pos >= out_size)
-				return LZMA_OK;
-
-			out[*out_pos] = 0x00;
-			++*out_pos;
-			++coder->compressed_size;
-		}
-
-		if (coder->block->check == LZMA_CHECK_NONE)
-			return LZMA_STREAM_END;
-
-		lzma_check_finish(&coder->check, coder->block->check);
-
-		coder->sequence = SEQ_CHECK;
-
-	// Fall through
-
-	case SEQ_CHECK: {
-		const size_t check_size = lzma_check_size(coder->block->check);
-		lzma_bufcpy(coder->check.buffer.u8, &coder->pos, check_size,
-				out, out_pos, out_size);
-		if (coder->pos < check_size)
-			return LZMA_OK;
-
-		memcpy(coder->block->raw_check, coder->check.buffer.u8,
-				check_size);
-		return LZMA_STREAM_END;
-	}
-	}
-
-	return LZMA_PROG_ERROR;
-}
-
-
-static void
-block_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_ret
-block_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
-		const lzma_filter *filters lzma_attribute((__unused__)),
-		const lzma_filter *reversed_filters)
-{
-	if (coder->sequence != SEQ_CODE)
-		return LZMA_PROG_ERROR;
-
-	return lzma_next_filter_update(
-			&coder->next, allocator, reversed_filters);
-}
-
-
-extern lzma_ret
-lzma_block_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		lzma_block *block)
-{
-	lzma_next_coder_init(&lzma_block_encoder_init, next, allocator);
-
-	if (block == NULL)
-		return LZMA_PROG_ERROR;
-
-	// The contents of the structure may depend on the version so
-	// check the version first.
-	if (block->version != 0)
-		return LZMA_OPTIONS_ERROR;
-
-	// If the Check ID is not supported, we cannot calculate the check and
-	// thus not create a proper Block.
-	if ((unsigned int)(block->check) > LZMA_CHECK_ID_MAX)
-		return LZMA_PROG_ERROR;
-
-	if (!lzma_check_is_supported(block->check))
-		return LZMA_UNSUPPORTED_CHECK;
-
-	// Allocate and initialize *next->coder if needed.
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &block_encode;
-		next->end = &block_encoder_end;
-		next->update = &block_encoder_update;
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	// Basic initializations
-	next->coder->sequence = SEQ_CODE;
-	next->coder->block = block;
-	next->coder->compressed_size = 0;
-	next->coder->uncompressed_size = 0;
-	next->coder->pos = 0;
-
-	// Initialize the check
-	lzma_check_init(&next->coder->check, block->check);
-
-	// Initialize the requested filters.
-	return lzma_raw_encoder_init(&next->coder->next, allocator,
-			block->filters);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_encoder(lzma_stream *strm, lzma_block *block)
-{
-	lzma_next_strm_init(lzma_block_encoder_init, strm, block);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/block_encoder.c (from rev 11013, vendor/xz/dist/src/liblzma/common/block_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/block_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/block_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,223 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       block_encoder.c
+/// \brief      Encodes .xz Blocks
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "block_encoder.h"
+#include "filter_encoder.h"
+#include "check.h"
+
+
+typedef struct {
+	/// The filters in the chain; initialized with lzma_raw_decoder_init().
+	lzma_next_coder next;
+
+	/// Encoding options; we also write Unpadded Size, Compressed Size,
+	/// and Uncompressed Size back to this structure when the encoding
+	/// has been finished.
+	lzma_block *block;
+
+	enum {
+		SEQ_CODE,
+		SEQ_PADDING,
+		SEQ_CHECK,
+	} sequence;
+
+	/// Compressed Size calculated while encoding
+	lzma_vli compressed_size;
+
+	/// Uncompressed Size calculated while encoding
+	lzma_vli uncompressed_size;
+
+	/// Position in the Check field
+	size_t pos;
+
+	/// Check of the uncompressed data
+	lzma_check_state check;
+} lzma_block_coder;
+
+
+static lzma_ret
+block_encode(void *coder_ptr, const 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)
+{
+	lzma_block_coder *coder = coder_ptr;
+
+	// Check that our amount of input stays in proper limits.
+	if (LZMA_VLI_MAX - coder->uncompressed_size < in_size - *in_pos)
+		return LZMA_DATA_ERROR;
+
+	switch (coder->sequence) {
+	case SEQ_CODE: {
+		const size_t in_start = *in_pos;
+		const size_t out_start = *out_pos;
+
+		const lzma_ret ret = coder->next.code(coder->next.coder,
+				allocator, in, in_pos, in_size,
+				out, out_pos, out_size, action);
+
+		const size_t in_used = *in_pos - in_start;
+		const size_t out_used = *out_pos - out_start;
+
+		if (COMPRESSED_SIZE_MAX - coder->compressed_size < out_used)
+			return LZMA_DATA_ERROR;
+
+		coder->compressed_size += out_used;
+
+		// No need to check for overflow because we have already
+		// checked it at the beginning of this function.
+		coder->uncompressed_size += in_used;
+
+		lzma_check_update(&coder->check, coder->block->check,
+				in + in_start, in_used);
+
+		if (ret != LZMA_STREAM_END || action == LZMA_SYNC_FLUSH)
+			return ret;
+
+		assert(*in_pos == in_size);
+		assert(action == LZMA_FINISH);
+
+		// Copy the values into coder->block. The caller
+		// may use this information to construct Index.
+		coder->block->compressed_size = coder->compressed_size;
+		coder->block->uncompressed_size = coder->uncompressed_size;
+
+		coder->sequence = SEQ_PADDING;
+	}
+
+	// Fall through
+
+	case SEQ_PADDING:
+		// Pad Compressed Data to a multiple of four bytes. We can
+		// use coder->compressed_size for this since we don't need
+		// it for anything else anymore.
+		while (coder->compressed_size & 3) {
+			if (*out_pos >= out_size)
+				return LZMA_OK;
+
+			out[*out_pos] = 0x00;
+			++*out_pos;
+			++coder->compressed_size;
+		}
+
+		if (coder->block->check == LZMA_CHECK_NONE)
+			return LZMA_STREAM_END;
+
+		lzma_check_finish(&coder->check, coder->block->check);
+
+		coder->sequence = SEQ_CHECK;
+
+	// Fall through
+
+	case SEQ_CHECK: {
+		const size_t check_size = lzma_check_size(coder->block->check);
+		lzma_bufcpy(coder->check.buffer.u8, &coder->pos, check_size,
+				out, out_pos, out_size);
+		if (coder->pos < check_size)
+			return LZMA_OK;
+
+		memcpy(coder->block->raw_check, coder->check.buffer.u8,
+				check_size);
+		return LZMA_STREAM_END;
+	}
+	}
+
+	return LZMA_PROG_ERROR;
+}
+
+
+static void
+block_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_block_coder *coder = coder_ptr;
+	lzma_next_end(&coder->next, allocator);
+	lzma_free(coder, allocator);
+	return;
+}
+
+
+static lzma_ret
+block_encoder_update(void *coder_ptr, const lzma_allocator *allocator,
+		const lzma_filter *filters lzma_attribute((__unused__)),
+		const lzma_filter *reversed_filters)
+{
+	lzma_block_coder *coder = coder_ptr;
+
+	if (coder->sequence != SEQ_CODE)
+		return LZMA_PROG_ERROR;
+
+	return lzma_next_filter_update(
+			&coder->next, allocator, reversed_filters);
+}
+
+
+extern lzma_ret
+lzma_block_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		lzma_block *block)
+{
+	lzma_next_coder_init(&lzma_block_encoder_init, next, allocator);
+
+	if (block == NULL)
+		return LZMA_PROG_ERROR;
+
+	// The contents of the structure may depend on the version so
+	// check the version first.
+	if (block->version > 1)
+		return LZMA_OPTIONS_ERROR;
+
+	// If the Check ID is not supported, we cannot calculate the check and
+	// thus not create a proper Block.
+	if ((unsigned int)(block->check) > LZMA_CHECK_ID_MAX)
+		return LZMA_PROG_ERROR;
+
+	if (!lzma_check_is_supported(block->check))
+		return LZMA_UNSUPPORTED_CHECK;
+
+	// Allocate and initialize *next->coder if needed.
+	lzma_block_coder *coder = next->coder;
+	if (coder == NULL) {
+		coder = lzma_alloc(sizeof(lzma_block_coder), allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		next->coder = coder;
+		next->code = &block_encode;
+		next->end = &block_encoder_end;
+		next->update = &block_encoder_update;
+		coder->next = LZMA_NEXT_CODER_INIT;
+	}
+
+	// Basic initializations
+	coder->sequence = SEQ_CODE;
+	coder->block = block;
+	coder->compressed_size = 0;
+	coder->uncompressed_size = 0;
+	coder->pos = 0;
+
+	// Initialize the check
+	lzma_check_init(&coder->check, block->check);
+
+	// Initialize the requested filters.
+	return lzma_raw_encoder_init(&coder->next, allocator, block->filters);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_encoder(lzma_stream *strm, lzma_block *block)
+{
+	lzma_next_strm_init(lzma_block_encoder_init, strm, block);
+
+	strm->internal->supported_actions[LZMA_RUN] = true;
+	strm->internal->supported_actions[LZMA_FINISH] = true;
+
+	return LZMA_OK;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/block_encoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/common/block_encoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/block_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,47 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_encoder.h
-/// \brief      Encodes .xz Blocks
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_BLOCK_ENCODER_H
-#define LZMA_BLOCK_ENCODER_H
-
-#include "common.h"
-
-
-/// \brief      Biggest Compressed Size value that the Block encoder supports
-///
-/// The maximum size of a single Block is limited by the maximum size of
-/// a Stream, which in theory is 2^63 - 3 bytes (i.e. LZMA_VLI_MAX - 3).
-/// While the size is really big and no one should hit it in practice, we
-/// take it into account in some places anyway to catch some errors e.g. if
-/// application passes insanely big value to some function.
-///
-/// We could take into account the headers etc. to determine the exact
-/// maximum size of the Compressed Data field, but the complexity would give
-/// us nothing useful. Instead, limit the size of Compressed Data so that
-/// even with biggest possible Block Header and Check fields the total
-/// encoded size of the Block stays as a valid VLI. This doesn't guarantee
-/// that the size of the Stream doesn't grow too big, but that problem is
-/// taken care outside the Block handling code.
-///
-/// ~LZMA_VLI_C(3) is to guarantee that if we need padding at the end of
-/// the Compressed Data field, it will still stay in the proper limit.
-///
-/// This constant is in this file because it is needed in both
-/// block_encoder.c and block_buffer_encoder.c.
-#define COMPRESSED_SIZE_MAX ((LZMA_VLI_MAX - LZMA_BLOCK_HEADER_SIZE_MAX \
-		- LZMA_CHECK_SIZE_MAX) & ~LZMA_VLI_C(3))
-
-
-extern lzma_ret lzma_block_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, lzma_block *block);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/common/block_encoder.h (from rev 9176, vendor/xz/dist/src/liblzma/common/block_encoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/block_encoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/block_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,47 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       block_encoder.h
+/// \brief      Encodes .xz Blocks
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_BLOCK_ENCODER_H
+#define LZMA_BLOCK_ENCODER_H
+
+#include "common.h"
+
+
+/// \brief      Biggest Compressed Size value that the Block encoder supports
+///
+/// The maximum size of a single Block is limited by the maximum size of
+/// a Stream, which in theory is 2^63 - 3 bytes (i.e. LZMA_VLI_MAX - 3).
+/// While the size is really big and no one should hit it in practice, we
+/// take it into account in some places anyway to catch some errors e.g. if
+/// application passes insanely big value to some function.
+///
+/// We could take into account the headers etc. to determine the exact
+/// maximum size of the Compressed Data field, but the complexity would give
+/// us nothing useful. Instead, limit the size of Compressed Data so that
+/// even with biggest possible Block Header and Check fields the total
+/// encoded size of the Block stays as a valid VLI. This doesn't guarantee
+/// that the size of the Stream doesn't grow too big, but that problem is
+/// taken care outside the Block handling code.
+///
+/// ~LZMA_VLI_C(3) is to guarantee that if we need padding at the end of
+/// the Compressed Data field, it will still stay in the proper limit.
+///
+/// This constant is in this file because it is needed in both
+/// block_encoder.c and block_buffer_encoder.c.
+#define COMPRESSED_SIZE_MAX ((LZMA_VLI_MAX - LZMA_BLOCK_HEADER_SIZE_MAX \
+		- LZMA_CHECK_SIZE_MAX) & ~LZMA_VLI_C(3))
+
+
+extern lzma_ret lzma_block_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator, lzma_block *block);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/common/block_header_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/block_header_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/block_header_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,116 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_header_decoder.c
-/// \brief      Decodes Block Header from .xz files
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-#include "check.h"
-
-
-static void
-free_properties(lzma_block *block, lzma_allocator *allocator)
-{
-	// Free allocated filter options. The last array member is not
-	// touched after the initialization in the beginning of
-	// lzma_block_header_decode(), so we don't need to touch that here.
-	for (size_t i = 0; i < LZMA_FILTERS_MAX; ++i) {
-		lzma_free(block->filters[i].options, allocator);
-		block->filters[i].id = LZMA_VLI_UNKNOWN;
-		block->filters[i].options = NULL;
-	}
-
-	return;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_header_decode(lzma_block *block,
-		lzma_allocator *allocator, const uint8_t *in)
-{
-	// NOTE: We consider the header to be corrupt not only when the
-	// CRC32 doesn't match, but also when variable-length integers
-	// are invalid or over 63 bits, or if the header is too small
-	// to contain the claimed information.
-
-	// Initialize the filter options array. This way the caller can
-	// safely free() the options even if an error occurs in this function.
-	for (size_t i = 0; i <= LZMA_FILTERS_MAX; ++i) {
-		block->filters[i].id = LZMA_VLI_UNKNOWN;
-		block->filters[i].options = NULL;
-	}
-
-	// Always zero for now.
-	block->version = 0;
-
-	// Validate Block Header Size and Check type. The caller must have
-	// already set these, so it is a programming error if this test fails.
-	if (lzma_block_header_size_decode(in[0]) != block->header_size
-			|| (unsigned int)(block->check) > LZMA_CHECK_ID_MAX)
-		return LZMA_PROG_ERROR;
-
-	// Exclude the CRC32 field.
-	const size_t in_size = block->header_size - 4;
-
-	// Verify CRC32
-	if (lzma_crc32(in, in_size, 0) != unaligned_read32le(in + in_size))
-		return LZMA_DATA_ERROR;
-
-	// Check for unsupported flags.
-	if (in[1] & 0x3C)
-		return LZMA_OPTIONS_ERROR;
-
-	// Start after the Block Header Size and Block Flags fields.
-	size_t in_pos = 2;
-
-	// Compressed Size
-	if (in[1] & 0x40) {
-		return_if_error(lzma_vli_decode(&block->compressed_size,
-				NULL, in, &in_pos, in_size));
-
-		// Validate Compressed Size. This checks that it isn't zero
-		// and that the total size of the Block is a valid VLI.
-		if (lzma_block_unpadded_size(block) == 0)
-			return LZMA_DATA_ERROR;
-	} else {
-		block->compressed_size = LZMA_VLI_UNKNOWN;
-	}
-
-	// Uncompressed Size
-	if (in[1] & 0x80)
-		return_if_error(lzma_vli_decode(&block->uncompressed_size,
-				NULL, in, &in_pos, in_size));
-	else
-		block->uncompressed_size = LZMA_VLI_UNKNOWN;
-
-	// Filter Flags
-	const size_t filter_count = (in[1] & 3) + 1;
-	for (size_t i = 0; i < filter_count; ++i) {
-		const lzma_ret ret = lzma_filter_flags_decode(
-				&block->filters[i], allocator,
-				in, &in_pos, in_size);
-		if (ret != LZMA_OK) {
-			free_properties(block, allocator);
-			return ret;
-		}
-	}
-
-	// Padding
-	while (in_pos < in_size) {
-		if (in[in_pos++] != 0x00) {
-			free_properties(block, allocator);
-
-			// Possibly some new field present so use
-			// LZMA_OPTIONS_ERROR instead of LZMA_DATA_ERROR.
-			return LZMA_OPTIONS_ERROR;
-		}
-	}
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/block_header_decoder.c (from rev 9176, vendor/xz/dist/src/liblzma/common/block_header_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/block_header_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/block_header_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,124 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       block_header_decoder.c
+/// \brief      Decodes Block Header from .xz files
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+#include "check.h"
+
+
+static void
+free_properties(lzma_block *block, const lzma_allocator *allocator)
+{
+	// Free allocated filter options. The last array member is not
+	// touched after the initialization in the beginning of
+	// lzma_block_header_decode(), so we don't need to touch that here.
+	for (size_t i = 0; i < LZMA_FILTERS_MAX; ++i) {
+		lzma_free(block->filters[i].options, allocator);
+		block->filters[i].id = LZMA_VLI_UNKNOWN;
+		block->filters[i].options = NULL;
+	}
+
+	return;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_header_decode(lzma_block *block,
+		const lzma_allocator *allocator, const uint8_t *in)
+{
+	// NOTE: We consider the header to be corrupt not only when the
+	// CRC32 doesn't match, but also when variable-length integers
+	// are invalid or over 63 bits, or if the header is too small
+	// to contain the claimed information.
+
+	// Initialize the filter options array. This way the caller can
+	// safely free() the options even if an error occurs in this function.
+	for (size_t i = 0; i <= LZMA_FILTERS_MAX; ++i) {
+		block->filters[i].id = LZMA_VLI_UNKNOWN;
+		block->filters[i].options = NULL;
+	}
+
+	// Versions 0 and 1 are supported. If a newer version was specified,
+	// we need to downgrade it.
+	if (block->version > 1)
+		block->version = 1;
+
+	// This isn't a Block Header option, but since the decompressor will
+	// read it if version >= 1, it's better to initialize it here than
+	// to expect the caller to do it since in almost all cases this
+	// should be false.
+	block->ignore_check = false;
+
+	// Validate Block Header Size and Check type. The caller must have
+	// already set these, so it is a programming error if this test fails.
+	if (lzma_block_header_size_decode(in[0]) != block->header_size
+			|| (unsigned int)(block->check) > LZMA_CHECK_ID_MAX)
+		return LZMA_PROG_ERROR;
+
+	// Exclude the CRC32 field.
+	const size_t in_size = block->header_size - 4;
+
+	// Verify CRC32
+	if (lzma_crc32(in, in_size, 0) != unaligned_read32le(in + in_size))
+		return LZMA_DATA_ERROR;
+
+	// Check for unsupported flags.
+	if (in[1] & 0x3C)
+		return LZMA_OPTIONS_ERROR;
+
+	// Start after the Block Header Size and Block Flags fields.
+	size_t in_pos = 2;
+
+	// Compressed Size
+	if (in[1] & 0x40) {
+		return_if_error(lzma_vli_decode(&block->compressed_size,
+				NULL, in, &in_pos, in_size));
+
+		// Validate Compressed Size. This checks that it isn't zero
+		// and that the total size of the Block is a valid VLI.
+		if (lzma_block_unpadded_size(block) == 0)
+			return LZMA_DATA_ERROR;
+	} else {
+		block->compressed_size = LZMA_VLI_UNKNOWN;
+	}
+
+	// Uncompressed Size
+	if (in[1] & 0x80)
+		return_if_error(lzma_vli_decode(&block->uncompressed_size,
+				NULL, in, &in_pos, in_size));
+	else
+		block->uncompressed_size = LZMA_VLI_UNKNOWN;
+
+	// Filter Flags
+	const size_t filter_count = (in[1] & 3) + 1;
+	for (size_t i = 0; i < filter_count; ++i) {
+		const lzma_ret ret = lzma_filter_flags_decode(
+				&block->filters[i], allocator,
+				in, &in_pos, in_size);
+		if (ret != LZMA_OK) {
+			free_properties(block, allocator);
+			return ret;
+		}
+	}
+
+	// Padding
+	while (in_pos < in_size) {
+		if (in[in_pos++] != 0x00) {
+			free_properties(block, allocator);
+
+			// Possibly some new field present so use
+			// LZMA_OPTIONS_ERROR instead of LZMA_DATA_ERROR.
+			return LZMA_OPTIONS_ERROR;
+		}
+	}
+
+	return LZMA_OK;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/block_header_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/block_header_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/block_header_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,132 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_header_encoder.c
-/// \brief      Encodes Block Header for .xz files
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-#include "check.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_header_size(lzma_block *block)
-{
-	if (block->version != 0)
-		return LZMA_OPTIONS_ERROR;
-
-	// Block Header Size + Block Flags + CRC32.
-	uint32_t size = 1 + 1 + 4;
-
-	// Compressed Size
-	if (block->compressed_size != LZMA_VLI_UNKNOWN) {
-		const uint32_t add = lzma_vli_size(block->compressed_size);
-		if (add == 0 || block->compressed_size == 0)
-			return LZMA_PROG_ERROR;
-
-		size += add;
-	}
-
-	// Uncompressed Size
-	if (block->uncompressed_size != LZMA_VLI_UNKNOWN) {
-		const uint32_t add = lzma_vli_size(block->uncompressed_size);
-		if (add == 0)
-			return LZMA_PROG_ERROR;
-
-		size += add;
-	}
-
-	// List of Filter Flags
-	if (block->filters == NULL || block->filters[0].id == LZMA_VLI_UNKNOWN)
-		return LZMA_PROG_ERROR;
-
-	for (size_t i = 0; block->filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
-		// Don't allow too many filters.
-		if (i == LZMA_FILTERS_MAX)
-			return LZMA_PROG_ERROR;
-
-		uint32_t add;
-		return_if_error(lzma_filter_flags_size(&add,
-				block->filters + i));
-
-		size += add;
-	}
-
-	// Pad to a multiple of four bytes.
-	block->header_size = (size + 3) & ~UINT32_C(3);
-
-	// NOTE: We don't verify that the encoded size of the Block stays
-	// within limits. This is because it is possible that we are called
-	// with exaggerated Compressed Size (e.g. LZMA_VLI_MAX) to reserve
-	// space for Block Header, and later called again with lower,
-	// real values.
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_header_encode(const lzma_block *block, uint8_t *out)
-{
-	// Validate everything but filters.
-	if (lzma_block_unpadded_size(block) == 0
-			|| !lzma_vli_is_valid(block->uncompressed_size))
-		return LZMA_PROG_ERROR;
-
-	// Indicate the size of the buffer _excluding_ the CRC32 field.
-	const size_t out_size = block->header_size - 4;
-
-	// Store the Block Header Size.
-	out[0] = out_size / 4;
-
-	// We write Block Flags in pieces.
-	out[1] = 0x00;
-	size_t out_pos = 2;
-
-	// Compressed Size
-	if (block->compressed_size != LZMA_VLI_UNKNOWN) {
-		return_if_error(lzma_vli_encode(block->compressed_size, NULL,
-				out, &out_pos, out_size));
-
-		out[1] |= 0x40;
-	}
-
-	// Uncompressed Size
-	if (block->uncompressed_size != LZMA_VLI_UNKNOWN) {
-		return_if_error(lzma_vli_encode(block->uncompressed_size, NULL,
-				out, &out_pos, out_size));
-
-		out[1] |= 0x80;
-	}
-
-	// Filter Flags
-	if (block->filters == NULL || block->filters[0].id == LZMA_VLI_UNKNOWN)
-		return LZMA_PROG_ERROR;
-
-	size_t filter_count = 0;
-	do {
-		// There can be a maximum of four filters.
-		if (filter_count == LZMA_FILTERS_MAX)
-			return LZMA_PROG_ERROR;
-
-		return_if_error(lzma_filter_flags_encode(
-				block->filters + filter_count,
-				out, &out_pos, out_size));
-
-	} while (block->filters[++filter_count].id != LZMA_VLI_UNKNOWN);
-
-	out[1] |= filter_count - 1;
-
-	// Padding
-	memzero(out + out_pos, out_size - out_pos);
-
-	// CRC32
-	unaligned_write32le(out + out_size, lzma_crc32(out, out_size, 0));
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/block_header_encoder.c (from rev 9176, vendor/xz/dist/src/liblzma/common/block_header_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/block_header_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/block_header_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,132 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       block_header_encoder.c
+/// \brief      Encodes Block Header for .xz files
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+#include "check.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_header_size(lzma_block *block)
+{
+	if (block->version > 1)
+		return LZMA_OPTIONS_ERROR;
+
+	// Block Header Size + Block Flags + CRC32.
+	uint32_t size = 1 + 1 + 4;
+
+	// Compressed Size
+	if (block->compressed_size != LZMA_VLI_UNKNOWN) {
+		const uint32_t add = lzma_vli_size(block->compressed_size);
+		if (add == 0 || block->compressed_size == 0)
+			return LZMA_PROG_ERROR;
+
+		size += add;
+	}
+
+	// Uncompressed Size
+	if (block->uncompressed_size != LZMA_VLI_UNKNOWN) {
+		const uint32_t add = lzma_vli_size(block->uncompressed_size);
+		if (add == 0)
+			return LZMA_PROG_ERROR;
+
+		size += add;
+	}
+
+	// List of Filter Flags
+	if (block->filters == NULL || block->filters[0].id == LZMA_VLI_UNKNOWN)
+		return LZMA_PROG_ERROR;
+
+	for (size_t i = 0; block->filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
+		// Don't allow too many filters.
+		if (i == LZMA_FILTERS_MAX)
+			return LZMA_PROG_ERROR;
+
+		uint32_t add;
+		return_if_error(lzma_filter_flags_size(&add,
+				block->filters + i));
+
+		size += add;
+	}
+
+	// Pad to a multiple of four bytes.
+	block->header_size = (size + 3) & ~UINT32_C(3);
+
+	// NOTE: We don't verify that the encoded size of the Block stays
+	// within limits. This is because it is possible that we are called
+	// with exaggerated Compressed Size (e.g. LZMA_VLI_MAX) to reserve
+	// space for Block Header, and later called again with lower,
+	// real values.
+
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_header_encode(const lzma_block *block, uint8_t *out)
+{
+	// Validate everything but filters.
+	if (lzma_block_unpadded_size(block) == 0
+			|| !lzma_vli_is_valid(block->uncompressed_size))
+		return LZMA_PROG_ERROR;
+
+	// Indicate the size of the buffer _excluding_ the CRC32 field.
+	const size_t out_size = block->header_size - 4;
+
+	// Store the Block Header Size.
+	out[0] = out_size / 4;
+
+	// We write Block Flags in pieces.
+	out[1] = 0x00;
+	size_t out_pos = 2;
+
+	// Compressed Size
+	if (block->compressed_size != LZMA_VLI_UNKNOWN) {
+		return_if_error(lzma_vli_encode(block->compressed_size, NULL,
+				out, &out_pos, out_size));
+
+		out[1] |= 0x40;
+	}
+
+	// Uncompressed Size
+	if (block->uncompressed_size != LZMA_VLI_UNKNOWN) {
+		return_if_error(lzma_vli_encode(block->uncompressed_size, NULL,
+				out, &out_pos, out_size));
+
+		out[1] |= 0x80;
+	}
+
+	// Filter Flags
+	if (block->filters == NULL || block->filters[0].id == LZMA_VLI_UNKNOWN)
+		return LZMA_PROG_ERROR;
+
+	size_t filter_count = 0;
+	do {
+		// There can be a maximum of four filters.
+		if (filter_count == LZMA_FILTERS_MAX)
+			return LZMA_PROG_ERROR;
+
+		return_if_error(lzma_filter_flags_encode(
+				block->filters + filter_count,
+				out, &out_pos, out_size));
+
+	} while (block->filters[++filter_count].id != LZMA_VLI_UNKNOWN);
+
+	out[1] |= filter_count - 1;
+
+	// Padding
+	memzero(out + out_pos, out_size - out_pos);
+
+	// CRC32
+	unaligned_write32le(out + out_size, lzma_crc32(out, out_size, 0));
+
+	return LZMA_OK;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/block_util.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/block_util.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/block_util.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,90 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_header.c
-/// \brief      Utility functions to handle lzma_block
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-#include "index.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_compressed_size(lzma_block *block, lzma_vli unpadded_size)
-{
-	// Validate everything but Uncompressed Size and filters.
-	if (lzma_block_unpadded_size(block) == 0)
-		return LZMA_PROG_ERROR;
-
-	const uint32_t container_size = block->header_size
-			+ lzma_check_size(block->check);
-
-	// Validate that Compressed Size will be greater than zero.
-	if (unpadded_size <= container_size)
-		return LZMA_DATA_ERROR;
-
-	// Calculate what Compressed Size is supposed to be.
-	// If Compressed Size was present in Block Header,
-	// compare that the new value matches it.
-	const lzma_vli compressed_size = unpadded_size - container_size;
-	if (block->compressed_size != LZMA_VLI_UNKNOWN
-			&& block->compressed_size != compressed_size)
-		return LZMA_DATA_ERROR;
-
-	block->compressed_size = compressed_size;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_block_unpadded_size(const lzma_block *block)
-{
-	// Validate the values that we are interested in i.e. all but
-	// Uncompressed Size and the filters.
-	//
-	// NOTE: This function is used for validation too, so it is
-	// essential that these checks are always done even if
-	// Compressed Size is unknown.
-	if (block == NULL || block->version != 0
-			|| block->header_size < LZMA_BLOCK_HEADER_SIZE_MIN
-			|| block->header_size > LZMA_BLOCK_HEADER_SIZE_MAX
-			|| (block->header_size & 3)
-			|| !lzma_vli_is_valid(block->compressed_size)
-			|| block->compressed_size == 0
-			|| (unsigned int)(block->check) > LZMA_CHECK_ID_MAX)
-		return 0;
-
-	// If Compressed Size is unknown, return that we cannot know
-	// size of the Block either.
-	if (block->compressed_size == LZMA_VLI_UNKNOWN)
-		return LZMA_VLI_UNKNOWN;
-
-	// Calculate Unpadded Size and validate it.
-	const lzma_vli unpadded_size = block->compressed_size
-				+ block->header_size
-				+ lzma_check_size(block->check);
-
-	assert(unpadded_size >= UNPADDED_SIZE_MIN);
-	if (unpadded_size > UNPADDED_SIZE_MAX)
-		return 0;
-
-	return unpadded_size;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_block_total_size(const lzma_block *block)
-{
-	lzma_vli unpadded_size = lzma_block_unpadded_size(block);
-
-	if (unpadded_size != LZMA_VLI_UNKNOWN)
-		unpadded_size = vli_ceil4(unpadded_size);
-
-	return unpadded_size;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/block_util.c (from rev 9176, vendor/xz/dist/src/liblzma/common/block_util.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/block_util.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/block_util.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,90 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       block_header.c
+/// \brief      Utility functions to handle lzma_block
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+#include "index.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_compressed_size(lzma_block *block, lzma_vli unpadded_size)
+{
+	// Validate everything but Uncompressed Size and filters.
+	if (lzma_block_unpadded_size(block) == 0)
+		return LZMA_PROG_ERROR;
+
+	const uint32_t container_size = block->header_size
+			+ lzma_check_size(block->check);
+
+	// Validate that Compressed Size will be greater than zero.
+	if (unpadded_size <= container_size)
+		return LZMA_DATA_ERROR;
+
+	// Calculate what Compressed Size is supposed to be.
+	// If Compressed Size was present in Block Header,
+	// compare that the new value matches it.
+	const lzma_vli compressed_size = unpadded_size - container_size;
+	if (block->compressed_size != LZMA_VLI_UNKNOWN
+			&& block->compressed_size != compressed_size)
+		return LZMA_DATA_ERROR;
+
+	block->compressed_size = compressed_size;
+
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_block_unpadded_size(const lzma_block *block)
+{
+	// Validate the values that we are interested in i.e. all but
+	// Uncompressed Size and the filters.
+	//
+	// NOTE: This function is used for validation too, so it is
+	// essential that these checks are always done even if
+	// Compressed Size is unknown.
+	if (block == NULL || block->version > 1
+			|| block->header_size < LZMA_BLOCK_HEADER_SIZE_MIN
+			|| block->header_size > LZMA_BLOCK_HEADER_SIZE_MAX
+			|| (block->header_size & 3)
+			|| !lzma_vli_is_valid(block->compressed_size)
+			|| block->compressed_size == 0
+			|| (unsigned int)(block->check) > LZMA_CHECK_ID_MAX)
+		return 0;
+
+	// If Compressed Size is unknown, return that we cannot know
+	// size of the Block either.
+	if (block->compressed_size == LZMA_VLI_UNKNOWN)
+		return LZMA_VLI_UNKNOWN;
+
+	// Calculate Unpadded Size and validate it.
+	const lzma_vli unpadded_size = block->compressed_size
+				+ block->header_size
+				+ lzma_check_size(block->check);
+
+	assert(unpadded_size >= UNPADDED_SIZE_MIN);
+	if (unpadded_size > UNPADDED_SIZE_MAX)
+		return 0;
+
+	return unpadded_size;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_block_total_size(const lzma_block *block)
+{
+	lzma_vli unpadded_size = lzma_block_unpadded_size(block);
+
+	if (unpadded_size != LZMA_VLI_UNKNOWN)
+		unpadded_size = vli_ceil4(unpadded_size);
+
+	return unpadded_size;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/common.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/common.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/common.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,388 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       common.h
-/// \brief      Common functions needed in many places in liblzma
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-
-
-/////////////
-// Version //
-/////////////
-
-extern LZMA_API(uint32_t)
-lzma_version_number(void)
-{
-	return LZMA_VERSION;
-}
-
-
-extern LZMA_API(const char *)
-lzma_version_string(void)
-{
-	return LZMA_VERSION_STRING;
-}
-
-
-///////////////////////
-// Memory allocation //
-///////////////////////
-
-extern void * lzma_attribute((__malloc__)) lzma_attr_alloc_size(1)
-lzma_alloc(size_t size, lzma_allocator *allocator)
-{
-	// Some malloc() variants return NULL if called with size == 0.
-	if (size == 0)
-		size = 1;
-
-	void *ptr;
-
-	if (allocator != NULL && allocator->alloc != NULL)
-		ptr = allocator->alloc(allocator->opaque, 1, size);
-	else
-		ptr = malloc(size);
-
-	return ptr;
-}
-
-
-extern void
-lzma_free(void *ptr, lzma_allocator *allocator)
-{
-	if (allocator != NULL && allocator->free != NULL)
-		allocator->free(allocator->opaque, ptr);
-	else
-		free(ptr);
-
-	return;
-}
-
-
-//////////
-// Misc //
-//////////
-
-extern size_t
-lzma_bufcpy(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)
-{
-	const size_t in_avail = in_size - *in_pos;
-	const size_t out_avail = out_size - *out_pos;
-	const size_t copy_size = my_min(in_avail, out_avail);
-
-	memcpy(out + *out_pos, in + *in_pos, copy_size);
-
-	*in_pos += copy_size;
-	*out_pos += copy_size;
-
-	return copy_size;
-}
-
-
-extern lzma_ret
-lzma_next_filter_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	lzma_next_coder_init(filters[0].init, next, allocator);
-	next->id = filters[0].id;
-	return filters[0].init == NULL
-			? LZMA_OK : filters[0].init(next, allocator, filters);
-}
-
-
-extern lzma_ret
-lzma_next_filter_update(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *reversed_filters)
-{
-	// Check that the application isn't trying to change the Filter ID.
-	// End of filters is indicated with LZMA_VLI_UNKNOWN in both
-	// reversed_filters[0].id and next->id.
-	if (reversed_filters[0].id != next->id)
-		return LZMA_PROG_ERROR;
-
-	if (reversed_filters[0].id == LZMA_VLI_UNKNOWN)
-		return LZMA_OK;
-
-	assert(next->update != NULL);
-	return next->update(next->coder, allocator, NULL, reversed_filters);
-}
-
-
-extern void
-lzma_next_end(lzma_next_coder *next, lzma_allocator *allocator)
-{
-	if (next->init != (uintptr_t)(NULL)) {
-		// To avoid tiny end functions that simply call
-		// lzma_free(coder, allocator), we allow leaving next->end
-		// NULL and call lzma_free() here.
-		if (next->end != NULL)
-			next->end(next->coder, allocator);
-		else
-			lzma_free(next->coder, allocator);
-
-		// Reset the variables so the we don't accidentally think
-		// that it is an already initialized coder.
-		*next = LZMA_NEXT_CODER_INIT;
-	}
-
-	return;
-}
-
-
-//////////////////////////////////////
-// External to internal API wrapper //
-//////////////////////////////////////
-
-extern lzma_ret
-lzma_strm_init(lzma_stream *strm)
-{
-	if (strm == NULL)
-		return LZMA_PROG_ERROR;
-
-	if (strm->internal == NULL) {
-		strm->internal = lzma_alloc(sizeof(lzma_internal),
-				strm->allocator);
-		if (strm->internal == NULL)
-			return LZMA_MEM_ERROR;
-
-		strm->internal->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	strm->internal->supported_actions[LZMA_RUN] = false;
-	strm->internal->supported_actions[LZMA_SYNC_FLUSH] = false;
-	strm->internal->supported_actions[LZMA_FULL_FLUSH] = false;
-	strm->internal->supported_actions[LZMA_FINISH] = false;
-	strm->internal->sequence = ISEQ_RUN;
-	strm->internal->allow_buf_error = false;
-
-	strm->total_in = 0;
-	strm->total_out = 0;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_code(lzma_stream *strm, lzma_action action)
-{
-	// Sanity checks
-	if ((strm->next_in == NULL && strm->avail_in != 0)
-			|| (strm->next_out == NULL && strm->avail_out != 0)
-			|| strm->internal == NULL
-			|| strm->internal->next.code == NULL
-			|| (unsigned int)(action) > LZMA_FINISH
-			|| !strm->internal->supported_actions[action])
-		return LZMA_PROG_ERROR;
-
-	// Check if unsupported members have been set to non-zero or non-NULL,
-	// which would indicate that some new feature is wanted.
-	if (strm->reserved_ptr1 != NULL
-			|| strm->reserved_ptr2 != NULL
-			|| strm->reserved_ptr3 != NULL
-			|| strm->reserved_ptr4 != NULL
-			|| strm->reserved_int1 != 0
-			|| strm->reserved_int2 != 0
-			|| strm->reserved_int3 != 0
-			|| strm->reserved_int4 != 0
-			|| strm->reserved_enum1 != LZMA_RESERVED_ENUM
-			|| strm->reserved_enum2 != LZMA_RESERVED_ENUM)
-		return LZMA_OPTIONS_ERROR;
-
-	switch (strm->internal->sequence) {
-	case ISEQ_RUN:
-		switch (action) {
-		case LZMA_RUN:
-			break;
-
-		case LZMA_SYNC_FLUSH:
-			strm->internal->sequence = ISEQ_SYNC_FLUSH;
-			break;
-
-		case LZMA_FULL_FLUSH:
-			strm->internal->sequence = ISEQ_FULL_FLUSH;
-			break;
-
-		case LZMA_FINISH:
-			strm->internal->sequence = ISEQ_FINISH;
-			break;
-		}
-
-		break;
-
-	case ISEQ_SYNC_FLUSH:
-		// The same action must be used until we return
-		// LZMA_STREAM_END, and the amount of input must not change.
-		if (action != LZMA_SYNC_FLUSH
-				|| strm->internal->avail_in != strm->avail_in)
-			return LZMA_PROG_ERROR;
-
-		break;
-
-	case ISEQ_FULL_FLUSH:
-		if (action != LZMA_FULL_FLUSH
-				|| strm->internal->avail_in != strm->avail_in)
-			return LZMA_PROG_ERROR;
-
-		break;
-
-	case ISEQ_FINISH:
-		if (action != LZMA_FINISH
-				|| strm->internal->avail_in != strm->avail_in)
-			return LZMA_PROG_ERROR;
-
-		break;
-
-	case ISEQ_END:
-		return LZMA_STREAM_END;
-
-	case ISEQ_ERROR:
-	default:
-		return LZMA_PROG_ERROR;
-	}
-
-	size_t in_pos = 0;
-	size_t out_pos = 0;
-	lzma_ret ret = strm->internal->next.code(
-			strm->internal->next.coder, strm->allocator,
-			strm->next_in, &in_pos, strm->avail_in,
-			strm->next_out, &out_pos, strm->avail_out, action);
-
-	strm->next_in += in_pos;
-	strm->avail_in -= in_pos;
-	strm->total_in += in_pos;
-
-	strm->next_out += out_pos;
-	strm->avail_out -= out_pos;
-	strm->total_out += out_pos;
-
-	strm->internal->avail_in = strm->avail_in;
-
-	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
-		// was zero but still there was no more data left to written
-		// to next_out.
-		if (out_pos == 0 && in_pos == 0) {
-			if (strm->internal->allow_buf_error)
-				ret = LZMA_BUF_ERROR;
-			else
-				strm->internal->allow_buf_error = true;
-		} else {
-			strm->internal->allow_buf_error = false;
-		}
-		break;
-
-	case LZMA_STREAM_END:
-		if (strm->internal->sequence == ISEQ_SYNC_FLUSH
-				|| strm->internal->sequence == ISEQ_FULL_FLUSH)
-			strm->internal->sequence = ISEQ_RUN;
-		else
-			strm->internal->sequence = ISEQ_END;
-
-	// Fall through
-
-	case LZMA_NO_CHECK:
-	case LZMA_UNSUPPORTED_CHECK:
-	case LZMA_GET_CHECK:
-	case LZMA_MEMLIMIT_ERROR:
-		// Something else than LZMA_OK, but not a fatal error,
-		// that is, coding may be continued (except if ISEQ_END).
-		strm->internal->allow_buf_error = false;
-		break;
-
-	default:
-		// All the other errors are fatal; coding cannot be continued.
-		assert(ret != LZMA_BUF_ERROR);
-		strm->internal->sequence = ISEQ_ERROR;
-		break;
-	}
-
-	return ret;
-}
-
-
-extern LZMA_API(void)
-lzma_end(lzma_stream *strm)
-{
-	if (strm != NULL && strm->internal != NULL) {
-		lzma_next_end(&strm->internal->next, strm->allocator);
-		lzma_free(strm->internal, strm->allocator);
-		strm->internal = NULL;
-	}
-
-	return;
-}
-
-
-extern LZMA_API(lzma_check)
-lzma_get_check(const lzma_stream *strm)
-{
-	// Return LZMA_CHECK_NONE if we cannot know the check type.
-	// It's a bug in the application if this happens.
-	if (strm->internal->next.get_check == NULL)
-		return LZMA_CHECK_NONE;
-
-	return strm->internal->next.get_check(strm->internal->next.coder);
-}
-
-
-extern LZMA_API(uint64_t)
-lzma_memusage(const lzma_stream *strm)
-{
-	uint64_t memusage;
-	uint64_t old_memlimit;
-
-	if (strm == NULL || strm->internal == NULL
-			|| strm->internal->next.memconfig == NULL
-			|| strm->internal->next.memconfig(
-				strm->internal->next.coder,
-				&memusage, &old_memlimit, 0) != LZMA_OK)
-		return 0;
-
-	return memusage;
-}
-
-
-extern LZMA_API(uint64_t)
-lzma_memlimit_get(const lzma_stream *strm)
-{
-	uint64_t old_memlimit;
-	uint64_t memusage;
-
-	if (strm == NULL || strm->internal == NULL
-			|| strm->internal->next.memconfig == NULL
-			|| strm->internal->next.memconfig(
-				strm->internal->next.coder,
-				&memusage, &old_memlimit, 0) != LZMA_OK)
-		return 0;
-
-	return old_memlimit;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_memlimit_set(lzma_stream *strm, uint64_t new_memlimit)
-{
-	// Dummy variables to simplify memconfig functions
-	uint64_t old_memlimit;
-	uint64_t memusage;
-
-	if (strm == NULL || strm->internal == NULL
-			|| strm->internal->next.memconfig == NULL)
-		return LZMA_PROG_ERROR;
-
-	if (new_memlimit != 0 && new_memlimit < LZMA_MEMUSAGE_BASE)
-		return LZMA_MEMLIMIT_ERROR;
-
-	return strm->internal->next.memconfig(strm->internal->next.coder,
-			&memusage, &old_memlimit, new_memlimit);
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/common.c (from rev 9176, vendor/xz/dist/src/liblzma/common/common.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/common.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/common.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,443 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       common.h
+/// \brief      Common functions needed in many places in liblzma
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+
+/////////////
+// Version //
+/////////////
+
+extern LZMA_API(uint32_t)
+lzma_version_number(void)
+{
+	return LZMA_VERSION;
+}
+
+
+extern LZMA_API(const char *)
+lzma_version_string(void)
+{
+	return LZMA_VERSION_STRING;
+}
+
+
+///////////////////////
+// Memory allocation //
+///////////////////////
+
+extern void * lzma_attribute((__malloc__)) lzma_attr_alloc_size(1)
+lzma_alloc(size_t size, const lzma_allocator *allocator)
+{
+	// Some malloc() variants return NULL if called with size == 0.
+	if (size == 0)
+		size = 1;
+
+	void *ptr;
+
+	if (allocator != NULL && allocator->alloc != NULL)
+		ptr = allocator->alloc(allocator->opaque, 1, size);
+	else
+		ptr = malloc(size);
+
+	return ptr;
+}
+
+
+extern void * lzma_attribute((__malloc__)) lzma_attr_alloc_size(1)
+lzma_alloc_zero(size_t size, const lzma_allocator *allocator)
+{
+	// Some calloc() variants return NULL if called with size == 0.
+	if (size == 0)
+		size = 1;
+
+	void *ptr;
+
+	if (allocator != NULL && allocator->alloc != NULL) {
+		ptr = allocator->alloc(allocator->opaque, 1, size);
+		if (ptr != NULL)
+			memzero(ptr, size);
+	} else {
+		ptr = calloc(1, size);
+	}
+
+	return ptr;
+}
+
+
+extern void
+lzma_free(void *ptr, const lzma_allocator *allocator)
+{
+	if (allocator != NULL && allocator->free != NULL)
+		allocator->free(allocator->opaque, ptr);
+	else
+		free(ptr);
+
+	return;
+}
+
+
+//////////
+// Misc //
+//////////
+
+extern size_t
+lzma_bufcpy(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)
+{
+	const size_t in_avail = in_size - *in_pos;
+	const size_t out_avail = out_size - *out_pos;
+	const size_t copy_size = my_min(in_avail, out_avail);
+
+	memcpy(out + *out_pos, in + *in_pos, copy_size);
+
+	*in_pos += copy_size;
+	*out_pos += copy_size;
+
+	return copy_size;
+}
+
+
+extern lzma_ret
+lzma_next_filter_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	lzma_next_coder_init(filters[0].init, next, allocator);
+	next->id = filters[0].id;
+	return filters[0].init == NULL
+			? LZMA_OK : filters[0].init(next, allocator, filters);
+}
+
+
+extern lzma_ret
+lzma_next_filter_update(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter *reversed_filters)
+{
+	// Check that the application isn't trying to change the Filter ID.
+	// End of filters is indicated with LZMA_VLI_UNKNOWN in both
+	// reversed_filters[0].id and next->id.
+	if (reversed_filters[0].id != next->id)
+		return LZMA_PROG_ERROR;
+
+	if (reversed_filters[0].id == LZMA_VLI_UNKNOWN)
+		return LZMA_OK;
+
+	assert(next->update != NULL);
+	return next->update(next->coder, allocator, NULL, reversed_filters);
+}
+
+
+extern void
+lzma_next_end(lzma_next_coder *next, const lzma_allocator *allocator)
+{
+	if (next->init != (uintptr_t)(NULL)) {
+		// To avoid tiny end functions that simply call
+		// lzma_free(coder, allocator), we allow leaving next->end
+		// NULL and call lzma_free() here.
+		if (next->end != NULL)
+			next->end(next->coder, allocator);
+		else
+			lzma_free(next->coder, allocator);
+
+		// Reset the variables so the we don't accidentally think
+		// that it is an already initialized coder.
+		*next = LZMA_NEXT_CODER_INIT;
+	}
+
+	return;
+}
+
+
+//////////////////////////////////////
+// External to internal API wrapper //
+//////////////////////////////////////
+
+extern lzma_ret
+lzma_strm_init(lzma_stream *strm)
+{
+	if (strm == NULL)
+		return LZMA_PROG_ERROR;
+
+	if (strm->internal == NULL) {
+		strm->internal = lzma_alloc(sizeof(lzma_internal),
+				strm->allocator);
+		if (strm->internal == NULL)
+			return LZMA_MEM_ERROR;
+
+		strm->internal->next = LZMA_NEXT_CODER_INIT;
+	}
+
+	memzero(strm->internal->supported_actions,
+			sizeof(strm->internal->supported_actions));
+	strm->internal->sequence = ISEQ_RUN;
+	strm->internal->allow_buf_error = false;
+
+	strm->total_in = 0;
+	strm->total_out = 0;
+
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_code(lzma_stream *strm, lzma_action action)
+{
+	// Sanity checks
+	if ((strm->next_in == NULL && strm->avail_in != 0)
+			|| (strm->next_out == NULL && strm->avail_out != 0)
+			|| strm->internal == NULL
+			|| strm->internal->next.code == NULL
+			|| (unsigned int)(action) > LZMA_ACTION_MAX
+			|| !strm->internal->supported_actions[action])
+		return LZMA_PROG_ERROR;
+
+	// Check if unsupported members have been set to non-zero or non-NULL,
+	// which would indicate that some new feature is wanted.
+	if (strm->reserved_ptr1 != NULL
+			|| strm->reserved_ptr2 != NULL
+			|| strm->reserved_ptr3 != NULL
+			|| strm->reserved_ptr4 != NULL
+			|| strm->reserved_int1 != 0
+			|| strm->reserved_int2 != 0
+			|| strm->reserved_int3 != 0
+			|| strm->reserved_int4 != 0
+			|| strm->reserved_enum1 != LZMA_RESERVED_ENUM
+			|| strm->reserved_enum2 != LZMA_RESERVED_ENUM)
+		return LZMA_OPTIONS_ERROR;
+
+	switch (strm->internal->sequence) {
+	case ISEQ_RUN:
+		switch (action) {
+		case LZMA_RUN:
+			break;
+
+		case LZMA_SYNC_FLUSH:
+			strm->internal->sequence = ISEQ_SYNC_FLUSH;
+			break;
+
+		case LZMA_FULL_FLUSH:
+			strm->internal->sequence = ISEQ_FULL_FLUSH;
+			break;
+
+		case LZMA_FINISH:
+			strm->internal->sequence = ISEQ_FINISH;
+			break;
+
+		case LZMA_FULL_BARRIER:
+			strm->internal->sequence = ISEQ_FULL_BARRIER;
+			break;
+		}
+
+		break;
+
+	case ISEQ_SYNC_FLUSH:
+		// The same action must be used until we return
+		// LZMA_STREAM_END, and the amount of input must not change.
+		if (action != LZMA_SYNC_FLUSH
+				|| strm->internal->avail_in != strm->avail_in)
+			return LZMA_PROG_ERROR;
+
+		break;
+
+	case ISEQ_FULL_FLUSH:
+		if (action != LZMA_FULL_FLUSH
+				|| strm->internal->avail_in != strm->avail_in)
+			return LZMA_PROG_ERROR;
+
+		break;
+
+	case ISEQ_FINISH:
+		if (action != LZMA_FINISH
+				|| strm->internal->avail_in != strm->avail_in)
+			return LZMA_PROG_ERROR;
+
+		break;
+
+	case ISEQ_FULL_BARRIER:
+		if (action != LZMA_FULL_BARRIER
+				|| strm->internal->avail_in != strm->avail_in)
+			return LZMA_PROG_ERROR;
+
+		break;
+
+	case ISEQ_END:
+		return LZMA_STREAM_END;
+
+	case ISEQ_ERROR:
+	default:
+		return LZMA_PROG_ERROR;
+	}
+
+	size_t in_pos = 0;
+	size_t out_pos = 0;
+	lzma_ret ret = strm->internal->next.code(
+			strm->internal->next.coder, strm->allocator,
+			strm->next_in, &in_pos, strm->avail_in,
+			strm->next_out, &out_pos, strm->avail_out, action);
+
+	strm->next_in += in_pos;
+	strm->avail_in -= in_pos;
+	strm->total_in += in_pos;
+
+	strm->next_out += out_pos;
+	strm->avail_out -= out_pos;
+	strm->total_out += out_pos;
+
+	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)) {
+	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
+		// was zero but still there was no more data left to written
+		// to next_out.
+		if (out_pos == 0 && in_pos == 0) {
+			if (strm->internal->allow_buf_error)
+				ret = LZMA_BUF_ERROR;
+			else
+				strm->internal->allow_buf_error = true;
+		} else {
+			strm->internal->allow_buf_error = false;
+		}
+		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
+				|| strm->internal->sequence
+					== ISEQ_FULL_BARRIER)
+			strm->internal->sequence = ISEQ_RUN;
+		else
+			strm->internal->sequence = ISEQ_END;
+
+	// Fall through
+
+	case LZMA_NO_CHECK:
+	case LZMA_UNSUPPORTED_CHECK:
+	case LZMA_GET_CHECK:
+	case LZMA_MEMLIMIT_ERROR:
+		// Something else than LZMA_OK, but not a fatal error,
+		// that is, coding may be continued (except if ISEQ_END).
+		strm->internal->allow_buf_error = false;
+		break;
+
+	default:
+		// All the other errors are fatal; coding cannot be continued.
+		assert(ret != LZMA_BUF_ERROR);
+		strm->internal->sequence = ISEQ_ERROR;
+		break;
+	}
+
+	return ret;
+}
+
+
+extern LZMA_API(void)
+lzma_end(lzma_stream *strm)
+{
+	if (strm != NULL && strm->internal != NULL) {
+		lzma_next_end(&strm->internal->next, strm->allocator);
+		lzma_free(strm->internal, strm->allocator);
+		strm->internal = NULL;
+	}
+
+	return;
+}
+
+
+extern LZMA_API(void)
+lzma_get_progress(lzma_stream *strm,
+		uint64_t *progress_in, uint64_t *progress_out)
+{
+	if (strm->internal->next.get_progress != NULL) {
+		strm->internal->next.get_progress(strm->internal->next.coder,
+				progress_in, progress_out);
+	} else {
+		*progress_in = strm->total_in;
+		*progress_out = strm->total_out;
+	}
+
+	return;
+}
+
+
+extern LZMA_API(lzma_check)
+lzma_get_check(const lzma_stream *strm)
+{
+	// Return LZMA_CHECK_NONE if we cannot know the check type.
+	// It's a bug in the application if this happens.
+	if (strm->internal->next.get_check == NULL)
+		return LZMA_CHECK_NONE;
+
+	return strm->internal->next.get_check(strm->internal->next.coder);
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_memusage(const lzma_stream *strm)
+{
+	uint64_t memusage;
+	uint64_t old_memlimit;
+
+	if (strm == NULL || strm->internal == NULL
+			|| strm->internal->next.memconfig == NULL
+			|| strm->internal->next.memconfig(
+				strm->internal->next.coder,
+				&memusage, &old_memlimit, 0) != LZMA_OK)
+		return 0;
+
+	return memusage;
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_memlimit_get(const lzma_stream *strm)
+{
+	uint64_t old_memlimit;
+	uint64_t memusage;
+
+	if (strm == NULL || strm->internal == NULL
+			|| strm->internal->next.memconfig == NULL
+			|| strm->internal->next.memconfig(
+				strm->internal->next.coder,
+				&memusage, &old_memlimit, 0) != LZMA_OK)
+		return 0;
+
+	return old_memlimit;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_memlimit_set(lzma_stream *strm, uint64_t new_memlimit)
+{
+	// Dummy variables to simplify memconfig functions
+	uint64_t old_memlimit;
+	uint64_t memusage;
+
+	if (strm == NULL || strm->internal == NULL
+			|| strm->internal->next.memconfig == NULL)
+		return LZMA_PROG_ERROR;
+
+	if (new_memlimit != 0 && new_memlimit < LZMA_MEMUSAGE_BASE)
+		return LZMA_MEMLIMIT_ERROR;
+
+	return strm->internal->next.memconfig(strm->internal->next.coder,
+			&memusage, &old_memlimit, new_memlimit);
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/common.h
===================================================================
--- vendor/xz/dist/src/liblzma/common/common.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/common.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,284 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       common.h
-/// \brief      Definitions common to the whole liblzma library
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_COMMON_H
-#define LZMA_COMMON_H
-
-#include "sysdefs.h"
-#include "mythread.h"
-#include "tuklib_integer.h"
-
-#if defined(_WIN32) || defined(__CYGWIN__)
-#	ifdef DLL_EXPORT
-#		define LZMA_API_EXPORT __declspec(dllexport)
-#	else
-#		define LZMA_API_EXPORT
-#	endif
-// Don't use ifdef or defined() below.
-#elif HAVE_VISIBILITY
-#	define LZMA_API_EXPORT __attribute__((__visibility__("default")))
-#else
-#	define LZMA_API_EXPORT
-#endif
-
-#define LZMA_API(type) LZMA_API_EXPORT type LZMA_API_CALL
-
-#include "lzma.h"
-
-// These allow helping the compiler in some often-executed branches, whose
-// result is almost always the same.
-#ifdef __GNUC__
-#	define likely(expr) __builtin_expect(expr, true)
-#	define unlikely(expr) __builtin_expect(expr, false)
-#else
-#	define likely(expr) (expr)
-#	define unlikely(expr) (expr)
-#endif
-
-
-/// Size of temporary buffers needed in some filters
-#define LZMA_BUFFER_SIZE 4096
-
-
-/// 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
-/// but should be easily good enough.
-#define LZMA_MEMUSAGE_BASE (UINT64_C(1) << 15)
-
-/// Start of internal Filter ID space. These IDs must never be used
-/// in Streams.
-#define LZMA_FILTER_RESERVED_START (LZMA_VLI_C(1) << 62)
-
-
-/// Supported flags that can be passed to lzma_stream_decoder()
-/// or lzma_auto_decoder().
-#define LZMA_SUPPORTED_FLAGS \
-	( LZMA_TELL_NO_CHECK \
-	| LZMA_TELL_UNSUPPORTED_CHECK \
-	| LZMA_TELL_ANY_CHECK \
-	| LZMA_CONCATENATED )
-
-
-/// Type of encoder/decoder specific data; the actual structure is defined
-/// differently in different coders.
-typedef struct lzma_coder_s lzma_coder;
-
-typedef struct lzma_next_coder_s lzma_next_coder;
-
-typedef struct lzma_filter_info_s lzma_filter_info;
-
-
-/// Type of a function used to initialize a filter encoder or decoder
-typedef lzma_ret (*lzma_init_function)(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters);
-
-/// Type of a function to do some kind of coding work (filters, Stream,
-/// Block encoders/decoders etc.). Some special coders use don't use both
-/// input and output buffers, but for simplicity they still use this same
-/// function prototype.
-typedef lzma_ret (*lzma_code_function)(
-		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);
-
-/// Type of a function to free the memory allocated for the coder
-typedef void (*lzma_end_function)(
-		lzma_coder *coder, lzma_allocator *allocator);
-
-
-/// Raw coder validates and converts an array of lzma_filter structures to
-/// an array of lzma_filter_info structures. This array is used with
-/// lzma_next_filter_init to initialize the filter chain.
-struct lzma_filter_info_s {
-	/// Filter ID. This is used only by the encoder
-	/// with lzma_filters_update().
-	lzma_vli id;
-
-	/// Pointer to function used to initialize the filter.
-	/// This is NULL to indicate end of array.
-	lzma_init_function init;
-
-	/// Pointer to filter's options structure
-	void *options;
-};
-
-
-/// Hold data and function pointers of the next filter in the chain.
-struct lzma_next_coder_s {
-	/// Pointer to coder-specific data
-	lzma_coder *coder;
-
-	/// Filter ID. This is LZMA_VLI_UNKNOWN when this structure doesn't
-	/// point to a filter coder.
-	lzma_vli id;
-
-	/// "Pointer" to init function. This is never called here.
-	/// We need only to detect if we are initializing a coder
-	/// that was allocated earlier. See lzma_next_coder_init and
-	/// lzma_next_strm_init macros in this file.
-	uintptr_t init;
-
-	/// Pointer to function to do the actual coding
-	lzma_code_function code;
-
-	/// Pointer to function to free lzma_next_coder.coder. This can
-	/// be NULL; in that case, lzma_free is called to free
-	/// lzma_next_coder.coder.
-	lzma_end_function end;
-
-	/// Pointer to function to return the type of the integrity check.
-	/// Most coders won't support this.
-	lzma_check (*get_check)(const lzma_coder *coder);
-
-	/// Pointer to function to get and/or change the memory usage limit.
-	/// If new_memlimit == 0, the limit is not changed.
-	lzma_ret (*memconfig)(lzma_coder *coder, uint64_t *memusage,
-			uint64_t *old_memlimit, uint64_t new_memlimit);
-
-	/// Update the filter-specific options or the whole filter chain
-	/// in the encoder.
-	lzma_ret (*update)(lzma_coder *coder, lzma_allocator *allocator,
-			const lzma_filter *filters,
-			const lzma_filter *reversed_filters);
-};
-
-
-/// Macro to initialize lzma_next_coder structure
-#define LZMA_NEXT_CODER_INIT \
-	(lzma_next_coder){ \
-		.coder = NULL, \
-		.init = (uintptr_t)(NULL), \
-		.id = LZMA_VLI_UNKNOWN, \
-		.code = NULL, \
-		.end = NULL, \
-		.get_check = NULL, \
-		.memconfig = NULL, \
-		.update = NULL, \
-	}
-
-
-/// Internal data for lzma_strm_init, lzma_code, and lzma_end. A pointer to
-/// this is stored in lzma_stream.
-struct lzma_internal_s {
-	/// The actual coder that should do something useful
-	lzma_next_coder next;
-
-	/// Track the state of the coder. This is used to validate arguments
-	/// so that the actual coders can rely on e.g. that LZMA_SYNC_FLUSH
-	/// is used on every call to lzma_code until next.code has returned
-	/// LZMA_STREAM_END.
-	enum {
-		ISEQ_RUN,
-		ISEQ_SYNC_FLUSH,
-		ISEQ_FULL_FLUSH,
-		ISEQ_FINISH,
-		ISEQ_END,
-		ISEQ_ERROR,
-	} sequence;
-
-	/// A copy of lzma_stream avail_in. This is used to verify that the
-	/// amount of input doesn't change once e.g. LZMA_FINISH has been
-	/// used.
-	size_t avail_in;
-
-	/// Indicates which lzma_action values are allowed by next.code.
-	bool supported_actions[4];
-
-	/// 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;
-};
-
-
-/// Allocates memory
-extern void *lzma_alloc(size_t size, lzma_allocator *allocator)
-		lzma_attribute((__malloc__)) lzma_attr_alloc_size(1);
-
-/// Frees memory
-extern void lzma_free(void *ptr, lzma_allocator *allocator);
-
-
-/// Allocates strm->internal if it is NULL, and initializes *strm and
-/// strm->internal. This function is only called via lzma_next_strm_init macro.
-extern lzma_ret lzma_strm_init(lzma_stream *strm);
-
-/// Initializes the next filter in the chain, if any. This takes care of
-/// freeing the memory of previously initialized filter if it is different
-/// than the filter being initialized now. This way the actual filter
-/// initialization functions don't need to use lzma_next_coder_init macro.
-extern lzma_ret lzma_next_filter_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-/// Update the next filter in the chain, if any. This checks that
-/// the application is not trying to change the Filter IDs.
-extern lzma_ret lzma_next_filter_update(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *reversed_filters);
-
-/// Frees the memory allocated for next->coder either using next->end or,
-/// if next->end is NULL, using lzma_free.
-extern void lzma_next_end(lzma_next_coder *next, lzma_allocator *allocator);
-
-
-/// Copy as much data as possible from in[] to out[] and update *in_pos
-/// and *out_pos accordingly. Returns the number of bytes copied.
-extern size_t lzma_bufcpy(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);
-
-
-/// \brief      Return if expression doesn't evaluate to LZMA_OK
-///
-/// There are several situations where we want to return immediately
-/// with the value of expr if it isn't LZMA_OK. This macro shortens
-/// the code a little.
-#define return_if_error(expr) \
-do { \
-	const lzma_ret ret_ = (expr); \
-	if (ret_ != LZMA_OK) \
-		return ret_; \
-} while (0)
-
-
-/// If next isn't already initialized, free the previous coder. Then mark
-/// that next is _possibly_ initialized for the coder using this macro.
-/// "Possibly" means that if e.g. allocation of next->coder fails, the
-/// structure isn't actually initialized for this coder, but leaving
-/// next->init to func is still OK.
-#define lzma_next_coder_init(func, next, allocator) \
-do { \
-	if ((uintptr_t)(func) != (next)->init) \
-		lzma_next_end(next, allocator); \
-	(next)->init = (uintptr_t)(func); \
-} while (0)
-
-
-/// Initializes lzma_strm and calls func() to initialize strm->internal->next.
-/// (The function being called will use lzma_next_coder_init()). If
-/// initialization fails, memory that wasn't freed by func() is freed
-/// along strm->internal.
-#define lzma_next_strm_init(func, strm, ...) \
-do { \
-	return_if_error(lzma_strm_init(strm)); \
-	const lzma_ret ret_ = func(&(strm)->internal->next, \
-			(strm)->allocator, __VA_ARGS__); \
-	if (ret_ != LZMA_OK) { \
-		lzma_end(strm); \
-		return ret_; \
-	} \
-} while (0)
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/common/common.h (from rev 11013, vendor/xz/dist/src/liblzma/common/common.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/common.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/common.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,314 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       common.h
+/// \brief      Definitions common to the whole liblzma library
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_COMMON_H
+#define LZMA_COMMON_H
+
+#include "sysdefs.h"
+#include "mythread.h"
+#include "tuklib_integer.h"
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+#	ifdef DLL_EXPORT
+#		define LZMA_API_EXPORT __declspec(dllexport)
+#	else
+#		define LZMA_API_EXPORT
+#	endif
+// Don't use ifdef or defined() below.
+#elif HAVE_VISIBILITY
+#	define LZMA_API_EXPORT __attribute__((__visibility__("default")))
+#else
+#	define LZMA_API_EXPORT
+#endif
+
+#define LZMA_API(type) LZMA_API_EXPORT type LZMA_API_CALL
+
+#include "lzma.h"
+
+// These allow helping the compiler in some often-executed branches, whose
+// result is almost always the same.
+#ifdef __GNUC__
+#	define likely(expr) __builtin_expect(expr, true)
+#	define unlikely(expr) __builtin_expect(expr, false)
+#else
+#	define likely(expr) (expr)
+#	define unlikely(expr) (expr)
+#endif
+
+
+/// Size of temporary buffers needed in some filters
+#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
+/// but should be easily good enough.
+#define LZMA_MEMUSAGE_BASE (UINT64_C(1) << 15)
+
+/// Start of internal Filter ID space. These IDs must never be used
+/// in Streams.
+#define LZMA_FILTER_RESERVED_START (LZMA_VLI_C(1) << 62)
+
+
+/// Supported flags that can be passed to lzma_stream_decoder()
+/// or lzma_auto_decoder().
+#define LZMA_SUPPORTED_FLAGS \
+	( LZMA_TELL_NO_CHECK \
+	| LZMA_TELL_UNSUPPORTED_CHECK \
+	| LZMA_TELL_ANY_CHECK \
+	| LZMA_IGNORE_CHECK \
+	| LZMA_CONCATENATED )
+
+
+/// Largest valid lzma_action value as unsigned integer.
+#define LZMA_ACTION_MAX ((unsigned int)(LZMA_FULL_BARRIER))
+
+
+/// 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
+
+
+typedef struct lzma_next_coder_s lzma_next_coder;
+
+typedef struct lzma_filter_info_s lzma_filter_info;
+
+
+/// Type of a function used to initialize a filter encoder or decoder
+typedef lzma_ret (*lzma_init_function)(
+		lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+/// Type of a function to do some kind of coding work (filters, Stream,
+/// Block encoders/decoders etc.). Some special coders use don't use both
+/// input and output buffers, but for simplicity they still use this same
+/// function prototype.
+typedef lzma_ret (*lzma_code_function)(
+		void *coder, const 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);
+
+/// Type of a function to free the memory allocated for the coder
+typedef void (*lzma_end_function)(
+		void *coder, const lzma_allocator *allocator);
+
+
+/// Raw coder validates and converts an array of lzma_filter structures to
+/// an array of lzma_filter_info structures. This array is used with
+/// lzma_next_filter_init to initialize the filter chain.
+struct lzma_filter_info_s {
+	/// Filter ID. This is used only by the encoder
+	/// with lzma_filters_update().
+	lzma_vli id;
+
+	/// Pointer to function used to initialize the filter.
+	/// This is NULL to indicate end of array.
+	lzma_init_function init;
+
+	/// Pointer to filter's options structure
+	void *options;
+};
+
+
+/// Hold data and function pointers of the next filter in the chain.
+struct lzma_next_coder_s {
+	/// Pointer to coder-specific data
+	void *coder;
+
+	/// Filter ID. This is LZMA_VLI_UNKNOWN when this structure doesn't
+	/// point to a filter coder.
+	lzma_vli id;
+
+	/// "Pointer" to init function. This is never called here.
+	/// We need only to detect if we are initializing a coder
+	/// that was allocated earlier. See lzma_next_coder_init and
+	/// lzma_next_strm_init macros in this file.
+	uintptr_t init;
+
+	/// Pointer to function to do the actual coding
+	lzma_code_function code;
+
+	/// Pointer to function to free lzma_next_coder.coder. This can
+	/// be NULL; in that case, lzma_free is called to free
+	/// lzma_next_coder.coder.
+	lzma_end_function end;
+
+	/// Pointer to a function to get progress information. If this is NULL,
+	/// lzma_stream.total_in and .total_out are used instead.
+	void (*get_progress)(void *coder,
+			uint64_t *progress_in, uint64_t *progress_out);
+
+	/// Pointer to function to return the type of the integrity check.
+	/// Most coders won't support this.
+	lzma_check (*get_check)(const void *coder);
+
+	/// Pointer to function to get and/or change the memory usage limit.
+	/// If new_memlimit == 0, the limit is not changed.
+	lzma_ret (*memconfig)(void *coder, uint64_t *memusage,
+			uint64_t *old_memlimit, uint64_t new_memlimit);
+
+	/// Update the filter-specific options or the whole filter chain
+	/// in the encoder.
+	lzma_ret (*update)(void *coder, const lzma_allocator *allocator,
+			const lzma_filter *filters,
+			const lzma_filter *reversed_filters);
+};
+
+
+/// Macro to initialize lzma_next_coder structure
+#define LZMA_NEXT_CODER_INIT \
+	(lzma_next_coder){ \
+		.coder = NULL, \
+		.init = (uintptr_t)(NULL), \
+		.id = LZMA_VLI_UNKNOWN, \
+		.code = NULL, \
+		.end = NULL, \
+		.get_progress = NULL, \
+		.get_check = NULL, \
+		.memconfig = NULL, \
+		.update = NULL, \
+	}
+
+
+/// Internal data for lzma_strm_init, lzma_code, and lzma_end. A pointer to
+/// this is stored in lzma_stream.
+struct lzma_internal_s {
+	/// The actual coder that should do something useful
+	lzma_next_coder next;
+
+	/// Track the state of the coder. This is used to validate arguments
+	/// so that the actual coders can rely on e.g. that LZMA_SYNC_FLUSH
+	/// is used on every call to lzma_code until next.code has returned
+	/// LZMA_STREAM_END.
+	enum {
+		ISEQ_RUN,
+		ISEQ_SYNC_FLUSH,
+		ISEQ_FULL_FLUSH,
+		ISEQ_FINISH,
+		ISEQ_FULL_BARRIER,
+		ISEQ_END,
+		ISEQ_ERROR,
+	} sequence;
+
+	/// A copy of lzma_stream avail_in. This is used to verify that the
+	/// amount of input doesn't change once e.g. LZMA_FINISH has been
+	/// used.
+	size_t avail_in;
+
+	/// Indicates which lzma_action values are allowed by next.code.
+	bool supported_actions[LZMA_ACTION_MAX + 1];
+
+	/// 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;
+};
+
+
+/// Allocates memory
+extern void *lzma_alloc(size_t size, const lzma_allocator *allocator)
+		lzma_attribute((__malloc__)) lzma_attr_alloc_size(1);
+
+/// Allocates memory and zeroes it (like calloc()). This can be faster
+/// than lzma_alloc() + memzero() while being backward compatible with
+/// custom allocators.
+extern void * lzma_attribute((__malloc__)) lzma_attr_alloc_size(1)
+		lzma_alloc_zero(size_t size, const lzma_allocator *allocator);
+
+/// Frees memory
+extern void lzma_free(void *ptr, const lzma_allocator *allocator);
+
+
+/// Allocates strm->internal if it is NULL, and initializes *strm and
+/// strm->internal. This function is only called via lzma_next_strm_init macro.
+extern lzma_ret lzma_strm_init(lzma_stream *strm);
+
+/// Initializes the next filter in the chain, if any. This takes care of
+/// freeing the memory of previously initialized filter if it is different
+/// than the filter being initialized now. This way the actual filter
+/// initialization functions don't need to use lzma_next_coder_init macro.
+extern lzma_ret lzma_next_filter_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+/// Update the next filter in the chain, if any. This checks that
+/// the application is not trying to change the Filter IDs.
+extern lzma_ret lzma_next_filter_update(
+		lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter *reversed_filters);
+
+/// Frees the memory allocated for next->coder either using next->end or,
+/// if next->end is NULL, using lzma_free.
+extern void lzma_next_end(lzma_next_coder *next,
+		const lzma_allocator *allocator);
+
+
+/// Copy as much data as possible from in[] to out[] and update *in_pos
+/// and *out_pos accordingly. Returns the number of bytes copied.
+extern size_t lzma_bufcpy(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);
+
+
+/// \brief      Return if expression doesn't evaluate to LZMA_OK
+///
+/// There are several situations where we want to return immediately
+/// with the value of expr if it isn't LZMA_OK. This macro shortens
+/// the code a little.
+#define return_if_error(expr) \
+do { \
+	const lzma_ret ret_ = (expr); \
+	if (ret_ != LZMA_OK) \
+		return ret_; \
+} while (0)
+
+
+/// If next isn't already initialized, free the previous coder. Then mark
+/// that next is _possibly_ initialized for the coder using this macro.
+/// "Possibly" means that if e.g. allocation of next->coder fails, the
+/// structure isn't actually initialized for this coder, but leaving
+/// next->init to func is still OK.
+#define lzma_next_coder_init(func, next, allocator) \
+do { \
+	if ((uintptr_t)(func) != (next)->init) \
+		lzma_next_end(next, allocator); \
+	(next)->init = (uintptr_t)(func); \
+} while (0)
+
+
+/// Initializes lzma_strm and calls func() to initialize strm->internal->next.
+/// (The function being called will use lzma_next_coder_init()). If
+/// initialization fails, memory that wasn't freed by func() is freed
+/// along strm->internal.
+#define lzma_next_strm_init(func, strm, ...) \
+do { \
+	return_if_error(lzma_strm_init(strm)); \
+	const lzma_ret ret_ = func(&(strm)->internal->next, \
+			(strm)->allocator, __VA_ARGS__); \
+	if (ret_ != LZMA_OK) { \
+		lzma_end(strm); \
+		return ret_; \
+	} \
+} while (0)
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/common/easy_buffer_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/easy_buffer_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/easy_buffer_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,27 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       easy_buffer_encoder.c
-/// \brief      Easy single-call .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 "easy_preset.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_easy_buffer_encode(uint32_t preset, lzma_check check,
-		lzma_allocator *allocator, const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	lzma_options_easy opt_easy;
-	if (lzma_easy_preset(&opt_easy, preset))
-		return LZMA_OPTIONS_ERROR;
-
-	return lzma_stream_buffer_encode(opt_easy.filters, check,
-			allocator, in, in_size, out, out_pos, out_size);
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/easy_buffer_encoder.c (from rev 9176, vendor/xz/dist/src/liblzma/common/easy_buffer_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/easy_buffer_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/easy_buffer_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       easy_buffer_encoder.c
+/// \brief      Easy single-call .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 "easy_preset.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_easy_buffer_encode(uint32_t preset, lzma_check check,
+		const lzma_allocator *allocator, const uint8_t *in,
+		size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size)
+{
+	lzma_options_easy opt_easy;
+	if (lzma_easy_preset(&opt_easy, preset))
+		return LZMA_OPTIONS_ERROR;
+
+	return lzma_stream_buffer_encode(opt_easy.filters, check,
+			allocator, in, in_size, out, out_pos, out_size);
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/easy_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/easy_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/easy_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,25 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       easy_encoder.c
-/// \brief      Easy .xz Stream encoder initialization
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "easy_preset.h"
-#include "stream_encoder.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
-{
-	lzma_options_easy opt_easy;
-	if (lzma_easy_preset(&opt_easy, preset))
-		return LZMA_OPTIONS_ERROR;
-
-	return lzma_stream_encoder(strm, opt_easy.filters, check);
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/easy_encoder.c (from rev 9176, vendor/xz/dist/src/liblzma/common/easy_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/easy_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/easy_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,24 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       easy_encoder.c
+/// \brief      Easy .xz Stream encoder initialization
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "easy_preset.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
+{
+	lzma_options_easy opt_easy;
+	if (lzma_easy_preset(&opt_easy, preset))
+		return LZMA_OPTIONS_ERROR;
+
+	return lzma_stream_encoder(strm, opt_easy.filters, check);
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/filter_buffer_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/filter_buffer_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_buffer_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,87 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_buffer_decoder.c
-/// \brief      Single-call raw decoding
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "filter_decoder.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_raw_buffer_decode(const lzma_filter *filters, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	// Validate what isn't validated later in filter_common.c.
-	if (in == NULL || in_pos == NULL || *in_pos > in_size || out == NULL
-			|| out_pos == NULL || *out_pos > out_size)
-		return LZMA_PROG_ERROR;
-
-	// Initialize the decoer.
-	lzma_next_coder next = LZMA_NEXT_CODER_INIT;
-	return_if_error(lzma_raw_decoder_init(&next, allocator, filters));
-
-	// Store the positions so that we can restore them if something
-	// goes wrong.
-	const size_t in_start = *in_pos;
-	const size_t out_start = *out_pos;
-
-	// Do the actual decoding and free decoder's memory.
-	lzma_ret ret = next.code(next.coder, allocator, in, in_pos, in_size,
-			out, out_pos, out_size, LZMA_FINISH);
-
-	if (ret == LZMA_STREAM_END) {
-		ret = LZMA_OK;
-	} else {
-		if (ret == LZMA_OK) {
-			// Either the input was truncated or the
-			// output buffer was too small.
-			assert(*in_pos == in_size || *out_pos == out_size);
-
-			if (*in_pos != in_size) {
-				// Since input wasn't consumed completely,
-				// the output buffer became full and is
-				// too small.
-				ret = LZMA_BUF_ERROR;
-
-			} else if (*out_pos != out_size) {
-				// Since output didn't became full, the input
-				// has to be truncated.
-				ret = LZMA_DATA_ERROR;
-
-			} else {
-				// All the input was consumed and output
-				// buffer is full. Now we don't immediately
-				// know the reason for the error. Try
-				// decoding one more byte. If it succeeds,
-				// then the output buffer was too small. If
-				// we cannot get a new output byte, the input
-				// is truncated.
-				uint8_t tmp[1];
-				size_t tmp_pos = 0;
-				(void)next.code(next.coder, allocator,
-						in, in_pos, in_size,
-						tmp, &tmp_pos, 1, LZMA_FINISH);
-
-				if (tmp_pos == 1)
-					ret = LZMA_BUF_ERROR;
-				else
-					ret = LZMA_DATA_ERROR;
-			}
-		}
-
-		// Restore the positions.
-		*in_pos = in_start;
-		*out_pos = out_start;
-	}
-
-	lzma_next_end(&next, allocator);
-
-	return ret;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/filter_buffer_decoder.c (from rev 9176, vendor/xz/dist/src/liblzma/common/filter_buffer_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/filter_buffer_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_buffer_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,88 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       filter_buffer_decoder.c
+/// \brief      Single-call raw decoding
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "filter_decoder.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_raw_buffer_decode(
+		const lzma_filter *filters, const lzma_allocator *allocator,
+		const uint8_t *in, size_t *in_pos, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+{
+	// Validate what isn't validated later in filter_common.c.
+	if (in == NULL || in_pos == NULL || *in_pos > in_size || out == NULL
+			|| out_pos == NULL || *out_pos > out_size)
+		return LZMA_PROG_ERROR;
+
+	// Initialize the decoer.
+	lzma_next_coder next = LZMA_NEXT_CODER_INIT;
+	return_if_error(lzma_raw_decoder_init(&next, allocator, filters));
+
+	// Store the positions so that we can restore them if something
+	// goes wrong.
+	const size_t in_start = *in_pos;
+	const size_t out_start = *out_pos;
+
+	// Do the actual decoding and free decoder's memory.
+	lzma_ret ret = next.code(next.coder, allocator, in, in_pos, in_size,
+			out, out_pos, out_size, LZMA_FINISH);
+
+	if (ret == LZMA_STREAM_END) {
+		ret = LZMA_OK;
+	} else {
+		if (ret == LZMA_OK) {
+			// Either the input was truncated or the
+			// output buffer was too small.
+			assert(*in_pos == in_size || *out_pos == out_size);
+
+			if (*in_pos != in_size) {
+				// Since input wasn't consumed completely,
+				// the output buffer became full and is
+				// too small.
+				ret = LZMA_BUF_ERROR;
+
+			} else if (*out_pos != out_size) {
+				// Since output didn't became full, the input
+				// has to be truncated.
+				ret = LZMA_DATA_ERROR;
+
+			} else {
+				// All the input was consumed and output
+				// buffer is full. Now we don't immediately
+				// know the reason for the error. Try
+				// decoding one more byte. If it succeeds,
+				// then the output buffer was too small. If
+				// we cannot get a new output byte, the input
+				// is truncated.
+				uint8_t tmp[1];
+				size_t tmp_pos = 0;
+				(void)next.code(next.coder, allocator,
+						in, in_pos, in_size,
+						tmp, &tmp_pos, 1, LZMA_FINISH);
+
+				if (tmp_pos == 1)
+					ret = LZMA_BUF_ERROR;
+				else
+					ret = LZMA_DATA_ERROR;
+			}
+		}
+
+		// Restore the positions.
+		*in_pos = in_start;
+		*out_pos = out_start;
+	}
+
+	lzma_next_end(&next, allocator);
+
+	return ret;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/filter_buffer_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/filter_buffer_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_buffer_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,54 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_buffer_encoder.c
-/// \brief      Single-call raw encoding
-//
-//  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"
-
-
-extern LZMA_API(lzma_ret)
-lzma_raw_buffer_encode(const lzma_filter *filters, lzma_allocator *allocator,
-		const uint8_t *in, size_t in_size, uint8_t *out,
-		size_t *out_pos, size_t out_size)
-{
-	// Validate what isn't validated later in filter_common.c.
-	if ((in == NULL && in_size != 0) || out == NULL
-			|| out_pos == NULL || *out_pos > out_size)
-		return LZMA_PROG_ERROR;
-
-	// Initialize the encoder
-	lzma_next_coder next = LZMA_NEXT_CODER_INIT;
-	return_if_error(lzma_raw_encoder_init(&next, allocator, filters));
-
-	// Store the output position so that we can restore it if
-	// something goes wrong.
-	const size_t out_start = *out_pos;
-
-	// Do the actual encoding and free coder's memory.
-	size_t in_pos = 0;
-	lzma_ret ret = next.code(next.coder, allocator, in, &in_pos, in_size,
-			out, out_pos, out_size, LZMA_FINISH);
-	lzma_next_end(&next, allocator);
-
-	if (ret == LZMA_STREAM_END) {
-		ret = LZMA_OK;
-	} else {
-		if (ret == LZMA_OK) {
-			// Output buffer was too small.
-			assert(*out_pos == out_size);
-			ret = LZMA_BUF_ERROR;
-		}
-
-		// Restore the output position.
-		*out_pos = out_start;
-	}
-
-	return ret;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/filter_buffer_encoder.c (from rev 9176, vendor/xz/dist/src/liblzma/common/filter_buffer_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/filter_buffer_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_buffer_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,55 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       filter_buffer_encoder.c
+/// \brief      Single-call raw encoding
+//
+//  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"
+
+
+extern LZMA_API(lzma_ret)
+lzma_raw_buffer_encode(
+		const lzma_filter *filters, const lzma_allocator *allocator,
+		const uint8_t *in, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+{
+	// Validate what isn't validated later in filter_common.c.
+	if ((in == NULL && in_size != 0) || out == NULL
+			|| out_pos == NULL || *out_pos > out_size)
+		return LZMA_PROG_ERROR;
+
+	// Initialize the encoder
+	lzma_next_coder next = LZMA_NEXT_CODER_INIT;
+	return_if_error(lzma_raw_encoder_init(&next, allocator, filters));
+
+	// Store the output position so that we can restore it if
+	// something goes wrong.
+	const size_t out_start = *out_pos;
+
+	// Do the actual encoding and free coder's memory.
+	size_t in_pos = 0;
+	lzma_ret ret = next.code(next.coder, allocator, in, &in_pos, in_size,
+			out, out_pos, out_size, LZMA_FINISH);
+	lzma_next_end(&next, allocator);
+
+	if (ret == LZMA_STREAM_END) {
+		ret = LZMA_OK;
+	} else {
+		if (ret == LZMA_OK) {
+			// Output buffer was too small.
+			assert(*out_pos == out_size);
+			ret = LZMA_BUF_ERROR;
+		}
+
+		// Restore the output position.
+		*out_pos = out_start;
+	}
+
+	return ret;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/filter_common.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/filter_common.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_common.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,337 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_common.c
-/// \brief      Filter-specific stuff common for both encoder and decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "filter_common.h"
-
-
-static const struct {
-	/// Filter ID
-	lzma_vli id;
-
-	/// Size of the filter-specific options structure
-	size_t options_size;
-
-	/// True if it is OK to use this filter as non-last filter in
-	/// the chain.
-	bool non_last_ok;
-
-	/// True if it is OK to use this filter as the last filter in
-	/// the chain.
-	bool last_ok;
-
-	/// True if the filter may change the size of the data (that is, the
-	/// amount of encoded output can be different than the amount of
-	/// uncompressed input).
-	bool changes_size;
-
-} features[] = {
-#if defined (HAVE_ENCODER_LZMA1) || defined(HAVE_DECODER_LZMA1)
-	{
-		.id = LZMA_FILTER_LZMA1,
-		.options_size = sizeof(lzma_options_lzma),
-		.non_last_ok = false,
-		.last_ok = true,
-		.changes_size = true,
-	},
-#endif
-#if defined(HAVE_ENCODER_LZMA2) || defined(HAVE_DECODER_LZMA2)
-	{
-		.id = LZMA_FILTER_LZMA2,
-		.options_size = sizeof(lzma_options_lzma),
-		.non_last_ok = false,
-		.last_ok = true,
-		.changes_size = true,
-	},
-#endif
-#if defined(HAVE_ENCODER_X86) || defined(HAVE_DECODER_X86)
-	{
-		.id = LZMA_FILTER_X86,
-		.options_size = sizeof(lzma_options_bcj),
-		.non_last_ok = true,
-		.last_ok = false,
-		.changes_size = false,
-	},
-#endif
-#if defined(HAVE_ENCODER_POWERPC) || defined(HAVE_DECODER_POWERPC)
-	{
-		.id = LZMA_FILTER_POWERPC,
-		.options_size = sizeof(lzma_options_bcj),
-		.non_last_ok = true,
-		.last_ok = false,
-		.changes_size = false,
-	},
-#endif
-#if defined(HAVE_ENCODER_IA64) || defined(HAVE_DECODER_IA64)
-	{
-		.id = LZMA_FILTER_IA64,
-		.options_size = sizeof(lzma_options_bcj),
-		.non_last_ok = true,
-		.last_ok = false,
-		.changes_size = false,
-	},
-#endif
-#if defined(HAVE_ENCODER_ARM) || defined(HAVE_DECODER_ARM)
-	{
-		.id = LZMA_FILTER_ARM,
-		.options_size = sizeof(lzma_options_bcj),
-		.non_last_ok = true,
-		.last_ok = false,
-		.changes_size = false,
-	},
-#endif
-#if defined(HAVE_ENCODER_ARMTHUMB) || defined(HAVE_DECODER_ARMTHUMB)
-	{
-		.id = LZMA_FILTER_ARMTHUMB,
-		.options_size = sizeof(lzma_options_bcj),
-		.non_last_ok = true,
-		.last_ok = false,
-		.changes_size = false,
-	},
-#endif
-#if defined(HAVE_ENCODER_SPARC) || defined(HAVE_DECODER_SPARC)
-	{
-		.id = LZMA_FILTER_SPARC,
-		.options_size = sizeof(lzma_options_bcj),
-		.non_last_ok = true,
-		.last_ok = false,
-		.changes_size = false,
-	},
-#endif
-#if defined(HAVE_ENCODER_DELTA) || defined(HAVE_DECODER_DELTA)
-	{
-		.id = LZMA_FILTER_DELTA,
-		.options_size = sizeof(lzma_options_delta),
-		.non_last_ok = true,
-		.last_ok = false,
-		.changes_size = false,
-	},
-#endif
-	{
-		.id = LZMA_VLI_UNKNOWN
-	}
-};
-
-
-extern LZMA_API(lzma_ret)
-lzma_filters_copy(const lzma_filter *src, lzma_filter *dest,
-		lzma_allocator *allocator)
-{
-	if (src == NULL || dest == NULL)
-		return LZMA_PROG_ERROR;
-
-	lzma_ret ret;
-	size_t i;
-	for (i = 0; src[i].id != LZMA_VLI_UNKNOWN; ++i) {
-		// There must be a maximum of four filters plus
-		// the array terminator.
-		if (i == LZMA_FILTERS_MAX) {
-			ret = LZMA_OPTIONS_ERROR;
-			goto error;
-		}
-
-		dest[i].id = src[i].id;
-
-		if (src[i].options == NULL) {
-			dest[i].options = NULL;
-		} else {
-			// See if the filter is supported only when the
-			// options is not NULL. This might be convenient
-			// sometimes if the app is actually copying only
-			// a partial filter chain with a place holder ID.
-			//
-			// When options is not NULL, the Filter ID must be
-			// supported by us, because otherwise we don't know
-			// how big the options are.
-			size_t j;
-			for (j = 0; src[i].id != features[j].id; ++j) {
-				if (features[j].id == LZMA_VLI_UNKNOWN) {
-					ret = LZMA_OPTIONS_ERROR;
-					goto error;
-				}
-			}
-
-			// Allocate and copy the options.
-			dest[i].options = lzma_alloc(features[j].options_size,
-					allocator);
-			if (dest[i].options == NULL) {
-				ret = LZMA_MEM_ERROR;
-				goto error;
-			}
-
-			memcpy(dest[i].options, src[i].options,
-					features[j].options_size);
-		}
-	}
-
-	// Terminate the filter array.
-	assert(i <= LZMA_FILTERS_MAX + 1);
-	dest[i].id = LZMA_VLI_UNKNOWN;
-	dest[i].options = NULL;
-
-	return LZMA_OK;
-
-error:
-	// Free the options which we have already allocated.
-	while (i-- > 0) {
-		lzma_free(dest[i].options, allocator);
-		dest[i].options = NULL;
-	}
-
-	return ret;
-}
-
-
-static lzma_ret
-validate_chain(const lzma_filter *filters, size_t *count)
-{
-	// There must be at least one filter.
-	if (filters == NULL || filters[0].id == LZMA_VLI_UNKNOWN)
-		return LZMA_PROG_ERROR;
-
-	// Number of non-last filters that may change the size of the data
-	// significantly (that is, more than 1-2 % or so).
-	size_t changes_size_count = 0;
-
-	// True if it is OK to add a new filter after the current filter.
-	bool non_last_ok = true;
-
-	// True if the last filter in the given chain is actually usable as
-	// the last filter. Only filters that support embedding End of Payload
-	// Marker can be used as the last filter in the chain.
-	bool last_ok = false;
-
-	size_t i = 0;
-	do {
-		size_t j;
-		for (j = 0; filters[i].id != features[j].id; ++j)
-			if (features[j].id == LZMA_VLI_UNKNOWN)
-				return LZMA_OPTIONS_ERROR;
-
-		// If the previous filter in the chain cannot be a non-last
-		// filter, the chain is invalid.
-		if (!non_last_ok)
-			return LZMA_OPTIONS_ERROR;
-
-		non_last_ok = features[j].non_last_ok;
-		last_ok = features[j].last_ok;
-		changes_size_count += features[j].changes_size;
-
-	} while (filters[++i].id != LZMA_VLI_UNKNOWN);
-
-	// There must be 1-4 filters. The last filter must be usable as
-	// the last filter in the chain. A maximum of three filters are
-	// allowed to change the size of the data.
-	if (i > LZMA_FILTERS_MAX || !last_ok || changes_size_count > 3)
-		return LZMA_OPTIONS_ERROR;
-
-	*count = i;
-	return LZMA_OK;
-}
-
-
-extern lzma_ret
-lzma_raw_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *options,
-		lzma_filter_find coder_find, bool is_encoder)
-{
-	// Do some basic validation and get the number of filters.
-	size_t count;
-	return_if_error(validate_chain(options, &count));
-
-	// Set the filter functions and copy the options pointer.
-	lzma_filter_info filters[LZMA_FILTERS_MAX + 1];
-	if (is_encoder) {
-		for (size_t i = 0; i < count; ++i) {
-			// The order of the filters is reversed in the
-			// encoder. It allows more efficient handling
-			// of the uncompressed data.
-			const size_t j = count - i - 1;
-
-			const lzma_filter_coder *const fc
-					= coder_find(options[i].id);
-			if (fc == NULL || fc->init == NULL)
-				return LZMA_OPTIONS_ERROR;
-
-			filters[j].id = options[i].id;
-			filters[j].init = fc->init;
-			filters[j].options = options[i].options;
-		}
-	} else {
-		for (size_t i = 0; i < count; ++i) {
-			const lzma_filter_coder *const fc
-					= coder_find(options[i].id);
-			if (fc == NULL || fc->init == NULL)
-				return LZMA_OPTIONS_ERROR;
-
-			filters[i].id = options[i].id;
-			filters[i].init = fc->init;
-			filters[i].options = options[i].options;
-		}
-	}
-
-	// Terminate the array.
-	filters[count].id = LZMA_VLI_UNKNOWN;
-	filters[count].init = NULL;
-
-	// Initialize the filters.
-	const lzma_ret ret = lzma_next_filter_init(next, allocator, filters);
-	if (ret != LZMA_OK)
-		lzma_next_end(next, allocator);
-
-	return ret;
-}
-
-
-extern uint64_t
-lzma_raw_coder_memusage(lzma_filter_find coder_find,
-		const lzma_filter *filters)
-{
-	// The chain has to have at least one filter.
-	{
-		size_t tmp;
-		if (validate_chain(filters, &tmp) != LZMA_OK)
-			return UINT64_MAX;
-	}
-
-	uint64_t total = 0;
-	size_t i = 0;
-
-	do {
-		const lzma_filter_coder *const fc
-				 = coder_find(filters[i].id);
-		if (fc == NULL)
-			return UINT64_MAX; // Unsupported Filter ID
-
-		if (fc->memusage == NULL) {
-			// This filter doesn't have a function to calculate
-			// the memory usage and validate the options. Such
-			// filters need only little memory, so we use 1 KiB
-			// as a good estimate. They also accept all possible
-			// options, so there's no need to worry about lack
-			// of validation.
-			total += 1024;
-		} else {
-			// Call the filter-specific memory usage calculation
-			// function.
-			const uint64_t usage
-					= fc->memusage(filters[i].options);
-			if (usage == UINT64_MAX)
-				return UINT64_MAX; // Invalid options
-
-			total += usage;
-		}
-	} while (filters[++i].id != LZMA_VLI_UNKNOWN);
-
-	// Add some fixed amount of extra. It's to compensate memory usage
-	// of Stream, Block etc. coders, malloc() overhead, stack etc.
-	return total + LZMA_MEMUSAGE_BASE;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/filter_common.c (from rev 9176, vendor/xz/dist/src/liblzma/common/filter_common.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/filter_common.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_common.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,337 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       filter_common.c
+/// \brief      Filter-specific stuff common for both encoder and decoder
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "filter_common.h"
+
+
+static const struct {
+	/// Filter ID
+	lzma_vli id;
+
+	/// Size of the filter-specific options structure
+	size_t options_size;
+
+	/// True if it is OK to use this filter as non-last filter in
+	/// the chain.
+	bool non_last_ok;
+
+	/// True if it is OK to use this filter as the last filter in
+	/// the chain.
+	bool last_ok;
+
+	/// True if the filter may change the size of the data (that is, the
+	/// amount of encoded output can be different than the amount of
+	/// uncompressed input).
+	bool changes_size;
+
+} features[] = {
+#if defined (HAVE_ENCODER_LZMA1) || defined(HAVE_DECODER_LZMA1)
+	{
+		.id = LZMA_FILTER_LZMA1,
+		.options_size = sizeof(lzma_options_lzma),
+		.non_last_ok = false,
+		.last_ok = true,
+		.changes_size = true,
+	},
+#endif
+#if defined(HAVE_ENCODER_LZMA2) || defined(HAVE_DECODER_LZMA2)
+	{
+		.id = LZMA_FILTER_LZMA2,
+		.options_size = sizeof(lzma_options_lzma),
+		.non_last_ok = false,
+		.last_ok = true,
+		.changes_size = true,
+	},
+#endif
+#if defined(HAVE_ENCODER_X86) || defined(HAVE_DECODER_X86)
+	{
+		.id = LZMA_FILTER_X86,
+		.options_size = sizeof(lzma_options_bcj),
+		.non_last_ok = true,
+		.last_ok = false,
+		.changes_size = false,
+	},
+#endif
+#if defined(HAVE_ENCODER_POWERPC) || defined(HAVE_DECODER_POWERPC)
+	{
+		.id = LZMA_FILTER_POWERPC,
+		.options_size = sizeof(lzma_options_bcj),
+		.non_last_ok = true,
+		.last_ok = false,
+		.changes_size = false,
+	},
+#endif
+#if defined(HAVE_ENCODER_IA64) || defined(HAVE_DECODER_IA64)
+	{
+		.id = LZMA_FILTER_IA64,
+		.options_size = sizeof(lzma_options_bcj),
+		.non_last_ok = true,
+		.last_ok = false,
+		.changes_size = false,
+	},
+#endif
+#if defined(HAVE_ENCODER_ARM) || defined(HAVE_DECODER_ARM)
+	{
+		.id = LZMA_FILTER_ARM,
+		.options_size = sizeof(lzma_options_bcj),
+		.non_last_ok = true,
+		.last_ok = false,
+		.changes_size = false,
+	},
+#endif
+#if defined(HAVE_ENCODER_ARMTHUMB) || defined(HAVE_DECODER_ARMTHUMB)
+	{
+		.id = LZMA_FILTER_ARMTHUMB,
+		.options_size = sizeof(lzma_options_bcj),
+		.non_last_ok = true,
+		.last_ok = false,
+		.changes_size = false,
+	},
+#endif
+#if defined(HAVE_ENCODER_SPARC) || defined(HAVE_DECODER_SPARC)
+	{
+		.id = LZMA_FILTER_SPARC,
+		.options_size = sizeof(lzma_options_bcj),
+		.non_last_ok = true,
+		.last_ok = false,
+		.changes_size = false,
+	},
+#endif
+#if defined(HAVE_ENCODER_DELTA) || defined(HAVE_DECODER_DELTA)
+	{
+		.id = LZMA_FILTER_DELTA,
+		.options_size = sizeof(lzma_options_delta),
+		.non_last_ok = true,
+		.last_ok = false,
+		.changes_size = false,
+	},
+#endif
+	{
+		.id = LZMA_VLI_UNKNOWN
+	}
+};
+
+
+extern LZMA_API(lzma_ret)
+lzma_filters_copy(const lzma_filter *src, lzma_filter *dest,
+		const lzma_allocator *allocator)
+{
+	if (src == NULL || dest == NULL)
+		return LZMA_PROG_ERROR;
+
+	lzma_ret ret;
+	size_t i;
+	for (i = 0; src[i].id != LZMA_VLI_UNKNOWN; ++i) {
+		// There must be a maximum of four filters plus
+		// the array terminator.
+		if (i == LZMA_FILTERS_MAX) {
+			ret = LZMA_OPTIONS_ERROR;
+			goto error;
+		}
+
+		dest[i].id = src[i].id;
+
+		if (src[i].options == NULL) {
+			dest[i].options = NULL;
+		} else {
+			// See if the filter is supported only when the
+			// options is not NULL. This might be convenient
+			// sometimes if the app is actually copying only
+			// a partial filter chain with a place holder ID.
+			//
+			// When options is not NULL, the Filter ID must be
+			// supported by us, because otherwise we don't know
+			// how big the options are.
+			size_t j;
+			for (j = 0; src[i].id != features[j].id; ++j) {
+				if (features[j].id == LZMA_VLI_UNKNOWN) {
+					ret = LZMA_OPTIONS_ERROR;
+					goto error;
+				}
+			}
+
+			// Allocate and copy the options.
+			dest[i].options = lzma_alloc(features[j].options_size,
+					allocator);
+			if (dest[i].options == NULL) {
+				ret = LZMA_MEM_ERROR;
+				goto error;
+			}
+
+			memcpy(dest[i].options, src[i].options,
+					features[j].options_size);
+		}
+	}
+
+	// Terminate the filter array.
+	assert(i <= LZMA_FILTERS_MAX + 1);
+	dest[i].id = LZMA_VLI_UNKNOWN;
+	dest[i].options = NULL;
+
+	return LZMA_OK;
+
+error:
+	// Free the options which we have already allocated.
+	while (i-- > 0) {
+		lzma_free(dest[i].options, allocator);
+		dest[i].options = NULL;
+	}
+
+	return ret;
+}
+
+
+static lzma_ret
+validate_chain(const lzma_filter *filters, size_t *count)
+{
+	// There must be at least one filter.
+	if (filters == NULL || filters[0].id == LZMA_VLI_UNKNOWN)
+		return LZMA_PROG_ERROR;
+
+	// Number of non-last filters that may change the size of the data
+	// significantly (that is, more than 1-2 % or so).
+	size_t changes_size_count = 0;
+
+	// True if it is OK to add a new filter after the current filter.
+	bool non_last_ok = true;
+
+	// True if the last filter in the given chain is actually usable as
+	// the last filter. Only filters that support embedding End of Payload
+	// Marker can be used as the last filter in the chain.
+	bool last_ok = false;
+
+	size_t i = 0;
+	do {
+		size_t j;
+		for (j = 0; filters[i].id != features[j].id; ++j)
+			if (features[j].id == LZMA_VLI_UNKNOWN)
+				return LZMA_OPTIONS_ERROR;
+
+		// If the previous filter in the chain cannot be a non-last
+		// filter, the chain is invalid.
+		if (!non_last_ok)
+			return LZMA_OPTIONS_ERROR;
+
+		non_last_ok = features[j].non_last_ok;
+		last_ok = features[j].last_ok;
+		changes_size_count += features[j].changes_size;
+
+	} while (filters[++i].id != LZMA_VLI_UNKNOWN);
+
+	// There must be 1-4 filters. The last filter must be usable as
+	// the last filter in the chain. A maximum of three filters are
+	// allowed to change the size of the data.
+	if (i > LZMA_FILTERS_MAX || !last_ok || changes_size_count > 3)
+		return LZMA_OPTIONS_ERROR;
+
+	*count = i;
+	return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_raw_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter *options,
+		lzma_filter_find coder_find, bool is_encoder)
+{
+	// Do some basic validation and get the number of filters.
+	size_t count;
+	return_if_error(validate_chain(options, &count));
+
+	// Set the filter functions and copy the options pointer.
+	lzma_filter_info filters[LZMA_FILTERS_MAX + 1];
+	if (is_encoder) {
+		for (size_t i = 0; i < count; ++i) {
+			// The order of the filters is reversed in the
+			// encoder. It allows more efficient handling
+			// of the uncompressed data.
+			const size_t j = count - i - 1;
+
+			const lzma_filter_coder *const fc
+					= coder_find(options[i].id);
+			if (fc == NULL || fc->init == NULL)
+				return LZMA_OPTIONS_ERROR;
+
+			filters[j].id = options[i].id;
+			filters[j].init = fc->init;
+			filters[j].options = options[i].options;
+		}
+	} else {
+		for (size_t i = 0; i < count; ++i) {
+			const lzma_filter_coder *const fc
+					= coder_find(options[i].id);
+			if (fc == NULL || fc->init == NULL)
+				return LZMA_OPTIONS_ERROR;
+
+			filters[i].id = options[i].id;
+			filters[i].init = fc->init;
+			filters[i].options = options[i].options;
+		}
+	}
+
+	// Terminate the array.
+	filters[count].id = LZMA_VLI_UNKNOWN;
+	filters[count].init = NULL;
+
+	// Initialize the filters.
+	const lzma_ret ret = lzma_next_filter_init(next, allocator, filters);
+	if (ret != LZMA_OK)
+		lzma_next_end(next, allocator);
+
+	return ret;
+}
+
+
+extern uint64_t
+lzma_raw_coder_memusage(lzma_filter_find coder_find,
+		const lzma_filter *filters)
+{
+	// The chain has to have at least one filter.
+	{
+		size_t tmp;
+		if (validate_chain(filters, &tmp) != LZMA_OK)
+			return UINT64_MAX;
+	}
+
+	uint64_t total = 0;
+	size_t i = 0;
+
+	do {
+		const lzma_filter_coder *const fc
+				 = coder_find(filters[i].id);
+		if (fc == NULL)
+			return UINT64_MAX; // Unsupported Filter ID
+
+		if (fc->memusage == NULL) {
+			// This filter doesn't have a function to calculate
+			// the memory usage and validate the options. Such
+			// filters need only little memory, so we use 1 KiB
+			// as a good estimate. They also accept all possible
+			// options, so there's no need to worry about lack
+			// of validation.
+			total += 1024;
+		} else {
+			// Call the filter-specific memory usage calculation
+			// function.
+			const uint64_t usage
+					= fc->memusage(filters[i].options);
+			if (usage == UINT64_MAX)
+				return UINT64_MAX; // Invalid options
+
+			total += usage;
+		}
+	} while (filters[++i].id != LZMA_VLI_UNKNOWN);
+
+	// Add some fixed amount of extra. It's to compensate memory usage
+	// of Stream, Block etc. coders, malloc() overhead, stack etc.
+	return total + LZMA_MEMUSAGE_BASE;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/filter_common.h
===================================================================
--- vendor/xz/dist/src/liblzma/common/filter_common.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_common.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,48 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_common.c
-/// \brief      Filter-specific stuff common for both encoder and decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_FILTER_COMMON_H
-#define LZMA_FILTER_COMMON_H
-
-#include "common.h"
-
-
-/// Both lzma_filter_encoder and lzma_filter_decoder begin with these members.
-typedef struct {
-	/// Filter ID
-	lzma_vli id;
-
-	/// Initializes the filter encoder and calls lzma_next_filter_init()
-	/// for filters + 1.
-	lzma_init_function init;
-
-	/// Calculates memory usage of the encoder. If the options are
-	/// invalid, UINT64_MAX is returned.
-	uint64_t (*memusage)(const void *options);
-
-} lzma_filter_coder;
-
-
-typedef const lzma_filter_coder *(*lzma_filter_find)(lzma_vli id);
-
-
-extern lzma_ret lzma_raw_coder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *filters,
-		lzma_filter_find coder_find, bool is_encoder);
-
-
-extern uint64_t lzma_raw_coder_memusage(lzma_filter_find coder_find,
-		const lzma_filter *filters);
-
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/common/filter_common.h (from rev 9176, vendor/xz/dist/src/liblzma/common/filter_common.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/filter_common.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_common.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,48 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       filter_common.c
+/// \brief      Filter-specific stuff common for both encoder and decoder
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_FILTER_COMMON_H
+#define LZMA_FILTER_COMMON_H
+
+#include "common.h"
+
+
+/// Both lzma_filter_encoder and lzma_filter_decoder begin with these members.
+typedef struct {
+	/// Filter ID
+	lzma_vli id;
+
+	/// Initializes the filter encoder and calls lzma_next_filter_init()
+	/// for filters + 1.
+	lzma_init_function init;
+
+	/// Calculates memory usage of the encoder. If the options are
+	/// invalid, UINT64_MAX is returned.
+	uint64_t (*memusage)(const void *options);
+
+} lzma_filter_coder;
+
+
+typedef const lzma_filter_coder *(*lzma_filter_find)(lzma_vli id);
+
+
+extern lzma_ret lzma_raw_coder_init(
+		lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter *filters,
+		lzma_filter_find coder_find, bool is_encoder);
+
+
+extern uint64_t lzma_raw_coder_memusage(lzma_filter_find coder_find,
+		const lzma_filter *filters);
+
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/common/filter_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/filter_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,183 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_decoder.c
-/// \brief      Filter ID mapping to filter-specific functions
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "filter_decoder.h"
-#include "filter_common.h"
-#include "lzma_decoder.h"
-#include "lzma2_decoder.h"
-#include "simple_decoder.h"
-#include "delta_decoder.h"
-
-
-typedef struct {
-	/// Filter ID
-	lzma_vli id;
-
-	/// Initializes the filter encoder and calls lzma_next_filter_init()
-	/// for filters + 1.
-	lzma_init_function init;
-
-	/// Calculates memory usage of the encoder. If the options are
-	/// invalid, UINT64_MAX is returned.
-	uint64_t (*memusage)(const void *options);
-
-	/// Decodes Filter Properties.
-	///
-	/// \return     - LZMA_OK: Properties decoded successfully.
-	///             - LZMA_OPTIONS_ERROR: Unsupported properties
-	///             - LZMA_MEM_ERROR: Memory allocation failed.
-	lzma_ret (*props_decode)(void **options, lzma_allocator *allocator,
-			const uint8_t *props, size_t props_size);
-
-} lzma_filter_decoder;
-
-
-static const lzma_filter_decoder decoders[] = {
-#ifdef HAVE_DECODER_LZMA1
-	{
-		.id = LZMA_FILTER_LZMA1,
-		.init = &lzma_lzma_decoder_init,
-		.memusage = &lzma_lzma_decoder_memusage,
-		.props_decode = &lzma_lzma_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_LZMA2
-	{
-		.id = LZMA_FILTER_LZMA2,
-		.init = &lzma_lzma2_decoder_init,
-		.memusage = &lzma_lzma2_decoder_memusage,
-		.props_decode = &lzma_lzma2_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_X86
-	{
-		.id = LZMA_FILTER_X86,
-		.init = &lzma_simple_x86_decoder_init,
-		.memusage = NULL,
-		.props_decode = &lzma_simple_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_POWERPC
-	{
-		.id = LZMA_FILTER_POWERPC,
-		.init = &lzma_simple_powerpc_decoder_init,
-		.memusage = NULL,
-		.props_decode = &lzma_simple_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_IA64
-	{
-		.id = LZMA_FILTER_IA64,
-		.init = &lzma_simple_ia64_decoder_init,
-		.memusage = NULL,
-		.props_decode = &lzma_simple_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_ARM
-	{
-		.id = LZMA_FILTER_ARM,
-		.init = &lzma_simple_arm_decoder_init,
-		.memusage = NULL,
-		.props_decode = &lzma_simple_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_ARMTHUMB
-	{
-		.id = LZMA_FILTER_ARMTHUMB,
-		.init = &lzma_simple_armthumb_decoder_init,
-		.memusage = NULL,
-		.props_decode = &lzma_simple_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_SPARC
-	{
-		.id = LZMA_FILTER_SPARC,
-		.init = &lzma_simple_sparc_decoder_init,
-		.memusage = NULL,
-		.props_decode = &lzma_simple_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_DELTA
-	{
-		.id = LZMA_FILTER_DELTA,
-		.init = &lzma_delta_decoder_init,
-		.memusage = &lzma_delta_coder_memusage,
-		.props_decode = &lzma_delta_props_decode,
-	},
-#endif
-};
-
-
-static const lzma_filter_decoder *
-decoder_find(lzma_vli id)
-{
-	for (size_t i = 0; i < ARRAY_SIZE(decoders); ++i)
-		if (decoders[i].id == id)
-			return decoders + i;
-
-	return NULL;
-}
-
-
-extern LZMA_API(lzma_bool)
-lzma_filter_decoder_is_supported(lzma_vli id)
-{
-	return decoder_find(id) != NULL;
-}
-
-
-extern lzma_ret
-lzma_raw_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *options)
-{
-	return lzma_raw_coder_init(next, allocator,
-			options, (lzma_filter_find)(&decoder_find), false);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_raw_decoder(lzma_stream *strm, const lzma_filter *options)
-{
-	lzma_next_strm_init(lzma_raw_decoder_init, strm, options);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(uint64_t)
-lzma_raw_decoder_memusage(const lzma_filter *filters)
-{
-	return lzma_raw_coder_memusage(
-			(lzma_filter_find)(&decoder_find), filters);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_properties_decode(lzma_filter *filter, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size)
-{
-	// Make it always NULL so that the caller can always safely free() it.
-	filter->options = NULL;
-
-	const lzma_filter_decoder *const fd = decoder_find(filter->id);
-	if (fd == NULL)
-		return LZMA_OPTIONS_ERROR;
-
-	if (fd->props_decode == NULL)
-		return props_size == 0 ? LZMA_OK : LZMA_OPTIONS_ERROR;
-
-	return fd->props_decode(
-			&filter->options, allocator, props, props_size);
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/filter_decoder.c (from rev 9176, vendor/xz/dist/src/liblzma/common/filter_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/filter_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,184 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       filter_decoder.c
+/// \brief      Filter ID mapping to filter-specific functions
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "filter_decoder.h"
+#include "filter_common.h"
+#include "lzma_decoder.h"
+#include "lzma2_decoder.h"
+#include "simple_decoder.h"
+#include "delta_decoder.h"
+
+
+typedef struct {
+	/// Filter ID
+	lzma_vli id;
+
+	/// Initializes the filter encoder and calls lzma_next_filter_init()
+	/// for filters + 1.
+	lzma_init_function init;
+
+	/// Calculates memory usage of the encoder. If the options are
+	/// invalid, UINT64_MAX is returned.
+	uint64_t (*memusage)(const void *options);
+
+	/// Decodes Filter Properties.
+	///
+	/// \return     - LZMA_OK: Properties decoded successfully.
+	///             - LZMA_OPTIONS_ERROR: Unsupported properties
+	///             - LZMA_MEM_ERROR: Memory allocation failed.
+	lzma_ret (*props_decode)(
+			void **options, const lzma_allocator *allocator,
+			const uint8_t *props, size_t props_size);
+
+} lzma_filter_decoder;
+
+
+static const lzma_filter_decoder decoders[] = {
+#ifdef HAVE_DECODER_LZMA1
+	{
+		.id = LZMA_FILTER_LZMA1,
+		.init = &lzma_lzma_decoder_init,
+		.memusage = &lzma_lzma_decoder_memusage,
+		.props_decode = &lzma_lzma_props_decode,
+	},
+#endif
+#ifdef HAVE_DECODER_LZMA2
+	{
+		.id = LZMA_FILTER_LZMA2,
+		.init = &lzma_lzma2_decoder_init,
+		.memusage = &lzma_lzma2_decoder_memusage,
+		.props_decode = &lzma_lzma2_props_decode,
+	},
+#endif
+#ifdef HAVE_DECODER_X86
+	{
+		.id = LZMA_FILTER_X86,
+		.init = &lzma_simple_x86_decoder_init,
+		.memusage = NULL,
+		.props_decode = &lzma_simple_props_decode,
+	},
+#endif
+#ifdef HAVE_DECODER_POWERPC
+	{
+		.id = LZMA_FILTER_POWERPC,
+		.init = &lzma_simple_powerpc_decoder_init,
+		.memusage = NULL,
+		.props_decode = &lzma_simple_props_decode,
+	},
+#endif
+#ifdef HAVE_DECODER_IA64
+	{
+		.id = LZMA_FILTER_IA64,
+		.init = &lzma_simple_ia64_decoder_init,
+		.memusage = NULL,
+		.props_decode = &lzma_simple_props_decode,
+	},
+#endif
+#ifdef HAVE_DECODER_ARM
+	{
+		.id = LZMA_FILTER_ARM,
+		.init = &lzma_simple_arm_decoder_init,
+		.memusage = NULL,
+		.props_decode = &lzma_simple_props_decode,
+	},
+#endif
+#ifdef HAVE_DECODER_ARMTHUMB
+	{
+		.id = LZMA_FILTER_ARMTHUMB,
+		.init = &lzma_simple_armthumb_decoder_init,
+		.memusage = NULL,
+		.props_decode = &lzma_simple_props_decode,
+	},
+#endif
+#ifdef HAVE_DECODER_SPARC
+	{
+		.id = LZMA_FILTER_SPARC,
+		.init = &lzma_simple_sparc_decoder_init,
+		.memusage = NULL,
+		.props_decode = &lzma_simple_props_decode,
+	},
+#endif
+#ifdef HAVE_DECODER_DELTA
+	{
+		.id = LZMA_FILTER_DELTA,
+		.init = &lzma_delta_decoder_init,
+		.memusage = &lzma_delta_coder_memusage,
+		.props_decode = &lzma_delta_props_decode,
+	},
+#endif
+};
+
+
+static const lzma_filter_decoder *
+decoder_find(lzma_vli id)
+{
+	for (size_t i = 0; i < ARRAY_SIZE(decoders); ++i)
+		if (decoders[i].id == id)
+			return decoders + i;
+
+	return NULL;
+}
+
+
+extern LZMA_API(lzma_bool)
+lzma_filter_decoder_is_supported(lzma_vli id)
+{
+	return decoder_find(id) != NULL;
+}
+
+
+extern lzma_ret
+lzma_raw_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter *options)
+{
+	return lzma_raw_coder_init(next, allocator,
+			options, (lzma_filter_find)(&decoder_find), false);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_raw_decoder(lzma_stream *strm, const lzma_filter *options)
+{
+	lzma_next_strm_init(lzma_raw_decoder_init, strm, options);
+
+	strm->internal->supported_actions[LZMA_RUN] = true;
+	strm->internal->supported_actions[LZMA_FINISH] = true;
+
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_raw_decoder_memusage(const lzma_filter *filters)
+{
+	return lzma_raw_coder_memusage(
+			(lzma_filter_find)(&decoder_find), filters);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_properties_decode(lzma_filter *filter, const lzma_allocator *allocator,
+		const uint8_t *props, size_t props_size)
+{
+	// Make it always NULL so that the caller can always safely free() it.
+	filter->options = NULL;
+
+	const lzma_filter_decoder *const fd = decoder_find(filter->id);
+	if (fd == NULL)
+		return LZMA_OPTIONS_ERROR;
+
+	if (fd->props_decode == NULL)
+		return props_size == 0 ? LZMA_OK : LZMA_OPTIONS_ERROR;
+
+	return fd->props_decode(
+			&filter->options, allocator, props, props_size);
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/filter_decoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/common/filter_decoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,23 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_decoder.c
-/// \brief      Filter ID mapping to filter-specific functions
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_FILTER_DECODER_H
-#define LZMA_FILTER_DECODER_H
-
-#include "common.h"
-
-
-extern lzma_ret lzma_raw_decoder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *options);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/common/filter_decoder.h (from rev 9176, vendor/xz/dist/src/liblzma/common/filter_decoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/filter_decoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       filter_decoder.c
+/// \brief      Filter ID mapping to filter-specific functions
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_FILTER_DECODER_H
+#define LZMA_FILTER_DECODER_H
+
+#include "common.h"
+
+
+extern lzma_ret lzma_raw_decoder_init(
+		lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter *options);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/common/filter_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/filter_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,288 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_decoder.c
-/// \brief      Filter ID mapping to filter-specific functions
-//
-//  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 "filter_common.h"
-#include "lzma_encoder.h"
-#include "lzma2_encoder.h"
-#include "simple_encoder.h"
-#include "delta_encoder.h"
-
-
-typedef struct {
-	/// Filter ID
-	lzma_vli id;
-
-	/// Initializes the filter encoder and calls lzma_next_filter_init()
-	/// for filters + 1.
-	lzma_init_function init;
-
-	/// Calculates memory usage of the encoder. If the options are
-	/// invalid, UINT64_MAX is returned.
-	uint64_t (*memusage)(const void *options);
-
-	/// Calculates the minimum sane size for Blocks (or other types of
-	/// chunks) to which the input data can be split to make
-	/// multithreaded encoding possible. If this is NULL, it is assumed
-	/// that the encoder is fast enough with single thread.
-	lzma_vli (*chunk_size)(const void *options);
-
-	/// Tells the size of the Filter Properties field. If options are
-	/// invalid, UINT32_MAX is returned. If this is NULL, props_size_fixed
-	/// is used.
-	lzma_ret (*props_size_get)(uint32_t *size, const void *options);
-	uint32_t props_size_fixed;
-
-	/// Encodes Filter Properties.
-	///
-	/// \return     - LZMA_OK: Properties encoded successfully.
-	///             - LZMA_OPTIONS_ERROR: Unsupported options
-	///             - LZMA_PROG_ERROR: Invalid options or not enough
-	///               output space
-	lzma_ret (*props_encode)(const void *options, uint8_t *out);
-
-} lzma_filter_encoder;
-
-
-static const lzma_filter_encoder encoders[] = {
-#ifdef HAVE_ENCODER_LZMA1
-	{
-		.id = LZMA_FILTER_LZMA1,
-		.init = &lzma_lzma_encoder_init,
-		.memusage = &lzma_lzma_encoder_memusage,
-		.chunk_size = NULL, // FIXME
-		.props_size_get = NULL,
-		.props_size_fixed = 5,
-		.props_encode = &lzma_lzma_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_LZMA2
-	{
-		.id = LZMA_FILTER_LZMA2,
-		.init = &lzma_lzma2_encoder_init,
-		.memusage = &lzma_lzma2_encoder_memusage,
-		.chunk_size = NULL, // FIXME
-		.props_size_get = NULL,
-		.props_size_fixed = 1,
-		.props_encode = &lzma_lzma2_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_X86
-	{
-		.id = LZMA_FILTER_X86,
-		.init = &lzma_simple_x86_encoder_init,
-		.memusage = NULL,
-		.chunk_size = NULL,
-		.props_size_get = &lzma_simple_props_size,
-		.props_encode = &lzma_simple_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_POWERPC
-	{
-		.id = LZMA_FILTER_POWERPC,
-		.init = &lzma_simple_powerpc_encoder_init,
-		.memusage = NULL,
-		.chunk_size = NULL,
-		.props_size_get = &lzma_simple_props_size,
-		.props_encode = &lzma_simple_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_IA64
-	{
-		.id = LZMA_FILTER_IA64,
-		.init = &lzma_simple_ia64_encoder_init,
-		.memusage = NULL,
-		.chunk_size = NULL,
-		.props_size_get = &lzma_simple_props_size,
-		.props_encode = &lzma_simple_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_ARM
-	{
-		.id = LZMA_FILTER_ARM,
-		.init = &lzma_simple_arm_encoder_init,
-		.memusage = NULL,
-		.chunk_size = NULL,
-		.props_size_get = &lzma_simple_props_size,
-		.props_encode = &lzma_simple_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_ARMTHUMB
-	{
-		.id = LZMA_FILTER_ARMTHUMB,
-		.init = &lzma_simple_armthumb_encoder_init,
-		.memusage = NULL,
-		.chunk_size = NULL,
-		.props_size_get = &lzma_simple_props_size,
-		.props_encode = &lzma_simple_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_SPARC
-	{
-		.id = LZMA_FILTER_SPARC,
-		.init = &lzma_simple_sparc_encoder_init,
-		.memusage = NULL,
-		.chunk_size = NULL,
-		.props_size_get = &lzma_simple_props_size,
-		.props_encode = &lzma_simple_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_DELTA
-	{
-		.id = LZMA_FILTER_DELTA,
-		.init = &lzma_delta_encoder_init,
-		.memusage = &lzma_delta_coder_memusage,
-		.chunk_size = NULL,
-		.props_size_get = NULL,
-		.props_size_fixed = 1,
-		.props_encode = &lzma_delta_props_encode,
-	},
-#endif
-};
-
-
-static const lzma_filter_encoder *
-encoder_find(lzma_vli id)
-{
-	for (size_t i = 0; i < ARRAY_SIZE(encoders); ++i)
-		if (encoders[i].id == id)
-			return encoders + i;
-
-	return NULL;
-}
-
-
-extern LZMA_API(lzma_bool)
-lzma_filter_encoder_is_supported(lzma_vli id)
-{
-	return encoder_find(id) != NULL;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_filters_update(lzma_stream *strm, const lzma_filter *filters)
-{
-	if (strm->internal->next.update == NULL)
-		return LZMA_PROG_ERROR;
-
-	// Validate the filter chain.
-	if (lzma_raw_encoder_memusage(filters) == UINT64_MAX)
-		return LZMA_OPTIONS_ERROR;
-
-	// The actual filter chain in the encoder is reversed. Some things
-	// still want the normal order chain, so we provide both.
-	size_t count = 1;
-	while (filters[count].id != LZMA_VLI_UNKNOWN)
-		++count;
-
-	lzma_filter reversed_filters[LZMA_FILTERS_MAX + 1];
-	for (size_t i = 0; i < count; ++i)
-		reversed_filters[count - i - 1] = filters[i];
-
-	reversed_filters[count].id = LZMA_VLI_UNKNOWN;
-
-	return strm->internal->next.update(strm->internal->next.coder,
-			strm->allocator, filters, reversed_filters);
-}
-
-
-extern lzma_ret
-lzma_raw_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *options)
-{
-	return lzma_raw_coder_init(next, allocator,
-			options, (lzma_filter_find)(&encoder_find), true);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_raw_encoder(lzma_stream *strm, const lzma_filter *options)
-{
-	lzma_next_strm_init(lzma_raw_coder_init, strm, options,
-			(lzma_filter_find)(&encoder_find), true);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(uint64_t)
-lzma_raw_encoder_memusage(const lzma_filter *filters)
-{
-	return lzma_raw_coder_memusage(
-			(lzma_filter_find)(&encoder_find), filters);
-}
-
-
-/*
-extern LZMA_API(lzma_vli)
-lzma_chunk_size(const lzma_filter *filters)
-{
-	lzma_vli max = 0;
-
-	for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
-		const lzma_filter_encoder *const fe
-				= encoder_find(filters[i].id);
-		if (fe->chunk_size != NULL) {
-			const lzma_vli size
-					= fe->chunk_size(filters[i].options);
-			if (size == LZMA_VLI_UNKNOWN)
-				return LZMA_VLI_UNKNOWN;
-
-			if (size > max)
-				max = size;
-		}
-	}
-
-	return max;
-}
-*/
-
-
-extern LZMA_API(lzma_ret)
-lzma_properties_size(uint32_t *size, const lzma_filter *filter)
-{
-	const lzma_filter_encoder *const fe = encoder_find(filter->id);
-	if (fe == NULL) {
-		// Unknown filter - if the Filter ID is a proper VLI,
-		// return LZMA_OPTIONS_ERROR instead of LZMA_PROG_ERROR,
-		// because it's possible that we just don't have support
-		// compiled in for the requested filter.
-		return filter->id <= LZMA_VLI_MAX
-				? LZMA_OPTIONS_ERROR : LZMA_PROG_ERROR;
-	}
-
-	if (fe->props_size_get == NULL) {
-		// No props_size_get() function, use props_size_fixed.
-		*size = fe->props_size_fixed;
-		return LZMA_OK;
-	}
-
-	return fe->props_size_get(size, filter->options);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_properties_encode(const lzma_filter *filter, uint8_t *props)
-{
-	const lzma_filter_encoder *const fe = encoder_find(filter->id);
-	if (fe == NULL)
-		return LZMA_PROG_ERROR;
-
-	if (fe->props_encode == NULL)
-		return LZMA_OK;
-
-	return fe->props_encode(filter->options, props);
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/filter_encoder.c (from rev 9176, vendor/xz/dist/src/liblzma/common/filter_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/filter_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,286 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       filter_decoder.c
+/// \brief      Filter ID mapping to filter-specific functions
+//
+//  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 "filter_common.h"
+#include "lzma_encoder.h"
+#include "lzma2_encoder.h"
+#include "simple_encoder.h"
+#include "delta_encoder.h"
+
+
+typedef struct {
+	/// Filter ID
+	lzma_vli id;
+
+	/// Initializes the filter encoder and calls lzma_next_filter_init()
+	/// for filters + 1.
+	lzma_init_function init;
+
+	/// Calculates memory usage of the encoder. If the options are
+	/// invalid, UINT64_MAX is returned.
+	uint64_t (*memusage)(const void *options);
+
+	/// Calculates the recommended Uncompressed Size for .xz Blocks to
+	/// which the input data can be split to make multithreaded
+	/// encoding possible. If this is NULL, it is assumed that
+	/// the encoder is fast enough with single thread.
+	uint64_t (*block_size)(const void *options);
+
+	/// Tells the size of the Filter Properties field. If options are
+	/// invalid, UINT32_MAX is returned. If this is NULL, props_size_fixed
+	/// is used.
+	lzma_ret (*props_size_get)(uint32_t *size, const void *options);
+	uint32_t props_size_fixed;
+
+	/// Encodes Filter Properties.
+	///
+	/// \return     - LZMA_OK: Properties encoded successfully.
+	///             - LZMA_OPTIONS_ERROR: Unsupported options
+	///             - LZMA_PROG_ERROR: Invalid options or not enough
+	///               output space
+	lzma_ret (*props_encode)(const void *options, uint8_t *out);
+
+} lzma_filter_encoder;
+
+
+static const lzma_filter_encoder encoders[] = {
+#ifdef HAVE_ENCODER_LZMA1
+	{
+		.id = LZMA_FILTER_LZMA1,
+		.init = &lzma_lzma_encoder_init,
+		.memusage = &lzma_lzma_encoder_memusage,
+		.block_size = NULL, // FIXME
+		.props_size_get = NULL,
+		.props_size_fixed = 5,
+		.props_encode = &lzma_lzma_props_encode,
+	},
+#endif
+#ifdef HAVE_ENCODER_LZMA2
+	{
+		.id = LZMA_FILTER_LZMA2,
+		.init = &lzma_lzma2_encoder_init,
+		.memusage = &lzma_lzma2_encoder_memusage,
+		.block_size = &lzma_lzma2_block_size, // FIXME
+		.props_size_get = NULL,
+		.props_size_fixed = 1,
+		.props_encode = &lzma_lzma2_props_encode,
+	},
+#endif
+#ifdef HAVE_ENCODER_X86
+	{
+		.id = LZMA_FILTER_X86,
+		.init = &lzma_simple_x86_encoder_init,
+		.memusage = NULL,
+		.block_size = NULL,
+		.props_size_get = &lzma_simple_props_size,
+		.props_encode = &lzma_simple_props_encode,
+	},
+#endif
+#ifdef HAVE_ENCODER_POWERPC
+	{
+		.id = LZMA_FILTER_POWERPC,
+		.init = &lzma_simple_powerpc_encoder_init,
+		.memusage = NULL,
+		.block_size = NULL,
+		.props_size_get = &lzma_simple_props_size,
+		.props_encode = &lzma_simple_props_encode,
+	},
+#endif
+#ifdef HAVE_ENCODER_IA64
+	{
+		.id = LZMA_FILTER_IA64,
+		.init = &lzma_simple_ia64_encoder_init,
+		.memusage = NULL,
+		.block_size = NULL,
+		.props_size_get = &lzma_simple_props_size,
+		.props_encode = &lzma_simple_props_encode,
+	},
+#endif
+#ifdef HAVE_ENCODER_ARM
+	{
+		.id = LZMA_FILTER_ARM,
+		.init = &lzma_simple_arm_encoder_init,
+		.memusage = NULL,
+		.block_size = NULL,
+		.props_size_get = &lzma_simple_props_size,
+		.props_encode = &lzma_simple_props_encode,
+	},
+#endif
+#ifdef HAVE_ENCODER_ARMTHUMB
+	{
+		.id = LZMA_FILTER_ARMTHUMB,
+		.init = &lzma_simple_armthumb_encoder_init,
+		.memusage = NULL,
+		.block_size = NULL,
+		.props_size_get = &lzma_simple_props_size,
+		.props_encode = &lzma_simple_props_encode,
+	},
+#endif
+#ifdef HAVE_ENCODER_SPARC
+	{
+		.id = LZMA_FILTER_SPARC,
+		.init = &lzma_simple_sparc_encoder_init,
+		.memusage = NULL,
+		.block_size = NULL,
+		.props_size_get = &lzma_simple_props_size,
+		.props_encode = &lzma_simple_props_encode,
+	},
+#endif
+#ifdef HAVE_ENCODER_DELTA
+	{
+		.id = LZMA_FILTER_DELTA,
+		.init = &lzma_delta_encoder_init,
+		.memusage = &lzma_delta_coder_memusage,
+		.block_size = NULL,
+		.props_size_get = NULL,
+		.props_size_fixed = 1,
+		.props_encode = &lzma_delta_props_encode,
+	},
+#endif
+};
+
+
+static const lzma_filter_encoder *
+encoder_find(lzma_vli id)
+{
+	for (size_t i = 0; i < ARRAY_SIZE(encoders); ++i)
+		if (encoders[i].id == id)
+			return encoders + i;
+
+	return NULL;
+}
+
+
+extern LZMA_API(lzma_bool)
+lzma_filter_encoder_is_supported(lzma_vli id)
+{
+	return encoder_find(id) != NULL;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_filters_update(lzma_stream *strm, const lzma_filter *filters)
+{
+	if (strm->internal->next.update == NULL)
+		return LZMA_PROG_ERROR;
+
+	// Validate the filter chain.
+	if (lzma_raw_encoder_memusage(filters) == UINT64_MAX)
+		return LZMA_OPTIONS_ERROR;
+
+	// The actual filter chain in the encoder is reversed. Some things
+	// still want the normal order chain, so we provide both.
+	size_t count = 1;
+	while (filters[count].id != LZMA_VLI_UNKNOWN)
+		++count;
+
+	lzma_filter reversed_filters[LZMA_FILTERS_MAX + 1];
+	for (size_t i = 0; i < count; ++i)
+		reversed_filters[count - i - 1] = filters[i];
+
+	reversed_filters[count].id = LZMA_VLI_UNKNOWN;
+
+	return strm->internal->next.update(strm->internal->next.coder,
+			strm->allocator, filters, reversed_filters);
+}
+
+
+extern lzma_ret
+lzma_raw_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter *options)
+{
+	return lzma_raw_coder_init(next, allocator,
+			options, (lzma_filter_find)(&encoder_find), true);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_raw_encoder(lzma_stream *strm, const lzma_filter *options)
+{
+	lzma_next_strm_init(lzma_raw_coder_init, strm, options,
+			(lzma_filter_find)(&encoder_find), true);
+
+	strm->internal->supported_actions[LZMA_RUN] = true;
+	strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
+	strm->internal->supported_actions[LZMA_FINISH] = true;
+
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_raw_encoder_memusage(const lzma_filter *filters)
+{
+	return lzma_raw_coder_memusage(
+			(lzma_filter_find)(&encoder_find), filters);
+}
+
+
+extern uint64_t
+lzma_mt_block_size(const lzma_filter *filters)
+{
+	uint64_t max = 0;
+
+	for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
+		const lzma_filter_encoder *const fe
+				= encoder_find(filters[i].id);
+		if (fe->block_size != NULL) {
+			const uint64_t size
+					= fe->block_size(filters[i].options);
+			if (size == 0)
+				return 0;
+
+			if (size > max)
+				max = size;
+		}
+	}
+
+	return max;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_properties_size(uint32_t *size, const lzma_filter *filter)
+{
+	const lzma_filter_encoder *const fe = encoder_find(filter->id);
+	if (fe == NULL) {
+		// Unknown filter - if the Filter ID is a proper VLI,
+		// return LZMA_OPTIONS_ERROR instead of LZMA_PROG_ERROR,
+		// because it's possible that we just don't have support
+		// compiled in for the requested filter.
+		return filter->id <= LZMA_VLI_MAX
+				? LZMA_OPTIONS_ERROR : LZMA_PROG_ERROR;
+	}
+
+	if (fe->props_size_get == NULL) {
+		// No props_size_get() function, use props_size_fixed.
+		*size = fe->props_size_fixed;
+		return LZMA_OK;
+	}
+
+	return fe->props_size_get(size, filter->options);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_properties_encode(const lzma_filter *filter, uint8_t *props)
+{
+	const lzma_filter_encoder *const fe = encoder_find(filter->id);
+	if (fe == NULL)
+		return LZMA_PROG_ERROR;
+
+	if (fe->props_encode == NULL)
+		return LZMA_OK;
+
+	return fe->props_encode(filter->options, props);
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/filter_encoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/common/filter_encoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,27 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_encoder.c
-/// \brief      Filter ID mapping to filter-specific functions
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_FILTER_ENCODER_H
-#define LZMA_FILTER_ENCODER_H
-
-#include "common.h"
-
-
-// FIXME: Might become a part of the public API once finished.
-// extern lzma_vli lzma_chunk_size(const lzma_filter *filters);
-
-
-extern lzma_ret lzma_raw_encoder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *filters);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/common/filter_encoder.h (from rev 9176, vendor/xz/dist/src/liblzma/common/filter_encoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/filter_encoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       filter_encoder.c
+/// \brief      Filter ID mapping to filter-specific functions
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_FILTER_ENCODER_H
+#define LZMA_FILTER_ENCODER_H
+
+#include "common.h"
+
+
+// FIXME: Might become a part of the public API.
+extern uint64_t lzma_mt_block_size(const lzma_filter *filters);
+
+
+extern lzma_ret lzma_raw_encoder_init(
+		lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter *filters);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/common/filter_flags_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/filter_flags_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_flags_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,46 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_flags_decoder.c
-/// \brief      Decodes a Filter Flags field
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "filter_decoder.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_filter_flags_decode(
-		lzma_filter *filter, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size)
-{
-	// Set the pointer to NULL so the caller can always safely free it.
-	filter->options = NULL;
-
-	// Filter ID
-	return_if_error(lzma_vli_decode(&filter->id, NULL,
-			in, in_pos, in_size));
-
-	if (filter->id >= LZMA_FILTER_RESERVED_START)
-		return LZMA_DATA_ERROR;
-
-	// Size of Properties
-	lzma_vli props_size;
-	return_if_error(lzma_vli_decode(&props_size, NULL,
-			in, in_pos, in_size));
-
-	// Filter Properties
-	if (in_size - *in_pos < props_size)
-		return LZMA_DATA_ERROR;
-
-	const lzma_ret ret = lzma_properties_decode(
-			filter, allocator, in + *in_pos, props_size);
-
-	*in_pos += props_size;
-
-	return ret;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/filter_flags_decoder.c (from rev 9176, vendor/xz/dist/src/liblzma/common/filter_flags_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/filter_flags_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/filter_flags_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,46 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       filter_flags_decoder.c
+/// \brief      Decodes a Filter Flags field
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "filter_decoder.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_filter_flags_decode(
+		lzma_filter *filter, const lzma_allocator *allocator,
+		const uint8_t *in, size_t *in_pos, size_t in_size)
+{
+	// Set the pointer to NULL so the caller can always safely free it.
+	filter->options = NULL;
+
+	// Filter ID
+	return_if_error(lzma_vli_decode(&filter->id, NULL,
+			in, in_pos, in_size));
+
+	if (filter->id >= LZMA_FILTER_RESERVED_START)
+		return LZMA_DATA_ERROR;
+
+	// Size of Properties
+	lzma_vli props_size;
+	return_if_error(lzma_vli_decode(&props_size, NULL,
+			in, in_pos, in_size));
+
+	// Filter Properties
+	if (in_size - *in_pos < props_size)
+		return LZMA_DATA_ERROR;
+
+	const lzma_ret ret = lzma_properties_decode(
+			filter, allocator, in + *in_pos, props_size);
+
+	*in_pos += props_size;
+
+	return ret;
+}

Copied: vendor/xz/5.2.3/src/liblzma/common/hardware_cputhreads.c (from rev 9176, vendor/xz/dist/src/liblzma/common/hardware_cputhreads.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/hardware_cputhreads.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/hardware_cputhreads.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       hardware_cputhreads.c
+/// \brief      Get the number of CPU threads or cores
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+#include "tuklib_cpucores.h"
+
+
+extern LZMA_API(uint32_t)
+lzma_cputhreads(void)
+{
+	return tuklib_cpucores();
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/index.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/index.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/index.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,1244 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       index.c
-/// \brief      Handling of .xz Indexes and some other Stream information
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "index.h"
-#include "stream_flags_common.h"
-
-
-/// \brief      How many Records to allocate at once
-///
-/// This should be big enough to avoid making lots of tiny allocations
-/// but small enough to avoid too much unused memory at once.
-#define INDEX_GROUP_SIZE 512
-
-
-/// \brief      How many Records can be allocated at once at maximum
-#define PREALLOC_MAX ((SIZE_MAX - sizeof(index_group)) / sizeof(index_record))
-
-
-/// \brief      Base structure for index_stream and index_group structures
-typedef struct index_tree_node_s index_tree_node;
-struct index_tree_node_s {
-	/// Uncompressed start offset of this Stream (relative to the
-	/// beginning of the file) or Block (relative to the beginning
-	/// of the Stream)
-	lzma_vli uncompressed_base;
-
-	/// Compressed start offset of this Stream or Block
-	lzma_vli compressed_base;
-
-	index_tree_node *parent;
-	index_tree_node *left;
-	index_tree_node *right;
-};
-
-
-/// \brief      AVL tree to hold index_stream or index_group structures
-typedef struct {
-	/// Root node
-	index_tree_node *root;
-
-	/// Leftmost node. Since the tree will be filled sequentially,
-	/// this won't change after the first node has been added to
-	/// the tree.
-	index_tree_node *leftmost;
-
-	/// The rightmost node in the tree. Since the tree is filled
-	/// sequentially, this is always the node where to add the new data.
-	index_tree_node *rightmost;
-
-	/// Number of nodes in the tree
-	uint32_t count;
-
-} index_tree;
-
-
-typedef struct {
-	lzma_vli uncompressed_sum;
-	lzma_vli unpadded_sum;
-} index_record;
-
-
-typedef struct {
-	/// Every Record group is part of index_stream.groups tree.
-	index_tree_node node;
-
-	/// Number of Blocks in this Stream before this group.
-	lzma_vli number_base;
-
-	/// Number of Records that can be put in records[].
-	size_t allocated;
-
-	/// Index of the last Record in use.
-	size_t last;
-
-	/// The sizes in this array are stored as cumulative sums relative
-	/// to the beginning of the Stream. This makes it possible to
-	/// use binary search in lzma_index_locate().
-	///
-	/// Note that the cumulative summing is done specially for
-	/// unpadded_sum: The previous value is rounded up to the next
-	/// multiple of four before adding the Unpadded Size of the new
-	/// Block. The total encoded size of the Blocks in the Stream
-	/// is records[last].unpadded_sum in the last Record group of
-	/// the Stream.
-	///
-	/// For example, if the Unpadded Sizes are 39, 57, and 81, the
-	/// stored values are 39, 97 (40 + 57), and 181 (100 + 181).
-	/// The total encoded size of these Blocks is 184.
-	///
-	/// This is a flexible array, because it makes easy to optimize
-	/// memory usage in case someone concatenates many Streams that
-	/// have only one or few Blocks.
-	index_record records[];
-
-} index_group;
-
-
-typedef struct {
-	/// Every index_stream is a node in the tree of Sreams.
-	index_tree_node node;
-
-	/// Number of this Stream (first one is 1)
-	uint32_t number;
-
-	/// Total number of Blocks before this Stream
-	lzma_vli block_number_base;
-
-	/// Record groups of this Stream are stored in a tree.
-	/// It's a T-tree with AVL-tree balancing. There are
-	/// INDEX_GROUP_SIZE Records per node by default.
-	/// This keeps the number of memory allocations reasonable
-	/// and finding a Record is fast.
-	index_tree groups;
-
-	/// Number of Records in this Stream
-	lzma_vli record_count;
-
-	/// Size of the List of Records field in this Stream. This is used
-	/// together with record_count to calculate the size of the Index
-	/// field and thus the total size of the Stream.
-	lzma_vli index_list_size;
-
-	/// Stream Flags of this Stream. This is meaningful only if
-	/// the Stream Flags have been told us with lzma_index_stream_flags().
-	/// Initially stream_flags.version is set to UINT32_MAX to indicate
-	/// that the Stream Flags are unknown.
-	lzma_stream_flags stream_flags;
-
-	/// Amount of Stream Padding after this Stream. This defaults to
-	/// zero and can be set with lzma_index_stream_padding().
-	lzma_vli stream_padding;
-
-} index_stream;
-
-
-struct lzma_index_s {
-	/// AVL-tree containing the Stream(s). Often there is just one
-	/// Stream, but using a tree keeps lookups fast even when there
-	/// are many concatenated Streams.
-	index_tree streams;
-
-	/// Uncompressed size of all the Blocks in the Stream(s)
-	lzma_vli uncompressed_size;
-
-	/// Total size of all the Blocks in the Stream(s)
-	lzma_vli total_size;
-
-	/// Total number of Records in all Streams in this lzma_index
-	lzma_vli record_count;
-
-	/// Size of the List of Records field if all the Streams in this
-	/// lzma_index were packed into a single Stream (makes it simpler to
-	/// take many .xz files and combine them into a single Stream).
-	///
-	/// This value together with record_count is needed to calculate
-	/// Backward Size that is stored into Stream Footer.
-	lzma_vli index_list_size;
-
-	/// How many Records to allocate at once in lzma_index_append().
-	/// This defaults to INDEX_GROUP_SIZE but can be overriden with
-	/// lzma_index_prealloc().
-	size_t prealloc;
-
-	/// Bitmask indicating what integrity check types have been used
-	/// as set by lzma_index_stream_flags(). The bit of the last Stream
-	/// is not included here, since it is possible to change it by
-	/// calling lzma_index_stream_flags() again.
-	uint32_t checks;
-};
-
-
-static void
-index_tree_init(index_tree *tree)
-{
-	tree->root = NULL;
-	tree->leftmost = NULL;
-	tree->rightmost = NULL;
-	tree->count = 0;
-	return;
-}
-
-
-/// Helper for index_tree_end()
-static void
-index_tree_node_end(index_tree_node *node, lzma_allocator *allocator,
-		void (*free_func)(void *node, lzma_allocator *allocator))
-{
-	// The tree won't ever be very huge, so recursion should be fine.
-	// 20 levels in the tree is likely quite a lot already in practice.
-	if (node->left != NULL)
-		index_tree_node_end(node->left, allocator, free_func);
-
-	if (node->right != NULL)
-		index_tree_node_end(node->right, allocator, free_func);
-
-	if (free_func != NULL)
-		free_func(node, allocator);
-
-	lzma_free(node, allocator);
-	return;
-}
-
-
-/// Free the meory allocated for a tree. If free_func is not NULL,
-/// it is called on each node before freeing the node. This is used
-/// to free the Record groups from each index_stream before freeing
-/// the index_stream itself.
-static void
-index_tree_end(index_tree *tree, lzma_allocator *allocator,
-		void (*free_func)(void *node, lzma_allocator *allocator))
-{
-	if (tree->root != NULL)
-		index_tree_node_end(tree->root, allocator, free_func);
-
-	return;
-}
-
-
-/// Add a new node to the tree. node->uncompressed_base and
-/// node->compressed_base must have been set by the caller already.
-static void
-index_tree_append(index_tree *tree, index_tree_node *node)
-{
-	node->parent = tree->rightmost;
-	node->left = NULL;
-	node->right = NULL;
-
-	++tree->count;
-
-	// Handle the special case of adding the first node.
-	if (tree->root == NULL) {
-		tree->root = node;
-		tree->leftmost = node;
-		tree->rightmost = node;
-		return;
-	}
-
-	// The tree is always filled sequentially.
-	assert(tree->rightmost->uncompressed_base <= node->uncompressed_base);
-	assert(tree->rightmost->compressed_base < node->compressed_base);
-
-	// Add the new node after the rightmost node. It's the correct
-	// place due to the reason above.
-	tree->rightmost->right = node;
-	tree->rightmost = node;
-
-	// Balance the AVL-tree if needed. We don't need to keep the balance
-	// factors in nodes, because we always fill the tree sequentially,
-	// and thus know the state of the tree just by looking at the node
-	// count. From the node count we can calculate how many steps to go
-	// up in the tree to find the rotation root.
-	uint32_t up = tree->count ^ (UINT32_C(1) << bsr32(tree->count));
-	if (up != 0) {
-		// Locate the root node for the rotation.
-		up = ctz32(tree->count) + 2;
-		do {
-			node = node->parent;
-		} while (--up > 0);
-
-		// Rotate left using node as the rotation root.
-		index_tree_node *pivot = node->right;
-
-		if (node->parent == NULL) {
-			tree->root = pivot;
-		} else {
-			assert(node->parent->right == node);
-			node->parent->right = pivot;
-		}
-
-		pivot->parent = node->parent;
-
-		node->right = pivot->left;
-		if (node->right != NULL)
-			node->right->parent = node;
-
-		pivot->left = node;
-		node->parent = pivot;
-	}
-
-	return;
-}
-
-
-/// Get the next node in the tree. Return NULL if there are no more nodes.
-static void *
-index_tree_next(const index_tree_node *node)
-{
-	if (node->right != NULL) {
-		node = node->right;
-		while (node->left != NULL)
-			node = node->left;
-
-		return (void *)(node);
-	}
-
-	while (node->parent != NULL && node->parent->right == node)
-		node = node->parent;
-
-	return (void *)(node->parent);
-}
-
-
-/// Locate a node that contains the given uncompressed offset. It is
-/// caller's job to check that target is not bigger than the uncompressed
-/// size of the tree (the last node would be returned in that case still).
-static void *
-index_tree_locate(const index_tree *tree, lzma_vli target)
-{
-	const index_tree_node *result = NULL;
-	const index_tree_node *node = tree->root;
-
-	assert(tree->leftmost == NULL
-			|| tree->leftmost->uncompressed_base == 0);
-
-	// Consecutive nodes may have the same uncompressed_base.
-	// We must pick the rightmost one.
-	while (node != NULL) {
-		if (node->uncompressed_base > target) {
-			node = node->left;
-		} else {
-			result = node;
-			node = node->right;
-		}
-	}
-
-	return (void *)(result);
-}
-
-
-/// Allocate and initialize a new Stream using the given base offsets.
-static index_stream *
-index_stream_init(lzma_vli compressed_base, lzma_vli uncompressed_base,
-		lzma_vli stream_number, lzma_vli block_number_base,
-		lzma_allocator *allocator)
-{
-	index_stream *s = lzma_alloc(sizeof(index_stream), allocator);
-	if (s == NULL)
-		return NULL;
-
-	s->node.uncompressed_base = uncompressed_base;
-	s->node.compressed_base = compressed_base;
-	s->node.parent = NULL;
-	s->node.left = NULL;
-	s->node.right = NULL;
-
-	s->number = stream_number;
-	s->block_number_base = block_number_base;
-
-	index_tree_init(&s->groups);
-
-	s->record_count = 0;
-	s->index_list_size = 0;
-	s->stream_flags.version = UINT32_MAX;
-	s->stream_padding = 0;
-
-	return s;
-}
-
-
-/// Free the memory allocated for a Stream and its Record groups.
-static void
-index_stream_end(void *node, lzma_allocator *allocator)
-{
-	index_stream *s = node;
-	index_tree_end(&s->groups, allocator, NULL);
-	return;
-}
-
-
-static lzma_index *
-index_init_plain(lzma_allocator *allocator)
-{
-	lzma_index *i = lzma_alloc(sizeof(lzma_index), allocator);
-	if (i != NULL) {
-		index_tree_init(&i->streams);
-		i->uncompressed_size = 0;
-		i->total_size = 0;
-		i->record_count = 0;
-		i->index_list_size = 0;
-		i->prealloc = INDEX_GROUP_SIZE;
-		i->checks = 0;
-	}
-
-	return i;
-}
-
-
-extern LZMA_API(lzma_index *)
-lzma_index_init(lzma_allocator *allocator)
-{
-	lzma_index *i = index_init_plain(allocator);
-	if (i == NULL)
-		return NULL;
-
-	index_stream *s = index_stream_init(0, 0, 1, 0, allocator);
-	if (s == NULL) {
-		lzma_free(i, allocator);
-		return NULL;
-	}
-
-	index_tree_append(&i->streams, &s->node);
-
-	return i;
-}
-
-
-extern LZMA_API(void)
-lzma_index_end(lzma_index *i, lzma_allocator *allocator)
-{
-	// NOTE: If you modify this function, check also the bottom
-	// of lzma_index_cat().
-	if (i != NULL) {
-		index_tree_end(&i->streams, allocator, &index_stream_end);
-		lzma_free(i, allocator);
-	}
-
-	return;
-}
-
-
-extern void
-lzma_index_prealloc(lzma_index *i, lzma_vli records)
-{
-	if (records > PREALLOC_MAX)
-		records = PREALLOC_MAX;
-
-	i->prealloc = (size_t)(records);
-	return;
-}
-
-
-extern LZMA_API(uint64_t)
-lzma_index_memusage(lzma_vli streams, lzma_vli blocks)
-{
-	// This calculates an upper bound that is only a little bit
-	// bigger than the exact maximum memory usage with the given
-	// parameters.
-
-	// Typical malloc() overhead is 2 * sizeof(void *) but we take
-	// a little bit extra just in case. Using LZMA_MEMUSAGE_BASE
-	// instead would give too inaccurate estimate.
-	const size_t alloc_overhead = 4 * sizeof(void *);
-
-	// Amount of memory needed for each Stream base structures.
-	// We assume that every Stream has at least one Block and
-	// thus at least one group.
-	const size_t stream_base = sizeof(index_stream)
-			+ sizeof(index_group) + 2 * alloc_overhead;
-
-	// Amount of memory needed per group.
-	const size_t group_base = sizeof(index_group)
-			+ INDEX_GROUP_SIZE * sizeof(index_record)
-			+ alloc_overhead;
-
-	// Number of groups. There may actually be more, but that overhead
-	// has been taken into account in stream_base already.
-	const lzma_vli groups
-			= (blocks + INDEX_GROUP_SIZE - 1) / INDEX_GROUP_SIZE;
-
-	// Memory used by index_stream and index_group structures.
-	const uint64_t streams_mem = streams * stream_base;
-	const uint64_t groups_mem = groups * group_base;
-
-	// Memory used by the base structure.
-	const uint64_t index_base = sizeof(lzma_index) + alloc_overhead;
-
-	// Validate the arguments and catch integer overflows.
-	// Maximum number of Streams is "only" UINT32_MAX, because
-	// that limit is used by the tree containing the Streams.
-	const uint64_t limit = UINT64_MAX - index_base;
-	if (streams == 0 || streams > UINT32_MAX || blocks > LZMA_VLI_MAX
-			|| streams > limit / stream_base
-			|| groups > limit / group_base
-			|| limit - streams_mem < groups_mem)
-		return UINT64_MAX;
-
-	return index_base + streams_mem + groups_mem;
-}
-
-
-extern LZMA_API(uint64_t)
-lzma_index_memused(const lzma_index *i)
-{
-	return lzma_index_memusage(i->streams.count, i->record_count);
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_block_count(const lzma_index *i)
-{
-	return i->record_count;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_stream_count(const lzma_index *i)
-{
-	return i->streams.count;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_size(const lzma_index *i)
-{
-	return index_size(i->record_count, i->index_list_size);
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_total_size(const lzma_index *i)
-{
-	return i->total_size;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_stream_size(const lzma_index *i)
-{
-	// Stream Header + Blocks + Index + Stream Footer
-	return LZMA_STREAM_HEADER_SIZE + i->total_size
-			+ index_size(i->record_count, i->index_list_size)
-			+ LZMA_STREAM_HEADER_SIZE;
-}
-
-
-static lzma_vli
-index_file_size(lzma_vli compressed_base, lzma_vli unpadded_sum,
-		lzma_vli record_count, lzma_vli index_list_size,
-		lzma_vli stream_padding)
-{
-	// Earlier Streams and Stream Paddings + Stream Header
-	// + Blocks + Index + Stream Footer + Stream Padding
-	//
-	// This might go over LZMA_VLI_MAX due to too big unpadded_sum
-	// when this function is used in lzma_index_append().
-	lzma_vli file_size = compressed_base + 2 * LZMA_STREAM_HEADER_SIZE
-			+ stream_padding + vli_ceil4(unpadded_sum);
-	if (file_size > LZMA_VLI_MAX)
-		return LZMA_VLI_UNKNOWN;
-
-	// The same applies here.
-	file_size += index_size(record_count, index_list_size);
-	if (file_size > LZMA_VLI_MAX)
-		return LZMA_VLI_UNKNOWN;
-
-	return file_size;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_file_size(const lzma_index *i)
-{
-	const index_stream *s = (const index_stream *)(i->streams.rightmost);
-	const index_group *g = (const index_group *)(s->groups.rightmost);
-	return index_file_size(s->node.compressed_base,
-			g == NULL ? 0 : g->records[g->last].unpadded_sum,
-			s->record_count, s->index_list_size,
-			s->stream_padding);
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_uncompressed_size(const lzma_index *i)
-{
-	return i->uncompressed_size;
-}
-
-
-extern LZMA_API(uint32_t)
-lzma_index_checks(const lzma_index *i)
-{
-	uint32_t checks = i->checks;
-
-	// Get the type of the Check of the last Stream too.
-	const index_stream *s = (const index_stream *)(i->streams.rightmost);
-	if (s->stream_flags.version != UINT32_MAX)
-		checks |= UINT32_C(1) << s->stream_flags.check;
-
-	return checks;
-}
-
-
-extern uint32_t
-lzma_index_padding_size(const lzma_index *i)
-{
-	return (LZMA_VLI_C(4) - index_size_unpadded(
-			i->record_count, i->index_list_size)) & 3;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_stream_flags(lzma_index *i, const lzma_stream_flags *stream_flags)
-{
-	if (i == NULL || stream_flags == NULL)
-		return LZMA_PROG_ERROR;
-
-	// Validate the Stream Flags.
-	return_if_error(lzma_stream_flags_compare(
-			stream_flags, stream_flags));
-
-	index_stream *s = (index_stream *)(i->streams.rightmost);
-	s->stream_flags = *stream_flags;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_stream_padding(lzma_index *i, lzma_vli stream_padding)
-{
-	if (i == NULL || stream_padding > LZMA_VLI_MAX
-			|| (stream_padding & 3) != 0)
-		return LZMA_PROG_ERROR;
-
-	index_stream *s = (index_stream *)(i->streams.rightmost);
-
-	// Check that the new value won't make the file grow too big.
-	const lzma_vli old_stream_padding = s->stream_padding;
-	s->stream_padding = 0;
-	if (lzma_index_file_size(i) + stream_padding > LZMA_VLI_MAX) {
-		s->stream_padding = old_stream_padding;
-		return LZMA_DATA_ERROR;
-	}
-
-	s->stream_padding = stream_padding;
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_append(lzma_index *i, lzma_allocator *allocator,
-		lzma_vli unpadded_size, lzma_vli uncompressed_size)
-{
-	// Validate.
-	if (i == NULL || unpadded_size < UNPADDED_SIZE_MIN
-			|| unpadded_size > UNPADDED_SIZE_MAX
-			|| uncompressed_size > LZMA_VLI_MAX)
-		return LZMA_PROG_ERROR;
-
-	index_stream *s = (index_stream *)(i->streams.rightmost);
-	index_group *g = (index_group *)(s->groups.rightmost);
-
-	const lzma_vli compressed_base = g == NULL ? 0
-			: vli_ceil4(g->records[g->last].unpadded_sum);
-	const lzma_vli uncompressed_base = g == NULL ? 0
-			: g->records[g->last].uncompressed_sum;
-	const uint32_t index_list_size_add = lzma_vli_size(unpadded_size)
-			+ lzma_vli_size(uncompressed_size);
-
-	// Check that the file size will stay within limits.
-	if (index_file_size(s->node.compressed_base,
-			compressed_base + unpadded_size, s->record_count + 1,
-			s->index_list_size + index_list_size_add,
-			s->stream_padding) == LZMA_VLI_UNKNOWN)
-		return LZMA_DATA_ERROR;
-
-	// The size of the Index field must not exceed the maximum value
-	// that can be stored in the Backward Size field.
-	if (index_size(i->record_count + 1,
-			i->index_list_size + index_list_size_add)
-			> LZMA_BACKWARD_SIZE_MAX)
-		return LZMA_DATA_ERROR;
-
-	if (g != NULL && g->last + 1 < g->allocated) {
-		// There is space in the last group at least for one Record.
-		++g->last;
-	} else {
-		// We need to allocate a new group.
-		g = lzma_alloc(sizeof(index_group)
-				+ i->prealloc * sizeof(index_record),
-				allocator);
-		if (g == NULL)
-			return LZMA_MEM_ERROR;
-
-		g->last = 0;
-		g->allocated = i->prealloc;
-
-		// Reset prealloc so that if the application happens to
-		// add new Records, the allocation size will be sane.
-		i->prealloc = INDEX_GROUP_SIZE;
-
-		// Set the start offsets of this group.
-		g->node.uncompressed_base = uncompressed_base;
-		g->node.compressed_base = compressed_base;
-		g->number_base = s->record_count + 1;
-
-		// Add the new group to the Stream.
-		index_tree_append(&s->groups, &g->node);
-	}
-
-	// Add the new Record to the group.
-	g->records[g->last].uncompressed_sum
-			= uncompressed_base + uncompressed_size;
-	g->records[g->last].unpadded_sum
-			= compressed_base + unpadded_size;
-
-	// Update the totals.
-	++s->record_count;
-	s->index_list_size += index_list_size_add;
-
-	i->total_size += vli_ceil4(unpadded_size);
-	i->uncompressed_size += uncompressed_size;
-	++i->record_count;
-	i->index_list_size += index_list_size_add;
-
-	return LZMA_OK;
-}
-
-
-/// Structure to pass info to index_cat_helper()
-typedef struct {
-	/// Uncompressed size of the destination
-	lzma_vli uncompressed_size;
-
-	/// Compressed file size of the destination
-	lzma_vli file_size;
-
-	/// Same as above but for Block numbers
-	lzma_vli block_number_add;
-
-	/// Number of Streams that were in the destination index before we
-	/// started appending new Streams from the source index. This is
-	/// used to fix the Stream numbering.
-	uint32_t stream_number_add;
-
-	/// Destination index' Stream tree
-	index_tree *streams;
-
-} index_cat_info;
-
-
-/// Add the Stream nodes from the source index to dest using recursion.
-/// Simplest iterative traversal of the source tree wouldn't work, because
-/// we update the pointers in nodes when moving them to the destination tree.
-static void
-index_cat_helper(const index_cat_info *info, index_stream *this)
-{
-	index_stream *left = (index_stream *)(this->node.left);
-	index_stream *right = (index_stream *)(this->node.right);
-
-	if (left != NULL)
-		index_cat_helper(info, left);
-
-	this->node.uncompressed_base += info->uncompressed_size;
-	this->node.compressed_base += info->file_size;
-	this->number += info->stream_number_add;
-	this->block_number_base += info->block_number_add;
-	index_tree_append(info->streams, &this->node);
-
-	if (right != NULL)
-		index_cat_helper(info, right);
-
-	return;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_cat(lzma_index *restrict dest, lzma_index *restrict src,
-		lzma_allocator *allocator)
-{
-	const lzma_vli dest_file_size = lzma_index_file_size(dest);
-
-	// Check that we don't exceed the file size limits.
-	if (dest_file_size + lzma_index_file_size(src) > LZMA_VLI_MAX
-			|| dest->uncompressed_size + src->uncompressed_size
-				> LZMA_VLI_MAX)
-		return LZMA_DATA_ERROR;
-
-	// Check that the encoded size of the combined lzma_indexes stays
-	// within limits. In theory, this should be done only if we know
-	// that the user plans to actually combine the Streams and thus
-	// construct a single Index (probably rare). However, exceeding
-	// this limit is quite theoretical, so we do this check always
-	// to simplify things elsewhere.
-	{
-		const lzma_vli dest_size = index_size_unpadded(
-				dest->record_count, dest->index_list_size);
-		const lzma_vli src_size = index_size_unpadded(
-				src->record_count, src->index_list_size);
-		if (vli_ceil4(dest_size + src_size) > LZMA_BACKWARD_SIZE_MAX)
-			return LZMA_DATA_ERROR;
-	}
-
-	// Optimize the last group to minimize memory usage. Allocation has
-	// to be done before modifying dest or src.
-	{
-		index_stream *s = (index_stream *)(dest->streams.rightmost);
-		index_group *g = (index_group *)(s->groups.rightmost);
-		if (g != NULL && g->last + 1 < g->allocated) {
-			assert(g->node.left == NULL);
-			assert(g->node.right == NULL);
-
-			index_group *newg = lzma_alloc(sizeof(index_group)
-					+ (g->last + 1)
-					* sizeof(index_record),
-					allocator);
-			if (newg == NULL)
-				return LZMA_MEM_ERROR;
-
-			newg->node = g->node;
-			newg->allocated = g->last + 1;
-			newg->last = g->last;
-			newg->number_base = g->number_base;
-
-			memcpy(newg->records, g->records, newg->allocated
-					* sizeof(index_record));
-
-			if (g->node.parent != NULL) {
-				assert(g->node.parent->right == &g->node);
-				g->node.parent->right = &newg->node;
-			}
-
-			if (s->groups.leftmost == &g->node) {
-				assert(s->groups.root == &g->node);
-				s->groups.leftmost = &newg->node;
-				s->groups.root = &newg->node;
-			}
-
-			if (s->groups.rightmost == &g->node)
-				s->groups.rightmost = &newg->node;
-
-			lzma_free(g, allocator);
-		}
-	}
-
-	// Add all the Streams from src to dest. Update the base offsets
-	// of each Stream from src.
-	const index_cat_info info = {
-		.uncompressed_size = dest->uncompressed_size,
-		.file_size = dest_file_size,
-		.stream_number_add = dest->streams.count,
-		.block_number_add = dest->record_count,
-		.streams = &dest->streams,
-	};
-	index_cat_helper(&info, (index_stream *)(src->streams.root));
-
-	// Update info about all the combined Streams.
-	dest->uncompressed_size += src->uncompressed_size;
-	dest->total_size += src->total_size;
-	dest->record_count += src->record_count;
-	dest->index_list_size += src->index_list_size;
-	dest->checks = lzma_index_checks(dest) | src->checks;
-
-	// There's nothing else left in src than the base structure.
-	lzma_free(src, allocator);
-
-	return LZMA_OK;
-}
-
-
-/// Duplicate an index_stream.
-static index_stream *
-index_dup_stream(const index_stream *src, lzma_allocator *allocator)
-{
-	// Catch a somewhat theoretical integer overflow.
-	if (src->record_count > PREALLOC_MAX)
-		return NULL;
-
-	// Allocate and initialize a new Stream.
-	index_stream *dest = index_stream_init(src->node.compressed_base,
-			src->node.uncompressed_base, src->number,
-			src->block_number_base, allocator);
-
-	// Return immediately if allocation failed or if there are
-	// no groups to duplicate.
-	if (dest == NULL || src->groups.leftmost == NULL)
-		return dest;
-
-	// Copy the overall information.
-	dest->record_count = src->record_count;
-	dest->index_list_size = src->index_list_size;
-	dest->stream_flags = src->stream_flags;
-	dest->stream_padding = src->stream_padding;
-
-	// Allocate memory for the Records. We put all the Records into
-	// a single group. It's simplest and also tends to make
-	// lzma_index_locate() a little bit faster with very big Indexes.
-	index_group *destg = lzma_alloc(sizeof(index_group)
-			+ src->record_count * sizeof(index_record),
-			allocator);
-	if (destg == NULL) {
-		index_stream_end(dest, allocator);
-		return NULL;
-	}
-
-	// Initialize destg.
-	destg->node.uncompressed_base = 0;
-	destg->node.compressed_base = 0;
-	destg->number_base = 1;
-	destg->allocated = src->record_count;
-	destg->last = src->record_count - 1;
-
-	// Go through all the groups in src and copy the Records into destg.
-	const index_group *srcg = (const index_group *)(src->groups.leftmost);
-	size_t i = 0;
-	do {
-		memcpy(destg->records + i, srcg->records,
-				(srcg->last + 1) * sizeof(index_record));
-		i += srcg->last + 1;
-		srcg = index_tree_next(&srcg->node);
-	} while (srcg != NULL);
-
-	assert(i == destg->allocated);
-
-	// Add the group to the new Stream.
-	index_tree_append(&dest->groups, &destg->node);
-
-	return dest;
-}
-
-
-extern LZMA_API(lzma_index *)
-lzma_index_dup(const lzma_index *src, lzma_allocator *allocator)
-{
-	// Allocate the base structure (no initial Stream).
-	lzma_index *dest = index_init_plain(allocator);
-	if (dest == NULL)
-		return NULL;
-
-	// Copy the totals.
-	dest->uncompressed_size = src->uncompressed_size;
-	dest->total_size = src->total_size;
-	dest->record_count = src->record_count;
-	dest->index_list_size = src->index_list_size;
-
-	// Copy the Streams and the groups in them.
-	const index_stream *srcstream
-			= (const index_stream *)(src->streams.leftmost);
-	do {
-		index_stream *deststream = index_dup_stream(
-				srcstream, allocator);
-		if (deststream == NULL) {
-			lzma_index_end(dest, allocator);
-			return NULL;
-		}
-
-		index_tree_append(&dest->streams, &deststream->node);
-
-		srcstream = index_tree_next(&srcstream->node);
-	} while (srcstream != NULL);
-
-	return dest;
-}
-
-
-/// Indexing for lzma_index_iter.internal[]
-enum {
-	ITER_INDEX,
-	ITER_STREAM,
-	ITER_GROUP,
-	ITER_RECORD,
-	ITER_METHOD,
-};
-
-
-/// Values for lzma_index_iter.internal[ITER_METHOD].s
-enum {
-	ITER_METHOD_NORMAL,
-	ITER_METHOD_NEXT,
-	ITER_METHOD_LEFTMOST,
-};
-
-
-static void
-iter_set_info(lzma_index_iter *iter)
-{
-	const lzma_index *i = iter->internal[ITER_INDEX].p;
-	const index_stream *stream = iter->internal[ITER_STREAM].p;
-	const index_group *group = iter->internal[ITER_GROUP].p;
-	const size_t record = iter->internal[ITER_RECORD].s;
-
-	// lzma_index_iter.internal must not contain a pointer to the last
-	// group in the index, because that may be reallocated by
-	// lzma_index_cat().
-	if (group == NULL) {
-		// There are no groups.
-		assert(stream->groups.root == NULL);
-		iter->internal[ITER_METHOD].s = ITER_METHOD_LEFTMOST;
-
-	} else if (i->streams.rightmost != &stream->node
-			|| stream->groups.rightmost != &group->node) {
-		// The group is not not the last group in the index.
-		iter->internal[ITER_METHOD].s = ITER_METHOD_NORMAL;
-
-	} else if (stream->groups.leftmost != &group->node) {
-		// The group isn't the only group in the Stream, thus we
-		// know that it must have a parent group i.e. it's not
-		// the root node.
-		assert(stream->groups.root != &group->node);
-		assert(group->node.parent->right == &group->node);
-		iter->internal[ITER_METHOD].s = ITER_METHOD_NEXT;
-		iter->internal[ITER_GROUP].p = group->node.parent;
-
-	} else {
-		// The Stream has only one group.
-		assert(stream->groups.root == &group->node);
-		assert(group->node.parent == NULL);
-		iter->internal[ITER_METHOD].s = ITER_METHOD_LEFTMOST;
-		iter->internal[ITER_GROUP].p = NULL;
-	}
-
-	iter->stream.number = stream->number;
-	iter->stream.block_count = stream->record_count;
-	iter->stream.compressed_offset = stream->node.compressed_base;
-	iter->stream.uncompressed_offset = stream->node.uncompressed_base;
-
-	// iter->stream.flags will be NULL if the Stream Flags haven't been
-	// set with lzma_index_stream_flags().
-	iter->stream.flags = stream->stream_flags.version == UINT32_MAX
-			? NULL : &stream->stream_flags;
-	iter->stream.padding = stream->stream_padding;
-
-	if (stream->groups.rightmost == NULL) {
-		// Stream has no Blocks.
-		iter->stream.compressed_size = index_size(0, 0)
-				+ 2 * LZMA_STREAM_HEADER_SIZE;
-		iter->stream.uncompressed_size = 0;
-	} else {
-		const index_group *g = (const index_group *)(
-				stream->groups.rightmost);
-
-		// Stream Header + Stream Footer + Index + Blocks
-		iter->stream.compressed_size = 2 * LZMA_STREAM_HEADER_SIZE
-				+ index_size(stream->record_count,
-					stream->index_list_size)
-				+ vli_ceil4(g->records[g->last].unpadded_sum);
-		iter->stream.uncompressed_size
-				= g->records[g->last].uncompressed_sum;
-	}
-
-	if (group != NULL) {
-		iter->block.number_in_stream = group->number_base + record;
-		iter->block.number_in_file = iter->block.number_in_stream
-				+ stream->block_number_base;
-
-		iter->block.compressed_stream_offset
-				= record == 0 ? group->node.compressed_base
-				: vli_ceil4(group->records[
-					record - 1].unpadded_sum);
-		iter->block.uncompressed_stream_offset
-				= record == 0 ? group->node.uncompressed_base
-				: group->records[record - 1].uncompressed_sum;
-
-		iter->block.uncompressed_size
-				= group->records[record].uncompressed_sum
-				- iter->block.uncompressed_stream_offset;
-		iter->block.unpadded_size
-				= group->records[record].unpadded_sum
-				- iter->block.compressed_stream_offset;
-		iter->block.total_size = vli_ceil4(iter->block.unpadded_size);
-
-		iter->block.compressed_stream_offset
-				+= LZMA_STREAM_HEADER_SIZE;
-
-		iter->block.compressed_file_offset
-				= iter->block.compressed_stream_offset
-				+ iter->stream.compressed_offset;
-		iter->block.uncompressed_file_offset
-				= iter->block.uncompressed_stream_offset
-				+ iter->stream.uncompressed_offset;
-	}
-
-	return;
-}
-
-
-extern LZMA_API(void)
-lzma_index_iter_init(lzma_index_iter *iter, const lzma_index *i)
-{
-	iter->internal[ITER_INDEX].p = i;
-	lzma_index_iter_rewind(iter);
-	return;
-}
-
-
-extern LZMA_API(void)
-lzma_index_iter_rewind(lzma_index_iter *iter)
-{
-	iter->internal[ITER_STREAM].p = NULL;
-	iter->internal[ITER_GROUP].p = NULL;
-	iter->internal[ITER_RECORD].s = 0;
-	iter->internal[ITER_METHOD].s = ITER_METHOD_NORMAL;
-	return;
-}
-
-
-extern LZMA_API(lzma_bool)
-lzma_index_iter_next(lzma_index_iter *iter, lzma_index_iter_mode mode)
-{
-	// Catch unsupported mode values.
-	if ((unsigned int)(mode) > LZMA_INDEX_ITER_NONEMPTY_BLOCK)
-		return true;
-
-	const lzma_index *i = iter->internal[ITER_INDEX].p;
-	const index_stream *stream = iter->internal[ITER_STREAM].p;
-	const index_group *group = NULL;
-	size_t record = iter->internal[ITER_RECORD].s;
-
-	// If we are being asked for the next Stream, leave group to NULL
-	// so that the rest of the this function thinks that this Stream
-	// has no groups and will thus go to the next Stream.
-	if (mode != LZMA_INDEX_ITER_STREAM) {
-		// Get the pointer to the current group. See iter_set_inf()
-		// for explanation.
-		switch (iter->internal[ITER_METHOD].s) {
-		case ITER_METHOD_NORMAL:
-			group = iter->internal[ITER_GROUP].p;
-			break;
-
-		case ITER_METHOD_NEXT:
-			group = index_tree_next(iter->internal[ITER_GROUP].p);
-			break;
-
-		case ITER_METHOD_LEFTMOST:
-			group = (const index_group *)(
-					stream->groups.leftmost);
-			break;
-		}
-	}
-
-again:
-	if (stream == NULL) {
-		// We at the beginning of the lzma_index.
-		// Locate the first Stream.
-		stream = (const index_stream *)(i->streams.leftmost);
-		if (mode >= LZMA_INDEX_ITER_BLOCK) {
-			// Since we are being asked to return information
-			// about the first a Block, skip Streams that have
-			// no Blocks.
-			while (stream->groups.leftmost == NULL) {
-				stream = index_tree_next(&stream->node);
-				if (stream == NULL)
-					return true;
-			}
-		}
-
-		// Start from the first Record in the Stream.
-		group = (const index_group *)(stream->groups.leftmost);
-		record = 0;
-
-	} else if (group != NULL && record < group->last) {
-		// The next Record is in the same group.
-		++record;
-
-	} else {
-		// This group has no more Records or this Stream has
-		// no Blocks at all.
-		record = 0;
-
-		// If group is not NULL, this Stream has at least one Block
-		// and thus at least one group. Find the next group.
-		if (group != NULL)
-			group = index_tree_next(&group->node);
-
-		if (group == NULL) {
-			// This Stream has no more Records. Find the next
-			// Stream. If we are being asked to return information
-			// about a Block, we skip empty Streams.
-			do {
-				stream = index_tree_next(&stream->node);
-				if (stream == NULL)
-					return true;
-			} while (mode >= LZMA_INDEX_ITER_BLOCK
-					&& stream->groups.leftmost == NULL);
-
-			group = (const index_group *)(
-					stream->groups.leftmost);
-		}
-	}
-
-	if (mode == LZMA_INDEX_ITER_NONEMPTY_BLOCK) {
-		// We need to look for the next Block again if this Block
-		// is empty.
-		if (record == 0) {
-			if (group->node.uncompressed_base
-					== group->records[0].uncompressed_sum)
-				goto again;
-		} else if (group->records[record - 1].uncompressed_sum
-				== group->records[record].uncompressed_sum) {
-			goto again;
-		}
-	}
-
-	iter->internal[ITER_STREAM].p = stream;
-	iter->internal[ITER_GROUP].p = group;
-	iter->internal[ITER_RECORD].s = record;
-
-	iter_set_info(iter);
-
-	return false;
-}
-
-
-extern LZMA_API(lzma_bool)
-lzma_index_iter_locate(lzma_index_iter *iter, lzma_vli target)
-{
-	const lzma_index *i = iter->internal[ITER_INDEX].p;
-
-	// If the target is past the end of the file, return immediately.
-	if (i->uncompressed_size <= target)
-		return true;
-
-	// Locate the Stream containing the target offset.
-	const index_stream *stream = index_tree_locate(&i->streams, target);
-	assert(stream != NULL);
-	target -= stream->node.uncompressed_base;
-
-	// Locate the group containing the target offset.
-	const index_group *group = index_tree_locate(&stream->groups, target);
-	assert(group != NULL);
-
-	// Use binary search to locate the exact Record. It is the first
-	// Record whose uncompressed_sum is greater than target.
-	// This is because we want the rightmost Record that fullfills the
-	// search criterion. It is possible that there are empty Blocks;
-	// we don't want to return them.
-	size_t left = 0;
-	size_t right = group->last;
-
-	while (left < right) {
-		const size_t pos = left + (right - left) / 2;
-		if (group->records[pos].uncompressed_sum <= target)
-			left = pos + 1;
-		else
-			right = pos;
-	}
-
-	iter->internal[ITER_STREAM].p = stream;
-	iter->internal[ITER_GROUP].p = group;
-	iter->internal[ITER_RECORD].s = left;
-
-	iter_set_info(iter);
-
-	return false;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/index.c (from rev 11013, vendor/xz/dist/src/liblzma/common/index.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/index.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/index.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,1250 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       index.c
+/// \brief      Handling of .xz Indexes and some other Stream information
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "index.h"
+#include "stream_flags_common.h"
+
+
+/// \brief      How many Records to allocate at once
+///
+/// This should be big enough to avoid making lots of tiny allocations
+/// but small enough to avoid too much unused memory at once.
+#define INDEX_GROUP_SIZE 512
+
+
+/// \brief      How many Records can be allocated at once at maximum
+#define PREALLOC_MAX ((SIZE_MAX - sizeof(index_group)) / sizeof(index_record))
+
+
+/// \brief      Base structure for index_stream and index_group structures
+typedef struct index_tree_node_s index_tree_node;
+struct index_tree_node_s {
+	/// Uncompressed start offset of this Stream (relative to the
+	/// beginning of the file) or Block (relative to the beginning
+	/// of the Stream)
+	lzma_vli uncompressed_base;
+
+	/// Compressed start offset of this Stream or Block
+	lzma_vli compressed_base;
+
+	index_tree_node *parent;
+	index_tree_node *left;
+	index_tree_node *right;
+};
+
+
+/// \brief      AVL tree to hold index_stream or index_group structures
+typedef struct {
+	/// Root node
+	index_tree_node *root;
+
+	/// Leftmost node. Since the tree will be filled sequentially,
+	/// this won't change after the first node has been added to
+	/// the tree.
+	index_tree_node *leftmost;
+
+	/// The rightmost node in the tree. Since the tree is filled
+	/// sequentially, this is always the node where to add the new data.
+	index_tree_node *rightmost;
+
+	/// Number of nodes in the tree
+	uint32_t count;
+
+} index_tree;
+
+
+typedef struct {
+	lzma_vli uncompressed_sum;
+	lzma_vli unpadded_sum;
+} index_record;
+
+
+typedef struct {
+	/// Every Record group is part of index_stream.groups tree.
+	index_tree_node node;
+
+	/// Number of Blocks in this Stream before this group.
+	lzma_vli number_base;
+
+	/// Number of Records that can be put in records[].
+	size_t allocated;
+
+	/// Index of the last Record in use.
+	size_t last;
+
+	/// The sizes in this array are stored as cumulative sums relative
+	/// to the beginning of the Stream. This makes it possible to
+	/// use binary search in lzma_index_locate().
+	///
+	/// Note that the cumulative summing is done specially for
+	/// unpadded_sum: The previous value is rounded up to the next
+	/// multiple of four before adding the Unpadded Size of the new
+	/// Block. The total encoded size of the Blocks in the Stream
+	/// is records[last].unpadded_sum in the last Record group of
+	/// the Stream.
+	///
+	/// For example, if the Unpadded Sizes are 39, 57, and 81, the
+	/// stored values are 39, 97 (40 + 57), and 181 (100 + 181).
+	/// The total encoded size of these Blocks is 184.
+	///
+	/// This is a flexible array, because it makes easy to optimize
+	/// memory usage in case someone concatenates many Streams that
+	/// have only one or few Blocks.
+	index_record records[];
+
+} index_group;
+
+
+typedef struct {
+	/// Every index_stream is a node in the tree of Sreams.
+	index_tree_node node;
+
+	/// Number of this Stream (first one is 1)
+	uint32_t number;
+
+	/// Total number of Blocks before this Stream
+	lzma_vli block_number_base;
+
+	/// Record groups of this Stream are stored in a tree.
+	/// It's a T-tree with AVL-tree balancing. There are
+	/// INDEX_GROUP_SIZE Records per node by default.
+	/// This keeps the number of memory allocations reasonable
+	/// and finding a Record is fast.
+	index_tree groups;
+
+	/// Number of Records in this Stream
+	lzma_vli record_count;
+
+	/// Size of the List of Records field in this Stream. This is used
+	/// together with record_count to calculate the size of the Index
+	/// field and thus the total size of the Stream.
+	lzma_vli index_list_size;
+
+	/// Stream Flags of this Stream. This is meaningful only if
+	/// the Stream Flags have been told us with lzma_index_stream_flags().
+	/// Initially stream_flags.version is set to UINT32_MAX to indicate
+	/// that the Stream Flags are unknown.
+	lzma_stream_flags stream_flags;
+
+	/// Amount of Stream Padding after this Stream. This defaults to
+	/// zero and can be set with lzma_index_stream_padding().
+	lzma_vli stream_padding;
+
+} index_stream;
+
+
+struct lzma_index_s {
+	/// AVL-tree containing the Stream(s). Often there is just one
+	/// Stream, but using a tree keeps lookups fast even when there
+	/// are many concatenated Streams.
+	index_tree streams;
+
+	/// Uncompressed size of all the Blocks in the Stream(s)
+	lzma_vli uncompressed_size;
+
+	/// Total size of all the Blocks in the Stream(s)
+	lzma_vli total_size;
+
+	/// Total number of Records in all Streams in this lzma_index
+	lzma_vli record_count;
+
+	/// Size of the List of Records field if all the Streams in this
+	/// lzma_index were packed into a single Stream (makes it simpler to
+	/// take many .xz files and combine them into a single Stream).
+	///
+	/// This value together with record_count is needed to calculate
+	/// Backward Size that is stored into Stream Footer.
+	lzma_vli index_list_size;
+
+	/// How many Records to allocate at once in lzma_index_append().
+	/// This defaults to INDEX_GROUP_SIZE but can be overriden with
+	/// lzma_index_prealloc().
+	size_t prealloc;
+
+	/// Bitmask indicating what integrity check types have been used
+	/// as set by lzma_index_stream_flags(). The bit of the last Stream
+	/// is not included here, since it is possible to change it by
+	/// calling lzma_index_stream_flags() again.
+	uint32_t checks;
+};
+
+
+static void
+index_tree_init(index_tree *tree)
+{
+	tree->root = NULL;
+	tree->leftmost = NULL;
+	tree->rightmost = NULL;
+	tree->count = 0;
+	return;
+}
+
+
+/// Helper for index_tree_end()
+static void
+index_tree_node_end(index_tree_node *node, const lzma_allocator *allocator,
+		void (*free_func)(void *node, const lzma_allocator *allocator))
+{
+	// The tree won't ever be very huge, so recursion should be fine.
+	// 20 levels in the tree is likely quite a lot already in practice.
+	if (node->left != NULL)
+		index_tree_node_end(node->left, allocator, free_func);
+
+	if (node->right != NULL)
+		index_tree_node_end(node->right, allocator, free_func);
+
+	free_func(node, allocator);
+	return;
+}
+
+
+/// Free the memory allocated for a tree. Each node is freed using the
+/// given free_func which is either &lzma_free or &index_stream_end.
+/// The latter is used to free the Record groups from each index_stream
+/// before freeing the index_stream itself.
+static void
+index_tree_end(index_tree *tree, const lzma_allocator *allocator,
+		void (*free_func)(void *node, const lzma_allocator *allocator))
+{
+	assert(free_func != NULL);
+
+	if (tree->root != NULL)
+		index_tree_node_end(tree->root, allocator, free_func);
+
+	return;
+}
+
+
+/// Add a new node to the tree. node->uncompressed_base and
+/// node->compressed_base must have been set by the caller already.
+static void
+index_tree_append(index_tree *tree, index_tree_node *node)
+{
+	node->parent = tree->rightmost;
+	node->left = NULL;
+	node->right = NULL;
+
+	++tree->count;
+
+	// Handle the special case of adding the first node.
+	if (tree->root == NULL) {
+		tree->root = node;
+		tree->leftmost = node;
+		tree->rightmost = node;
+		return;
+	}
+
+	// The tree is always filled sequentially.
+	assert(tree->rightmost->uncompressed_base <= node->uncompressed_base);
+	assert(tree->rightmost->compressed_base < node->compressed_base);
+
+	// Add the new node after the rightmost node. It's the correct
+	// place due to the reason above.
+	tree->rightmost->right = node;
+	tree->rightmost = node;
+
+	// Balance the AVL-tree if needed. We don't need to keep the balance
+	// factors in nodes, because we always fill the tree sequentially,
+	// and thus know the state of the tree just by looking at the node
+	// count. From the node count we can calculate how many steps to go
+	// up in the tree to find the rotation root.
+	uint32_t up = tree->count ^ (UINT32_C(1) << bsr32(tree->count));
+	if (up != 0) {
+		// Locate the root node for the rotation.
+		up = ctz32(tree->count) + 2;
+		do {
+			node = node->parent;
+		} while (--up > 0);
+
+		// Rotate left using node as the rotation root.
+		index_tree_node *pivot = node->right;
+
+		if (node->parent == NULL) {
+			tree->root = pivot;
+		} else {
+			assert(node->parent->right == node);
+			node->parent->right = pivot;
+		}
+
+		pivot->parent = node->parent;
+
+		node->right = pivot->left;
+		if (node->right != NULL)
+			node->right->parent = node;
+
+		pivot->left = node;
+		node->parent = pivot;
+	}
+
+	return;
+}
+
+
+/// Get the next node in the tree. Return NULL if there are no more nodes.
+static void *
+index_tree_next(const index_tree_node *node)
+{
+	if (node->right != NULL) {
+		node = node->right;
+		while (node->left != NULL)
+			node = node->left;
+
+		return (void *)(node);
+	}
+
+	while (node->parent != NULL && node->parent->right == node)
+		node = node->parent;
+
+	return (void *)(node->parent);
+}
+
+
+/// Locate a node that contains the given uncompressed offset. It is
+/// caller's job to check that target is not bigger than the uncompressed
+/// size of the tree (the last node would be returned in that case still).
+static void *
+index_tree_locate(const index_tree *tree, lzma_vli target)
+{
+	const index_tree_node *result = NULL;
+	const index_tree_node *node = tree->root;
+
+	assert(tree->leftmost == NULL
+			|| tree->leftmost->uncompressed_base == 0);
+
+	// Consecutive nodes may have the same uncompressed_base.
+	// We must pick the rightmost one.
+	while (node != NULL) {
+		if (node->uncompressed_base > target) {
+			node = node->left;
+		} else {
+			result = node;
+			node = node->right;
+		}
+	}
+
+	return (void *)(result);
+}
+
+
+/// Allocate and initialize a new Stream using the given base offsets.
+static index_stream *
+index_stream_init(lzma_vli compressed_base, lzma_vli uncompressed_base,
+		uint32_t stream_number, lzma_vli block_number_base,
+		const lzma_allocator *allocator)
+{
+	index_stream *s = lzma_alloc(sizeof(index_stream), allocator);
+	if (s == NULL)
+		return NULL;
+
+	s->node.uncompressed_base = uncompressed_base;
+	s->node.compressed_base = compressed_base;
+	s->node.parent = NULL;
+	s->node.left = NULL;
+	s->node.right = NULL;
+
+	s->number = stream_number;
+	s->block_number_base = block_number_base;
+
+	index_tree_init(&s->groups);
+
+	s->record_count = 0;
+	s->index_list_size = 0;
+	s->stream_flags.version = UINT32_MAX;
+	s->stream_padding = 0;
+
+	return s;
+}
+
+
+/// Free the memory allocated for a Stream and its Record groups.
+static void
+index_stream_end(void *node, const lzma_allocator *allocator)
+{
+	index_stream *s = node;
+	index_tree_end(&s->groups, allocator, &lzma_free);
+	lzma_free(s, allocator);
+	return;
+}
+
+
+static lzma_index *
+index_init_plain(const lzma_allocator *allocator)
+{
+	lzma_index *i = lzma_alloc(sizeof(lzma_index), allocator);
+	if (i != NULL) {
+		index_tree_init(&i->streams);
+		i->uncompressed_size = 0;
+		i->total_size = 0;
+		i->record_count = 0;
+		i->index_list_size = 0;
+		i->prealloc = INDEX_GROUP_SIZE;
+		i->checks = 0;
+	}
+
+	return i;
+}
+
+
+extern LZMA_API(lzma_index *)
+lzma_index_init(const lzma_allocator *allocator)
+{
+	lzma_index *i = index_init_plain(allocator);
+	if (i == NULL)
+		return NULL;
+
+	index_stream *s = index_stream_init(0, 0, 1, 0, allocator);
+	if (s == NULL) {
+		lzma_free(i, allocator);
+		return NULL;
+	}
+
+	index_tree_append(&i->streams, &s->node);
+
+	return i;
+}
+
+
+extern LZMA_API(void)
+lzma_index_end(lzma_index *i, const lzma_allocator *allocator)
+{
+	// NOTE: If you modify this function, check also the bottom
+	// of lzma_index_cat().
+	if (i != NULL) {
+		index_tree_end(&i->streams, allocator, &index_stream_end);
+		lzma_free(i, allocator);
+	}
+
+	return;
+}
+
+
+extern void
+lzma_index_prealloc(lzma_index *i, lzma_vli records)
+{
+	if (records > PREALLOC_MAX)
+		records = PREALLOC_MAX;
+
+	i->prealloc = (size_t)(records);
+	return;
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_index_memusage(lzma_vli streams, lzma_vli blocks)
+{
+	// This calculates an upper bound that is only a little bit
+	// bigger than the exact maximum memory usage with the given
+	// parameters.
+
+	// Typical malloc() overhead is 2 * sizeof(void *) but we take
+	// a little bit extra just in case. Using LZMA_MEMUSAGE_BASE
+	// instead would give too inaccurate estimate.
+	const size_t alloc_overhead = 4 * sizeof(void *);
+
+	// Amount of memory needed for each Stream base structures.
+	// We assume that every Stream has at least one Block and
+	// thus at least one group.
+	const size_t stream_base = sizeof(index_stream)
+			+ sizeof(index_group) + 2 * alloc_overhead;
+
+	// Amount of memory needed per group.
+	const size_t group_base = sizeof(index_group)
+			+ INDEX_GROUP_SIZE * sizeof(index_record)
+			+ alloc_overhead;
+
+	// Number of groups. There may actually be more, but that overhead
+	// has been taken into account in stream_base already.
+	const lzma_vli groups
+			= (blocks + INDEX_GROUP_SIZE - 1) / INDEX_GROUP_SIZE;
+
+	// Memory used by index_stream and index_group structures.
+	const uint64_t streams_mem = streams * stream_base;
+	const uint64_t groups_mem = groups * group_base;
+
+	// Memory used by the base structure.
+	const uint64_t index_base = sizeof(lzma_index) + alloc_overhead;
+
+	// Validate the arguments and catch integer overflows.
+	// Maximum number of Streams is "only" UINT32_MAX, because
+	// that limit is used by the tree containing the Streams.
+	const uint64_t limit = UINT64_MAX - index_base;
+	if (streams == 0 || streams > UINT32_MAX || blocks > LZMA_VLI_MAX
+			|| streams > limit / stream_base
+			|| groups > limit / group_base
+			|| limit - streams_mem < groups_mem)
+		return UINT64_MAX;
+
+	return index_base + streams_mem + groups_mem;
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_index_memused(const lzma_index *i)
+{
+	return lzma_index_memusage(i->streams.count, i->record_count);
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_block_count(const lzma_index *i)
+{
+	return i->record_count;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_stream_count(const lzma_index *i)
+{
+	return i->streams.count;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_size(const lzma_index *i)
+{
+	return index_size(i->record_count, i->index_list_size);
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_total_size(const lzma_index *i)
+{
+	return i->total_size;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_stream_size(const lzma_index *i)
+{
+	// Stream Header + Blocks + Index + Stream Footer
+	return LZMA_STREAM_HEADER_SIZE + i->total_size
+			+ index_size(i->record_count, i->index_list_size)
+			+ LZMA_STREAM_HEADER_SIZE;
+}
+
+
+static lzma_vli
+index_file_size(lzma_vli compressed_base, lzma_vli unpadded_sum,
+		lzma_vli record_count, lzma_vli index_list_size,
+		lzma_vli stream_padding)
+{
+	// Earlier Streams and Stream Paddings + Stream Header
+	// + Blocks + Index + Stream Footer + Stream Padding
+	//
+	// This might go over LZMA_VLI_MAX due to too big unpadded_sum
+	// when this function is used in lzma_index_append().
+	lzma_vli file_size = compressed_base + 2 * LZMA_STREAM_HEADER_SIZE
+			+ stream_padding + vli_ceil4(unpadded_sum);
+	if (file_size > LZMA_VLI_MAX)
+		return LZMA_VLI_UNKNOWN;
+
+	// The same applies here.
+	file_size += index_size(record_count, index_list_size);
+	if (file_size > LZMA_VLI_MAX)
+		return LZMA_VLI_UNKNOWN;
+
+	return file_size;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_file_size(const lzma_index *i)
+{
+	const index_stream *s = (const index_stream *)(i->streams.rightmost);
+	const index_group *g = (const index_group *)(s->groups.rightmost);
+	return index_file_size(s->node.compressed_base,
+			g == NULL ? 0 : g->records[g->last].unpadded_sum,
+			s->record_count, s->index_list_size,
+			s->stream_padding);
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_uncompressed_size(const lzma_index *i)
+{
+	return i->uncompressed_size;
+}
+
+
+extern LZMA_API(uint32_t)
+lzma_index_checks(const lzma_index *i)
+{
+	uint32_t checks = i->checks;
+
+	// Get the type of the Check of the last Stream too.
+	const index_stream *s = (const index_stream *)(i->streams.rightmost);
+	if (s->stream_flags.version != UINT32_MAX)
+		checks |= UINT32_C(1) << s->stream_flags.check;
+
+	return checks;
+}
+
+
+extern uint32_t
+lzma_index_padding_size(const lzma_index *i)
+{
+	return (LZMA_VLI_C(4) - index_size_unpadded(
+			i->record_count, i->index_list_size)) & 3;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_stream_flags(lzma_index *i, const lzma_stream_flags *stream_flags)
+{
+	if (i == NULL || stream_flags == NULL)
+		return LZMA_PROG_ERROR;
+
+	// Validate the Stream Flags.
+	return_if_error(lzma_stream_flags_compare(
+			stream_flags, stream_flags));
+
+	index_stream *s = (index_stream *)(i->streams.rightmost);
+	s->stream_flags = *stream_flags;
+
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_stream_padding(lzma_index *i, lzma_vli stream_padding)
+{
+	if (i == NULL || stream_padding > LZMA_VLI_MAX
+			|| (stream_padding & 3) != 0)
+		return LZMA_PROG_ERROR;
+
+	index_stream *s = (index_stream *)(i->streams.rightmost);
+
+	// Check that the new value won't make the file grow too big.
+	const lzma_vli old_stream_padding = s->stream_padding;
+	s->stream_padding = 0;
+	if (lzma_index_file_size(i) + stream_padding > LZMA_VLI_MAX) {
+		s->stream_padding = old_stream_padding;
+		return LZMA_DATA_ERROR;
+	}
+
+	s->stream_padding = stream_padding;
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_append(lzma_index *i, const lzma_allocator *allocator,
+		lzma_vli unpadded_size, lzma_vli uncompressed_size)
+{
+	// Validate.
+	if (i == NULL || unpadded_size < UNPADDED_SIZE_MIN
+			|| unpadded_size > UNPADDED_SIZE_MAX
+			|| uncompressed_size > LZMA_VLI_MAX)
+		return LZMA_PROG_ERROR;
+
+	index_stream *s = (index_stream *)(i->streams.rightmost);
+	index_group *g = (index_group *)(s->groups.rightmost);
+
+	const lzma_vli compressed_base = g == NULL ? 0
+			: vli_ceil4(g->records[g->last].unpadded_sum);
+	const lzma_vli uncompressed_base = g == NULL ? 0
+			: g->records[g->last].uncompressed_sum;
+	const uint32_t index_list_size_add = lzma_vli_size(unpadded_size)
+			+ lzma_vli_size(uncompressed_size);
+
+	// Check that the file size will stay within limits.
+	if (index_file_size(s->node.compressed_base,
+			compressed_base + unpadded_size, s->record_count + 1,
+			s->index_list_size + index_list_size_add,
+			s->stream_padding) == LZMA_VLI_UNKNOWN)
+		return LZMA_DATA_ERROR;
+
+	// The size of the Index field must not exceed the maximum value
+	// that can be stored in the Backward Size field.
+	if (index_size(i->record_count + 1,
+			i->index_list_size + index_list_size_add)
+			> LZMA_BACKWARD_SIZE_MAX)
+		return LZMA_DATA_ERROR;
+
+	if (g != NULL && g->last + 1 < g->allocated) {
+		// There is space in the last group at least for one Record.
+		++g->last;
+	} else {
+		// We need to allocate a new group.
+		g = lzma_alloc(sizeof(index_group)
+				+ i->prealloc * sizeof(index_record),
+				allocator);
+		if (g == NULL)
+			return LZMA_MEM_ERROR;
+
+		g->last = 0;
+		g->allocated = i->prealloc;
+
+		// Reset prealloc so that if the application happens to
+		// add new Records, the allocation size will be sane.
+		i->prealloc = INDEX_GROUP_SIZE;
+
+		// Set the start offsets of this group.
+		g->node.uncompressed_base = uncompressed_base;
+		g->node.compressed_base = compressed_base;
+		g->number_base = s->record_count + 1;
+
+		// Add the new group to the Stream.
+		index_tree_append(&s->groups, &g->node);
+	}
+
+	// Add the new Record to the group.
+	g->records[g->last].uncompressed_sum
+			= uncompressed_base + uncompressed_size;
+	g->records[g->last].unpadded_sum
+			= compressed_base + unpadded_size;
+
+	// Update the totals.
+	++s->record_count;
+	s->index_list_size += index_list_size_add;
+
+	i->total_size += vli_ceil4(unpadded_size);
+	i->uncompressed_size += uncompressed_size;
+	++i->record_count;
+	i->index_list_size += index_list_size_add;
+
+	return LZMA_OK;
+}
+
+
+/// Structure to pass info to index_cat_helper()
+typedef struct {
+	/// Uncompressed size of the destination
+	lzma_vli uncompressed_size;
+
+	/// Compressed file size of the destination
+	lzma_vli file_size;
+
+	/// Same as above but for Block numbers
+	lzma_vli block_number_add;
+
+	/// Number of Streams that were in the destination index before we
+	/// started appending new Streams from the source index. This is
+	/// used to fix the Stream numbering.
+	uint32_t stream_number_add;
+
+	/// Destination index' Stream tree
+	index_tree *streams;
+
+} index_cat_info;
+
+
+/// Add the Stream nodes from the source index to dest using recursion.
+/// Simplest iterative traversal of the source tree wouldn't work, because
+/// we update the pointers in nodes when moving them to the destination tree.
+static void
+index_cat_helper(const index_cat_info *info, index_stream *this)
+{
+	index_stream *left = (index_stream *)(this->node.left);
+	index_stream *right = (index_stream *)(this->node.right);
+
+	if (left != NULL)
+		index_cat_helper(info, left);
+
+	this->node.uncompressed_base += info->uncompressed_size;
+	this->node.compressed_base += info->file_size;
+	this->number += info->stream_number_add;
+	this->block_number_base += info->block_number_add;
+	index_tree_append(info->streams, &this->node);
+
+	if (right != NULL)
+		index_cat_helper(info, right);
+
+	return;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_cat(lzma_index *restrict dest, lzma_index *restrict src,
+		const lzma_allocator *allocator)
+{
+	const lzma_vli dest_file_size = lzma_index_file_size(dest);
+
+	// Check that we don't exceed the file size limits.
+	if (dest_file_size + lzma_index_file_size(src) > LZMA_VLI_MAX
+			|| dest->uncompressed_size + src->uncompressed_size
+				> LZMA_VLI_MAX)
+		return LZMA_DATA_ERROR;
+
+	// Check that the encoded size of the combined lzma_indexes stays
+	// within limits. In theory, this should be done only if we know
+	// that the user plans to actually combine the Streams and thus
+	// construct a single Index (probably rare). However, exceeding
+	// this limit is quite theoretical, so we do this check always
+	// to simplify things elsewhere.
+	{
+		const lzma_vli dest_size = index_size_unpadded(
+				dest->record_count, dest->index_list_size);
+		const lzma_vli src_size = index_size_unpadded(
+				src->record_count, src->index_list_size);
+		if (vli_ceil4(dest_size + src_size) > LZMA_BACKWARD_SIZE_MAX)
+			return LZMA_DATA_ERROR;
+	}
+
+	// Optimize the last group to minimize memory usage. Allocation has
+	// to be done before modifying dest or src.
+	{
+		index_stream *s = (index_stream *)(dest->streams.rightmost);
+		index_group *g = (index_group *)(s->groups.rightmost);
+		if (g != NULL && g->last + 1 < g->allocated) {
+			assert(g->node.left == NULL);
+			assert(g->node.right == NULL);
+
+			index_group *newg = lzma_alloc(sizeof(index_group)
+					+ (g->last + 1)
+					* sizeof(index_record),
+					allocator);
+			if (newg == NULL)
+				return LZMA_MEM_ERROR;
+
+			newg->node = g->node;
+			newg->allocated = g->last + 1;
+			newg->last = g->last;
+			newg->number_base = g->number_base;
+
+			memcpy(newg->records, g->records, newg->allocated
+					* sizeof(index_record));
+
+			if (g->node.parent != NULL) {
+				assert(g->node.parent->right == &g->node);
+				g->node.parent->right = &newg->node;
+			}
+
+			if (s->groups.leftmost == &g->node) {
+				assert(s->groups.root == &g->node);
+				s->groups.leftmost = &newg->node;
+				s->groups.root = &newg->node;
+			}
+
+			if (s->groups.rightmost == &g->node)
+				s->groups.rightmost = &newg->node;
+
+			lzma_free(g, allocator);
+
+			// NOTE: newg isn't leaked here because
+			// newg == (void *)&newg->node.
+		}
+	}
+
+	// Add all the Streams from src to dest. Update the base offsets
+	// of each Stream from src.
+	const index_cat_info info = {
+		.uncompressed_size = dest->uncompressed_size,
+		.file_size = dest_file_size,
+		.stream_number_add = dest->streams.count,
+		.block_number_add = dest->record_count,
+		.streams = &dest->streams,
+	};
+	index_cat_helper(&info, (index_stream *)(src->streams.root));
+
+	// Update info about all the combined Streams.
+	dest->uncompressed_size += src->uncompressed_size;
+	dest->total_size += src->total_size;
+	dest->record_count += src->record_count;
+	dest->index_list_size += src->index_list_size;
+	dest->checks = lzma_index_checks(dest) | src->checks;
+
+	// There's nothing else left in src than the base structure.
+	lzma_free(src, allocator);
+
+	return LZMA_OK;
+}
+
+
+/// Duplicate an index_stream.
+static index_stream *
+index_dup_stream(const index_stream *src, const lzma_allocator *allocator)
+{
+	// Catch a somewhat theoretical integer overflow.
+	if (src->record_count > PREALLOC_MAX)
+		return NULL;
+
+	// Allocate and initialize a new Stream.
+	index_stream *dest = index_stream_init(src->node.compressed_base,
+			src->node.uncompressed_base, src->number,
+			src->block_number_base, allocator);
+	if (dest == NULL)
+		return NULL;
+
+	// Copy the overall information.
+	dest->record_count = src->record_count;
+	dest->index_list_size = src->index_list_size;
+	dest->stream_flags = src->stream_flags;
+	dest->stream_padding = src->stream_padding;
+
+	// Return if there are no groups to duplicate.
+	if (src->groups.leftmost == NULL)
+		return dest;
+
+	// Allocate memory for the Records. We put all the Records into
+	// a single group. It's simplest and also tends to make
+	// lzma_index_locate() a little bit faster with very big Indexes.
+	index_group *destg = lzma_alloc(sizeof(index_group)
+			+ src->record_count * sizeof(index_record),
+			allocator);
+	if (destg == NULL) {
+		index_stream_end(dest, allocator);
+		return NULL;
+	}
+
+	// Initialize destg.
+	destg->node.uncompressed_base = 0;
+	destg->node.compressed_base = 0;
+	destg->number_base = 1;
+	destg->allocated = src->record_count;
+	destg->last = src->record_count - 1;
+
+	// Go through all the groups in src and copy the Records into destg.
+	const index_group *srcg = (const index_group *)(src->groups.leftmost);
+	size_t i = 0;
+	do {
+		memcpy(destg->records + i, srcg->records,
+				(srcg->last + 1) * sizeof(index_record));
+		i += srcg->last + 1;
+		srcg = index_tree_next(&srcg->node);
+	} while (srcg != NULL);
+
+	assert(i == destg->allocated);
+
+	// Add the group to the new Stream.
+	index_tree_append(&dest->groups, &destg->node);
+
+	return dest;
+}
+
+
+extern LZMA_API(lzma_index *)
+lzma_index_dup(const lzma_index *src, const lzma_allocator *allocator)
+{
+	// Allocate the base structure (no initial Stream).
+	lzma_index *dest = index_init_plain(allocator);
+	if (dest == NULL)
+		return NULL;
+
+	// Copy the totals.
+	dest->uncompressed_size = src->uncompressed_size;
+	dest->total_size = src->total_size;
+	dest->record_count = src->record_count;
+	dest->index_list_size = src->index_list_size;
+
+	// Copy the Streams and the groups in them.
+	const index_stream *srcstream
+			= (const index_stream *)(src->streams.leftmost);
+	do {
+		index_stream *deststream = index_dup_stream(
+				srcstream, allocator);
+		if (deststream == NULL) {
+			lzma_index_end(dest, allocator);
+			return NULL;
+		}
+
+		index_tree_append(&dest->streams, &deststream->node);
+
+		srcstream = index_tree_next(&srcstream->node);
+	} while (srcstream != NULL);
+
+	return dest;
+}
+
+
+/// Indexing for lzma_index_iter.internal[]
+enum {
+	ITER_INDEX,
+	ITER_STREAM,
+	ITER_GROUP,
+	ITER_RECORD,
+	ITER_METHOD,
+};
+
+
+/// Values for lzma_index_iter.internal[ITER_METHOD].s
+enum {
+	ITER_METHOD_NORMAL,
+	ITER_METHOD_NEXT,
+	ITER_METHOD_LEFTMOST,
+};
+
+
+static void
+iter_set_info(lzma_index_iter *iter)
+{
+	const lzma_index *i = iter->internal[ITER_INDEX].p;
+	const index_stream *stream = iter->internal[ITER_STREAM].p;
+	const index_group *group = iter->internal[ITER_GROUP].p;
+	const size_t record = iter->internal[ITER_RECORD].s;
+
+	// lzma_index_iter.internal must not contain a pointer to the last
+	// group in the index, because that may be reallocated by
+	// lzma_index_cat().
+	if (group == NULL) {
+		// There are no groups.
+		assert(stream->groups.root == NULL);
+		iter->internal[ITER_METHOD].s = ITER_METHOD_LEFTMOST;
+
+	} else if (i->streams.rightmost != &stream->node
+			|| stream->groups.rightmost != &group->node) {
+		// The group is not not the last group in the index.
+		iter->internal[ITER_METHOD].s = ITER_METHOD_NORMAL;
+
+	} else if (stream->groups.leftmost != &group->node) {
+		// The group isn't the only group in the Stream, thus we
+		// know that it must have a parent group i.e. it's not
+		// the root node.
+		assert(stream->groups.root != &group->node);
+		assert(group->node.parent->right == &group->node);
+		iter->internal[ITER_METHOD].s = ITER_METHOD_NEXT;
+		iter->internal[ITER_GROUP].p = group->node.parent;
+
+	} else {
+		// The Stream has only one group.
+		assert(stream->groups.root == &group->node);
+		assert(group->node.parent == NULL);
+		iter->internal[ITER_METHOD].s = ITER_METHOD_LEFTMOST;
+		iter->internal[ITER_GROUP].p = NULL;
+	}
+
+	// NOTE: lzma_index_iter.stream.number is lzma_vli but we use uint32_t
+	// internally.
+	iter->stream.number = stream->number;
+	iter->stream.block_count = stream->record_count;
+	iter->stream.compressed_offset = stream->node.compressed_base;
+	iter->stream.uncompressed_offset = stream->node.uncompressed_base;
+
+	// iter->stream.flags will be NULL if the Stream Flags haven't been
+	// set with lzma_index_stream_flags().
+	iter->stream.flags = stream->stream_flags.version == UINT32_MAX
+			? NULL : &stream->stream_flags;
+	iter->stream.padding = stream->stream_padding;
+
+	if (stream->groups.rightmost == NULL) {
+		// Stream has no Blocks.
+		iter->stream.compressed_size = index_size(0, 0)
+				+ 2 * LZMA_STREAM_HEADER_SIZE;
+		iter->stream.uncompressed_size = 0;
+	} else {
+		const index_group *g = (const index_group *)(
+				stream->groups.rightmost);
+
+		// Stream Header + Stream Footer + Index + Blocks
+		iter->stream.compressed_size = 2 * LZMA_STREAM_HEADER_SIZE
+				+ index_size(stream->record_count,
+					stream->index_list_size)
+				+ vli_ceil4(g->records[g->last].unpadded_sum);
+		iter->stream.uncompressed_size
+				= g->records[g->last].uncompressed_sum;
+	}
+
+	if (group != NULL) {
+		iter->block.number_in_stream = group->number_base + record;
+		iter->block.number_in_file = iter->block.number_in_stream
+				+ stream->block_number_base;
+
+		iter->block.compressed_stream_offset
+				= record == 0 ? group->node.compressed_base
+				: vli_ceil4(group->records[
+					record - 1].unpadded_sum);
+		iter->block.uncompressed_stream_offset
+				= record == 0 ? group->node.uncompressed_base
+				: group->records[record - 1].uncompressed_sum;
+
+		iter->block.uncompressed_size
+				= group->records[record].uncompressed_sum
+				- iter->block.uncompressed_stream_offset;
+		iter->block.unpadded_size
+				= group->records[record].unpadded_sum
+				- iter->block.compressed_stream_offset;
+		iter->block.total_size = vli_ceil4(iter->block.unpadded_size);
+
+		iter->block.compressed_stream_offset
+				+= LZMA_STREAM_HEADER_SIZE;
+
+		iter->block.compressed_file_offset
+				= iter->block.compressed_stream_offset
+				+ iter->stream.compressed_offset;
+		iter->block.uncompressed_file_offset
+				= iter->block.uncompressed_stream_offset
+				+ iter->stream.uncompressed_offset;
+	}
+
+	return;
+}
+
+
+extern LZMA_API(void)
+lzma_index_iter_init(lzma_index_iter *iter, const lzma_index *i)
+{
+	iter->internal[ITER_INDEX].p = i;
+	lzma_index_iter_rewind(iter);
+	return;
+}
+
+
+extern LZMA_API(void)
+lzma_index_iter_rewind(lzma_index_iter *iter)
+{
+	iter->internal[ITER_STREAM].p = NULL;
+	iter->internal[ITER_GROUP].p = NULL;
+	iter->internal[ITER_RECORD].s = 0;
+	iter->internal[ITER_METHOD].s = ITER_METHOD_NORMAL;
+	return;
+}
+
+
+extern LZMA_API(lzma_bool)
+lzma_index_iter_next(lzma_index_iter *iter, lzma_index_iter_mode mode)
+{
+	// Catch unsupported mode values.
+	if ((unsigned int)(mode) > LZMA_INDEX_ITER_NONEMPTY_BLOCK)
+		return true;
+
+	const lzma_index *i = iter->internal[ITER_INDEX].p;
+	const index_stream *stream = iter->internal[ITER_STREAM].p;
+	const index_group *group = NULL;
+	size_t record = iter->internal[ITER_RECORD].s;
+
+	// If we are being asked for the next Stream, leave group to NULL
+	// so that the rest of the this function thinks that this Stream
+	// has no groups and will thus go to the next Stream.
+	if (mode != LZMA_INDEX_ITER_STREAM) {
+		// Get the pointer to the current group. See iter_set_inf()
+		// for explanation.
+		switch (iter->internal[ITER_METHOD].s) {
+		case ITER_METHOD_NORMAL:
+			group = iter->internal[ITER_GROUP].p;
+			break;
+
+		case ITER_METHOD_NEXT:
+			group = index_tree_next(iter->internal[ITER_GROUP].p);
+			break;
+
+		case ITER_METHOD_LEFTMOST:
+			group = (const index_group *)(
+					stream->groups.leftmost);
+			break;
+		}
+	}
+
+again:
+	if (stream == NULL) {
+		// We at the beginning of the lzma_index.
+		// Locate the first Stream.
+		stream = (const index_stream *)(i->streams.leftmost);
+		if (mode >= LZMA_INDEX_ITER_BLOCK) {
+			// Since we are being asked to return information
+			// about the first a Block, skip Streams that have
+			// no Blocks.
+			while (stream->groups.leftmost == NULL) {
+				stream = index_tree_next(&stream->node);
+				if (stream == NULL)
+					return true;
+			}
+		}
+
+		// Start from the first Record in the Stream.
+		group = (const index_group *)(stream->groups.leftmost);
+		record = 0;
+
+	} else if (group != NULL && record < group->last) {
+		// The next Record is in the same group.
+		++record;
+
+	} else {
+		// This group has no more Records or this Stream has
+		// no Blocks at all.
+		record = 0;
+
+		// If group is not NULL, this Stream has at least one Block
+		// and thus at least one group. Find the next group.
+		if (group != NULL)
+			group = index_tree_next(&group->node);
+
+		if (group == NULL) {
+			// This Stream has no more Records. Find the next
+			// Stream. If we are being asked to return information
+			// about a Block, we skip empty Streams.
+			do {
+				stream = index_tree_next(&stream->node);
+				if (stream == NULL)
+					return true;
+			} while (mode >= LZMA_INDEX_ITER_BLOCK
+					&& stream->groups.leftmost == NULL);
+
+			group = (const index_group *)(
+					stream->groups.leftmost);
+		}
+	}
+
+	if (mode == LZMA_INDEX_ITER_NONEMPTY_BLOCK) {
+		// We need to look for the next Block again if this Block
+		// is empty.
+		if (record == 0) {
+			if (group->node.uncompressed_base
+					== group->records[0].uncompressed_sum)
+				goto again;
+		} else if (group->records[record - 1].uncompressed_sum
+				== group->records[record].uncompressed_sum) {
+			goto again;
+		}
+	}
+
+	iter->internal[ITER_STREAM].p = stream;
+	iter->internal[ITER_GROUP].p = group;
+	iter->internal[ITER_RECORD].s = record;
+
+	iter_set_info(iter);
+
+	return false;
+}
+
+
+extern LZMA_API(lzma_bool)
+lzma_index_iter_locate(lzma_index_iter *iter, lzma_vli target)
+{
+	const lzma_index *i = iter->internal[ITER_INDEX].p;
+
+	// If the target is past the end of the file, return immediately.
+	if (i->uncompressed_size <= target)
+		return true;
+
+	// Locate the Stream containing the target offset.
+	const index_stream *stream = index_tree_locate(&i->streams, target);
+	assert(stream != NULL);
+	target -= stream->node.uncompressed_base;
+
+	// Locate the group containing the target offset.
+	const index_group *group = index_tree_locate(&stream->groups, target);
+	assert(group != NULL);
+
+	// Use binary search to locate the exact Record. It is the first
+	// Record whose uncompressed_sum is greater than target.
+	// This is because we want the rightmost Record that fullfills the
+	// search criterion. It is possible that there are empty Blocks;
+	// we don't want to return them.
+	size_t left = 0;
+	size_t right = group->last;
+
+	while (left < right) {
+		const size_t pos = left + (right - left) / 2;
+		if (group->records[pos].uncompressed_sum <= target)
+			left = pos + 1;
+		else
+			right = pos;
+	}
+
+	iter->internal[ITER_STREAM].p = stream;
+	iter->internal[ITER_GROUP].p = group;
+	iter->internal[ITER_RECORD].s = left;
+
+	iter_set_info(iter);
+
+	return false;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/index_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/index_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/index_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,345 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       index_decoder.c
-/// \brief      Decodes the Index field
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "index.h"
-#include "check.h"
-
-
-struct lzma_coder_s {
-	enum {
-		SEQ_INDICATOR,
-		SEQ_COUNT,
-		SEQ_MEMUSAGE,
-		SEQ_UNPADDED,
-		SEQ_UNCOMPRESSED,
-		SEQ_PADDING_INIT,
-		SEQ_PADDING,
-		SEQ_CRC32,
-	} sequence;
-
-	/// Memory usage limit
-	uint64_t memlimit;
-
-	/// Target Index
-	lzma_index *index;
-
-	/// Pointer give by the application, which is set after
-	/// successful decoding.
-	lzma_index **index_ptr;
-
-	/// Number of Records left to decode.
-	lzma_vli count;
-
-	/// The most recent Unpadded Size field
-	lzma_vli unpadded_size;
-
-	/// The most recent Uncompressed Size field
-	lzma_vli uncompressed_size;
-
-	/// Position in integers
-	size_t pos;
-
-	/// CRC32 of the List of Records field
-	uint32_t crc32;
-};
-
-
-static lzma_ret
-index_decode(lzma_coder *coder, lzma_allocator *allocator,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size,
-		uint8_t *restrict out lzma_attribute((__unused__)),
-		size_t *restrict out_pos lzma_attribute((__unused__)),
-		size_t out_size lzma_attribute((__unused__)),
-		lzma_action action lzma_attribute((__unused__)))
-{
-	// Similar optimization as in index_encoder.c
-	const size_t in_start = *in_pos;
-	lzma_ret ret = LZMA_OK;
-
-	while (*in_pos < in_size)
-	switch (coder->sequence) {
-	case SEQ_INDICATOR:
-		// Return LZMA_DATA_ERROR instead of e.g. LZMA_PROG_ERROR or
-		// LZMA_FORMAT_ERROR, because a typical usage case for Index
-		// decoder is when parsing the Stream backwards. If seeking
-		// backward from the Stream Footer gives us something that
-		// doesn't begin with Index Indicator, the file is considered
-		// corrupt, not "programming error" or "unrecognized file
-		// format". One could argue that the application should
-		// verify the Index Indicator before trying to decode the
-		// Index, but well, I suppose it is simpler this way.
-		if (in[(*in_pos)++] != 0x00)
-			return LZMA_DATA_ERROR;
-
-		coder->sequence = SEQ_COUNT;
-		break;
-
-	case SEQ_COUNT:
-		ret = lzma_vli_decode(&coder->count, &coder->pos,
-				in, in_pos, in_size);
-		if (ret != LZMA_STREAM_END)
-			goto out;
-
-		coder->pos = 0;
-		coder->sequence = SEQ_MEMUSAGE;
-
-	// Fall through
-
-	case SEQ_MEMUSAGE:
-		if (lzma_index_memusage(1, coder->count) > coder->memlimit) {
-			ret = LZMA_MEMLIMIT_ERROR;
-			goto out;
-		}
-
-		// Tell the Index handling code how many Records this
-		// Index has to allow it to allocate memory more efficiently.
-		lzma_index_prealloc(coder->index, coder->count);
-
-		ret = LZMA_OK;
-		coder->sequence = coder->count == 0
-				? SEQ_PADDING_INIT : SEQ_UNPADDED;
-		break;
-
-	case SEQ_UNPADDED:
-	case SEQ_UNCOMPRESSED: {
-		lzma_vli *size = coder->sequence == SEQ_UNPADDED
-				? &coder->unpadded_size
-				: &coder->uncompressed_size;
-
-		ret = lzma_vli_decode(size, &coder->pos,
-				in, in_pos, in_size);
-		if (ret != LZMA_STREAM_END)
-			goto out;
-
-		ret = LZMA_OK;
-		coder->pos = 0;
-
-		if (coder->sequence == SEQ_UNPADDED) {
-			// Validate that encoded Unpadded Size isn't too small
-			// or too big.
-			if (coder->unpadded_size < UNPADDED_SIZE_MIN
-					|| coder->unpadded_size
-						> UNPADDED_SIZE_MAX)
-				return LZMA_DATA_ERROR;
-
-			coder->sequence = SEQ_UNCOMPRESSED;
-		} else {
-			// Add the decoded Record to the Index.
-			return_if_error(lzma_index_append(
-					coder->index, allocator,
-					coder->unpadded_size,
-					coder->uncompressed_size));
-
-			// Check if this was the last Record.
-			coder->sequence = --coder->count == 0
-					? SEQ_PADDING_INIT
-					: SEQ_UNPADDED;
-		}
-
-		break;
-	}
-
-	case SEQ_PADDING_INIT:
-		coder->pos = lzma_index_padding_size(coder->index);
-		coder->sequence = SEQ_PADDING;
-
-	// Fall through
-
-	case SEQ_PADDING:
-		if (coder->pos > 0) {
-			--coder->pos;
-			if (in[(*in_pos)++] != 0x00)
-				return LZMA_DATA_ERROR;
-
-			break;
-		}
-
-		// Finish the CRC32 calculation.
-		coder->crc32 = lzma_crc32(in + in_start,
-				*in_pos - in_start, coder->crc32);
-
-		coder->sequence = SEQ_CRC32;
-
-	// Fall through
-
-	case SEQ_CRC32:
-		do {
-			if (*in_pos == in_size)
-				return LZMA_OK;
-
-			if (((coder->crc32 >> (coder->pos * 8)) & 0xFF)
-					!= in[(*in_pos)++])
-				return LZMA_DATA_ERROR;
-
-		} while (++coder->pos < 4);
-
-		// Decoding was successful, now we can let the application
-		// see the decoded Index.
-		*coder->index_ptr = coder->index;
-
-		// Make index NULL so we don't free it unintentionally.
-		coder->index = NULL;
-
-		return LZMA_STREAM_END;
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-
-out:
-	// Update the CRC32,
-	coder->crc32 = lzma_crc32(in + in_start,
-			*in_pos - in_start, coder->crc32);
-
-	return ret;
-}
-
-
-static void
-index_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_index_end(coder->index, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_ret
-index_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
-		uint64_t *old_memlimit, uint64_t new_memlimit)
-{
-	*memusage = lzma_index_memusage(1, coder->count);
-	*old_memlimit = coder->memlimit;
-
-	if (new_memlimit != 0) {
-		if (new_memlimit < *memusage)
-			return LZMA_MEMLIMIT_ERROR;
-
-		coder->memlimit = new_memlimit;
-	}
-
-	return LZMA_OK;
-}
-
-
-static lzma_ret
-index_decoder_reset(lzma_coder *coder, lzma_allocator *allocator,
-		lzma_index **i, uint64_t memlimit)
-{
-	// Remember the pointer given by the application. We will set it
-	// to point to the decoded Index only if decoding is successful.
-	// Before that, keep it NULL so that applications can always safely
-	// pass it to lzma_index_end() no matter did decoding succeed or not.
-	coder->index_ptr = i;
-	*i = NULL;
-
-	// We always allocate a new lzma_index.
-	coder->index = lzma_index_init(allocator);
-	if (coder->index == NULL)
-		return LZMA_MEM_ERROR;
-
-	// Initialize the rest.
-	coder->sequence = SEQ_INDICATOR;
-	coder->memlimit = memlimit;
-	coder->count = 0; // Needs to be initialized due to _memconfig().
-	coder->pos = 0;
-	coder->crc32 = 0;
-
-	return LZMA_OK;
-}
-
-
-static lzma_ret
-index_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		lzma_index **i, uint64_t memlimit)
-{
-	lzma_next_coder_init(&index_decoder_init, next, allocator);
-
-	if (i == NULL || memlimit == 0)
-		return LZMA_PROG_ERROR;
-
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &index_decode;
-		next->end = &index_decoder_end;
-		next->memconfig = &index_decoder_memconfig;
-		next->coder->index = NULL;
-	} else {
-		lzma_index_end(next->coder->index, allocator);
-	}
-
-	return index_decoder_reset(next->coder, allocator, i, memlimit);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_decoder(lzma_stream *strm, lzma_index **i, uint64_t memlimit)
-{
-	lzma_next_strm_init(index_decoder_init, strm, i, memlimit);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_buffer_decode(
-		lzma_index **i, uint64_t *memlimit, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size)
-{
-	// Sanity checks
-	if (i == NULL || memlimit == NULL
-			|| in == NULL || in_pos == NULL || *in_pos > in_size)
-		return LZMA_PROG_ERROR;
-
-	// Initialize the decoder.
-	lzma_coder coder;
-	return_if_error(index_decoder_reset(&coder, allocator, i, *memlimit));
-
-	// Store the input start position so that we can restore it in case
-	// of an error.
-	const size_t in_start = *in_pos;
-
-	// Do the actual decoding.
-	lzma_ret ret = index_decode(&coder, allocator, in, in_pos, in_size,
-			NULL, NULL, 0, LZMA_RUN);
-
-	if (ret == LZMA_STREAM_END) {
-		ret = LZMA_OK;
-	} else {
-		// Something went wrong, free the Index structure and restore
-		// the input position.
-		lzma_index_end(coder.index, allocator);
-		*in_pos = in_start;
-
-		if (ret == LZMA_OK) {
-			// The input is truncated or otherwise corrupt.
-			// Use LZMA_DATA_ERROR instead of LZMA_BUF_ERROR
-			// like lzma_vli_decode() does in single-call mode.
-			ret = LZMA_DATA_ERROR;
-
-		} else if (ret == LZMA_MEMLIMIT_ERROR) {
-			// Tell the caller how much memory would have
-			// been needed.
-			*memlimit = lzma_index_memusage(1, coder.count);
-		}
-	}
-
-	return ret;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/index_decoder.c (from rev 11013, vendor/xz/dist/src/liblzma/common/index_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/index_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/index_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,352 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       index_decoder.c
+/// \brief      Decodes the Index field
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "index.h"
+#include "check.h"
+
+
+typedef struct {
+	enum {
+		SEQ_INDICATOR,
+		SEQ_COUNT,
+		SEQ_MEMUSAGE,
+		SEQ_UNPADDED,
+		SEQ_UNCOMPRESSED,
+		SEQ_PADDING_INIT,
+		SEQ_PADDING,
+		SEQ_CRC32,
+	} sequence;
+
+	/// Memory usage limit
+	uint64_t memlimit;
+
+	/// Target Index
+	lzma_index *index;
+
+	/// Pointer give by the application, which is set after
+	/// successful decoding.
+	lzma_index **index_ptr;
+
+	/// Number of Records left to decode.
+	lzma_vli count;
+
+	/// The most recent Unpadded Size field
+	lzma_vli unpadded_size;
+
+	/// The most recent Uncompressed Size field
+	lzma_vli uncompressed_size;
+
+	/// Position in integers
+	size_t pos;
+
+	/// CRC32 of the List of Records field
+	uint32_t crc32;
+} lzma_index_coder;
+
+
+static lzma_ret
+index_decode(void *coder_ptr, const lzma_allocator *allocator,
+		const uint8_t *restrict in, size_t *restrict in_pos,
+		size_t in_size,
+		uint8_t *restrict out lzma_attribute((__unused__)),
+		size_t *restrict out_pos lzma_attribute((__unused__)),
+		size_t out_size lzma_attribute((__unused__)),
+		lzma_action action lzma_attribute((__unused__)))
+{
+	lzma_index_coder *coder = coder_ptr;
+
+	// Similar optimization as in index_encoder.c
+	const size_t in_start = *in_pos;
+	lzma_ret ret = LZMA_OK;
+
+	while (*in_pos < in_size)
+	switch (coder->sequence) {
+	case SEQ_INDICATOR:
+		// Return LZMA_DATA_ERROR instead of e.g. LZMA_PROG_ERROR or
+		// LZMA_FORMAT_ERROR, because a typical usage case for Index
+		// decoder is when parsing the Stream backwards. If seeking
+		// backward from the Stream Footer gives us something that
+		// doesn't begin with Index Indicator, the file is considered
+		// corrupt, not "programming error" or "unrecognized file
+		// format". One could argue that the application should
+		// verify the Index Indicator before trying to decode the
+		// Index, but well, I suppose it is simpler this way.
+		if (in[(*in_pos)++] != 0x00)
+			return LZMA_DATA_ERROR;
+
+		coder->sequence = SEQ_COUNT;
+		break;
+
+	case SEQ_COUNT:
+		ret = lzma_vli_decode(&coder->count, &coder->pos,
+				in, in_pos, in_size);
+		if (ret != LZMA_STREAM_END)
+			goto out;
+
+		coder->pos = 0;
+		coder->sequence = SEQ_MEMUSAGE;
+
+	// Fall through
+
+	case SEQ_MEMUSAGE:
+		if (lzma_index_memusage(1, coder->count) > coder->memlimit) {
+			ret = LZMA_MEMLIMIT_ERROR;
+			goto out;
+		}
+
+		// Tell the Index handling code how many Records this
+		// Index has to allow it to allocate memory more efficiently.
+		lzma_index_prealloc(coder->index, coder->count);
+
+		ret = LZMA_OK;
+		coder->sequence = coder->count == 0
+				? SEQ_PADDING_INIT : SEQ_UNPADDED;
+		break;
+
+	case SEQ_UNPADDED:
+	case SEQ_UNCOMPRESSED: {
+		lzma_vli *size = coder->sequence == SEQ_UNPADDED
+				? &coder->unpadded_size
+				: &coder->uncompressed_size;
+
+		ret = lzma_vli_decode(size, &coder->pos,
+				in, in_pos, in_size);
+		if (ret != LZMA_STREAM_END)
+			goto out;
+
+		ret = LZMA_OK;
+		coder->pos = 0;
+
+		if (coder->sequence == SEQ_UNPADDED) {
+			// Validate that encoded Unpadded Size isn't too small
+			// or too big.
+			if (coder->unpadded_size < UNPADDED_SIZE_MIN
+					|| coder->unpadded_size
+						> UNPADDED_SIZE_MAX)
+				return LZMA_DATA_ERROR;
+
+			coder->sequence = SEQ_UNCOMPRESSED;
+		} else {
+			// Add the decoded Record to the Index.
+			return_if_error(lzma_index_append(
+					coder->index, allocator,
+					coder->unpadded_size,
+					coder->uncompressed_size));
+
+			// Check if this was the last Record.
+			coder->sequence = --coder->count == 0
+					? SEQ_PADDING_INIT
+					: SEQ_UNPADDED;
+		}
+
+		break;
+	}
+
+	case SEQ_PADDING_INIT:
+		coder->pos = lzma_index_padding_size(coder->index);
+		coder->sequence = SEQ_PADDING;
+
+	// Fall through
+
+	case SEQ_PADDING:
+		if (coder->pos > 0) {
+			--coder->pos;
+			if (in[(*in_pos)++] != 0x00)
+				return LZMA_DATA_ERROR;
+
+			break;
+		}
+
+		// Finish the CRC32 calculation.
+		coder->crc32 = lzma_crc32(in + in_start,
+				*in_pos - in_start, coder->crc32);
+
+		coder->sequence = SEQ_CRC32;
+
+	// Fall through
+
+	case SEQ_CRC32:
+		do {
+			if (*in_pos == in_size)
+				return LZMA_OK;
+
+			if (((coder->crc32 >> (coder->pos * 8)) & 0xFF)
+					!= in[(*in_pos)++])
+				return LZMA_DATA_ERROR;
+
+		} while (++coder->pos < 4);
+
+		// Decoding was successful, now we can let the application
+		// see the decoded Index.
+		*coder->index_ptr = coder->index;
+
+		// Make index NULL so we don't free it unintentionally.
+		coder->index = NULL;
+
+		return LZMA_STREAM_END;
+
+	default:
+		assert(0);
+		return LZMA_PROG_ERROR;
+	}
+
+out:
+	// Update the CRC32,
+	coder->crc32 = lzma_crc32(in + in_start,
+			*in_pos - in_start, coder->crc32);
+
+	return ret;
+}
+
+
+static void
+index_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_index_coder *coder = coder_ptr;
+	lzma_index_end(coder->index, allocator);
+	lzma_free(coder, allocator);
+	return;
+}
+
+
+static lzma_ret
+index_decoder_memconfig(void *coder_ptr, uint64_t *memusage,
+		uint64_t *old_memlimit, uint64_t new_memlimit)
+{
+	lzma_index_coder *coder = coder_ptr;
+
+	*memusage = lzma_index_memusage(1, coder->count);
+	*old_memlimit = coder->memlimit;
+
+	if (new_memlimit != 0) {
+		if (new_memlimit < *memusage)
+			return LZMA_MEMLIMIT_ERROR;
+
+		coder->memlimit = new_memlimit;
+	}
+
+	return LZMA_OK;
+}
+
+
+static lzma_ret
+index_decoder_reset(lzma_index_coder *coder, const lzma_allocator *allocator,
+		lzma_index **i, uint64_t memlimit)
+{
+	// Remember the pointer given by the application. We will set it
+	// to point to the decoded Index only if decoding is successful.
+	// Before that, keep it NULL so that applications can always safely
+	// pass it to lzma_index_end() no matter did decoding succeed or not.
+	coder->index_ptr = i;
+	*i = NULL;
+
+	// We always allocate a new lzma_index.
+	coder->index = lzma_index_init(allocator);
+	if (coder->index == NULL)
+		return LZMA_MEM_ERROR;
+
+	// Initialize the rest.
+	coder->sequence = SEQ_INDICATOR;
+	coder->memlimit = memlimit;
+	coder->count = 0; // Needs to be initialized due to _memconfig().
+	coder->pos = 0;
+	coder->crc32 = 0;
+
+	return LZMA_OK;
+}
+
+
+static lzma_ret
+index_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		lzma_index **i, uint64_t memlimit)
+{
+	lzma_next_coder_init(&index_decoder_init, next, allocator);
+
+	if (i == NULL || memlimit == 0)
+		return LZMA_PROG_ERROR;
+
+	lzma_index_coder *coder = next->coder;
+	if (coder == NULL) {
+		coder = lzma_alloc(sizeof(lzma_index_coder), allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		next->coder = coder;
+		next->code = &index_decode;
+		next->end = &index_decoder_end;
+		next->memconfig = &index_decoder_memconfig;
+		coder->index = NULL;
+	} else {
+		lzma_index_end(coder->index, allocator);
+	}
+
+	return index_decoder_reset(coder, allocator, i, memlimit);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_decoder(lzma_stream *strm, lzma_index **i, uint64_t memlimit)
+{
+	lzma_next_strm_init(index_decoder_init, strm, i, memlimit);
+
+	strm->internal->supported_actions[LZMA_RUN] = true;
+	strm->internal->supported_actions[LZMA_FINISH] = true;
+
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_buffer_decode(lzma_index **i, uint64_t *memlimit,
+		const lzma_allocator *allocator,
+		const uint8_t *in, size_t *in_pos, size_t in_size)
+{
+	// Sanity checks
+	if (i == NULL || memlimit == NULL
+			|| in == NULL || in_pos == NULL || *in_pos > in_size)
+		return LZMA_PROG_ERROR;
+
+	// Initialize the decoder.
+	lzma_index_coder coder;
+	return_if_error(index_decoder_reset(&coder, allocator, i, *memlimit));
+
+	// Store the input start position so that we can restore it in case
+	// of an error.
+	const size_t in_start = *in_pos;
+
+	// Do the actual decoding.
+	lzma_ret ret = index_decode(&coder, allocator, in, in_pos, in_size,
+			NULL, NULL, 0, LZMA_RUN);
+
+	if (ret == LZMA_STREAM_END) {
+		ret = LZMA_OK;
+	} else {
+		// Something went wrong, free the Index structure and restore
+		// the input position.
+		lzma_index_end(coder.index, allocator);
+		*in_pos = in_start;
+
+		if (ret == LZMA_OK) {
+			// The input is truncated or otherwise corrupt.
+			// Use LZMA_DATA_ERROR instead of LZMA_BUF_ERROR
+			// like lzma_vli_decode() does in single-call mode.
+			ret = LZMA_DATA_ERROR;
+
+		} else if (ret == LZMA_MEMLIMIT_ERROR) {
+			// Tell the caller how much memory would have
+			// been needed.
+			*memlimit = lzma_index_memusage(1, coder.count);
+		}
+	}
+
+	return ret;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/index_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/index_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/index_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,254 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       index_encoder.c
-/// \brief      Encodes the Index field
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "index_encoder.h"
-#include "index.h"
-#include "check.h"
-
-
-struct lzma_coder_s {
-	enum {
-		SEQ_INDICATOR,
-		SEQ_COUNT,
-		SEQ_UNPADDED,
-		SEQ_UNCOMPRESSED,
-		SEQ_NEXT,
-		SEQ_PADDING,
-		SEQ_CRC32,
-	} sequence;
-
-	/// Index being encoded
-	const lzma_index *index;
-
-	/// Iterator for the Index being encoded
-	lzma_index_iter iter;
-
-	/// Position in integers
-	size_t pos;
-
-	/// CRC32 of the List of Records field
-	uint32_t crc32;
-};
-
-
-static lzma_ret
-index_encode(lzma_coder *coder,
-		lzma_allocator *allocator lzma_attribute((__unused__)),
-		const uint8_t *restrict in lzma_attribute((__unused__)),
-		size_t *restrict in_pos lzma_attribute((__unused__)),
-		size_t in_size lzma_attribute((__unused__)),
-		uint8_t *restrict out, size_t *restrict out_pos,
-		size_t out_size,
-		lzma_action action lzma_attribute((__unused__)))
-{
-	// Position where to start calculating CRC32. The idea is that we
-	// need to call lzma_crc32() only once per call to index_encode().
-	const size_t out_start = *out_pos;
-
-	// Return value to use if we return at the end of this function.
-	// We use "goto out" to jump out of the while-switch construct
-	// instead of returning directly, because that way we don't need
-	// to copypaste the lzma_crc32() call to many places.
-	lzma_ret ret = LZMA_OK;
-
-	while (*out_pos < out_size)
-	switch (coder->sequence) {
-	case SEQ_INDICATOR:
-		out[*out_pos] = 0x00;
-		++*out_pos;
-		coder->sequence = SEQ_COUNT;
-		break;
-
-	case SEQ_COUNT: {
-		const lzma_vli count = lzma_index_block_count(coder->index);
-		ret = lzma_vli_encode(count, &coder->pos,
-				out, out_pos, out_size);
-		if (ret != LZMA_STREAM_END)
-			goto out;
-
-		ret = LZMA_OK;
-		coder->pos = 0;
-		coder->sequence = SEQ_NEXT;
-		break;
-	}
-
-	case SEQ_NEXT:
-		if (lzma_index_iter_next(
-				&coder->iter, LZMA_INDEX_ITER_BLOCK)) {
-			// Get the size of the Index Padding field.
-			coder->pos = lzma_index_padding_size(coder->index);
-			assert(coder->pos <= 3);
-			coder->sequence = SEQ_PADDING;
-			break;
-		}
-
-		coder->sequence = SEQ_UNPADDED;
-
-	// Fall through
-
-	case SEQ_UNPADDED:
-	case SEQ_UNCOMPRESSED: {
-		const lzma_vli size = coder->sequence == SEQ_UNPADDED
-				? coder->iter.block.unpadded_size
-				: coder->iter.block.uncompressed_size;
-
-		ret = lzma_vli_encode(size, &coder->pos,
-				out, out_pos, out_size);
-		if (ret != LZMA_STREAM_END)
-			goto out;
-
-		ret = LZMA_OK;
-		coder->pos = 0;
-
-		// Advance to SEQ_UNCOMPRESSED or SEQ_NEXT.
-		++coder->sequence;
-		break;
-	}
-
-	case SEQ_PADDING:
-		if (coder->pos > 0) {
-			--coder->pos;
-			out[(*out_pos)++] = 0x00;
-			break;
-		}
-
-		// Finish the CRC32 calculation.
-		coder->crc32 = lzma_crc32(out + out_start,
-				*out_pos - out_start, coder->crc32);
-
-		coder->sequence = SEQ_CRC32;
-
-	// Fall through
-
-	case SEQ_CRC32:
-		// We don't use the main loop, because we don't want
-		// coder->crc32 to be touched anymore.
-		do {
-			if (*out_pos == out_size)
-				return LZMA_OK;
-
-			out[*out_pos] = (coder->crc32 >> (coder->pos * 8))
-					& 0xFF;
-			++*out_pos;
-
-		} while (++coder->pos < 4);
-
-		return LZMA_STREAM_END;
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-
-out:
-	// Update the CRC32.
-	coder->crc32 = lzma_crc32(out + out_start,
-			*out_pos - out_start, coder->crc32);
-
-	return ret;
-}
-
-
-static void
-index_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static void
-index_encoder_reset(lzma_coder *coder, const lzma_index *i)
-{
-	lzma_index_iter_init(&coder->iter, i);
-
-	coder->sequence = SEQ_INDICATOR;
-	coder->index = i;
-	coder->pos = 0;
-	coder->crc32 = 0;
-
-	return;
-}
-
-
-extern lzma_ret
-lzma_index_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_index *i)
-{
-	lzma_next_coder_init(&lzma_index_encoder_init, next, allocator);
-
-	if (i == NULL)
-		return LZMA_PROG_ERROR;
-
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &index_encode;
-		next->end = &index_encoder_end;
-	}
-
-	index_encoder_reset(next->coder, i);
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_encoder(lzma_stream *strm, const lzma_index *i)
-{
-	lzma_next_strm_init(lzma_index_encoder_init, strm, i);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_buffer_encode(const lzma_index *i,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	// Validate the arguments.
-	if (i == NULL || out == NULL || out_pos == NULL || *out_pos > out_size)
-		return LZMA_PROG_ERROR;
-
-	// Don't try to encode if there's not enough output space.
-	if (out_size - *out_pos < lzma_index_size(i))
-		return LZMA_BUF_ERROR;
-
-	// The Index encoder needs just one small data structure so we can
-	// allocate it on stack.
-	lzma_coder coder;
-	index_encoder_reset(&coder, i);
-
-	// Do the actual encoding. This should never fail, but store
-	// the original *out_pos just in case.
-	const size_t out_start = *out_pos;
-	lzma_ret ret = index_encode(&coder, NULL, NULL, NULL, 0,
-			out, out_pos, out_size, LZMA_RUN);
-
-	if (ret == LZMA_STREAM_END) {
-		ret = LZMA_OK;
-	} else {
-		// We should never get here, but just in case, restore the
-		// output position and set the error accordingly if something
-		// goes wrong and debugging isn't enabled.
-		assert(0);
-		*out_pos = out_start;
-		ret = LZMA_PROG_ERROR;
-	}
-
-	return ret;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/index_encoder.c (from rev 11013, vendor/xz/dist/src/liblzma/common/index_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/index_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/index_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,256 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       index_encoder.c
+/// \brief      Encodes the Index field
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "index_encoder.h"
+#include "index.h"
+#include "check.h"
+
+
+typedef struct {
+	enum {
+		SEQ_INDICATOR,
+		SEQ_COUNT,
+		SEQ_UNPADDED,
+		SEQ_UNCOMPRESSED,
+		SEQ_NEXT,
+		SEQ_PADDING,
+		SEQ_CRC32,
+	} sequence;
+
+	/// Index being encoded
+	const lzma_index *index;
+
+	/// Iterator for the Index being encoded
+	lzma_index_iter iter;
+
+	/// Position in integers
+	size_t pos;
+
+	/// CRC32 of the List of Records field
+	uint32_t crc32;
+} lzma_index_coder;
+
+
+static lzma_ret
+index_encode(void *coder_ptr,
+		const lzma_allocator *allocator lzma_attribute((__unused__)),
+		const uint8_t *restrict in lzma_attribute((__unused__)),
+		size_t *restrict in_pos lzma_attribute((__unused__)),
+		size_t in_size lzma_attribute((__unused__)),
+		uint8_t *restrict out, size_t *restrict out_pos,
+		size_t out_size,
+		lzma_action action lzma_attribute((__unused__)))
+{
+	lzma_index_coder *coder = coder_ptr;
+
+	// Position where to start calculating CRC32. The idea is that we
+	// need to call lzma_crc32() only once per call to index_encode().
+	const size_t out_start = *out_pos;
+
+	// Return value to use if we return at the end of this function.
+	// We use "goto out" to jump out of the while-switch construct
+	// instead of returning directly, because that way we don't need
+	// to copypaste the lzma_crc32() call to many places.
+	lzma_ret ret = LZMA_OK;
+
+	while (*out_pos < out_size)
+	switch (coder->sequence) {
+	case SEQ_INDICATOR:
+		out[*out_pos] = 0x00;
+		++*out_pos;
+		coder->sequence = SEQ_COUNT;
+		break;
+
+	case SEQ_COUNT: {
+		const lzma_vli count = lzma_index_block_count(coder->index);
+		ret = lzma_vli_encode(count, &coder->pos,
+				out, out_pos, out_size);
+		if (ret != LZMA_STREAM_END)
+			goto out;
+
+		ret = LZMA_OK;
+		coder->pos = 0;
+		coder->sequence = SEQ_NEXT;
+		break;
+	}
+
+	case SEQ_NEXT:
+		if (lzma_index_iter_next(
+				&coder->iter, LZMA_INDEX_ITER_BLOCK)) {
+			// Get the size of the Index Padding field.
+			coder->pos = lzma_index_padding_size(coder->index);
+			assert(coder->pos <= 3);
+			coder->sequence = SEQ_PADDING;
+			break;
+		}
+
+		coder->sequence = SEQ_UNPADDED;
+
+	// Fall through
+
+	case SEQ_UNPADDED:
+	case SEQ_UNCOMPRESSED: {
+		const lzma_vli size = coder->sequence == SEQ_UNPADDED
+				? coder->iter.block.unpadded_size
+				: coder->iter.block.uncompressed_size;
+
+		ret = lzma_vli_encode(size, &coder->pos,
+				out, out_pos, out_size);
+		if (ret != LZMA_STREAM_END)
+			goto out;
+
+		ret = LZMA_OK;
+		coder->pos = 0;
+
+		// Advance to SEQ_UNCOMPRESSED or SEQ_NEXT.
+		++coder->sequence;
+		break;
+	}
+
+	case SEQ_PADDING:
+		if (coder->pos > 0) {
+			--coder->pos;
+			out[(*out_pos)++] = 0x00;
+			break;
+		}
+
+		// Finish the CRC32 calculation.
+		coder->crc32 = lzma_crc32(out + out_start,
+				*out_pos - out_start, coder->crc32);
+
+		coder->sequence = SEQ_CRC32;
+
+	// Fall through
+
+	case SEQ_CRC32:
+		// We don't use the main loop, because we don't want
+		// coder->crc32 to be touched anymore.
+		do {
+			if (*out_pos == out_size)
+				return LZMA_OK;
+
+			out[*out_pos] = (coder->crc32 >> (coder->pos * 8))
+					& 0xFF;
+			++*out_pos;
+
+		} while (++coder->pos < 4);
+
+		return LZMA_STREAM_END;
+
+	default:
+		assert(0);
+		return LZMA_PROG_ERROR;
+	}
+
+out:
+	// Update the CRC32.
+	coder->crc32 = lzma_crc32(out + out_start,
+			*out_pos - out_start, coder->crc32);
+
+	return ret;
+}
+
+
+static void
+index_encoder_end(void *coder, const lzma_allocator *allocator)
+{
+	lzma_free(coder, allocator);
+	return;
+}
+
+
+static void
+index_encoder_reset(lzma_index_coder *coder, const lzma_index *i)
+{
+	lzma_index_iter_init(&coder->iter, i);
+
+	coder->sequence = SEQ_INDICATOR;
+	coder->index = i;
+	coder->pos = 0;
+	coder->crc32 = 0;
+
+	return;
+}
+
+
+extern lzma_ret
+lzma_index_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_index *i)
+{
+	lzma_next_coder_init(&lzma_index_encoder_init, next, allocator);
+
+	if (i == NULL)
+		return LZMA_PROG_ERROR;
+
+	if (next->coder == NULL) {
+		next->coder = lzma_alloc(sizeof(lzma_index_coder), allocator);
+		if (next->coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		next->code = &index_encode;
+		next->end = &index_encoder_end;
+	}
+
+	index_encoder_reset(next->coder, i);
+
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_encoder(lzma_stream *strm, const lzma_index *i)
+{
+	lzma_next_strm_init(lzma_index_encoder_init, strm, i);
+
+	strm->internal->supported_actions[LZMA_RUN] = true;
+	strm->internal->supported_actions[LZMA_FINISH] = true;
+
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_buffer_encode(const lzma_index *i,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+{
+	// Validate the arguments.
+	if (i == NULL || out == NULL || out_pos == NULL || *out_pos > out_size)
+		return LZMA_PROG_ERROR;
+
+	// Don't try to encode if there's not enough output space.
+	if (out_size - *out_pos < lzma_index_size(i))
+		return LZMA_BUF_ERROR;
+
+	// The Index encoder needs just one small data structure so we can
+	// allocate it on stack.
+	lzma_index_coder coder;
+	index_encoder_reset(&coder, i);
+
+	// Do the actual encoding. This should never fail, but store
+	// the original *out_pos just in case.
+	const size_t out_start = *out_pos;
+	lzma_ret ret = index_encode(&coder, NULL, NULL, NULL, 0,
+			out, out_pos, out_size, LZMA_RUN);
+
+	if (ret == LZMA_STREAM_END) {
+		ret = LZMA_OK;
+	} else {
+		// We should never get here, but just in case, restore the
+		// output position and set the error accordingly if something
+		// goes wrong and debugging isn't enabled.
+		assert(0);
+		*out_pos = out_start;
+		ret = LZMA_PROG_ERROR;
+	}
+
+	return ret;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/index_encoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/common/index_encoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/index_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,23 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       index_encoder.h
-/// \brief      Encodes the Index field
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_INDEX_ENCODER_H
-#define LZMA_INDEX_ENCODER_H
-
-#include "common.h"
-
-
-extern lzma_ret lzma_index_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_index *i);
-
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/common/index_encoder.h (from rev 9176, vendor/xz/dist/src/liblzma/common/index_encoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/index_encoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/index_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       index_encoder.h
+/// \brief      Encodes the Index field
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_INDEX_ENCODER_H
+#define LZMA_INDEX_ENCODER_H
+
+#include "common.h"
+
+
+extern lzma_ret lzma_index_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator, const lzma_index *i);
+
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/common/index_hash.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/index_hash.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/index_hash.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,332 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       index_hash.c
-/// \brief      Validates Index by using a hash function
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-#include "index.h"
-#include "check.h"
-
-
-typedef struct {
-	/// Sum of the Block sizes (including Block Padding)
-	lzma_vli blocks_size;
-
-	/// Sum of the Uncompressed Size fields
-	lzma_vli uncompressed_size;
-
-	/// Number of Records
-	lzma_vli count;
-
-	/// Size of the List of Index Records as bytes
-	lzma_vli index_list_size;
-
-	/// Check calculated from Unpadded Sizes and Uncompressed Sizes.
-	lzma_check_state check;
-
-} lzma_index_hash_info;
-
-
-struct lzma_index_hash_s {
-	enum {
-		SEQ_BLOCK,
-		SEQ_COUNT,
-		SEQ_UNPADDED,
-		SEQ_UNCOMPRESSED,
-		SEQ_PADDING_INIT,
-		SEQ_PADDING,
-		SEQ_CRC32,
-	} sequence;
-
-	/// Information collected while decoding the actual Blocks.
-	lzma_index_hash_info blocks;
-
-	/// Information collected from the Index field.
-	lzma_index_hash_info records;
-
-	/// Number of Records not fully decoded
-	lzma_vli remaining;
-
-	/// Unpadded Size currently being read from an Index Record.
-	lzma_vli unpadded_size;
-
-	/// Uncompressed Size currently being read from an Index Record.
-	lzma_vli uncompressed_size;
-
-	/// Position in variable-length integers when decoding them from
-	/// the List of Records.
-	size_t pos;
-
-	/// CRC32 of the Index
-	uint32_t crc32;
-};
-
-
-extern LZMA_API(lzma_index_hash *)
-lzma_index_hash_init(lzma_index_hash *index_hash, lzma_allocator *allocator)
-{
-	if (index_hash == NULL) {
-		index_hash = lzma_alloc(sizeof(lzma_index_hash), allocator);
-		if (index_hash == NULL)
-			return NULL;
-	}
-
-	index_hash->sequence = SEQ_BLOCK;
-	index_hash->blocks.blocks_size = 0;
-	index_hash->blocks.uncompressed_size = 0;
-	index_hash->blocks.count = 0;
-	index_hash->blocks.index_list_size = 0;
-	index_hash->records.blocks_size = 0;
-	index_hash->records.uncompressed_size = 0;
-	index_hash->records.count = 0;
-	index_hash->records.index_list_size = 0;
-	index_hash->unpadded_size = 0;
-	index_hash->uncompressed_size = 0;
-	index_hash->pos = 0;
-	index_hash->crc32 = 0;
-
-	// These cannot fail because LZMA_CHECK_BEST is known to be supported.
-	(void)lzma_check_init(&index_hash->blocks.check, LZMA_CHECK_BEST);
-	(void)lzma_check_init(&index_hash->records.check, LZMA_CHECK_BEST);
-
-	return index_hash;
-}
-
-
-extern LZMA_API(void)
-lzma_index_hash_end(lzma_index_hash *index_hash, lzma_allocator *allocator)
-{
-	lzma_free(index_hash, allocator);
-	return;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_hash_size(const lzma_index_hash *index_hash)
-{
-	// Get the size of the Index from ->blocks instead of ->records for
-	// cases where application wants to know the Index Size before
-	// decoding the Index.
-	return index_size(index_hash->blocks.count,
-			index_hash->blocks.index_list_size);
-}
-
-
-/// Updates the sizes and the hash without any validation.
-static lzma_ret
-hash_append(lzma_index_hash_info *info, lzma_vli unpadded_size,
-		lzma_vli uncompressed_size)
-{
-	info->blocks_size += vli_ceil4(unpadded_size);
-	info->uncompressed_size += uncompressed_size;
-	info->index_list_size += lzma_vli_size(unpadded_size)
-			+ lzma_vli_size(uncompressed_size);
-	++info->count;
-
-	const lzma_vli sizes[2] = { unpadded_size, uncompressed_size };
-	lzma_check_update(&info->check, LZMA_CHECK_BEST,
-			(const uint8_t *)(sizes), sizeof(sizes));
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_hash_append(lzma_index_hash *index_hash, lzma_vli unpadded_size,
-		lzma_vli uncompressed_size)
-{
-	// Validate the arguments.
-	if (index_hash->sequence != SEQ_BLOCK
-			|| unpadded_size < UNPADDED_SIZE_MIN
-			|| unpadded_size > UNPADDED_SIZE_MAX
-			|| uncompressed_size > LZMA_VLI_MAX)
-		return LZMA_PROG_ERROR;
-
-	// Update the hash.
-	return_if_error(hash_append(&index_hash->blocks,
-			unpadded_size, uncompressed_size));
-
-	// Validate the properties of *info are still in allowed limits.
-	if (index_hash->blocks.blocks_size > LZMA_VLI_MAX
-			|| index_hash->blocks.uncompressed_size > LZMA_VLI_MAX
-			|| index_size(index_hash->blocks.count,
-					index_hash->blocks.index_list_size)
-				> LZMA_BACKWARD_SIZE_MAX
-			|| index_stream_size(index_hash->blocks.blocks_size,
-					index_hash->blocks.count,
-					index_hash->blocks.index_list_size)
-				> LZMA_VLI_MAX)
-		return LZMA_DATA_ERROR;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_hash_decode(lzma_index_hash *index_hash, const uint8_t *in,
-		size_t *in_pos, size_t in_size)
-{
-	// Catch zero input buffer here, because in contrast to Index encoder
-	// and decoder functions, applications call this function directly
-	// instead of via lzma_code(), which does the buffer checking.
-	if (*in_pos >= in_size)
-		return LZMA_BUF_ERROR;
-
-	// NOTE: This function has many similarities to index_encode() and
-	// index_decode() functions found from index_encoder.c and
-	// index_decoder.c. See the comments especially in index_encoder.c.
-	const size_t in_start = *in_pos;
-	lzma_ret ret = LZMA_OK;
-
-	while (*in_pos < in_size)
-	switch (index_hash->sequence) {
-	case SEQ_BLOCK:
-		// Check the Index Indicator is present.
-		if (in[(*in_pos)++] != 0x00)
-			return LZMA_DATA_ERROR;
-
-		index_hash->sequence = SEQ_COUNT;
-		break;
-
-	case SEQ_COUNT: {
-		ret = lzma_vli_decode(&index_hash->remaining,
-				&index_hash->pos, in, in_pos, in_size);
-		if (ret != LZMA_STREAM_END)
-			goto out;
-
-		// The count must match the count of the Blocks decoded.
-		if (index_hash->remaining != index_hash->blocks.count)
-			return LZMA_DATA_ERROR;
-
-		ret = LZMA_OK;
-		index_hash->pos = 0;
-
-		// Handle the special case when there are no Blocks.
-		index_hash->sequence = index_hash->remaining == 0
-				? SEQ_PADDING_INIT : SEQ_UNPADDED;
-		break;
-	}
-
-	case SEQ_UNPADDED:
-	case SEQ_UNCOMPRESSED: {
-		lzma_vli *size = index_hash->sequence == SEQ_UNPADDED
-				? &index_hash->unpadded_size
-				: &index_hash->uncompressed_size;
-
-		ret = lzma_vli_decode(size, &index_hash->pos,
-				in, in_pos, in_size);
-		if (ret != LZMA_STREAM_END)
-			goto out;
-
-		ret = LZMA_OK;
-		index_hash->pos = 0;
-
-		if (index_hash->sequence == SEQ_UNPADDED) {
-			if (index_hash->unpadded_size < UNPADDED_SIZE_MIN
-					|| index_hash->unpadded_size
-						> UNPADDED_SIZE_MAX)
-				return LZMA_DATA_ERROR;
-
-			index_hash->sequence = SEQ_UNCOMPRESSED;
-		} else {
-			// Update the hash.
-			return_if_error(hash_append(&index_hash->records,
-					index_hash->unpadded_size,
-					index_hash->uncompressed_size));
-
-			// Verify that we don't go over the known sizes. Note
-			// that this validation is simpler than the one used
-			// in lzma_index_hash_append(), because here we know
-			// that values in index_hash->blocks are already
-			// validated and we are fine as long as we don't
-			// exceed them in index_hash->records.
-			if (index_hash->blocks.blocks_size
-					< index_hash->records.blocks_size
-					|| index_hash->blocks.uncompressed_size
-					< index_hash->records.uncompressed_size
-					|| index_hash->blocks.index_list_size
-					< index_hash->records.index_list_size)
-				return LZMA_DATA_ERROR;
-
-			// Check if this was the last Record.
-			index_hash->sequence = --index_hash->remaining == 0
-					? SEQ_PADDING_INIT : SEQ_UNPADDED;
-		}
-
-		break;
-	}
-
-	case SEQ_PADDING_INIT:
-		index_hash->pos = (LZMA_VLI_C(4) - index_size_unpadded(
-				index_hash->records.count,
-				index_hash->records.index_list_size)) & 3;
-		index_hash->sequence = SEQ_PADDING;
-
-	// Fall through
-
-	case SEQ_PADDING:
-		if (index_hash->pos > 0) {
-			--index_hash->pos;
-			if (in[(*in_pos)++] != 0x00)
-				return LZMA_DATA_ERROR;
-
-			break;
-		}
-
-		// Compare the sizes.
-		if (index_hash->blocks.blocks_size
-				!= index_hash->records.blocks_size
-				|| index_hash->blocks.uncompressed_size
-				!= index_hash->records.uncompressed_size
-				|| index_hash->blocks.index_list_size
-				!= index_hash->records.index_list_size)
-			return LZMA_DATA_ERROR;
-
-		// Finish the hashes and compare them.
-		lzma_check_finish(&index_hash->blocks.check, LZMA_CHECK_BEST);
-		lzma_check_finish(&index_hash->records.check, LZMA_CHECK_BEST);
-		if (memcmp(index_hash->blocks.check.buffer.u8,
-				index_hash->records.check.buffer.u8,
-				lzma_check_size(LZMA_CHECK_BEST)) != 0)
-			return LZMA_DATA_ERROR;
-
-		// Finish the CRC32 calculation.
-		index_hash->crc32 = lzma_crc32(in + in_start,
-				*in_pos - in_start, index_hash->crc32);
-
-		index_hash->sequence = SEQ_CRC32;
-
-	// Fall through
-
-	case SEQ_CRC32:
-		do {
-			if (*in_pos == in_size)
-				return LZMA_OK;
-
-			if (((index_hash->crc32 >> (index_hash->pos * 8))
-					& 0xFF) != in[(*in_pos)++])
-				return LZMA_DATA_ERROR;
-
-		} while (++index_hash->pos < 4);
-
-		return LZMA_STREAM_END;
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-
-out:
-	// Update the CRC32,
-	index_hash->crc32 = lzma_crc32(in + in_start,
-			*in_pos - in_start, index_hash->crc32);
-
-	return ret;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/index_hash.c (from rev 9176, vendor/xz/dist/src/liblzma/common/index_hash.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/index_hash.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/index_hash.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,334 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       index_hash.c
+/// \brief      Validates Index by using a hash function
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+#include "index.h"
+#include "check.h"
+
+
+typedef struct {
+	/// Sum of the Block sizes (including Block Padding)
+	lzma_vli blocks_size;
+
+	/// Sum of the Uncompressed Size fields
+	lzma_vli uncompressed_size;
+
+	/// Number of Records
+	lzma_vli count;
+
+	/// Size of the List of Index Records as bytes
+	lzma_vli index_list_size;
+
+	/// Check calculated from Unpadded Sizes and Uncompressed Sizes.
+	lzma_check_state check;
+
+} lzma_index_hash_info;
+
+
+struct lzma_index_hash_s {
+	enum {
+		SEQ_BLOCK,
+		SEQ_COUNT,
+		SEQ_UNPADDED,
+		SEQ_UNCOMPRESSED,
+		SEQ_PADDING_INIT,
+		SEQ_PADDING,
+		SEQ_CRC32,
+	} sequence;
+
+	/// Information collected while decoding the actual Blocks.
+	lzma_index_hash_info blocks;
+
+	/// Information collected from the Index field.
+	lzma_index_hash_info records;
+
+	/// Number of Records not fully decoded
+	lzma_vli remaining;
+
+	/// Unpadded Size currently being read from an Index Record.
+	lzma_vli unpadded_size;
+
+	/// Uncompressed Size currently being read from an Index Record.
+	lzma_vli uncompressed_size;
+
+	/// Position in variable-length integers when decoding them from
+	/// the List of Records.
+	size_t pos;
+
+	/// CRC32 of the Index
+	uint32_t crc32;
+};
+
+
+extern LZMA_API(lzma_index_hash *)
+lzma_index_hash_init(lzma_index_hash *index_hash,
+		const lzma_allocator *allocator)
+{
+	if (index_hash == NULL) {
+		index_hash = lzma_alloc(sizeof(lzma_index_hash), allocator);
+		if (index_hash == NULL)
+			return NULL;
+	}
+
+	index_hash->sequence = SEQ_BLOCK;
+	index_hash->blocks.blocks_size = 0;
+	index_hash->blocks.uncompressed_size = 0;
+	index_hash->blocks.count = 0;
+	index_hash->blocks.index_list_size = 0;
+	index_hash->records.blocks_size = 0;
+	index_hash->records.uncompressed_size = 0;
+	index_hash->records.count = 0;
+	index_hash->records.index_list_size = 0;
+	index_hash->unpadded_size = 0;
+	index_hash->uncompressed_size = 0;
+	index_hash->pos = 0;
+	index_hash->crc32 = 0;
+
+	// These cannot fail because LZMA_CHECK_BEST is known to be supported.
+	(void)lzma_check_init(&index_hash->blocks.check, LZMA_CHECK_BEST);
+	(void)lzma_check_init(&index_hash->records.check, LZMA_CHECK_BEST);
+
+	return index_hash;
+}
+
+
+extern LZMA_API(void)
+lzma_index_hash_end(lzma_index_hash *index_hash,
+		const lzma_allocator *allocator)
+{
+	lzma_free(index_hash, allocator);
+	return;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_hash_size(const lzma_index_hash *index_hash)
+{
+	// Get the size of the Index from ->blocks instead of ->records for
+	// cases where application wants to know the Index Size before
+	// decoding the Index.
+	return index_size(index_hash->blocks.count,
+			index_hash->blocks.index_list_size);
+}
+
+
+/// Updates the sizes and the hash without any validation.
+static lzma_ret
+hash_append(lzma_index_hash_info *info, lzma_vli unpadded_size,
+		lzma_vli uncompressed_size)
+{
+	info->blocks_size += vli_ceil4(unpadded_size);
+	info->uncompressed_size += uncompressed_size;
+	info->index_list_size += lzma_vli_size(unpadded_size)
+			+ lzma_vli_size(uncompressed_size);
+	++info->count;
+
+	const lzma_vli sizes[2] = { unpadded_size, uncompressed_size };
+	lzma_check_update(&info->check, LZMA_CHECK_BEST,
+			(const uint8_t *)(sizes), sizeof(sizes));
+
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_hash_append(lzma_index_hash *index_hash, lzma_vli unpadded_size,
+		lzma_vli uncompressed_size)
+{
+	// Validate the arguments.
+	if (index_hash->sequence != SEQ_BLOCK
+			|| unpadded_size < UNPADDED_SIZE_MIN
+			|| unpadded_size > UNPADDED_SIZE_MAX
+			|| uncompressed_size > LZMA_VLI_MAX)
+		return LZMA_PROG_ERROR;
+
+	// Update the hash.
+	return_if_error(hash_append(&index_hash->blocks,
+			unpadded_size, uncompressed_size));
+
+	// Validate the properties of *info are still in allowed limits.
+	if (index_hash->blocks.blocks_size > LZMA_VLI_MAX
+			|| index_hash->blocks.uncompressed_size > LZMA_VLI_MAX
+			|| index_size(index_hash->blocks.count,
+					index_hash->blocks.index_list_size)
+				> LZMA_BACKWARD_SIZE_MAX
+			|| index_stream_size(index_hash->blocks.blocks_size,
+					index_hash->blocks.count,
+					index_hash->blocks.index_list_size)
+				> LZMA_VLI_MAX)
+		return LZMA_DATA_ERROR;
+
+	return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_hash_decode(lzma_index_hash *index_hash, const uint8_t *in,
+		size_t *in_pos, size_t in_size)
+{
+	// Catch zero input buffer here, because in contrast to Index encoder
+	// and decoder functions, applications call this function directly
+	// instead of via lzma_code(), which does the buffer checking.
+	if (*in_pos >= in_size)
+		return LZMA_BUF_ERROR;
+
+	// NOTE: This function has many similarities to index_encode() and
+	// index_decode() functions found from index_encoder.c and
+	// index_decoder.c. See the comments especially in index_encoder.c.
+	const size_t in_start = *in_pos;
+	lzma_ret ret = LZMA_OK;
+
+	while (*in_pos < in_size)
+	switch (index_hash->sequence) {
+	case SEQ_BLOCK:
+		// Check the Index Indicator is present.
+		if (in[(*in_pos)++] != 0x00)
+			return LZMA_DATA_ERROR;
+
+		index_hash->sequence = SEQ_COUNT;
+		break;
+
+	case SEQ_COUNT: {
+		ret = lzma_vli_decode(&index_hash->remaining,
+				&index_hash->pos, in, in_pos, in_size);
+		if (ret != LZMA_STREAM_END)
+			goto out;
+
+		// The count must match the count of the Blocks decoded.
+		if (index_hash->remaining != index_hash->blocks.count)
+			return LZMA_DATA_ERROR;
+
+		ret = LZMA_OK;
+		index_hash->pos = 0;
+
+		// Handle the special case when there are no Blocks.
+		index_hash->sequence = index_hash->remaining == 0
+				? SEQ_PADDING_INIT : SEQ_UNPADDED;
+		break;
+	}
+
+	case SEQ_UNPADDED:
+	case SEQ_UNCOMPRESSED: {
+		lzma_vli *size = index_hash->sequence == SEQ_UNPADDED
+				? &index_hash->unpadded_size
+				: &index_hash->uncompressed_size;
+
+		ret = lzma_vli_decode(size, &index_hash->pos,
+				in, in_pos, in_size);
+		if (ret != LZMA_STREAM_END)
+			goto out;
+
+		ret = LZMA_OK;
+		index_hash->pos = 0;
+
+		if (index_hash->sequence == SEQ_UNPADDED) {
+			if (index_hash->unpadded_size < UNPADDED_SIZE_MIN
+					|| index_hash->unpadded_size
+						> UNPADDED_SIZE_MAX)
+				return LZMA_DATA_ERROR;
+
+			index_hash->sequence = SEQ_UNCOMPRESSED;
+		} else {
+			// Update the hash.
+			return_if_error(hash_append(&index_hash->records,
+					index_hash->unpadded_size,
+					index_hash->uncompressed_size));
+
+			// Verify that we don't go over the known sizes. Note
+			// that this validation is simpler than the one used
+			// in lzma_index_hash_append(), because here we know
+			// that values in index_hash->blocks are already
+			// validated and we are fine as long as we don't
+			// exceed them in index_hash->records.
+			if (index_hash->blocks.blocks_size
+					< index_hash->records.blocks_size
+					|| index_hash->blocks.uncompressed_size
+					< index_hash->records.uncompressed_size
+					|| index_hash->blocks.index_list_size
+					< index_hash->records.index_list_size)
+				return LZMA_DATA_ERROR;
+
+			// Check if this was the last Record.
+			index_hash->sequence = --index_hash->remaining == 0
+					? SEQ_PADDING_INIT : SEQ_UNPADDED;
+		}
+
+		break;
+	}
+
+	case SEQ_PADDING_INIT:
+		index_hash->pos = (LZMA_VLI_C(4) - index_size_unpadded(
+				index_hash->records.count,
+				index_hash->records.index_list_size)) & 3;
+		index_hash->sequence = SEQ_PADDING;
+
+	// Fall through
+
+	case SEQ_PADDING:
+		if (index_hash->pos > 0) {
+			--index_hash->pos;
+			if (in[(*in_pos)++] != 0x00)
+				return LZMA_DATA_ERROR;
+
+			break;
+		}
+
+		// Compare the sizes.
+		if (index_hash->blocks.blocks_size
+				!= index_hash->records.blocks_size
+				|| index_hash->blocks.uncompressed_size
+				!= index_hash->records.uncompressed_size
+				|| index_hash->blocks.index_list_size
+				!= index_hash->records.index_list_size)
+			return LZMA_DATA_ERROR;
+
+		// Finish the hashes and compare them.
+		lzma_check_finish(&index_hash->blocks.check, LZMA_CHECK_BEST);
+		lzma_check_finish(&index_hash->records.check, LZMA_CHECK_BEST);
+		if (memcmp(index_hash->blocks.check.buffer.u8,
+				index_hash->records.check.buffer.u8,
+				lzma_check_size(LZMA_CHECK_BEST)) != 0)
+			return LZMA_DATA_ERROR;
+
+		// Finish the CRC32 calculation.
+		index_hash->crc32 = lzma_crc32(in + in_start,
+				*in_pos - in_start, index_hash->crc32);
+
+		index_hash->sequence = SEQ_CRC32;
+
+	// Fall through
+
+	case SEQ_CRC32:
+		do {
+			if (*in_pos == in_size)
+				return LZMA_OK;
+
+			if (((index_hash->crc32 >> (index_hash->pos * 8))
+					& 0xFF) != in[(*in_pos)++])
+				return LZMA_DATA_ERROR;
+
+		} while (++index_hash->pos < 4);
+
+		return LZMA_STREAM_END;
+
+	default:
+		assert(0);
+		return LZMA_PROG_ERROR;
+	}
+
+out:
+	// Update the CRC32,
+	index_hash->crc32 = lzma_crc32(in + in_start,
+			*in_pos - in_start, index_hash->crc32);
+
+	return ret;
+}

Copied: vendor/xz/5.2.3/src/liblzma/common/memcmplen.h (from rev 9176, vendor/xz/dist/src/liblzma/common/memcmplen.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/memcmplen.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/memcmplen.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,175 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       memcmplen.h
+/// \brief      Optimized comparison of two buffers
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_MEMCMPLEN_H
+#define LZMA_MEMCMPLEN_H
+
+#include "common.h"
+
+#ifdef HAVE_IMMINTRIN_H
+#	include <immintrin.h>
+#endif
+
+
+/// Find out how many equal bytes the two buffers have.
+///
+/// \param      buf1    First buffer
+/// \param      buf2    Second buffer
+/// \param      len     How many bytes have already been compared and will
+///                     be assumed to match
+/// \param      limit   How many bytes to compare at most, including the
+///                     already-compared bytes. This must be significantly
+///                     smaller than UINT32_MAX to avoid integer overflows.
+///                     Up to LZMA_MEMCMPLEN_EXTRA bytes may be read past
+///                     the specified limit from both buf1 and buf2.
+///
+/// \return     Number of equal bytes in the buffers is returned.
+///             This is always at least len and at most limit.
+///
+/// \note       LZMA_MEMCMPLEN_EXTRA defines how many extra bytes may be read.
+///             It's rounded up to 2^n. This extra amount needs to be
+///             allocated in the buffers being used. It needs to be
+///             initialized too to keep Valgrind quiet.
+static inline uint32_t lzma_attribute((__always_inline__))
+lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2,
+		uint32_t len, uint32_t limit)
+{
+	assert(len <= limit);
+	assert(limit <= UINT32_MAX / 2);
+
+#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
+		&& ((TUKLIB_GNUC_REQ(3, 4) && defined(__x86_64__)) \
+			|| (defined(__INTEL_COMPILER) && defined(__x86_64__)) \
+			|| (defined(__INTEL_COMPILER) && defined(_M_X64)) \
+			|| (defined(_MSC_VER) && defined(_M_X64)))
+	// NOTE: This will use 64-bit unaligned access which
+	// TUKLIB_FAST_UNALIGNED_ACCESS wasn't meant to permit, but
+	// it's convenient here at least as long as it's x86-64 only.
+	//
+	// I keep this x86-64 only for now since that's where I know this
+	// to be a good method. This may be fine on other 64-bit CPUs too.
+	// On big endian one should use xor instead of subtraction and switch
+	// to __builtin_clzll().
+#define LZMA_MEMCMPLEN_EXTRA 8
+	while (len < limit) {
+		const uint64_t x = *(const uint64_t *)(buf1 + len)
+				- *(const uint64_t *)(buf2 + len);
+		if (x != 0) {
+#	if defined(_M_X64) // MSVC or Intel C compiler on Windows
+			unsigned long tmp;
+			_BitScanForward64(&tmp, x);
+			len += (uint32_t)tmp >> 3;
+#	else // GCC, clang, or Intel C compiler
+			len += (uint32_t)__builtin_ctzll(x) >> 3;
+#	endif
+			return my_min(len, limit);
+		}
+
+		len += 8;
+	}
+
+	return limit;
+
+#elif defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
+		&& defined(HAVE__MM_MOVEMASK_EPI8) \
+		&& ((defined(__GNUC__) && defined(__SSE2_MATH__)) \
+			|| (defined(__INTEL_COMPILER) && defined(__SSE2__)) \
+			|| (defined(_MSC_VER) && defined(_M_IX86_FP) \
+				&& _M_IX86_FP >= 2))
+	// NOTE: Like above, this will use 128-bit unaligned access which
+	// TUKLIB_FAST_UNALIGNED_ACCESS wasn't meant to permit.
+	//
+	// SSE2 version for 32-bit and 64-bit x86. On x86-64 the above
+	// version is sometimes significantly faster and sometimes
+	// slightly slower than this SSE2 version, so this SSE2
+	// version isn't used on x86-64.
+#	define LZMA_MEMCMPLEN_EXTRA 16
+	while (len < limit) {
+		const uint32_t x = 0xFFFF ^ _mm_movemask_epi8(_mm_cmpeq_epi8(
+			_mm_loadu_si128((const __m128i *)(buf1 + len)),
+			_mm_loadu_si128((const __m128i *)(buf2 + len))));
+
+		if (x != 0) {
+#	if defined(__INTEL_COMPILER)
+			len += _bit_scan_forward(x);
+#	elif defined(_MSC_VER)
+			unsigned long tmp;
+			_BitScanForward(&tmp, x);
+			len += tmp;
+#	else
+			len += __builtin_ctz(x);
+#	endif
+			return my_min(len, limit);
+		}
+
+		len += 16;
+	}
+
+	return limit;
+
+#elif defined(TUKLIB_FAST_UNALIGNED_ACCESS) && !defined(WORDS_BIGENDIAN)
+	// Generic 32-bit little endian method
+#	define LZMA_MEMCMPLEN_EXTRA 4
+	while (len < limit) {
+		uint32_t x = *(const uint32_t *)(buf1 + len)
+				- *(const uint32_t *)(buf2 + len);
+		if (x != 0) {
+			if ((x & 0xFFFF) == 0) {
+				len += 2;
+				x >>= 16;
+			}
+
+			if ((x & 0xFF) == 0)
+				++len;
+
+			return my_min(len, limit);
+		}
+
+		len += 4;
+	}
+
+	return limit;
+
+#elif defined(TUKLIB_FAST_UNALIGNED_ACCESS) && defined(WORDS_BIGENDIAN)
+	// Generic 32-bit big endian method
+#	define LZMA_MEMCMPLEN_EXTRA 4
+	while (len < limit) {
+		uint32_t x = *(const uint32_t *)(buf1 + len)
+				^ *(const uint32_t *)(buf2 + len);
+		if (x != 0) {
+			if ((x & 0xFFFF0000) == 0) {
+				len += 2;
+				x <<= 16;
+			}
+
+			if ((x & 0xFF000000) == 0)
+				++len;
+
+			return my_min(len, limit);
+		}
+
+		len += 4;
+	}
+
+	return limit;
+
+#else
+	// Simple portable version that doesn't use unaligned access.
+#	define LZMA_MEMCMPLEN_EXTRA 0
+	while (len < limit && buf1[len] == buf2[len])
+		++len;
+
+	return len;
+#endif
+}
+
+#endif

Copied: vendor/xz/5.2.3/src/liblzma/common/outqueue.c (from rev 9176, vendor/xz/dist/src/liblzma/common/outqueue.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/outqueue.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/outqueue.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,184 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \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, const 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, const 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;
+}

Copied: vendor/xz/5.2.3/src/liblzma/common/outqueue.h (from rev 9176, vendor/xz/dist/src/liblzma/common/outqueue.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/outqueue.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/outqueue.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,156 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \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, const 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, const 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;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/stream_buffer_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/stream_buffer_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/stream_buffer_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,91 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_buffer_decoder.c
-/// \brief      Single-call .xz Stream decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "stream_decoder.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_stream_buffer_decode(uint64_t *memlimit, uint32_t flags,
-		lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	// Sanity checks
-	if (in_pos == NULL || (in == NULL && *in_pos != in_size)
-			|| *in_pos > in_size || out_pos == NULL
-			|| (out == NULL && *out_pos != out_size)
-			|| *out_pos > out_size)
-		return LZMA_PROG_ERROR;
-
-	// Catch flags that are not allowed in buffer-to-buffer decoding.
-	if (flags & LZMA_TELL_ANY_CHECK)
-		return LZMA_PROG_ERROR;
-
-	// Initialize the Stream decoder.
-	// TODO: We need something to tell the decoder that it can use the
-	// output buffer as workspace, and thus save significant amount of RAM.
-	lzma_next_coder stream_decoder = LZMA_NEXT_CODER_INIT;
-	lzma_ret ret = lzma_stream_decoder_init(
-			&stream_decoder, allocator, *memlimit, flags);
-
-	if (ret == LZMA_OK) {
-		// Save the positions so that we can restore them in case
-		// an error occurs.
-		const size_t in_start = *in_pos;
-		const size_t out_start = *out_pos;
-
-		// Do the actual decoding.
-		ret = stream_decoder.code(stream_decoder.coder, allocator,
-				in, in_pos, in_size, out, out_pos, out_size,
-				LZMA_FINISH);
-
-		if (ret == LZMA_STREAM_END) {
-			ret = LZMA_OK;
-		} else {
-			// Something went wrong, restore the positions.
-			*in_pos = in_start;
-			*out_pos = out_start;
-
-			if (ret == LZMA_OK) {
-				// Either the input was truncated or the
-				// output buffer was too small.
-				assert(*in_pos == in_size
-						|| *out_pos == out_size);
-
-				// If all the input was consumed, then the
-				// input is truncated, even if the output
-				// buffer is also full. This is because
-				// processing the last byte of the Stream
-				// never produces output.
-				if (*in_pos == in_size)
-					ret = LZMA_DATA_ERROR;
-				else
-					ret = LZMA_BUF_ERROR;
-
-			} else if (ret == LZMA_MEMLIMIT_ERROR) {
-				// Let the caller know how much memory would
-				// have been needed.
-				uint64_t memusage;
-				(void)stream_decoder.memconfig(
-						stream_decoder.coder,
-						memlimit, &memusage, 0);
-			}
-		}
-	}
-
-	// Free the decoder memory. This needs to be done even if
-	// initialization fails, because the internal API doesn't
-	// require the initialization function to free its memory on error.
-	lzma_next_end(&stream_decoder, allocator);
-
-	return ret;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/stream_buffer_decoder.c (from rev 9176, vendor/xz/dist/src/liblzma/common/stream_buffer_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/stream_buffer_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/stream_buffer_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,91 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       stream_buffer_decoder.c
+/// \brief      Single-call .xz Stream decoder
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "stream_decoder.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_stream_buffer_decode(uint64_t *memlimit, uint32_t flags,
+		const lzma_allocator *allocator,
+		const uint8_t *in, size_t *in_pos, size_t in_size,
+		uint8_t *out, size_t *out_pos, size_t out_size)
+{
+	// Sanity checks
+	if (in_pos == NULL || (in == NULL && *in_pos != in_size)
+			|| *in_pos > in_size || out_pos == NULL
+			|| (out == NULL && *out_pos != out_size)
+			|| *out_pos > out_size)
+		return LZMA_PROG_ERROR;
+
+	// Catch flags that are not allowed in buffer-to-buffer decoding.
+	if (flags & LZMA_TELL_ANY_CHECK)
+		return LZMA_PROG_ERROR;
+
+	// Initialize the Stream decoder.
+	// TODO: We need something to tell the decoder that it can use the
+	// output buffer as workspace, and thus save significant amount of RAM.
+	lzma_next_coder stream_decoder = LZMA_NEXT_CODER_INIT;
+	lzma_ret ret = lzma_stream_decoder_init(
+			&stream_decoder, allocator, *memlimit, flags);
+
+	if (ret == LZMA_OK) {
+		// Save the positions so that we can restore them in case
+		// an error occurs.
+		const size_t in_start = *in_pos;
+		const size_t out_start = *out_pos;
+
+		// Do the actual decoding.
+		ret = stream_decoder.code(stream_decoder.coder, allocator,
+				in, in_pos, in_size, out, out_pos, out_size,
+				LZMA_FINISH);
+
+		if (ret == LZMA_STREAM_END) {
+			ret = LZMA_OK;
+		} else {
+			// Something went wrong, restore the positions.
+			*in_pos = in_start;
+			*out_pos = out_start;
+
+			if (ret == LZMA_OK) {
+				// Either the input was truncated or the
+				// output buffer was too small.
+				assert(*in_pos == in_size
+						|| *out_pos == out_size);
+
+				// If all the input was consumed, then the
+				// input is truncated, even if the output
+				// buffer is also full. This is because
+				// processing the last byte of the Stream
+				// never produces output.
+				if (*in_pos == in_size)
+					ret = LZMA_DATA_ERROR;
+				else
+					ret = LZMA_BUF_ERROR;
+
+			} else if (ret == LZMA_MEMLIMIT_ERROR) {
+				// Let the caller know how much memory would
+				// have been needed.
+				uint64_t memusage;
+				(void)stream_decoder.memconfig(
+						stream_decoder.coder,
+						memlimit, &memusage, 0);
+			}
+		}
+	}
+
+	// Free the decoder memory. This needs to be done even if
+	// initialization fails, because the internal API doesn't
+	// require the initialization function to free its memory on error.
+	lzma_next_end(&stream_decoder, allocator);
+
+	return ret;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/stream_buffer_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/stream_buffer_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/stream_buffer_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,140 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_buffer_encoder.c
-/// \brief      Single-call .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 "index.h"
-
-
-/// Maximum size of Index that has exactly one Record.
-/// Index Indicator + Number of Records + Record + CRC32 rounded up to
-/// the next multiple of four.
-#define INDEX_BOUND ((1 + 1 + 2 * LZMA_VLI_BYTES_MAX + 4 + 3) & ~3)
-
-/// Stream Header, Stream Footer, and Index
-#define HEADERS_BOUND (2 * LZMA_STREAM_HEADER_SIZE + INDEX_BOUND)
-
-
-extern LZMA_API(size_t)
-lzma_stream_buffer_bound(size_t uncompressed_size)
-{
-	// Get the maximum possible size of a Block.
-	const size_t block_bound = lzma_block_buffer_bound(uncompressed_size);
-	if (block_bound == 0)
-		return 0;
-
-	// Catch the possible integer overflow and also prevent the size of
-	// the Stream exceeding LZMA_VLI_MAX (theoretically possible on
-	// 64-bit systems).
-	if (my_min(SIZE_MAX, LZMA_VLI_MAX) - block_bound < HEADERS_BOUND)
-		return 0;
-
-	return block_bound + HEADERS_BOUND;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_stream_buffer_encode(lzma_filter *filters, lzma_check check,
-		lzma_allocator *allocator, const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos_ptr, size_t out_size)
-{
-	// Sanity checks
-	if (filters == NULL || (unsigned int)(check) > LZMA_CHECK_ID_MAX
-			|| (in == NULL && in_size != 0) || out == NULL
-			|| out_pos_ptr == NULL || *out_pos_ptr > out_size)
-		return LZMA_PROG_ERROR;
-
-	if (!lzma_check_is_supported(check))
-		return LZMA_UNSUPPORTED_CHECK;
-
-	// Note for the paranoids: Index encoder prevents the Stream from
-	// getting too big and still being accepted with LZMA_OK, and Block
-	// encoder catches if the input is too big. So we don't need to
-	// separately check if the buffers are too big.
-
-	// Use a local copy. We update *out_pos_ptr only if everything
-	// succeeds.
-	size_t out_pos = *out_pos_ptr;
-
-	// Check that there's enough space for both Stream Header and
-	// Stream Footer.
-	if (out_size - out_pos <= 2 * LZMA_STREAM_HEADER_SIZE)
-		return LZMA_BUF_ERROR;
-
-	// Reserve space for Stream Footer so we don't need to check for
-	// available space again before encoding Stream Footer.
-	out_size -= LZMA_STREAM_HEADER_SIZE;
-
-	// Encode the Stream Header.
-	lzma_stream_flags stream_flags = {
-		.version = 0,
-		.check = check,
-	};
-
-	if (lzma_stream_header_encode(&stream_flags, out + out_pos)
-			!= LZMA_OK)
-		return LZMA_PROG_ERROR;
-
-	out_pos += LZMA_STREAM_HEADER_SIZE;
-
-	// Encode a Block but only if there is at least one byte of input.
-	lzma_block block = {
-		.version = 0,
-		.check = check,
-		.filters = filters,
-	};
-
-	if (in_size > 0)
-		return_if_error(lzma_block_buffer_encode(&block, allocator,
-				in, in_size, out, &out_pos, out_size));
-
-	// Index
-	{
-		// Create an Index. It will have one Record if there was
-		// at least one byte of input to encode. Otherwise the
-		// Index will be empty.
-		lzma_index *i = lzma_index_init(allocator);
-		if (i == NULL)
-			return LZMA_MEM_ERROR;
-
-		lzma_ret ret = LZMA_OK;
-
-		if (in_size > 0)
-			ret = lzma_index_append(i, allocator,
-					lzma_block_unpadded_size(&block),
-					block.uncompressed_size);
-
-		// If adding the Record was successful, encode the Index
-		// and get its size which will be stored into Stream Footer.
-		if (ret == LZMA_OK) {
-			ret = lzma_index_buffer_encode(
-					i, out, &out_pos, out_size);
-
-			stream_flags.backward_size = lzma_index_size(i);
-		}
-
-		lzma_index_end(i, allocator);
-
-		if (ret != LZMA_OK)
-			return ret;
-	}
-
-	// Stream Footer. We have already reserved space for this.
-	if (lzma_stream_footer_encode(&stream_flags, out + out_pos)
-			!= LZMA_OK)
-		return LZMA_PROG_ERROR;
-
-	out_pos += LZMA_STREAM_HEADER_SIZE;
-
-	// Everything went fine, make the new output position available
-	// to the application.
-	*out_pos_ptr = out_pos;
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/stream_buffer_encoder.c (from rev 9176, vendor/xz/dist/src/liblzma/common/stream_buffer_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/stream_buffer_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/stream_buffer_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,141 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       stream_buffer_encoder.c
+/// \brief      Single-call .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 "index.h"
+
+
+/// Maximum size of Index that has exactly one Record.
+/// Index Indicator + Number of Records + Record + CRC32 rounded up to
+/// the next multiple of four.
+#define INDEX_BOUND ((1 + 1 + 2 * LZMA_VLI_BYTES_MAX + 4 + 3) & ~3)
+
+/// Stream Header, Stream Footer, and Index
+#define HEADERS_BOUND (2 * LZMA_STREAM_HEADER_SIZE + INDEX_BOUND)
+
+
+extern LZMA_API(size_t)
+lzma_stream_buffer_bound(size_t uncompressed_size)
+{
+	// Get the maximum possible size of a Block.
+	const size_t block_bound = lzma_block_buffer_bound(uncompressed_size);
+	if (block_bound == 0)
+		return 0;
+
+	// Catch the possible integer overflow and also prevent the size of
+	// the Stream exceeding LZMA_VLI_MAX (theoretically possible on
+	// 64-bit systems).
+	if (my_min(SIZE_MAX, LZMA_VLI_MAX) - block_bound < HEADERS_BOUND)
+		return 0;
+
+	return block_bound + HEADERS_BOUND;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_stream_buffer_encode(lzma_filter *filters, lzma_check check,
+		const lzma_allocator *allocator,
+		const uint8_t *in, size_t in_size,
+		uint8_t *out, size_t *out_pos_ptr, size_t out_size)
+{
+	// Sanity checks
+	if (filters == NULL || (unsigned int)(check) > LZMA_CHECK_ID_MAX
+			|| (in == NULL && in_size != 0) || out == NULL
+			|| out_pos_ptr == NULL || *out_pos_ptr > out_size)
+		return LZMA_PROG_ERROR;
+
+	if (!lzma_check_is_supported(check))
+		return LZMA_UNSUPPORTED_CHECK;
+
+	// Note for the paranoids: Index encoder prevents the Stream from
+	// getting too big and still being accepted with LZMA_OK, and Block
+	// encoder catches if the input is too big. So we don't need to
+	// separately check if the buffers are too big.
+
+	// Use a local copy. We update *out_pos_ptr only if everything
+	// succeeds.
+	size_t out_pos = *out_pos_ptr;
+
+	// Check that there's enough space for both Stream Header and
+	// Stream Footer.
+	if (out_size - out_pos <= 2 * LZMA_STREAM_HEADER_SIZE)
+		return LZMA_BUF_ERROR;
+
+	// Reserve space for Stream Footer so we don't need to check for
+	// available space again before encoding Stream Footer.
+	out_size -= LZMA_STREAM_HEADER_SIZE;
+
+	// Encode the Stream Header.
+	lzma_stream_flags stream_flags = {
+		.version = 0,
+		.check = check,
+	};
+
+	if (lzma_stream_header_encode(&stream_flags, out + out_pos)
+			!= LZMA_OK)
+		return LZMA_PROG_ERROR;
+
+	out_pos += LZMA_STREAM_HEADER_SIZE;
+
+	// Encode a Block but only if there is at least one byte of input.
+	lzma_block block = {
+		.version = 0,
+		.check = check,
+		.filters = filters,
+	};
+
+	if (in_size > 0)
+		return_if_error(lzma_block_buffer_encode(&block, allocator,
+				in, in_size, out, &out_pos, out_size));
+
+	// Index
+	{
+		// Create an Index. It will have one Record if there was
+		// at least one byte of input to encode. Otherwise the
+		// Index will be empty.
+		lzma_index *i = lzma_index_init(allocator);
+		if (i == NULL)
+			return LZMA_MEM_ERROR;
+
+		lzma_ret ret = LZMA_OK;
+
+		if (in_size > 0)
+			ret = lzma_index_append(i, allocator,
+					lzma_block_unpadded_size(&block),
+					block.uncompressed_size);
+
+		// If adding the Record was successful, encode the Index
+		// and get its size which will be stored into Stream Footer.
+		if (ret == LZMA_OK) {
+			ret = lzma_index_buffer_encode(
+					i, out, &out_pos, out_size);
+
+			stream_flags.backward_size = lzma_index_size(i);
+		}
+
+		lzma_index_end(i, allocator);
+
+		if (ret != LZMA_OK)
+			return ret;
+	}
+
+	// Stream Footer. We have already reserved space for this.
+	if (lzma_stream_footer_encode(&stream_flags, out + out_pos)
+			!= LZMA_OK)
+		return LZMA_PROG_ERROR;
+
+	out_pos += LZMA_STREAM_HEADER_SIZE;
+
+	// Everything went fine, make the new output position available
+	// to the application.
+	*out_pos_ptr = out_pos;
+	return LZMA_OK;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/stream_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/stream_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/stream_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,451 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_decoder.c
-/// \brief      Decodes .xz Streams
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "stream_decoder.h"
-#include "block_decoder.h"
-
-
-struct lzma_coder_s {
-	enum {
-		SEQ_STREAM_HEADER,
-		SEQ_BLOCK_HEADER,
-		SEQ_BLOCK,
-		SEQ_INDEX,
-		SEQ_STREAM_FOOTER,
-		SEQ_STREAM_PADDING,
-	} sequence;
-
-	/// Block or Metadata decoder. This takes little memory and the same
-	/// data structure can be used to decode every Block Header, so it's
-	/// a good idea to have a separate lzma_next_coder structure for it.
-	lzma_next_coder block_decoder;
-
-	/// Block options decoded by the Block Header decoder and used by
-	/// the Block decoder.
-	lzma_block block_options;
-
-	/// Stream Flags from Stream Header
-	lzma_stream_flags stream_flags;
-
-	/// Index is hashed so that it can be compared to the sizes of Blocks
-	/// with O(1) memory usage.
-	lzma_index_hash *index_hash;
-
-	/// Memory usage limit
-	uint64_t memlimit;
-
-	/// Amount of memory actually needed (only an estimate)
-	uint64_t memusage;
-
-	/// If true, LZMA_NO_CHECK is returned if the Stream has
-	/// no integrity check.
-	bool tell_no_check;
-
-	/// If true, LZMA_UNSUPPORTED_CHECK is returned if the Stream has
-	/// an integrity check that isn't supported by this liblzma build.
-	bool tell_unsupported_check;
-
-	/// If true, LZMA_GET_CHECK is returned after decoding Stream Header.
-	bool tell_any_check;
-
-	/// If true, we will decode concatenated Streams that possibly have
-	/// Stream Padding between or after them. LZMA_STREAM_END is returned
-	/// once the application isn't giving us any new input, and we aren't
-	/// in the middle of a Stream, and possible Stream Padding is a
-	/// multiple of four bytes.
-	bool concatenated;
-
-	/// When decoding concatenated Streams, this is true as long as we
-	/// are decoding the first Stream. This is needed to avoid misleading
-	/// LZMA_FORMAT_ERROR in case the later Streams don't have valid magic
-	/// bytes.
-	bool first_stream;
-
-	/// Write position in buffer[] and position in Stream Padding
-	size_t pos;
-
-	/// Buffer to hold Stream Header, Block Header, and Stream Footer.
-	/// Block Header has biggest maximum size.
-	uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX];
-};
-
-
-static lzma_ret
-stream_decoder_reset(lzma_coder *coder, lzma_allocator *allocator)
-{
-	// Initialize the Index hash used to verify the Index.
-	coder->index_hash = lzma_index_hash_init(coder->index_hash, allocator);
-	if (coder->index_hash == NULL)
-		return LZMA_MEM_ERROR;
-
-	// Reset the rest of the variables.
-	coder->sequence = SEQ_STREAM_HEADER;
-	coder->pos = 0;
-
-	return LZMA_OK;
-}
-
-
-static lzma_ret
-stream_decode(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)
-{
-	// When decoding the actual Block, it may be able to produce more
-	// output even if we don't give it any new input.
-	while (true)
-	switch (coder->sequence) {
-	case SEQ_STREAM_HEADER: {
-		// Copy the Stream Header to the internal buffer.
-		lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
-				LZMA_STREAM_HEADER_SIZE);
-
-		// Return if we didn't get the whole Stream Header yet.
-		if (coder->pos < LZMA_STREAM_HEADER_SIZE)
-			return LZMA_OK;
-
-		coder->pos = 0;
-
-		// Decode the Stream Header.
-		const lzma_ret ret = lzma_stream_header_decode(
-				&coder->stream_flags, coder->buffer);
-		if (ret != LZMA_OK)
-			return ret == LZMA_FORMAT_ERROR && !coder->first_stream
-					? LZMA_DATA_ERROR : ret;
-
-		// If we are decoding concatenated Streams, and the later
-		// Streams have invalid Header Magic Bytes, we give
-		// LZMA_DATA_ERROR instead of LZMA_FORMAT_ERROR.
-		coder->first_stream = false;
-
-		// Copy the type of the Check so that Block Header and Block
-		// decoders see it.
-		coder->block_options.check = coder->stream_flags.check;
-
-		// Even if we return LZMA_*_CHECK below, we want
-		// to continue from Block Header decoding.
-		coder->sequence = SEQ_BLOCK_HEADER;
-
-		// Detect if there's no integrity check or if it is
-		// unsupported if those were requested by the application.
-		if (coder->tell_no_check && coder->stream_flags.check
-				== LZMA_CHECK_NONE)
-			return LZMA_NO_CHECK;
-
-		if (coder->tell_unsupported_check
-				&& !lzma_check_is_supported(
-					coder->stream_flags.check))
-			return LZMA_UNSUPPORTED_CHECK;
-
-		if (coder->tell_any_check)
-			return LZMA_GET_CHECK;
-	}
-
-	// Fall through
-
-	case SEQ_BLOCK_HEADER: {
-		if (*in_pos >= in_size)
-			return LZMA_OK;
-
-		if (coder->pos == 0) {
-			// Detect if it's Index.
-			if (in[*in_pos] == 0x00) {
-				coder->sequence = SEQ_INDEX;
-				break;
-			}
-
-			// Calculate the size of the Block Header. Note that
-			// Block Header decoder wants to see this byte too
-			// so don't advance *in_pos.
-			coder->block_options.header_size
-					= lzma_block_header_size_decode(
-						in[*in_pos]);
-		}
-
-		// Copy the Block Header to the internal buffer.
-		lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
-				coder->block_options.header_size);
-
-		// Return if we didn't get the whole Block Header yet.
-		if (coder->pos < coder->block_options.header_size)
-			return LZMA_OK;
-
-		coder->pos = 0;
-
-		// Version 0 is currently the only possible version.
-		coder->block_options.version = 0;
-
-		// Set up a buffer to hold the filter chain. Block Header
-		// decoder will initialize all members of this array so
-		// we don't need to do it here.
-		lzma_filter filters[LZMA_FILTERS_MAX + 1];
-		coder->block_options.filters = filters;
-
-		// Decode the Block Header.
-		return_if_error(lzma_block_header_decode(&coder->block_options,
-				allocator, coder->buffer));
-
-		// Check the memory usage limit.
-		const uint64_t memusage = lzma_raw_decoder_memusage(filters);
-		lzma_ret ret;
-
-		if (memusage == UINT64_MAX) {
-			// One or more unknown Filter IDs.
-			ret = LZMA_OPTIONS_ERROR;
-		} else {
-			// Now we can set coder->memusage since we know that
-			// the filter chain is valid. We don't want
-			// lzma_memusage() to return UINT64_MAX in case of
-			// invalid filter chain.
-			coder->memusage = memusage;
-
-			if (memusage > coder->memlimit) {
-				// The chain would need too much memory.
-				ret = LZMA_MEMLIMIT_ERROR;
-			} else {
-				// Memory usage is OK.
-				// Initialize the Block decoder.
-				ret = lzma_block_decoder_init(
-						&coder->block_decoder,
-						allocator,
-						&coder->block_options);
-			}
-		}
-
-		// Free the allocated filter options since they are needed
-		// only to initialize the Block decoder.
-		for (size_t i = 0; i < LZMA_FILTERS_MAX; ++i)
-			lzma_free(filters[i].options, allocator);
-
-		coder->block_options.filters = NULL;
-
-		// Check if memory usage calculation and Block enocoder
-		// initialization succeeded.
-		if (ret != LZMA_OK)
-			return ret;
-
-		coder->sequence = SEQ_BLOCK;
-	}
-
-	// Fall through
-
-	case SEQ_BLOCK: {
-		const lzma_ret ret = coder->block_decoder.code(
-				coder->block_decoder.coder, allocator,
-				in, in_pos, in_size, out, out_pos, out_size,
-				action);
-
-		if (ret != LZMA_STREAM_END)
-			return ret;
-
-		// Block decoded successfully. Add the new size pair to
-		// the Index hash.
-		return_if_error(lzma_index_hash_append(coder->index_hash,
-				lzma_block_unpadded_size(
-					&coder->block_options),
-				coder->block_options.uncompressed_size));
-
-		coder->sequence = SEQ_BLOCK_HEADER;
-		break;
-	}
-
-	case SEQ_INDEX: {
-		// If we don't have any input, don't call
-		// lzma_index_hash_decode() since it would return
-		// LZMA_BUF_ERROR, which we must not do here.
-		if (*in_pos >= in_size)
-			return LZMA_OK;
-
-		// Decode the Index and compare it to the hash calculated
-		// from the sizes of the Blocks (if any).
-		const lzma_ret ret = lzma_index_hash_decode(coder->index_hash,
-				in, in_pos, in_size);
-		if (ret != LZMA_STREAM_END)
-			return ret;
-
-		coder->sequence = SEQ_STREAM_FOOTER;
-	}
-
-	// Fall through
-
-	case SEQ_STREAM_FOOTER: {
-		// Copy the Stream Footer to the internal buffer.
-		lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
-				LZMA_STREAM_HEADER_SIZE);
-
-		// Return if we didn't get the whole Stream Footer yet.
-		if (coder->pos < LZMA_STREAM_HEADER_SIZE)
-			return LZMA_OK;
-
-		coder->pos = 0;
-
-		// Decode the Stream Footer. The decoder gives
-		// LZMA_FORMAT_ERROR if the magic bytes don't match,
-		// so convert that return code to LZMA_DATA_ERROR.
-		lzma_stream_flags footer_flags;
-		const lzma_ret ret = lzma_stream_footer_decode(
-				&footer_flags, coder->buffer);
-		if (ret != LZMA_OK)
-			return ret == LZMA_FORMAT_ERROR
-					? LZMA_DATA_ERROR : ret;
-
-		// Check that Index Size stored in the Stream Footer matches
-		// the real size of the Index field.
-		if (lzma_index_hash_size(coder->index_hash)
-				!= footer_flags.backward_size)
-			return LZMA_DATA_ERROR;
-
-		// Compare that the Stream Flags fields are identical in
-		// both Stream Header and Stream Footer.
-		return_if_error(lzma_stream_flags_compare(
-				&coder->stream_flags, &footer_flags));
-
-		if (!coder->concatenated)
-			return LZMA_STREAM_END;
-
-		coder->sequence = SEQ_STREAM_PADDING;
-	}
-
-	// Fall through
-
-	case SEQ_STREAM_PADDING:
-		assert(coder->concatenated);
-
-		// Skip over possible Stream Padding.
-		while (true) {
-			if (*in_pos >= in_size) {
-				// Unless LZMA_FINISH was used, we cannot
-				// know if there's more input coming later.
-				if (action != LZMA_FINISH)
-					return LZMA_OK;
-
-				// Stream Padding must be a multiple of
-				// four bytes.
-				return coder->pos == 0
-						? LZMA_STREAM_END
-						: LZMA_DATA_ERROR;
-			}
-
-			// If the byte is not zero, it probably indicates
-			// beginning of a new Stream (or the file is corrupt).
-			if (in[*in_pos] != 0x00)
-				break;
-
-			++*in_pos;
-			coder->pos = (coder->pos + 1) & 3;
-		}
-
-		// Stream Padding must be a multiple of four bytes (empty
-		// Stream Padding is OK).
-		if (coder->pos != 0) {
-			++*in_pos;
-			return LZMA_DATA_ERROR;
-		}
-
-		// Prepare to decode the next Stream.
-		return_if_error(stream_decoder_reset(coder, allocator));
-		break;
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-
-	// Never reached
-}
-
-
-static void
-stream_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->block_decoder, allocator);
-	lzma_index_hash_end(coder->index_hash, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_check
-stream_decoder_get_check(const lzma_coder *coder)
-{
-	return coder->stream_flags.check;
-}
-
-
-static lzma_ret
-stream_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
-		uint64_t *old_memlimit, uint64_t new_memlimit)
-{
-	*memusage = coder->memusage;
-	*old_memlimit = coder->memlimit;
-
-	if (new_memlimit != 0) {
-		if (new_memlimit < coder->memusage)
-			return LZMA_MEMLIMIT_ERROR;
-
-		coder->memlimit = new_memlimit;
-	}
-
-	return LZMA_OK;
-}
-
-
-extern lzma_ret
-lzma_stream_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		uint64_t memlimit, uint32_t flags)
-{
-	lzma_next_coder_init(&lzma_stream_decoder_init, next, allocator);
-
-	if (memlimit == 0)
-		return LZMA_PROG_ERROR;
-
-	if (flags & ~LZMA_SUPPORTED_FLAGS)
-		return LZMA_OPTIONS_ERROR;
-
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &stream_decode;
-		next->end = &stream_decoder_end;
-		next->get_check = &stream_decoder_get_check;
-		next->memconfig = &stream_decoder_memconfig;
-
-		next->coder->block_decoder = LZMA_NEXT_CODER_INIT;
-		next->coder->index_hash = NULL;
-	}
-
-	next->coder->memlimit = memlimit;
-	next->coder->memusage = LZMA_MEMUSAGE_BASE;
-	next->coder->tell_no_check = (flags & LZMA_TELL_NO_CHECK) != 0;
-	next->coder->tell_unsupported_check
-			= (flags & LZMA_TELL_UNSUPPORTED_CHECK) != 0;
-	next->coder->tell_any_check = (flags & LZMA_TELL_ANY_CHECK) != 0;
-	next->coder->concatenated = (flags & LZMA_CONCATENATED) != 0;
-	next->coder->first_stream = true;
-
-	return stream_decoder_reset(next->coder, allocator);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_stream_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags)
-{
-	lzma_next_strm_init(lzma_stream_decoder_init, strm, memlimit, flags);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/stream_decoder.c (from rev 11013, vendor/xz/dist/src/liblzma/common/stream_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/stream_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/stream_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,470 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       stream_decoder.c
+/// \brief      Decodes .xz Streams
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "stream_decoder.h"
+#include "block_decoder.h"
+
+
+typedef struct {
+	enum {
+		SEQ_STREAM_HEADER,
+		SEQ_BLOCK_HEADER,
+		SEQ_BLOCK,
+		SEQ_INDEX,
+		SEQ_STREAM_FOOTER,
+		SEQ_STREAM_PADDING,
+	} sequence;
+
+	/// Block or Metadata decoder. This takes little memory and the same
+	/// data structure can be used to decode every Block Header, so it's
+	/// a good idea to have a separate lzma_next_coder structure for it.
+	lzma_next_coder block_decoder;
+
+	/// Block options decoded by the Block Header decoder and used by
+	/// the Block decoder.
+	lzma_block block_options;
+
+	/// Stream Flags from Stream Header
+	lzma_stream_flags stream_flags;
+
+	/// Index is hashed so that it can be compared to the sizes of Blocks
+	/// with O(1) memory usage.
+	lzma_index_hash *index_hash;
+
+	/// Memory usage limit
+	uint64_t memlimit;
+
+	/// Amount of memory actually needed (only an estimate)
+	uint64_t memusage;
+
+	/// If true, LZMA_NO_CHECK is returned if the Stream has
+	/// no integrity check.
+	bool tell_no_check;
+
+	/// If true, LZMA_UNSUPPORTED_CHECK is returned if the Stream has
+	/// an integrity check that isn't supported by this liblzma build.
+	bool tell_unsupported_check;
+
+	/// If true, LZMA_GET_CHECK is returned after decoding Stream Header.
+	bool tell_any_check;
+
+	/// If true, we will tell the Block decoder to skip calculating
+	/// and verifying the integrity check.
+	bool ignore_check;
+
+	/// If true, we will decode concatenated Streams that possibly have
+	/// Stream Padding between or after them. LZMA_STREAM_END is returned
+	/// once the application isn't giving us any new input, and we aren't
+	/// in the middle of a Stream, and possible Stream Padding is a
+	/// multiple of four bytes.
+	bool concatenated;
+
+	/// When decoding concatenated Streams, this is true as long as we
+	/// are decoding the first Stream. This is needed to avoid misleading
+	/// LZMA_FORMAT_ERROR in case the later Streams don't have valid magic
+	/// bytes.
+	bool first_stream;
+
+	/// Write position in buffer[] and position in Stream Padding
+	size_t pos;
+
+	/// Buffer to hold Stream Header, Block Header, and Stream Footer.
+	/// Block Header has biggest maximum size.
+	uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX];
+} lzma_stream_coder;
+
+
+static lzma_ret
+stream_decoder_reset(lzma_stream_coder *coder, const lzma_allocator *allocator)
+{
+	// Initialize the Index hash used to verify the Index.
+	coder->index_hash = lzma_index_hash_init(coder->index_hash, allocator);
+	if (coder->index_hash == NULL)
+		return LZMA_MEM_ERROR;
+
+	// Reset the rest of the variables.
+	coder->sequence = SEQ_STREAM_HEADER;
+	coder->pos = 0;
+
+	return LZMA_OK;
+}
+
+
+static lzma_ret
+stream_decode(void *coder_ptr, const 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)
+{
+	lzma_stream_coder *coder = coder_ptr;
+
+	// When decoding the actual Block, it may be able to produce more
+	// output even if we don't give it any new input.
+	while (true)
+	switch (coder->sequence) {
+	case SEQ_STREAM_HEADER: {
+		// Copy the Stream Header to the internal buffer.
+		lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
+				LZMA_STREAM_HEADER_SIZE);
+
+		// Return if we didn't get the whole Stream Header yet.
+		if (coder->pos < LZMA_STREAM_HEADER_SIZE)
+			return LZMA_OK;
+
+		coder->pos = 0;
+
+		// Decode the Stream Header.
+		const lzma_ret ret = lzma_stream_header_decode(
+				&coder->stream_flags, coder->buffer);
+		if (ret != LZMA_OK)
+			return ret == LZMA_FORMAT_ERROR && !coder->first_stream
+					? LZMA_DATA_ERROR : ret;
+
+		// If we are decoding concatenated Streams, and the later
+		// Streams have invalid Header Magic Bytes, we give
+		// LZMA_DATA_ERROR instead of LZMA_FORMAT_ERROR.
+		coder->first_stream = false;
+
+		// Copy the type of the Check so that Block Header and Block
+		// decoders see it.
+		coder->block_options.check = coder->stream_flags.check;
+
+		// Even if we return LZMA_*_CHECK below, we want
+		// to continue from Block Header decoding.
+		coder->sequence = SEQ_BLOCK_HEADER;
+
+		// Detect if there's no integrity check or if it is
+		// unsupported if those were requested by the application.
+		if (coder->tell_no_check && coder->stream_flags.check
+				== LZMA_CHECK_NONE)
+			return LZMA_NO_CHECK;
+
+		if (coder->tell_unsupported_check
+				&& !lzma_check_is_supported(
+					coder->stream_flags.check))
+			return LZMA_UNSUPPORTED_CHECK;
+
+		if (coder->tell_any_check)
+			return LZMA_GET_CHECK;
+	}
+
+	// Fall through
+
+	case SEQ_BLOCK_HEADER: {
+		if (*in_pos >= in_size)
+			return LZMA_OK;
+
+		if (coder->pos == 0) {
+			// Detect if it's Index.
+			if (in[*in_pos] == 0x00) {
+				coder->sequence = SEQ_INDEX;
+				break;
+			}
+
+			// Calculate the size of the Block Header. Note that
+			// Block Header decoder wants to see this byte too
+			// so don't advance *in_pos.
+			coder->block_options.header_size
+					= lzma_block_header_size_decode(
+						in[*in_pos]);
+		}
+
+		// Copy the Block Header to the internal buffer.
+		lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
+				coder->block_options.header_size);
+
+		// Return if we didn't get the whole Block Header yet.
+		if (coder->pos < coder->block_options.header_size)
+			return LZMA_OK;
+
+		coder->pos = 0;
+
+		// Version 1 is needed to support the .ignore_check option.
+		coder->block_options.version = 1;
+
+		// Set up a buffer to hold the filter chain. Block Header
+		// decoder will initialize all members of this array so
+		// we don't need to do it here.
+		lzma_filter filters[LZMA_FILTERS_MAX + 1];
+		coder->block_options.filters = filters;
+
+		// Decode the Block Header.
+		return_if_error(lzma_block_header_decode(&coder->block_options,
+				allocator, coder->buffer));
+
+		// If LZMA_IGNORE_CHECK was used, this flag needs to be set.
+		// It has to be set after lzma_block_header_decode() because
+		// it always resets this to false.
+		coder->block_options.ignore_check = coder->ignore_check;
+
+		// Check the memory usage limit.
+		const uint64_t memusage = lzma_raw_decoder_memusage(filters);
+		lzma_ret ret;
+
+		if (memusage == UINT64_MAX) {
+			// One or more unknown Filter IDs.
+			ret = LZMA_OPTIONS_ERROR;
+		} else {
+			// Now we can set coder->memusage since we know that
+			// the filter chain is valid. We don't want
+			// lzma_memusage() to return UINT64_MAX in case of
+			// invalid filter chain.
+			coder->memusage = memusage;
+
+			if (memusage > coder->memlimit) {
+				// The chain would need too much memory.
+				ret = LZMA_MEMLIMIT_ERROR;
+			} else {
+				// Memory usage is OK.
+				// Initialize the Block decoder.
+				ret = lzma_block_decoder_init(
+						&coder->block_decoder,
+						allocator,
+						&coder->block_options);
+			}
+		}
+
+		// Free the allocated filter options since they are needed
+		// only to initialize the Block decoder.
+		for (size_t i = 0; i < LZMA_FILTERS_MAX; ++i)
+			lzma_free(filters[i].options, allocator);
+
+		coder->block_options.filters = NULL;
+
+		// Check if memory usage calculation and Block enocoder
+		// initialization succeeded.
+		if (ret != LZMA_OK)
+			return ret;
+
+		coder->sequence = SEQ_BLOCK;
+	}
+
+	// Fall through
+
+	case SEQ_BLOCK: {
+		const lzma_ret ret = coder->block_decoder.code(
+				coder->block_decoder.coder, allocator,
+				in, in_pos, in_size, out, out_pos, out_size,
+				action);
+
+		if (ret != LZMA_STREAM_END)
+			return ret;
+
+		// Block decoded successfully. Add the new size pair to
+		// the Index hash.
+		return_if_error(lzma_index_hash_append(coder->index_hash,
+				lzma_block_unpadded_size(
+					&coder->block_options),
+				coder->block_options.uncompressed_size));
+
+		coder->sequence = SEQ_BLOCK_HEADER;
+		break;
+	}
+
+	case SEQ_INDEX: {
+		// If we don't have any input, don't call
+		// lzma_index_hash_decode() since it would return
+		// LZMA_BUF_ERROR, which we must not do here.
+		if (*in_pos >= in_size)
+			return LZMA_OK;
+
+		// Decode the Index and compare it to the hash calculated
+		// from the sizes of the Blocks (if any).
+		const lzma_ret ret = lzma_index_hash_decode(coder->index_hash,
+				in, in_pos, in_size);
+		if (ret != LZMA_STREAM_END)
+			return ret;
+
+		coder->sequence = SEQ_STREAM_FOOTER;
+	}
+
+	// Fall through
+
+	case SEQ_STREAM_FOOTER: {
+		// Copy the Stream Footer to the internal buffer.
+		lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
+				LZMA_STREAM_HEADER_SIZE);
+
+		// Return if we didn't get the whole Stream Footer yet.
+		if (coder->pos < LZMA_STREAM_HEADER_SIZE)
+			return LZMA_OK;
+
+		coder->pos = 0;
+
+		// Decode the Stream Footer. The decoder gives
+		// LZMA_FORMAT_ERROR if the magic bytes don't match,
+		// so convert that return code to LZMA_DATA_ERROR.
+		lzma_stream_flags footer_flags;
+		const lzma_ret ret = lzma_stream_footer_decode(
+				&footer_flags, coder->buffer);
+		if (ret != LZMA_OK)
+			return ret == LZMA_FORMAT_ERROR
+					? LZMA_DATA_ERROR : ret;
+
+		// Check that Index Size stored in the Stream Footer matches
+		// the real size of the Index field.
+		if (lzma_index_hash_size(coder->index_hash)
+				!= footer_flags.backward_size)
+			return LZMA_DATA_ERROR;
+
+		// Compare that the Stream Flags fields are identical in
+		// both Stream Header and Stream Footer.
+		return_if_error(lzma_stream_flags_compare(
+				&coder->stream_flags, &footer_flags));
+
+		if (!coder->concatenated)
+			return LZMA_STREAM_END;
+
+		coder->sequence = SEQ_STREAM_PADDING;
+	}
+
+	// Fall through
+
+	case SEQ_STREAM_PADDING:
+		assert(coder->concatenated);
+
+		// Skip over possible Stream Padding.
+		while (true) {
+			if (*in_pos >= in_size) {
+				// Unless LZMA_FINISH was used, we cannot
+				// know if there's more input coming later.
+				if (action != LZMA_FINISH)
+					return LZMA_OK;
+
+				// Stream Padding must be a multiple of
+				// four bytes.
+				return coder->pos == 0
+						? LZMA_STREAM_END
+						: LZMA_DATA_ERROR;
+			}
+
+			// If the byte is not zero, it probably indicates
+			// beginning of a new Stream (or the file is corrupt).
+			if (in[*in_pos] != 0x00)
+				break;
+
+			++*in_pos;
+			coder->pos = (coder->pos + 1) & 3;
+		}
+
+		// Stream Padding must be a multiple of four bytes (empty
+		// Stream Padding is OK).
+		if (coder->pos != 0) {
+			++*in_pos;
+			return LZMA_DATA_ERROR;
+		}
+
+		// Prepare to decode the next Stream.
+		return_if_error(stream_decoder_reset(coder, allocator));
+		break;
+
+	default:
+		assert(0);
+		return LZMA_PROG_ERROR;
+	}
+
+	// Never reached
+}
+
+
+static void
+stream_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_stream_coder *coder = coder_ptr;
+	lzma_next_end(&coder->block_decoder, allocator);
+	lzma_index_hash_end(coder->index_hash, allocator);
+	lzma_free(coder, allocator);
+	return;
+}
+
+
+static lzma_check
+stream_decoder_get_check(const void *coder_ptr)
+{
+	const lzma_stream_coder *coder = coder_ptr;
+	return coder->stream_flags.check;
+}
+
+
+static lzma_ret
+stream_decoder_memconfig(void *coder_ptr, uint64_t *memusage,
+		uint64_t *old_memlimit, uint64_t new_memlimit)
+{
+	lzma_stream_coder *coder = coder_ptr;
+
+	*memusage = coder->memusage;
+	*old_memlimit = coder->memlimit;
+
+	if (new_memlimit != 0) {
+		if (new_memlimit < coder->memusage)
+			return LZMA_MEMLIMIT_ERROR;
+
+		coder->memlimit = new_memlimit;
+	}
+
+	return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_stream_decoder_init(
+		lzma_next_coder *next, const lzma_allocator *allocator,
+		uint64_t memlimit, uint32_t flags)
+{
+	lzma_next_coder_init(&lzma_stream_decoder_init, next, allocator);
+
+	if (memlimit == 0)
+		return LZMA_PROG_ERROR;
+
+	if (flags & ~LZMA_SUPPORTED_FLAGS)
+		return LZMA_OPTIONS_ERROR;
+
+	lzma_stream_coder *coder = next->coder;
+	if (coder == NULL) {
+		coder = lzma_alloc(sizeof(lzma_stream_coder), allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		next->coder = coder;
+		next->code = &stream_decode;
+		next->end = &stream_decoder_end;
+		next->get_check = &stream_decoder_get_check;
+		next->memconfig = &stream_decoder_memconfig;
+
+		coder->block_decoder = LZMA_NEXT_CODER_INIT;
+		coder->index_hash = NULL;
+	}
+
+	coder->memlimit = memlimit;
+	coder->memusage = LZMA_MEMUSAGE_BASE;
+	coder->tell_no_check = (flags & LZMA_TELL_NO_CHECK) != 0;
+	coder->tell_unsupported_check
+			= (flags & LZMA_TELL_UNSUPPORTED_CHECK) != 0;
+	coder->tell_any_check = (flags & LZMA_TELL_ANY_CHECK) != 0;
+	coder->ignore_check = (flags & LZMA_IGNORE_CHECK) != 0;
+	coder->concatenated = (flags & LZMA_CONCATENATED) != 0;
+	coder->first_stream = true;
+
+	return stream_decoder_reset(coder, allocator);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_stream_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags)
+{
+	lzma_next_strm_init(lzma_stream_decoder_init, strm, memlimit, flags);
+
+	strm->internal->supported_actions[LZMA_RUN] = true;
+	strm->internal->supported_actions[LZMA_FINISH] = true;
+
+	return LZMA_OK;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/stream_decoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/common/stream_decoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/stream_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,21 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_decoder.h
-/// \brief      Decodes .xz Streams
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_STREAM_DECODER_H
-#define LZMA_STREAM_DECODER_H
-
-#include "common.h"
-
-extern lzma_ret lzma_stream_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, uint64_t memlimit, uint32_t flags);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/common/stream_decoder.h (from rev 9176, vendor/xz/dist/src/liblzma/common/stream_decoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/stream_decoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/stream_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       stream_decoder.h
+/// \brief      Decodes .xz Streams
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_STREAM_DECODER_H
+#define LZMA_STREAM_DECODER_H
+
+#include "common.h"
+
+extern lzma_ret lzma_stream_decoder_init(
+		lzma_next_coder *next, const lzma_allocator *allocator,
+		uint64_t memlimit, uint32_t flags);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/common/stream_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/common/stream_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/stream_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,331 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_encoder.c
-/// \brief      Encodes .xz Streams
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "stream_encoder.h"
-#include "block_encoder.h"
-#include "index_encoder.h"
-
-
-struct lzma_coder_s {
-	enum {
-		SEQ_STREAM_HEADER,
-		SEQ_BLOCK_INIT,
-		SEQ_BLOCK_HEADER,
-		SEQ_BLOCK_ENCODE,
-		SEQ_INDEX_ENCODE,
-		SEQ_STREAM_FOOTER,
-	} sequence;
-
-	/// True if Block encoder has been initialized by
-	/// lzma_stream_encoder_init() or stream_encoder_update()
-	/// and thus doesn't need to be initialized in stream_encode().
-	bool block_encoder_is_initialized;
-
-	/// Block
-	lzma_next_coder block_encoder;
-
-	/// Options for the Block encoder
-	lzma_block block_options;
-
-	/// The filter chain currently in use
-	lzma_filter filters[LZMA_FILTERS_MAX + 1];
-
-	/// Index encoder. This is separate from Block encoder, because this
-	/// doesn't take much memory, and when encoding multiple Streams
-	/// with the same encoding options we avoid reallocating memory.
-	lzma_next_coder index_encoder;
-
-	/// Index to hold sizes of the Blocks
-	lzma_index *index;
-
-	/// Read position in buffer[]
-	size_t buffer_pos;
-
-	/// Total number of bytes in buffer[]
-	size_t buffer_size;
-
-	/// Buffer to hold Stream Header, Block Header, and Stream Footer.
-	/// Block Header has biggest maximum size.
-	uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX];
-};
-
-
-static lzma_ret
-block_encoder_init(lzma_coder *coder, lzma_allocator *allocator)
-{
-	// Prepare the Block options. Even though Block encoder doesn't need
-	// compressed_size, uncompressed_size, and header_size to be
-	// initialized, it is a good idea to do it here, because this way
-	// we catch if someone gave us Filter ID that cannot be used in
-	// Blocks/Streams.
-	coder->block_options.compressed_size = LZMA_VLI_UNKNOWN;
-	coder->block_options.uncompressed_size = LZMA_VLI_UNKNOWN;
-
-	return_if_error(lzma_block_header_size(&coder->block_options));
-
-	// Initialize the actual Block encoder.
-	return lzma_block_encoder_init(&coder->block_encoder, allocator,
-			&coder->block_options);
-}
-
-
-static lzma_ret
-stream_encode(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)
-{
-	// Main loop
-	while (*out_pos < out_size)
-	switch (coder->sequence) {
-	case SEQ_STREAM_HEADER:
-	case SEQ_BLOCK_HEADER:
-	case SEQ_STREAM_FOOTER:
-		lzma_bufcpy(coder->buffer, &coder->buffer_pos,
-				coder->buffer_size, out, out_pos, out_size);
-		if (coder->buffer_pos < coder->buffer_size)
-			return LZMA_OK;
-
-		if (coder->sequence == SEQ_STREAM_FOOTER)
-			return LZMA_STREAM_END;
-
-		coder->buffer_pos = 0;
-		++coder->sequence;
-		break;
-
-	case SEQ_BLOCK_INIT: {
-		if (*in_pos == in_size) {
-			// If we are requested to flush or finish the current
-			// Block, return LZMA_STREAM_END immediately since
-			// there's nothing to do.
-			if (action != LZMA_FINISH)
-				return action == LZMA_RUN
-						? LZMA_OK : LZMA_STREAM_END;
-
-			// The application had used LZMA_FULL_FLUSH to finish
-			// the previous Block, but now wants to finish without
-			// encoding new data, or it is simply creating an
-			// empty Stream with no Blocks.
-			//
-			// Initialize the Index encoder, and continue to
-			// actually encoding the Index.
-			return_if_error(lzma_index_encoder_init(
-					&coder->index_encoder, allocator,
-					coder->index));
-			coder->sequence = SEQ_INDEX_ENCODE;
-			break;
-		}
-
-		// Initialize the Block encoder unless it was already
-		// initialized by lzma_stream_encoder_init() or
-		// stream_encoder_update().
-		if (!coder->block_encoder_is_initialized)
-			return_if_error(block_encoder_init(coder, allocator));
-
-		// Make it false so that we don't skip the initialization
-		// with the next Block.
-		coder->block_encoder_is_initialized = false;
-
-		// Encode the Block Header. This shouldn't fail since we have
-		// already initialized the Block encoder.
-		if (lzma_block_header_encode(&coder->block_options,
-				coder->buffer) != LZMA_OK)
-			return LZMA_PROG_ERROR;
-
-		coder->buffer_size = coder->block_options.header_size;
-		coder->sequence = SEQ_BLOCK_HEADER;
-		break;
-	}
-
-	case SEQ_BLOCK_ENCODE: {
-		static const lzma_action convert[4] = {
-			LZMA_RUN,
-			LZMA_SYNC_FLUSH,
-			LZMA_FINISH,
-			LZMA_FINISH,
-		};
-
-		const lzma_ret ret = coder->block_encoder.code(
-				coder->block_encoder.coder, allocator,
-				in, in_pos, in_size,
-				out, out_pos, out_size, convert[action]);
-		if (ret != LZMA_STREAM_END || action == LZMA_SYNC_FLUSH)
-			return ret;
-
-		// Add a new Index Record.
-		const lzma_vli unpadded_size = lzma_block_unpadded_size(
-				&coder->block_options);
-		assert(unpadded_size != 0);
-		return_if_error(lzma_index_append(coder->index, allocator,
-				unpadded_size,
-				coder->block_options.uncompressed_size));
-
-		coder->sequence = SEQ_BLOCK_INIT;
-		break;
-	}
-
-	case SEQ_INDEX_ENCODE: {
-		// 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.
-		const lzma_stream_flags stream_flags = {
-			.version = 0,
-			.backward_size = lzma_index_size(coder->index),
-			.check = coder->block_options.check,
-		};
-
-		if (lzma_stream_footer_encode(&stream_flags, coder->buffer)
-				!= LZMA_OK)
-			return LZMA_PROG_ERROR;
-
-		coder->buffer_size = LZMA_STREAM_HEADER_SIZE;
-		coder->sequence = SEQ_STREAM_FOOTER;
-		break;
-	}
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-
-	return LZMA_OK;
-}
-
-
-static void
-stream_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->block_encoder, allocator);
-	lzma_next_end(&coder->index_encoder, allocator);
-	lzma_index_end(coder->index, allocator);
-
-	for (size_t i = 0; coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i)
-		lzma_free(coder->filters[i].options, allocator);
-
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_ret
-stream_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
-		const lzma_filter *filters,
-		const lzma_filter *reversed_filters)
-{
-	if (coder->sequence <= SEQ_BLOCK_INIT) {
-		// There is no incomplete Block waiting to be finished,
-		// thus we can change the whole filter chain. Start by
-		// trying to initialize the Block encoder with the new
-		// chain. This way we detect if the chain is valid.
-		coder->block_encoder_is_initialized = false;
-		coder->block_options.filters = (lzma_filter *)(filters);
-		const lzma_ret ret = block_encoder_init(coder, allocator);
-		coder->block_options.filters = coder->filters;
-		if (ret != LZMA_OK)
-			return ret;
-
-		coder->block_encoder_is_initialized = true;
-
-	} else if (coder->sequence <= SEQ_BLOCK_ENCODE) {
-		// We are in the middle of a Block. Try to update only
-		// the filter-specific options.
-		return_if_error(coder->block_encoder.update(
-				coder->block_encoder.coder, allocator,
-				filters, reversed_filters));
-	} else {
-		// Trying to update the filter chain when we are already
-		// encoding Index or Stream Footer.
-		return LZMA_PROG_ERROR;
-	}
-
-	// Free the copy of the old chain and make a copy of the new chain.
-	for (size_t i = 0; coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i)
-		lzma_free(coder->filters[i].options, allocator);
-
-	return lzma_filters_copy(filters, coder->filters, allocator);
-}
-
-
-extern lzma_ret
-lzma_stream_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *filters, lzma_check check)
-{
-	lzma_next_coder_init(&lzma_stream_encoder_init, next, allocator);
-
-	if (filters == NULL)
-		return LZMA_PROG_ERROR;
-
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &stream_encode;
-		next->end = &stream_encoder_end;
-		next->update = &stream_encoder_update;
-
-		next->coder->filters[0].id = LZMA_VLI_UNKNOWN;
-		next->coder->block_encoder = LZMA_NEXT_CODER_INIT;
-		next->coder->index_encoder = LZMA_NEXT_CODER_INIT;
-		next->coder->index = NULL;
-	}
-
-	// Basic initializations
-	next->coder->sequence = SEQ_STREAM_HEADER;
-	next->coder->block_options.version = 0;
-	next->coder->block_options.check = check;
-
-	// Initialize the Index
-	lzma_index_end(next->coder->index, allocator);
-	next->coder->index = lzma_index_init(allocator);
-	if (next->coder->index == NULL)
-		return LZMA_MEM_ERROR;
-
-	// Encode the Stream Header
-	lzma_stream_flags stream_flags = {
-		.version = 0,
-		.check = check,
-	};
-	return_if_error(lzma_stream_header_encode(
-			&stream_flags, next->coder->buffer));
-
-	next->coder->buffer_pos = 0;
-	next->coder->buffer_size = LZMA_STREAM_HEADER_SIZE;
-
-	// Initialize the Block encoder. This way we detect unsupported
-	// filter chains when initializing the Stream encoder instead of
-	// giving an error after Stream Header has already written out.
-	return stream_encoder_update(
-			next->coder, allocator, filters, NULL);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_stream_encoder(lzma_stream *strm,
-		const lzma_filter *filters, lzma_check check)
-{
-	lzma_next_strm_init(lzma_stream_encoder_init, strm, filters, check);
-
-	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_FINISH] = true;
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/common/stream_encoder.c (from rev 11013, vendor/xz/dist/src/liblzma/common/stream_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/stream_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/stream_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,340 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       stream_encoder.c
+/// \brief      Encodes .xz Streams
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "block_encoder.h"
+#include "index_encoder.h"
+
+
+typedef struct {
+	enum {
+		SEQ_STREAM_HEADER,
+		SEQ_BLOCK_INIT,
+		SEQ_BLOCK_HEADER,
+		SEQ_BLOCK_ENCODE,
+		SEQ_INDEX_ENCODE,
+		SEQ_STREAM_FOOTER,
+	} sequence;
+
+	/// True if Block encoder has been initialized by
+	/// stream_encoder_init() or stream_encoder_update()
+	/// and thus doesn't need to be initialized in stream_encode().
+	bool block_encoder_is_initialized;
+
+	/// Block
+	lzma_next_coder block_encoder;
+
+	/// Options for the Block encoder
+	lzma_block block_options;
+
+	/// The filter chain currently in use
+	lzma_filter filters[LZMA_FILTERS_MAX + 1];
+
+	/// Index encoder. This is separate from Block encoder, because this
+	/// doesn't take much memory, and when encoding multiple Streams
+	/// with the same encoding options we avoid reallocating memory.
+	lzma_next_coder index_encoder;
+
+	/// Index to hold sizes of the Blocks
+	lzma_index *index;
+
+	/// Read position in buffer[]
+	size_t buffer_pos;
+
+	/// Total number of bytes in buffer[]
+	size_t buffer_size;
+
+	/// Buffer to hold Stream Header, Block Header, and Stream Footer.
+	/// Block Header has biggest maximum size.
+	uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX];
+} lzma_stream_coder;
+
+
+static lzma_ret
+block_encoder_init(lzma_stream_coder *coder, const lzma_allocator *allocator)
+{
+	// Prepare the Block options. Even though Block encoder doesn't need
+	// compressed_size, uncompressed_size, and header_size to be
+	// initialized, it is a good idea to do it here, because this way
+	// we catch if someone gave us Filter ID that cannot be used in
+	// Blocks/Streams.
+	coder->block_options.compressed_size = LZMA_VLI_UNKNOWN;
+	coder->block_options.uncompressed_size = LZMA_VLI_UNKNOWN;
+
+	return_if_error(lzma_block_header_size(&coder->block_options));
+
+	// Initialize the actual Block encoder.
+	return lzma_block_encoder_init(&coder->block_encoder, allocator,
+			&coder->block_options);
+}
+
+
+static lzma_ret
+stream_encode(void *coder_ptr, const 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)
+{
+	lzma_stream_coder *coder = coder_ptr;
+
+	// Main loop
+	while (*out_pos < out_size)
+	switch (coder->sequence) {
+	case SEQ_STREAM_HEADER:
+	case SEQ_BLOCK_HEADER:
+	case SEQ_STREAM_FOOTER:
+		lzma_bufcpy(coder->buffer, &coder->buffer_pos,
+				coder->buffer_size, out, out_pos, out_size);
+		if (coder->buffer_pos < coder->buffer_size)
+			return LZMA_OK;
+
+		if (coder->sequence == SEQ_STREAM_FOOTER)
+			return LZMA_STREAM_END;
+
+		coder->buffer_pos = 0;
+		++coder->sequence;
+		break;
+
+	case SEQ_BLOCK_INIT: {
+		if (*in_pos == in_size) {
+			// If we are requested to flush or finish the current
+			// Block, return LZMA_STREAM_END immediately since
+			// there's nothing to do.
+			if (action != LZMA_FINISH)
+				return action == LZMA_RUN
+						? LZMA_OK : LZMA_STREAM_END;
+
+			// The application had used LZMA_FULL_FLUSH to finish
+			// the previous Block, but now wants to finish without
+			// encoding new data, or it is simply creating an
+			// empty Stream with no Blocks.
+			//
+			// Initialize the Index encoder, and continue to
+			// actually encoding the Index.
+			return_if_error(lzma_index_encoder_init(
+					&coder->index_encoder, allocator,
+					coder->index));
+			coder->sequence = SEQ_INDEX_ENCODE;
+			break;
+		}
+
+		// Initialize the Block encoder unless it was already
+		// initialized by stream_encoder_init() or
+		// stream_encoder_update().
+		if (!coder->block_encoder_is_initialized)
+			return_if_error(block_encoder_init(coder, allocator));
+
+		// Make it false so that we don't skip the initialization
+		// with the next Block.
+		coder->block_encoder_is_initialized = false;
+
+		// Encode the Block Header. This shouldn't fail since we have
+		// already initialized the Block encoder.
+		if (lzma_block_header_encode(&coder->block_options,
+				coder->buffer) != LZMA_OK)
+			return LZMA_PROG_ERROR;
+
+		coder->buffer_size = coder->block_options.header_size;
+		coder->sequence = SEQ_BLOCK_HEADER;
+		break;
+	}
+
+	case SEQ_BLOCK_ENCODE: {
+		static const lzma_action convert[LZMA_ACTION_MAX + 1] = {
+			LZMA_RUN,
+			LZMA_SYNC_FLUSH,
+			LZMA_FINISH,
+			LZMA_FINISH,
+			LZMA_FINISH,
+		};
+
+		const lzma_ret ret = coder->block_encoder.code(
+				coder->block_encoder.coder, allocator,
+				in, in_pos, in_size,
+				out, out_pos, out_size, convert[action]);
+		if (ret != LZMA_STREAM_END || action == LZMA_SYNC_FLUSH)
+			return ret;
+
+		// Add a new Index Record.
+		const lzma_vli unpadded_size = lzma_block_unpadded_size(
+				&coder->block_options);
+		assert(unpadded_size != 0);
+		return_if_error(lzma_index_append(coder->index, allocator,
+				unpadded_size,
+				coder->block_options.uncompressed_size));
+
+		coder->sequence = SEQ_BLOCK_INIT;
+		break;
+	}
+
+	case SEQ_INDEX_ENCODE: {
+		// 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.
+		const lzma_stream_flags stream_flags = {
+			.version = 0,
+			.backward_size = lzma_index_size(coder->index),
+			.check = coder->block_options.check,
+		};
+
+		if (lzma_stream_footer_encode(&stream_flags, coder->buffer)
+				!= LZMA_OK)
+			return LZMA_PROG_ERROR;
+
+		coder->buffer_size = LZMA_STREAM_HEADER_SIZE;
+		coder->sequence = SEQ_STREAM_FOOTER;
+		break;
+	}
+
+	default:
+		assert(0);
+		return LZMA_PROG_ERROR;
+	}
+
+	return LZMA_OK;
+}
+
+
+static void
+stream_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_stream_coder *coder = coder_ptr;
+
+	lzma_next_end(&coder->block_encoder, allocator);
+	lzma_next_end(&coder->index_encoder, allocator);
+	lzma_index_end(coder->index, allocator);
+
+	for (size_t i = 0; coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i)
+		lzma_free(coder->filters[i].options, allocator);
+
+	lzma_free(coder, allocator);
+	return;
+}
+
+
+static lzma_ret
+stream_encoder_update(void *coder_ptr, const lzma_allocator *allocator,
+		const lzma_filter *filters,
+		const lzma_filter *reversed_filters)
+{
+	lzma_stream_coder *coder = coder_ptr;
+
+	if (coder->sequence <= SEQ_BLOCK_INIT) {
+		// There is no incomplete Block waiting to be finished,
+		// thus we can change the whole filter chain. Start by
+		// trying to initialize the Block encoder with the new
+		// chain. This way we detect if the chain is valid.
+		coder->block_encoder_is_initialized = false;
+		coder->block_options.filters = (lzma_filter *)(filters);
+		const lzma_ret ret = block_encoder_init(coder, allocator);
+		coder->block_options.filters = coder->filters;
+		if (ret != LZMA_OK)
+			return ret;
+
+		coder->block_encoder_is_initialized = true;
+
+	} else if (coder->sequence <= SEQ_BLOCK_ENCODE) {
+		// We are in the middle of a Block. Try to update only
+		// the filter-specific options.
+		return_if_error(coder->block_encoder.update(
+				coder->block_encoder.coder, allocator,
+				filters, reversed_filters));
+	} else {
+		// Trying to update the filter chain when we are already
+		// encoding Index or Stream Footer.
+		return LZMA_PROG_ERROR;
+	}
+
+	// Free the copy of the old chain and make a copy of the new chain.
+	for (size_t i = 0; coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i)
+		lzma_free(coder->filters[i].options, allocator);
+
+	return lzma_filters_copy(filters, coder->filters, allocator);
+}
+
+
+static lzma_ret
+stream_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter *filters, lzma_check check)
+{
+	lzma_next_coder_init(&stream_encoder_init, next, allocator);
+
+	if (filters == NULL)
+		return LZMA_PROG_ERROR;
+
+	lzma_stream_coder *coder = next->coder;
+
+	if (coder == NULL) {
+		coder = lzma_alloc(sizeof(lzma_stream_coder), allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		next->coder = coder;
+		next->code = &stream_encode;
+		next->end = &stream_encoder_end;
+		next->update = &stream_encoder_update;
+
+		coder->filters[0].id = LZMA_VLI_UNKNOWN;
+		coder->block_encoder = LZMA_NEXT_CODER_INIT;
+		coder->index_encoder = LZMA_NEXT_CODER_INIT;
+		coder->index = NULL;
+	}
+
+	// Basic initializations
+	coder->sequence = SEQ_STREAM_HEADER;
+	coder->block_options.version = 0;
+	coder->block_options.check = check;
+
+	// Initialize the Index
+	lzma_index_end(coder->index, allocator);
+	coder->index = lzma_index_init(allocator);
+	if (coder->index == NULL)
+		return LZMA_MEM_ERROR;
+
+	// Encode the Stream Header
+	lzma_stream_flags stream_flags = {
+		.version = 0,
+		.check = check,
+	};
+	return_if_error(lzma_stream_header_encode(
+			&stream_flags, coder->buffer));
+
+	coder->buffer_pos = 0;
+	coder->buffer_size = LZMA_STREAM_HEADER_SIZE;
+
+	// Initialize the Block encoder. This way we detect unsupported
+	// filter chains when initializing the Stream encoder instead of
+	// giving an error after Stream Header has already written out.
+	return stream_encoder_update(coder, allocator, filters, NULL);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_stream_encoder(lzma_stream *strm,
+		const lzma_filter *filters, lzma_check check)
+{
+	lzma_next_strm_init(stream_encoder_init, strm, filters, check);
+
+	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;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/common/stream_encoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/common/stream_encoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/common/stream_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,23 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_encoder.h
-/// \brief      Encodes .xz Streams
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_STREAM_ENCODER_H
-#define LZMA_STREAM_ENCODER_H
-
-#include "common.h"
-
-
-extern lzma_ret lzma_stream_encoder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *filters, lzma_check check);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/common/stream_encoder_mt.c (from rev 11013, vendor/xz/dist/src/liblzma/common/stream_encoder_mt.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/common/stream_encoder_mt.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/common/stream_encoder_mt.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,1143 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \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 "block_buffer_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 lzma_stream_coder_s lzma_stream_coder;
+
+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_stream_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().
+	const lzma_allocator *allocator;
+
+	/// Amount of uncompressed data that has already been compressed.
+	uint64_t progress_in;
+
+	/// Amount of compressed data that is ready.
+	uint64_t progress_out;
+
+	/// 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;
+
+	mythread_mutex mutex;
+	mythread_cond cond;
+
+	/// The ID of this thread is used to join the thread
+	/// when it's not needed anymore.
+	mythread thread_id;
+};
+
+
+struct lzma_stream_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;
+
+
+	/// Maximum wait time if cannot use all the input and cannot
+	/// fill the output buffer. This is in milliseconds.
+	uint32_t timeout;
+
+
+	/// 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;
+
+
+	/// Amount of uncompressed data in Blocks that have already
+	/// been finished.
+	uint64_t progress_in;
+
+	/// Amount of compressed data in Stream Header + Blocks that
+	/// have already been finished.
+	uint64_t progress_out;
+
+
+	mythread_mutex 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)
+{
+	assert(thr->progress_in == 0);
+	assert(thr->progress_out == 0);
+
+	// 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) {
+			// Store in_pos and out_pos into *thr so that
+			// an application may read them via
+			// lzma_get_progress() to get progress information.
+			//
+			// NOTE: These aren't updated when the encoding
+			// finishes. Instead, the final values are taken
+			// later from thr->outbuf.
+			thr->progress_in = in_pos;
+			thr->progress_out = thr->outbuf->size;
+
+			while (in_size == thr->in_size
+					&& thr->state == THR_RUN)
+				mythread_cond_wait(&thr->cond, &thr->mutex);
+
+			state = thr->state;
+			in_size = thr->in_size;
+		}
+
+		// 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 && thr->outbuf->size < out_size);
+
+	switch (ret) {
+	case LZMA_STREAM_END:
+		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;
+		}
+
+		break;
+
+	case LZMA_OK:
+		// The data was incompressible. Encode it using uncompressed
+		// LZMA2 chunks.
+		//
+		// First wait that we have gotten all the input.
+		mythread_sync(thr->mutex) {
+			while (thr->state == THR_RUN)
+				mythread_cond_wait(&thr->cond, &thr->mutex);
+
+			state = thr->state;
+			in_size = thr->in_size;
+		}
+
+		if (state >= THR_STOP)
+			return state;
+
+		// Do the encoding. This takes care of the Block Header too.
+		thr->outbuf->size = 0;
+		ret = lzma_block_uncomp_encode(&thr->block_options,
+				thr->in, in_size, thr->outbuf->buf,
+				&thr->outbuf->size, out_size);
+
+		// It shouldn't fail.
+		if (ret != LZMA_OK) {
+			worker_error(thr, LZMA_PROG_ERROR);
+			return THR_STOP;
+		}
+
+		break;
+
+	default:
+		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 MYTHREAD_RET_TYPE
+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;
+					mythread_cond_signal(&thr->cond);
+				}
+
+				state = thr->state;
+				if (state != THR_IDLE)
+					break;
+
+				mythread_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 unless the main thread has
+		// told us to exit. Signal is needed for the case
+		// where the main thread is waiting for the threads to stop.
+		mythread_sync(thr->mutex) {
+			if (thr->state != THR_EXIT) {
+				thr->state = THR_IDLE;
+				mythread_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;
+
+			// Update the main progress info.
+			thr->coder->progress_in
+					+= thr->outbuf->uncompressed_size;
+			thr->coder->progress_out += thr->outbuf->size;
+			thr->progress_in = 0;
+			thr->progress_out = 0;
+
+			// 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.
+	mythread_mutex_destroy(&thr->mutex);
+	mythread_cond_destroy(&thr->cond);
+
+	lzma_next_end(&thr->block_encoder, thr->allocator);
+	lzma_free(thr->in, thr->allocator);
+	return MYTHREAD_RET_VALUE;
+}
+
+
+/// Make the threads stop but not exit. Optionally wait for them to stop.
+static void
+threads_stop(lzma_stream_coder *coder, bool wait_for_threads)
+{
+	// 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;
+			mythread_cond_signal(&coder->threads[i].cond);
+		}
+	}
+
+	if (!wait_for_threads)
+		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)
+				mythread_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_stream_coder *coder, const 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;
+			mythread_cond_signal(&coder->threads[i].cond);
+		}
+	}
+
+	for (uint32_t i = 0; i < coder->threads_initialized; ++i) {
+		int ret = mythread_join(coder->threads[i].thread_id);
+		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_stream_coder *coder,
+		const 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 (mythread_mutex_init(&thr->mutex))
+		goto error_mutex;
+
+	if (mythread_cond_init(&thr->cond))
+		goto error_cond;
+
+	thr->state = THR_IDLE;
+	thr->allocator = allocator;
+	thr->coder = coder;
+	thr->progress_in = 0;
+	thr->progress_out = 0;
+	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:
+	mythread_cond_destroy(&thr->cond);
+
+error_cond:
+	mythread_mutex_destroy(&thr->mutex);
+
+error_mutex:
+	lzma_free(thr->in, allocator);
+	return LZMA_MEM_ERROR;
+}
+
+
+static lzma_ret
+get_thread(lzma_stream_coder *coder, const 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);
+		mythread_cond_signal(&coder->thr->cond);
+	}
+
+	return LZMA_OK;
+}
+
+
+static lzma_ret
+stream_encode_in(lzma_stream_coder *coder, const 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;
+
+				mythread_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_stream_coder *coder, mythread_condtime *wait_abs,
+		bool *has_blocked, bool has_input)
+{
+	if (coder->timeout != 0 && !*has_blocked) {
+		// Every time when stream_encode_mt() is called via
+		// lzma_code(), *has_blocked 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_condtime_set(), which may do a syscall
+		// depending on the operating system.
+		*has_blocked = true;
+		mythread_condtime_set(wait_abs, &coder->cond, coder->timeout);
+	}
+
+	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->timeout != 0)
+				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(void *coder_ptr, const 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)
+{
+	lzma_stream_coder *coder = coder_ptr;
+
+	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;
+		mythread_condtime 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;
+			}
+
+			// 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;
+			}
+
+			// See if we should wait or return.
+			//
+			// TODO: LZMA_SYNC_FLUSH and LZMA_SYNC_BARRIER.
+			if (*in_pos == in_size) {
+				// LZMA_RUN: More data is probably coming
+				// so return to let the caller fill the
+				// input buffer.
+				if (action == LZMA_RUN)
+					return LZMA_OK;
+
+				// LZMA_FULL_BARRIER: The same as with
+				// LZMA_RUN but tell the caller that the
+				// barrier was completed.
+				if (action == LZMA_FULL_BARRIER)
+					return LZMA_STREAM_END;
+
+				// Finishing or flushing isn't completed until
+				// all input data has been encoded and copied
+				// to the output buffer.
+				if (lzma_outq_is_empty(&coder->outq)) {
+					// LZMA_FINISH: Continue to encode
+					// the Index field.
+					if (action == LZMA_FINISH)
+						break;
+
+					// LZMA_FULL_FLUSH: Return to tell
+					// the caller that flushing was
+					// completed.
+					if (action == LZMA_FULL_FLUSH)
+						return LZMA_STREAM_END;
+				}
+			}
+
+			// Return if there is no output space left.
+			// This check must be done after testing the input
+			// buffer, because we might want to use a different
+			// return code.
+			if (*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;
+
+		// Update the progress info to take the Index and
+		// Stream Footer into account. Those are very fast to encode
+		// so in terms of progress information they can be thought
+		// to be ready to be copied out.
+		coder->progress_out += lzma_index_size(coder->index)
+				+ LZMA_STREAM_HEADER_SIZE;
+	}
+
+	// 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(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_stream_coder *coder = coder_ptr;
+
+	// 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);
+	mythread_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.
+	*outbuf_size_max = lzma_block_buffer_bound64(*block_size);
+	if (*outbuf_size_max == 0)
+		return LZMA_MEM_ERROR;
+
+	return LZMA_OK;
+}
+
+
+static void
+get_progress(void *coder_ptr, uint64_t *progress_in, uint64_t *progress_out)
+{
+	lzma_stream_coder *coder = coder_ptr;
+
+	// Lock coder->mutex to prevent finishing threads from moving their
+	// progress info from the worker_thread structure to lzma_stream_coder.
+	mythread_sync(coder->mutex) {
+		*progress_in = coder->progress_in;
+		*progress_out = coder->progress_out;
+
+		for (size_t i = 0; i < coder->threads_initialized; ++i) {
+			mythread_sync(coder->threads[i].mutex) {
+				*progress_in += coder->threads[i].progress_in;
+				*progress_out += coder->threads[i]
+						.progress_out;
+			}
+		}
+	}
+
+	return;
+}
+
+
+static lzma_ret
+stream_encoder_mt_init(lzma_next_coder *next, const 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
+
+	// 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().
+	// The memory usage calculation verifies the filter chain as
+	// a side effect so we take advatange of that.
+	if (lzma_raw_encoder_memusage(filters) == UINT64_MAX)
+		return LZMA_OPTIONS_ERROR;
+
+	// 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.
+	lzma_stream_coder *coder = next->coder;
+	if (coder == NULL) {
+		coder = lzma_alloc(sizeof(lzma_stream_coder), allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		next->coder = coder;
+
+		// 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 (mythread_mutex_init(&coder->mutex)) {
+			lzma_free(coder, allocator);
+			next->coder = NULL;
+			return LZMA_MEM_ERROR;
+		}
+
+		if (mythread_cond_init(&coder->cond)) {
+			mythread_mutex_destroy(&coder->mutex);
+			lzma_free(coder, allocator);
+			next->coder = NULL;
+			return LZMA_MEM_ERROR;
+		}
+
+		next->code = &stream_encode_mt;
+		next->end = &stream_encoder_mt_end;
+		next->get_progress = &get_progress;
+// 		next->update = &stream_encoder_mt_update;
+
+		coder->filters[0].id = LZMA_VLI_UNKNOWN;
+		coder->index_encoder = LZMA_NEXT_CODER_INIT;
+		coder->index = NULL;
+		memzero(&coder->outq, sizeof(coder->outq));
+		coder->threads = NULL;
+		coder->threads_max = 0;
+		coder->threads_initialized = 0;
+	}
+
+	// Basic initializations
+	coder->sequence = SEQ_STREAM_HEADER;
+	coder->block_size = (size_t)(block_size);
+	coder->thread_error = LZMA_OK;
+	coder->thr = NULL;
+
+	// Allocate the thread-specific base structures.
+	assert(options->threads > 0);
+	if (coder->threads_max != options->threads) {
+		threads_end(coder, allocator);
+
+		coder->threads = NULL;
+		coder->threads_max = 0;
+
+		coder->threads_initialized = 0;
+		coder->threads_free = NULL;
+
+		coder->threads = lzma_alloc(
+				options->threads * sizeof(worker_thread),
+				allocator);
+		if (coder->threads == NULL)
+			return LZMA_MEM_ERROR;
+
+		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(coder, true);
+	}
+
+	// Output queue
+	return_if_error(lzma_outq_init(&coder->outq, allocator,
+			outbuf_size_max, options->threads));
+
+	// Timeout
+	coder->timeout = options->timeout;
+
+	// Free the old filter chain and copy the new one.
+	for (size_t i = 0; coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i)
+		lzma_free(coder->filters[i].options, allocator);
+
+	return_if_error(lzma_filters_copy(
+			filters, coder->filters, allocator));
+
+	// Index
+	lzma_index_end(coder->index, allocator);
+	coder->index = lzma_index_init(allocator);
+	if (coder->index == NULL)
+		return LZMA_MEM_ERROR;
+
+	// Stream Header
+	coder->stream_flags.version = 0;
+	coder->stream_flags.check = options->check;
+	return_if_error(lzma_stream_header_encode(
+			&coder->stream_flags, coder->header));
+
+	coder->header_pos = 0;
+
+	// Progress info
+	coder->progress_in = 0;
+	coder->progress_out = LZMA_STREAM_HEADER_SIZE;
+
+	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(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_stream_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;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/delta/Makefile.inc
===================================================================
--- vendor/xz/dist/src/liblzma/delta/Makefile.inc	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/delta/Makefile.inc	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,23 +0,0 @@
-##
-## Author: Lasse Collin
-##
-## This file has been put into the public domain.
-## You can do whatever you want with this file.
-##
-
-liblzma_la_SOURCES += \
-	delta/delta_common.c \
-	delta/delta_common.h \
-	delta/delta_private.h
-
-if COND_ENCODER_DELTA
-liblzma_la_SOURCES += \
-	delta/delta_encoder.c \
-	delta/delta_encoder.h
-endif
-
-if COND_DECODER_DELTA
-liblzma_la_SOURCES += \
-	delta/delta_decoder.c \
-	delta/delta_decoder.h
-endif

Deleted: vendor/xz/5.2.3/src/liblzma/delta/delta_common.c
===================================================================
--- vendor/xz/dist/src/liblzma/delta/delta_common.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/delta/delta_common.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,70 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       delta_common.c
-/// \brief      Common stuff for Delta encoder and decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "delta_common.h"
-#include "delta_private.h"
-
-
-static void
-delta_coder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-extern lzma_ret
-lzma_delta_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	// Allocate memory for the decoder if needed.
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		// End function is the same for encoder and decoder.
-		next->end = &delta_coder_end;
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	// Validate the options.
-	if (lzma_delta_coder_memusage(filters[0].options) == UINT64_MAX)
-		return LZMA_OPTIONS_ERROR;
-
-	// Set the delta distance.
-	const lzma_options_delta *opt = filters[0].options;
-	next->coder->distance = opt->dist;
-
-	// Initialize the rest of the variables.
-	next->coder->pos = 0;
-	memzero(next->coder->history, LZMA_DELTA_DIST_MAX);
-
-	// Initialize the next decoder in the chain, if any.
-	return lzma_next_filter_init(&next->coder->next,
-			allocator, filters + 1);
-}
-
-
-extern uint64_t
-lzma_delta_coder_memusage(const void *options)
-{
-	const lzma_options_delta *opt = options;
-
-	if (opt == NULL || opt->type != LZMA_DELTA_TYPE_BYTE
-			|| opt->dist < LZMA_DELTA_DIST_MIN
-			|| opt->dist > LZMA_DELTA_DIST_MAX)
-		return UINT64_MAX;
-
-	return sizeof(lzma_coder);
-}

Copied: vendor/xz/5.2.3/src/liblzma/delta/delta_common.c (from rev 11013, vendor/xz/dist/src/liblzma/delta/delta_common.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/delta/delta_common.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/delta/delta_common.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,73 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       delta_common.c
+/// \brief      Common stuff for Delta encoder and decoder
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "delta_common.h"
+#include "delta_private.h"
+
+
+static void
+delta_coder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_delta_coder *coder = coder_ptr;
+	lzma_next_end(&coder->next, allocator);
+	lzma_free(coder, allocator);
+	return;
+}
+
+
+extern lzma_ret
+lzma_delta_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	// Allocate memory for the decoder if needed.
+	lzma_delta_coder *coder = next->coder;
+	if (coder == NULL) {
+		coder = lzma_alloc(sizeof(lzma_delta_coder), allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		next->coder = coder;
+
+		// End function is the same for encoder and decoder.
+		next->end = &delta_coder_end;
+		coder->next = LZMA_NEXT_CODER_INIT;
+	}
+
+	// Validate the options.
+	if (lzma_delta_coder_memusage(filters[0].options) == UINT64_MAX)
+		return LZMA_OPTIONS_ERROR;
+
+	// Set the delta distance.
+	const lzma_options_delta *opt = filters[0].options;
+	coder->distance = opt->dist;
+
+	// Initialize the rest of the variables.
+	coder->pos = 0;
+	memzero(coder->history, LZMA_DELTA_DIST_MAX);
+
+	// Initialize the next decoder in the chain, if any.
+	return lzma_next_filter_init(&coder->next, allocator, filters + 1);
+}
+
+
+extern uint64_t
+lzma_delta_coder_memusage(const void *options)
+{
+	const lzma_options_delta *opt = options;
+
+	if (opt == NULL || opt->type != LZMA_DELTA_TYPE_BYTE
+			|| opt->dist < LZMA_DELTA_DIST_MIN
+			|| opt->dist > LZMA_DELTA_DIST_MAX)
+		return UINT64_MAX;
+
+	return sizeof(lzma_delta_coder);
+}

Deleted: vendor/xz/5.2.3/src/liblzma/delta/delta_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/delta/delta_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/delta/delta_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,76 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       delta_decoder.c
-/// \brief      Delta filter decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "delta_decoder.h"
-#include "delta_private.h"
-
-
-static void
-decode_buffer(lzma_coder *coder, uint8_t *buffer, size_t size)
-{
-	const size_t distance = coder->distance;
-
-	for (size_t i = 0; i < size; ++i) {
-		buffer[i] += coder->history[(distance + coder->pos) & 0xFF];
-		coder->history[coder->pos-- & 0xFF] = buffer[i];
-	}
-}
-
-
-static lzma_ret
-delta_decode(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)
-{
-	assert(coder->next.code != NULL);
-
-	const size_t out_start = *out_pos;
-
-	const lzma_ret ret = coder->next.code(coder->next.coder, allocator,
-			in, in_pos, in_size, out, out_pos, out_size,
-			action);
-
-	decode_buffer(coder, out + out_start, *out_pos - out_start);
-
-	return ret;
-}
-
-
-extern lzma_ret
-lzma_delta_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	next->code = &delta_decode;
-	return lzma_delta_coder_init(next, allocator, filters);
-}
-
-
-extern lzma_ret
-lzma_delta_props_decode(void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size)
-{
-	if (props_size != 1)
-		return LZMA_OPTIONS_ERROR;
-
-	lzma_options_delta *opt
-			= lzma_alloc(sizeof(lzma_options_delta), allocator);
-	if (opt == NULL)
-		return LZMA_MEM_ERROR;
-
-	opt->type = LZMA_DELTA_TYPE_BYTE;
-	opt->dist = props[0] + 1;
-
-	*options = opt;
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/delta/delta_decoder.c (from rev 11013, vendor/xz/dist/src/liblzma/delta/delta_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/delta/delta_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/delta/delta_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,78 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       delta_decoder.c
+/// \brief      Delta filter decoder
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "delta_decoder.h"
+#include "delta_private.h"
+
+
+static void
+decode_buffer(lzma_delta_coder *coder, uint8_t *buffer, size_t size)
+{
+	const size_t distance = coder->distance;
+
+	for (size_t i = 0; i < size; ++i) {
+		buffer[i] += coder->history[(distance + coder->pos) & 0xFF];
+		coder->history[coder->pos-- & 0xFF] = buffer[i];
+	}
+}
+
+
+static lzma_ret
+delta_decode(void *coder_ptr, const 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)
+{
+	lzma_delta_coder *coder = coder_ptr;
+
+	assert(coder->next.code != NULL);
+
+	const size_t out_start = *out_pos;
+
+	const lzma_ret ret = coder->next.code(coder->next.coder, allocator,
+			in, in_pos, in_size, out, out_pos, out_size,
+			action);
+
+	decode_buffer(coder, out + out_start, *out_pos - out_start);
+
+	return ret;
+}
+
+
+extern lzma_ret
+lzma_delta_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	next->code = &delta_decode;
+	return lzma_delta_coder_init(next, allocator, filters);
+}
+
+
+extern lzma_ret
+lzma_delta_props_decode(void **options, const lzma_allocator *allocator,
+		const uint8_t *props, size_t props_size)
+{
+	if (props_size != 1)
+		return LZMA_OPTIONS_ERROR;
+
+	lzma_options_delta *opt
+			= lzma_alloc(sizeof(lzma_options_delta), allocator);
+	if (opt == NULL)
+		return LZMA_MEM_ERROR;
+
+	opt->type = LZMA_DELTA_TYPE_BYTE;
+	opt->dist = props[0] + 1;
+
+	*options = opt;
+
+	return LZMA_OK;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/delta/delta_decoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/delta/delta_decoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/delta/delta_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,25 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       delta_decoder.h
-/// \brief      Delta filter decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_DELTA_DECODER_H
-#define LZMA_DELTA_DECODER_H
-
-#include "delta_common.h"
-
-extern lzma_ret lzma_delta_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_delta_props_decode(
-		void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/delta/delta_decoder.h (from rev 9176, vendor/xz/dist/src/liblzma/delta/delta_decoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/delta/delta_decoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/delta/delta_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,26 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       delta_decoder.h
+/// \brief      Delta filter decoder
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_DELTA_DECODER_H
+#define LZMA_DELTA_DECODER_H
+
+#include "delta_common.h"
+
+extern lzma_ret lzma_delta_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+extern lzma_ret lzma_delta_props_decode(
+		void **options, const lzma_allocator *allocator,
+		const uint8_t *props, size_t props_size);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/delta/delta_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/delta/delta_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/delta/delta_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,121 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       delta_encoder.c
-/// \brief      Delta filter encoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "delta_encoder.h"
-#include "delta_private.h"
-
-
-/// Copies and encodes the data at the same time. This is used when Delta
-/// is the first filter in the chain (and thus the last filter in the
-/// encoder's filter stack).
-static void
-copy_and_encode(lzma_coder *coder,
-		const uint8_t *restrict in, uint8_t *restrict out, size_t size)
-{
-	const size_t distance = coder->distance;
-
-	for (size_t i = 0; i < size; ++i) {
-		const uint8_t tmp = coder->history[
-				(distance + coder->pos) & 0xFF];
-		coder->history[coder->pos-- & 0xFF] = in[i];
-		out[i] = in[i] - tmp;
-	}
-}
-
-
-/// Encodes the data in place. This is used when we are the last filter
-/// in the chain (and thus non-last filter in the encoder's filter stack).
-static void
-encode_in_place(lzma_coder *coder, uint8_t *buffer, size_t size)
-{
-	const size_t distance = coder->distance;
-
-	for (size_t i = 0; i < size; ++i) {
-		const uint8_t tmp = coder->history[
-				(distance + coder->pos) & 0xFF];
-		coder->history[coder->pos-- & 0xFF] = buffer[i];
-		buffer[i] -= tmp;
-	}
-}
-
-
-static lzma_ret
-delta_encode(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)
-{
-	lzma_ret ret;
-
-	if (coder->next.code == NULL) {
-		const size_t in_avail = in_size - *in_pos;
-		const size_t out_avail = out_size - *out_pos;
-		const size_t size = my_min(in_avail, out_avail);
-
-		copy_and_encode(coder, in + *in_pos, out + *out_pos, size);
-
-		*in_pos += size;
-		*out_pos += size;
-
-		ret = action != LZMA_RUN && *in_pos == in_size
-				? LZMA_STREAM_END : LZMA_OK;
-
-	} else {
-		const size_t out_start = *out_pos;
-
-		ret = coder->next.code(coder->next.coder, allocator,
-				in, in_pos, in_size, out, out_pos, out_size,
-				action);
-
-		encode_in_place(coder, out + out_start, *out_pos - out_start);
-	}
-
-	return ret;
-}
-
-
-static lzma_ret
-delta_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
-		const lzma_filter *filters_null lzma_attribute((__unused__)),
-		const lzma_filter *reversed_filters)
-{
-	// Delta doesn't and will never support changing the options in
-	// the middle of encoding. If the app tries to change them, we
-	// simply ignore them.
-	return lzma_next_filter_update(
-			&coder->next, allocator, reversed_filters + 1);
-}
-
-
-extern lzma_ret
-lzma_delta_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	next->code = &delta_encode;
-	next->update = &delta_encoder_update;
-	return lzma_delta_coder_init(next, allocator, filters);
-}
-
-
-extern lzma_ret
-lzma_delta_props_encode(const void *options, uint8_t *out)
-{
-	// The caller must have already validated the options, so it's
-	// LZMA_PROG_ERROR if they are invalid.
-	if (lzma_delta_coder_memusage(options) == UINT64_MAX)
-		return LZMA_PROG_ERROR;
-
-	const lzma_options_delta *opt = options;
-	out[0] = opt->dist - LZMA_DELTA_DIST_MIN;
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/delta/delta_encoder.c (from rev 11013, vendor/xz/dist/src/liblzma/delta/delta_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/delta/delta_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/delta/delta_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,125 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       delta_encoder.c
+/// \brief      Delta filter encoder
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "delta_encoder.h"
+#include "delta_private.h"
+
+
+/// Copies and encodes the data at the same time. This is used when Delta
+/// is the first filter in the chain (and thus the last filter in the
+/// encoder's filter stack).
+static void
+copy_and_encode(lzma_delta_coder *coder,
+		const uint8_t *restrict in, uint8_t *restrict out, size_t size)
+{
+	const size_t distance = coder->distance;
+
+	for (size_t i = 0; i < size; ++i) {
+		const uint8_t tmp = coder->history[
+				(distance + coder->pos) & 0xFF];
+		coder->history[coder->pos-- & 0xFF] = in[i];
+		out[i] = in[i] - tmp;
+	}
+}
+
+
+/// Encodes the data in place. This is used when we are the last filter
+/// in the chain (and thus non-last filter in the encoder's filter stack).
+static void
+encode_in_place(lzma_delta_coder *coder, uint8_t *buffer, size_t size)
+{
+	const size_t distance = coder->distance;
+
+	for (size_t i = 0; i < size; ++i) {
+		const uint8_t tmp = coder->history[
+				(distance + coder->pos) & 0xFF];
+		coder->history[coder->pos-- & 0xFF] = buffer[i];
+		buffer[i] -= tmp;
+	}
+}
+
+
+static lzma_ret
+delta_encode(void *coder_ptr, const 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)
+{
+	lzma_delta_coder *coder = coder_ptr;
+
+	lzma_ret ret;
+
+	if (coder->next.code == NULL) {
+		const size_t in_avail = in_size - *in_pos;
+		const size_t out_avail = out_size - *out_pos;
+		const size_t size = my_min(in_avail, out_avail);
+
+		copy_and_encode(coder, in + *in_pos, out + *out_pos, size);
+
+		*in_pos += size;
+		*out_pos += size;
+
+		ret = action != LZMA_RUN && *in_pos == in_size
+				? LZMA_STREAM_END : LZMA_OK;
+
+	} else {
+		const size_t out_start = *out_pos;
+
+		ret = coder->next.code(coder->next.coder, allocator,
+				in, in_pos, in_size, out, out_pos, out_size,
+				action);
+
+		encode_in_place(coder, out + out_start, *out_pos - out_start);
+	}
+
+	return ret;
+}
+
+
+static lzma_ret
+delta_encoder_update(void *coder_ptr, const lzma_allocator *allocator,
+		const lzma_filter *filters_null lzma_attribute((__unused__)),
+		const lzma_filter *reversed_filters)
+{
+	lzma_delta_coder *coder = coder_ptr;
+
+	// Delta doesn't and will never support changing the options in
+	// the middle of encoding. If the app tries to change them, we
+	// simply ignore them.
+	return lzma_next_filter_update(
+			&coder->next, allocator, reversed_filters + 1);
+}
+
+
+extern lzma_ret
+lzma_delta_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	next->code = &delta_encode;
+	next->update = &delta_encoder_update;
+	return lzma_delta_coder_init(next, allocator, filters);
+}
+
+
+extern lzma_ret
+lzma_delta_props_encode(const void *options, uint8_t *out)
+{
+	// The caller must have already validated the options, so it's
+	// LZMA_PROG_ERROR if they are invalid.
+	if (lzma_delta_coder_memusage(options) == UINT64_MAX)
+		return LZMA_PROG_ERROR;
+
+	const lzma_options_delta *opt = options;
+	out[0] = opt->dist - LZMA_DELTA_DIST_MIN;
+
+	return LZMA_OK;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/delta/delta_encoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/delta/delta_encoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/delta/delta_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,23 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       delta_encoder.h
-/// \brief      Delta filter encoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_DELTA_ENCODER_H
-#define LZMA_DELTA_ENCODER_H
-
-#include "delta_common.h"
-
-extern lzma_ret lzma_delta_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_delta_props_encode(const void *options, uint8_t *out);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/delta/delta_encoder.h (from rev 9176, vendor/xz/dist/src/liblzma/delta/delta_encoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/delta/delta_encoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/delta/delta_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,24 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       delta_encoder.h
+/// \brief      Delta filter encoder
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_DELTA_ENCODER_H
+#define LZMA_DELTA_ENCODER_H
+
+#include "delta_common.h"
+
+extern lzma_ret lzma_delta_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+extern lzma_ret lzma_delta_props_encode(const void *options, uint8_t *out);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/delta/delta_private.h
===================================================================
--- vendor/xz/dist/src/liblzma/delta/delta_private.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/delta/delta_private.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,37 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       delta_private.h
-/// \brief      Private common stuff for Delta encoder and decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_DELTA_PRIVATE_H
-#define LZMA_DELTA_PRIVATE_H
-
-#include "delta_common.h"
-
-struct lzma_coder_s {
-	/// Next coder in the chain
-	lzma_next_coder next;
-
-	/// Delta distance
-	size_t distance;
-
-	/// Position in history[]
-	uint8_t pos;
-
-	/// Buffer to hold history of the original data
-	uint8_t history[LZMA_DELTA_DIST_MAX];
-};
-
-
-extern lzma_ret lzma_delta_coder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/delta/delta_private.h (from rev 11013, vendor/xz/dist/src/liblzma/delta/delta_private.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/delta/delta_private.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/delta/delta_private.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,37 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       delta_private.h
+/// \brief      Private common stuff for Delta encoder and decoder
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_DELTA_PRIVATE_H
+#define LZMA_DELTA_PRIVATE_H
+
+#include "delta_common.h"
+
+typedef struct {
+	/// Next coder in the chain
+	lzma_next_coder next;
+
+	/// Delta distance
+	size_t distance;
+
+	/// Position in history[]
+	uint8_t pos;
+
+	/// Buffer to hold history of the original data
+	uint8_t history[LZMA_DELTA_DIST_MAX];
+} lzma_delta_coder;
+
+
+extern lzma_ret lzma_delta_coder_init(
+		lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+#endif

Copied: vendor/xz/5.2.3/src/liblzma/liblzma.map (from rev 9176, vendor/xz/dist/src/liblzma/liblzma.map)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/liblzma.map	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/liblzma.map	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,108 @@
+XZ_5.0 {
+global:
+	lzma_alone_decoder;
+	lzma_alone_encoder;
+	lzma_auto_decoder;
+	lzma_block_buffer_bound;
+	lzma_block_buffer_decode;
+	lzma_block_buffer_encode;
+	lzma_block_compressed_size;
+	lzma_block_decoder;
+	lzma_block_encoder;
+	lzma_block_header_decode;
+	lzma_block_header_encode;
+	lzma_block_header_size;
+	lzma_block_total_size;
+	lzma_block_unpadded_size;
+	lzma_check_is_supported;
+	lzma_check_size;
+	lzma_code;
+	lzma_crc32;
+	lzma_crc64;
+	lzma_easy_buffer_encode;
+	lzma_easy_decoder_memusage;
+	lzma_easy_encoder;
+	lzma_easy_encoder_memusage;
+	lzma_end;
+	lzma_filter_decoder_is_supported;
+	lzma_filter_encoder_is_supported;
+	lzma_filter_flags_decode;
+	lzma_filter_flags_encode;
+	lzma_filter_flags_size;
+	lzma_filters_copy;
+	lzma_filters_update;
+	lzma_get_check;
+	lzma_index_append;
+	lzma_index_block_count;
+	lzma_index_buffer_decode;
+	lzma_index_buffer_encode;
+	lzma_index_cat;
+	lzma_index_checks;
+	lzma_index_decoder;
+	lzma_index_dup;
+	lzma_index_encoder;
+	lzma_index_end;
+	lzma_index_file_size;
+	lzma_index_hash_append;
+	lzma_index_hash_decode;
+	lzma_index_hash_end;
+	lzma_index_hash_init;
+	lzma_index_hash_size;
+	lzma_index_init;
+	lzma_index_iter_init;
+	lzma_index_iter_locate;
+	lzma_index_iter_next;
+	lzma_index_iter_rewind;
+	lzma_index_memusage;
+	lzma_index_memused;
+	lzma_index_size;
+	lzma_index_stream_count;
+	lzma_index_stream_flags;
+	lzma_index_stream_padding;
+	lzma_index_stream_size;
+	lzma_index_total_size;
+	lzma_index_uncompressed_size;
+	lzma_lzma_preset;
+	lzma_memlimit_get;
+	lzma_memlimit_set;
+	lzma_memusage;
+	lzma_mf_is_supported;
+	lzma_mode_is_supported;
+	lzma_physmem;
+	lzma_properties_decode;
+	lzma_properties_encode;
+	lzma_properties_size;
+	lzma_raw_buffer_decode;
+	lzma_raw_buffer_encode;
+	lzma_raw_decoder;
+	lzma_raw_decoder_memusage;
+	lzma_raw_encoder;
+	lzma_raw_encoder_memusage;
+	lzma_stream_buffer_bound;
+	lzma_stream_buffer_decode;
+	lzma_stream_buffer_encode;
+	lzma_stream_decoder;
+	lzma_stream_encoder;
+	lzma_stream_flags_compare;
+	lzma_stream_footer_decode;
+	lzma_stream_footer_encode;
+	lzma_stream_header_decode;
+	lzma_stream_header_encode;
+	lzma_version_number;
+	lzma_version_string;
+	lzma_vli_decode;
+	lzma_vli_encode;
+	lzma_vli_size;
+};
+
+XZ_5.2 {
+global:
+	lzma_block_uncomp_encode;
+	lzma_cputhreads;
+	lzma_get_progress;
+	lzma_stream_encoder_mt;
+	lzma_stream_encoder_mt_memusage;
+
+local:
+	*;
+} XZ_5.0;

Deleted: vendor/xz/5.2.3/src/liblzma/liblzma.pc.in
===================================================================
--- vendor/xz/dist/src/liblzma/liblzma.pc.in	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/liblzma.pc.in	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,19 +0,0 @@
-#
-# Author: Lasse Collin
-#
-# This file has been put into the public domain.
-# You can do whatever you want with this file.
-#
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: liblzma
-Description: General purpose data compression library
-URL: @PACKAGE_URL@
-Version: @PACKAGE_VERSION@
-Cflags: -I${includedir}
-Libs: -L${libdir} -llzma
-Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@

Copied: vendor/xz/5.2.3/src/liblzma/liblzma.pc.in (from rev 9176, vendor/xz/dist/src/liblzma/liblzma.pc.in)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/liblzma.pc.in	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/liblzma.pc.in	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,19 @@
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: liblzma
+Description: General purpose data compression library
+URL: @PACKAGE_URL@
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -llzma
+Libs.private: @PTHREAD_CFLAGS@ @LIBS@

Deleted: vendor/xz/5.2.3/src/liblzma/liblzma_w32res.rc
===================================================================
--- vendor/xz/dist/src/liblzma/liblzma_w32res.rc	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/liblzma_w32res.rc	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,12 +0,0 @@
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#define MY_TYPE VFT_DLL
-#define MY_NAME "liblzma"
-#define MY_SUFFIX ".dll"
-#define MY_DESC "liblzma data compression library"
-#include "common_w32res.rc"

Deleted: vendor/xz/5.2.3/src/liblzma/lz/Makefile.inc
===================================================================
--- vendor/xz/dist/src/liblzma/lz/Makefile.inc	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lz/Makefile.inc	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,22 +0,0 @@
-##
-## Author: Lasse Collin
-##
-## This file has been put into the public domain.
-## You can do whatever you want with this file.
-##
-
-if COND_ENCODER_LZ
-liblzma_la_SOURCES += \
-	lz/lz_encoder.c \
-	lz/lz_encoder.h \
-	lz/lz_encoder_hash.h \
-	lz/lz_encoder_hash_table.h \
-	lz/lz_encoder_mf.c
-endif
-
-
-if COND_DECODER_LZ
-liblzma_la_SOURCES += \
-	lz/lz_decoder.c \
-	lz/lz_decoder.h
-endif

Deleted: vendor/xz/5.2.3/src/liblzma/lz/lz_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/lz/lz_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lz/lz_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,300 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lz_decoder.c
-/// \brief      LZ out window
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-// liblzma supports multiple LZ77-based filters. The LZ part is shared
-// between these filters. The LZ code takes care of dictionary handling
-// and passing the data between filters in the chain. The filter-specific
-// part decodes from the input buffer to the dictionary.
-
-
-#include "lz_decoder.h"
-
-
-struct lzma_coder_s {
-	/// Dictionary (history buffer)
-	lzma_dict dict;
-
-	/// The actual LZ-based decoder e.g. LZMA
-	lzma_lz_decoder lz;
-
-	/// Next filter in the chain, if any. Note that LZMA and LZMA2 are
-	/// only allowed as the last filter, but the long-range filter in
-	/// future can be in the middle of the chain.
-	lzma_next_coder next;
-
-	/// True if the next filter in the chain has returned LZMA_STREAM_END.
-	bool next_finished;
-
-	/// True if the LZ decoder (e.g. LZMA) has detected end of payload
-	/// marker. This may become true before next_finished becomes true.
-	bool this_finished;
-
-	/// Temporary buffer needed when the LZ-based filter is not the last
-	/// filter in the chain. The output of the next filter is first
-	/// decoded into buffer[], which is then used as input for the actual
-	/// LZ-based decoder.
-	struct {
-		size_t pos;
-		size_t size;
-		uint8_t buffer[LZMA_BUFFER_SIZE];
-	} temp;
-};
-
-
-static void
-lz_decoder_reset(lzma_coder *coder)
-{
-	coder->dict.pos = 0;
-	coder->dict.full = 0;
-	coder->dict.buf[coder->dict.size - 1] = '\0';
-	coder->dict.need_reset = false;
-	return;
-}
-
-
-static lzma_ret
-decode_buffer(lzma_coder *coder,
-		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)
-{
-	while (true) {
-		// Wrap the dictionary if needed.
-		if (coder->dict.pos == coder->dict.size)
-			coder->dict.pos = 0;
-
-		// Store the current dictionary position. It is needed to know
-		// where to start copying to the out[] buffer.
-		const size_t dict_start = coder->dict.pos;
-
-		// Calculate how much we allow coder->lz.code() to decode.
-		// It must not decode past the end of the dictionary
-		// buffer, and we don't want it to decode more than is
-		// actually needed to fill the out[] buffer.
-		coder->dict.limit = coder->dict.pos
-				+ my_min(out_size - *out_pos,
-					coder->dict.size - coder->dict.pos);
-
-		// Call the coder->lz.code() to do the actual decoding.
-		const lzma_ret ret = coder->lz.code(
-				coder->lz.coder, &coder->dict,
-				in, in_pos, in_size);
-
-		// Copy the decoded data from the dictionary to the out[]
-		// buffer.
-		const size_t copy_size = coder->dict.pos - dict_start;
-		assert(copy_size <= out_size - *out_pos);
-		memcpy(out + *out_pos, coder->dict.buf + dict_start,
-				copy_size);
-		*out_pos += copy_size;
-
-		// Reset the dictionary if so requested by coder->lz.code().
-		if (coder->dict.need_reset) {
-			lz_decoder_reset(coder);
-
-			// Since we reset dictionary, we don't check if
-			// dictionary became full.
-			if (ret != LZMA_OK || *out_pos == out_size)
-				return ret;
-		} else {
-			// Return if everything got decoded or an error
-			// occurred, or if there's no more data to decode.
-			//
-			// Note that detecting if there's something to decode
-			// is done by looking if dictionary become full
-			// instead of looking if *in_pos == in_size. This
-			// is because it is possible that all the input was
-			// consumed already but some data is pending to be
-			// written to the dictionary.
-			if (ret != LZMA_OK || *out_pos == out_size
-					|| coder->dict.pos < coder->dict.size)
-				return ret;
-		}
-	}
-}
-
-
-static lzma_ret
-lz_decode(lzma_coder *coder,
-		lzma_allocator *allocator lzma_attribute((__unused__)),
-		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)
-{
-	if (coder->next.code == NULL)
-		return decode_buffer(coder, in, in_pos, in_size,
-				out, out_pos, out_size);
-
-	// We aren't the last coder in the chain, we need to decode
-	// our input to a temporary buffer.
-	while (*out_pos < out_size) {
-		// Fill the temporary buffer if it is empty.
-		if (!coder->next_finished
-				&& coder->temp.pos == coder->temp.size) {
-			coder->temp.pos = 0;
-			coder->temp.size = 0;
-
-			const lzma_ret ret = coder->next.code(
-					coder->next.coder,
-					allocator, in, in_pos, in_size,
-					coder->temp.buffer, &coder->temp.size,
-					LZMA_BUFFER_SIZE, action);
-
-			if (ret == LZMA_STREAM_END)
-				coder->next_finished = true;
-			else if (ret != LZMA_OK || coder->temp.size == 0)
-				return ret;
-		}
-
-		if (coder->this_finished) {
-			if (coder->temp.size != 0)
-				return LZMA_DATA_ERROR;
-
-			if (coder->next_finished)
-				return LZMA_STREAM_END;
-
-			return LZMA_OK;
-		}
-
-		const lzma_ret ret = decode_buffer(coder, coder->temp.buffer,
-				&coder->temp.pos, coder->temp.size,
-				out, out_pos, out_size);
-
-		if (ret == LZMA_STREAM_END)
-			coder->this_finished = true;
-		else if (ret != LZMA_OK)
-			return ret;
-		else if (coder->next_finished && *out_pos < out_size)
-			return LZMA_DATA_ERROR;
-	}
-
-	return LZMA_OK;
-}
-
-
-static void
-lz_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder->dict.buf, allocator);
-
-	if (coder->lz.end != NULL)
-		coder->lz.end(coder->lz.coder, allocator);
-	else
-		lzma_free(coder->lz.coder, allocator);
-
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-extern lzma_ret
-lzma_lz_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters,
-		lzma_ret (*lz_init)(lzma_lz_decoder *lz,
-			lzma_allocator *allocator, const void *options,
-			lzma_lz_options *lz_options))
-{
-	// Allocate the base structure if it isn't already allocated.
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &lz_decode;
-		next->end = &lz_decoder_end;
-
-		next->coder->dict.buf = NULL;
-		next->coder->dict.size = 0;
-		next->coder->lz = LZMA_LZ_DECODER_INIT;
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	// Allocate and initialize the LZ-based decoder. It will also give
-	// us the dictionary size.
-	lzma_lz_options lz_options;
-	return_if_error(lz_init(&next->coder->lz, allocator,
-			filters[0].options, &lz_options));
-
-	// If the dictionary size is very small, increase it to 4096 bytes.
-	// This is to prevent constant wrapping of the dictionary, which
-	// would slow things down. The downside is that since we don't check
-	// separately for the real dictionary size, we may happily accept
-	// corrupt files.
-	if (lz_options.dict_size < 4096)
-		lz_options.dict_size = 4096;
-
-	// Make dictionary size a multipe of 16. Some LZ-based decoders like
-	// LZMA use the lowest bits lzma_dict.pos to know the alignment of the
-	// data. Aligned buffer is also good when memcpying from the
-	// dictionary to the output buffer, since applications are
-	// recommended to give aligned buffers to liblzma.
-	//
-	// Avoid integer overflow.
-	if (lz_options.dict_size > SIZE_MAX - 15)
-		return LZMA_MEM_ERROR;
-
-	lz_options.dict_size = (lz_options.dict_size + 15) & ~((size_t)(15));
-
-	// Allocate and initialize the dictionary.
-	if (next->coder->dict.size != lz_options.dict_size) {
-		lzma_free(next->coder->dict.buf, allocator);
-		next->coder->dict.buf
-				= lzma_alloc(lz_options.dict_size, allocator);
-		if (next->coder->dict.buf == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->coder->dict.size = lz_options.dict_size;
-	}
-
-	lz_decoder_reset(next->coder);
-
-	// Use the preset dictionary if it was given to us.
-	if (lz_options.preset_dict != NULL
-			&& lz_options.preset_dict_size > 0) {
-		// If the preset dictionary is bigger than the actual
-		// dictionary, copy only the tail.
-		const size_t copy_size = my_min(lz_options.preset_dict_size,
-				lz_options.dict_size);
-		const size_t offset = lz_options.preset_dict_size - copy_size;
-		memcpy(next->coder->dict.buf, lz_options.preset_dict + offset,
-				copy_size);
-		next->coder->dict.pos = copy_size;
-		next->coder->dict.full = copy_size;
-	}
-
-	// Miscellaneous initializations
-	next->coder->next_finished = false;
-	next->coder->this_finished = false;
-	next->coder->temp.pos = 0;
-	next->coder->temp.size = 0;
-
-	// Initialize the next filter in the chain, if any.
-	return lzma_next_filter_init(&next->coder->next, allocator,
-			filters + 1);
-}
-
-
-extern uint64_t
-lzma_lz_decoder_memusage(size_t dictionary_size)
-{
-	return sizeof(lzma_coder) + (uint64_t)(dictionary_size);
-}
-
-
-extern void
-lzma_lz_decoder_uncompressed(lzma_coder *coder, lzma_vli uncompressed_size)
-{
-	coder->lz.set_uncompressed(coder->lz.coder, uncompressed_size);
-}

Copied: vendor/xz/5.2.3/src/liblzma/lz/lz_decoder.c (from rev 11013, vendor/xz/dist/src/liblzma/lz/lz_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lz/lz_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lz/lz_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,306 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lz_decoder.c
+/// \brief      LZ out window
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// liblzma supports multiple LZ77-based filters. The LZ part is shared
+// between these filters. The LZ code takes care of dictionary handling
+// and passing the data between filters in the chain. The filter-specific
+// part decodes from the input buffer to the dictionary.
+
+
+#include "lz_decoder.h"
+
+
+typedef struct {
+	/// Dictionary (history buffer)
+	lzma_dict dict;
+
+	/// The actual LZ-based decoder e.g. LZMA
+	lzma_lz_decoder lz;
+
+	/// Next filter in the chain, if any. Note that LZMA and LZMA2 are
+	/// only allowed as the last filter, but the long-range filter in
+	/// future can be in the middle of the chain.
+	lzma_next_coder next;
+
+	/// True if the next filter in the chain has returned LZMA_STREAM_END.
+	bool next_finished;
+
+	/// True if the LZ decoder (e.g. LZMA) has detected end of payload
+	/// marker. This may become true before next_finished becomes true.
+	bool this_finished;
+
+	/// Temporary buffer needed when the LZ-based filter is not the last
+	/// filter in the chain. The output of the next filter is first
+	/// decoded into buffer[], which is then used as input for the actual
+	/// LZ-based decoder.
+	struct {
+		size_t pos;
+		size_t size;
+		uint8_t buffer[LZMA_BUFFER_SIZE];
+	} temp;
+} lzma_coder;
+
+
+static void
+lz_decoder_reset(lzma_coder *coder)
+{
+	coder->dict.pos = 0;
+	coder->dict.full = 0;
+	coder->dict.buf[coder->dict.size - 1] = '\0';
+	coder->dict.need_reset = false;
+	return;
+}
+
+
+static lzma_ret
+decode_buffer(lzma_coder *coder,
+		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)
+{
+	while (true) {
+		// Wrap the dictionary if needed.
+		if (coder->dict.pos == coder->dict.size)
+			coder->dict.pos = 0;
+
+		// Store the current dictionary position. It is needed to know
+		// where to start copying to the out[] buffer.
+		const size_t dict_start = coder->dict.pos;
+
+		// Calculate how much we allow coder->lz.code() to decode.
+		// It must not decode past the end of the dictionary
+		// buffer, and we don't want it to decode more than is
+		// actually needed to fill the out[] buffer.
+		coder->dict.limit = coder->dict.pos
+				+ my_min(out_size - *out_pos,
+					coder->dict.size - coder->dict.pos);
+
+		// Call the coder->lz.code() to do the actual decoding.
+		const lzma_ret ret = coder->lz.code(
+				coder->lz.coder, &coder->dict,
+				in, in_pos, in_size);
+
+		// Copy the decoded data from the dictionary to the out[]
+		// buffer.
+		const size_t copy_size = coder->dict.pos - dict_start;
+		assert(copy_size <= out_size - *out_pos);
+		memcpy(out + *out_pos, coder->dict.buf + dict_start,
+				copy_size);
+		*out_pos += copy_size;
+
+		// Reset the dictionary if so requested by coder->lz.code().
+		if (coder->dict.need_reset) {
+			lz_decoder_reset(coder);
+
+			// Since we reset dictionary, we don't check if
+			// dictionary became full.
+			if (ret != LZMA_OK || *out_pos == out_size)
+				return ret;
+		} else {
+			// Return if everything got decoded or an error
+			// occurred, or if there's no more data to decode.
+			//
+			// Note that detecting if there's something to decode
+			// is done by looking if dictionary become full
+			// instead of looking if *in_pos == in_size. This
+			// is because it is possible that all the input was
+			// consumed already but some data is pending to be
+			// written to the dictionary.
+			if (ret != LZMA_OK || *out_pos == out_size
+					|| coder->dict.pos < coder->dict.size)
+				return ret;
+		}
+	}
+}
+
+
+static lzma_ret
+lz_decode(void *coder_ptr,
+		const lzma_allocator *allocator lzma_attribute((__unused__)),
+		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)
+{
+	lzma_coder *coder = coder_ptr;
+
+	if (coder->next.code == NULL)
+		return decode_buffer(coder, in, in_pos, in_size,
+				out, out_pos, out_size);
+
+	// We aren't the last coder in the chain, we need to decode
+	// our input to a temporary buffer.
+	while (*out_pos < out_size) {
+		// Fill the temporary buffer if it is empty.
+		if (!coder->next_finished
+				&& coder->temp.pos == coder->temp.size) {
+			coder->temp.pos = 0;
+			coder->temp.size = 0;
+
+			const lzma_ret ret = coder->next.code(
+					coder->next.coder,
+					allocator, in, in_pos, in_size,
+					coder->temp.buffer, &coder->temp.size,
+					LZMA_BUFFER_SIZE, action);
+
+			if (ret == LZMA_STREAM_END)
+				coder->next_finished = true;
+			else if (ret != LZMA_OK || coder->temp.size == 0)
+				return ret;
+		}
+
+		if (coder->this_finished) {
+			if (coder->temp.size != 0)
+				return LZMA_DATA_ERROR;
+
+			if (coder->next_finished)
+				return LZMA_STREAM_END;
+
+			return LZMA_OK;
+		}
+
+		const lzma_ret ret = decode_buffer(coder, coder->temp.buffer,
+				&coder->temp.pos, coder->temp.size,
+				out, out_pos, out_size);
+
+		if (ret == LZMA_STREAM_END)
+			coder->this_finished = true;
+		else if (ret != LZMA_OK)
+			return ret;
+		else if (coder->next_finished && *out_pos < out_size)
+			return LZMA_DATA_ERROR;
+	}
+
+	return LZMA_OK;
+}
+
+
+static void
+lz_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_coder *coder = coder_ptr;
+
+	lzma_next_end(&coder->next, allocator);
+	lzma_free(coder->dict.buf, allocator);
+
+	if (coder->lz.end != NULL)
+		coder->lz.end(coder->lz.coder, allocator);
+	else
+		lzma_free(coder->lz.coder, allocator);
+
+	lzma_free(coder, allocator);
+	return;
+}
+
+
+extern lzma_ret
+lzma_lz_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters,
+		lzma_ret (*lz_init)(lzma_lz_decoder *lz,
+			const lzma_allocator *allocator, const void *options,
+			lzma_lz_options *lz_options))
+{
+	// Allocate the base structure if it isn't already allocated.
+	lzma_coder *coder = next->coder;
+	if (coder == NULL) {
+		coder = lzma_alloc(sizeof(lzma_coder), allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		next->coder = coder;
+		next->code = &lz_decode;
+		next->end = &lz_decoder_end;
+
+		coder->dict.buf = NULL;
+		coder->dict.size = 0;
+		coder->lz = LZMA_LZ_DECODER_INIT;
+		coder->next = LZMA_NEXT_CODER_INIT;
+	}
+
+	// Allocate and initialize the LZ-based decoder. It will also give
+	// us the dictionary size.
+	lzma_lz_options lz_options;
+	return_if_error(lz_init(&coder->lz, allocator,
+			filters[0].options, &lz_options));
+
+	// If the dictionary size is very small, increase it to 4096 bytes.
+	// This is to prevent constant wrapping of the dictionary, which
+	// would slow things down. The downside is that since we don't check
+	// separately for the real dictionary size, we may happily accept
+	// corrupt files.
+	if (lz_options.dict_size < 4096)
+		lz_options.dict_size = 4096;
+
+	// Make dictionary size a multipe of 16. Some LZ-based decoders like
+	// LZMA use the lowest bits lzma_dict.pos to know the alignment of the
+	// data. Aligned buffer is also good when memcpying from the
+	// dictionary to the output buffer, since applications are
+	// recommended to give aligned buffers to liblzma.
+	//
+	// Avoid integer overflow.
+	if (lz_options.dict_size > SIZE_MAX - 15)
+		return LZMA_MEM_ERROR;
+
+	lz_options.dict_size = (lz_options.dict_size + 15) & ~((size_t)(15));
+
+	// Allocate and initialize the dictionary.
+	if (coder->dict.size != lz_options.dict_size) {
+		lzma_free(coder->dict.buf, allocator);
+		coder->dict.buf
+				= lzma_alloc(lz_options.dict_size, allocator);
+		if (coder->dict.buf == NULL)
+			return LZMA_MEM_ERROR;
+
+		coder->dict.size = lz_options.dict_size;
+	}
+
+	lz_decoder_reset(next->coder);
+
+	// Use the preset dictionary if it was given to us.
+	if (lz_options.preset_dict != NULL
+			&& lz_options.preset_dict_size > 0) {
+		// If the preset dictionary is bigger than the actual
+		// dictionary, copy only the tail.
+		const size_t copy_size = my_min(lz_options.preset_dict_size,
+				lz_options.dict_size);
+		const size_t offset = lz_options.preset_dict_size - copy_size;
+		memcpy(coder->dict.buf, lz_options.preset_dict + offset,
+				copy_size);
+		coder->dict.pos = copy_size;
+		coder->dict.full = copy_size;
+	}
+
+	// Miscellaneous initializations
+	coder->next_finished = false;
+	coder->this_finished = false;
+	coder->temp.pos = 0;
+	coder->temp.size = 0;
+
+	// Initialize the next filter in the chain, if any.
+	return lzma_next_filter_init(&coder->next, allocator, filters + 1);
+}
+
+
+extern uint64_t
+lzma_lz_decoder_memusage(size_t dictionary_size)
+{
+	return sizeof(lzma_coder) + (uint64_t)(dictionary_size);
+}
+
+
+extern void
+lzma_lz_decoder_uncompressed(void *coder_ptr, lzma_vli uncompressed_size)
+{
+	lzma_coder *coder = coder_ptr;
+	coder->lz.set_uncompressed(coder->lz.coder, uncompressed_size);
+}

Deleted: vendor/xz/5.2.3/src/liblzma/lz/lz_decoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/lz/lz_decoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lz/lz_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,234 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lz_decoder.h
-/// \brief      LZ out window
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZ_DECODER_H
-#define LZMA_LZ_DECODER_H
-
-#include "common.h"
-
-
-typedef struct {
-	/// Pointer to the dictionary buffer. It can be an allocated buffer
-	/// internal to liblzma, or it can a be a buffer given by the
-	/// application when in single-call mode (not implemented yet).
-	uint8_t *buf;
-
-	/// Write position in dictionary. The next byte will be written to
-	/// buf[pos].
-	size_t pos;
-
-	/// Indicates how full the dictionary is. This is used by
-	/// dict_is_distance_valid() to detect corrupt files that would
-	/// read beyond the beginning of the dictionary.
-	size_t full;
-
-	/// Write limit
-	size_t limit;
-
-	/// Size of the dictionary
-	size_t size;
-
-	/// True when dictionary should be reset before decoding more data.
-	bool need_reset;
-
-} lzma_dict;
-
-
-typedef struct {
-	size_t dict_size;
-	const uint8_t *preset_dict;
-	size_t preset_dict_size;
-} lzma_lz_options;
-
-
-typedef struct {
-	/// Data specific to the LZ-based decoder
-	lzma_coder *coder;
-
-	/// Function to decode from in[] to *dict
-	lzma_ret (*code)(lzma_coder *restrict coder,
-			lzma_dict *restrict dict, const uint8_t *restrict in,
-			size_t *restrict in_pos, size_t in_size);
-
-	void (*reset)(lzma_coder *coder, const void *options);
-
-	/// Set the uncompressed size
-	void (*set_uncompressed)(lzma_coder *coder,
-			lzma_vli uncompressed_size);
-
-	/// Free allocated resources
-	void (*end)(lzma_coder *coder, lzma_allocator *allocator);
-
-} lzma_lz_decoder;
-
-
-#define LZMA_LZ_DECODER_INIT \
-	(lzma_lz_decoder){ \
-		.coder = NULL, \
-		.code = NULL, \
-		.reset = NULL, \
-		.set_uncompressed = NULL, \
-		.end = NULL, \
-	}
-
-
-extern lzma_ret lzma_lz_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters,
-		lzma_ret (*lz_init)(lzma_lz_decoder *lz,
-			lzma_allocator *allocator, const void *options,
-			lzma_lz_options *lz_options));
-
-extern uint64_t lzma_lz_decoder_memusage(size_t dictionary_size);
-
-extern void lzma_lz_decoder_uncompressed(
-		lzma_coder *coder, lzma_vli uncompressed_size);
-
-
-//////////////////////
-// Inline functions //
-//////////////////////
-
-/// Get a byte from the history buffer.
-static inline uint8_t
-dict_get(const lzma_dict *const dict, const uint32_t distance)
-{
-	return dict->buf[dict->pos - distance - 1
-			+ (distance < dict->pos ? 0 : dict->size)];
-}
-
-
-/// Test if dictionary is empty.
-static inline bool
-dict_is_empty(const lzma_dict *const dict)
-{
-	return dict->full == 0;
-}
-
-
-/// Validate the match distance
-static inline bool
-dict_is_distance_valid(const lzma_dict *const dict, const size_t distance)
-{
-	return dict->full > distance;
-}
-
-
-/// Repeat *len bytes at distance.
-static inline bool
-dict_repeat(lzma_dict *dict, uint32_t distance, uint32_t *len)
-{
-	// Don't write past the end of the dictionary.
-	const size_t dict_avail = dict->limit - dict->pos;
-	uint32_t left = my_min(dict_avail, *len);
-	*len -= left;
-
-	// Repeat a block of data from the history. Because memcpy() is faster
-	// than copying byte by byte in a loop, the copying process gets split
-	// into three cases.
-	if (distance < left) {
-		// Source and target areas overlap, thus we can't use
-		// memcpy() nor even memmove() safely.
-		do {
-			dict->buf[dict->pos] = dict_get(dict, distance);
-			++dict->pos;
-		} while (--left > 0);
-
-	} else if (distance < dict->pos) {
-		// The easiest and fastest case
-		memcpy(dict->buf + dict->pos,
-				dict->buf + dict->pos - distance - 1,
-				left);
-		dict->pos += left;
-
-	} else {
-		// The bigger the dictionary, the more rare this
-		// case occurs. We need to "wrap" the dict, thus
-		// we might need two memcpy() to copy all the data.
-		assert(dict->full == dict->size);
-		const uint32_t copy_pos
-				= dict->pos - distance - 1 + dict->size;
-		uint32_t copy_size = dict->size - copy_pos;
-
-		if (copy_size < left) {
-			memmove(dict->buf + dict->pos, dict->buf + copy_pos,
-					copy_size);
-			dict->pos += copy_size;
-			copy_size = left - copy_size;
-			memcpy(dict->buf + dict->pos, dict->buf, copy_size);
-			dict->pos += copy_size;
-		} else {
-			memmove(dict->buf + dict->pos, dict->buf + copy_pos,
-					left);
-			dict->pos += left;
-		}
-	}
-
-	// Update how full the dictionary is.
-	if (dict->full < dict->pos)
-		dict->full = dict->pos;
-
-	return unlikely(*len != 0);
-}
-
-
-/// Puts one byte into the dictionary. Returns true if the dictionary was
-/// already full and the byte couldn't be added.
-static inline bool
-dict_put(lzma_dict *dict, uint8_t byte)
-{
-	if (unlikely(dict->pos == dict->limit))
-		return true;
-
-	dict->buf[dict->pos++] = byte;
-
-	if (dict->pos > dict->full)
-		dict->full = dict->pos;
-
-	return false;
-}
-
-
-/// Copies arbitrary amount of data into the dictionary.
-static inline void
-dict_write(lzma_dict *restrict dict, const uint8_t *restrict in,
-		size_t *restrict in_pos, size_t in_size,
-		size_t *restrict left)
-{
-	// NOTE: If we are being given more data than the size of the
-	// dictionary, it could be possible to optimize the LZ decoder
-	// so that not everything needs to go through the dictionary.
-	// This shouldn't be very common thing in practice though, and
-	// the slowdown of one extra memcpy() isn't bad compared to how
-	// much time it would have taken if the data were compressed.
-
-	if (in_size - *in_pos > *left)
-		in_size = *in_pos + *left;
-
-	*left -= lzma_bufcpy(in, in_pos, in_size,
-			dict->buf, &dict->pos, dict->limit);
-
-	if (dict->pos > dict->full)
-		dict->full = dict->pos;
-
-	return;
-}
-
-
-static inline void
-dict_reset(lzma_dict *dict)
-{
-	dict->need_reset = true;
-	return;
-}
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/lz/lz_decoder.h (from rev 11013, vendor/xz/dist/src/liblzma/lz/lz_decoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lz/lz_decoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lz/lz_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,234 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lz_decoder.h
+/// \brief      LZ out window
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZ_DECODER_H
+#define LZMA_LZ_DECODER_H
+
+#include "common.h"
+
+
+typedef struct {
+	/// Pointer to the dictionary buffer. It can be an allocated buffer
+	/// internal to liblzma, or it can a be a buffer given by the
+	/// application when in single-call mode (not implemented yet).
+	uint8_t *buf;
+
+	/// Write position in dictionary. The next byte will be written to
+	/// buf[pos].
+	size_t pos;
+
+	/// Indicates how full the dictionary is. This is used by
+	/// dict_is_distance_valid() to detect corrupt files that would
+	/// read beyond the beginning of the dictionary.
+	size_t full;
+
+	/// Write limit
+	size_t limit;
+
+	/// Size of the dictionary
+	size_t size;
+
+	/// True when dictionary should be reset before decoding more data.
+	bool need_reset;
+
+} lzma_dict;
+
+
+typedef struct {
+	size_t dict_size;
+	const uint8_t *preset_dict;
+	size_t preset_dict_size;
+} lzma_lz_options;
+
+
+typedef struct {
+	/// Data specific to the LZ-based decoder
+	void *coder;
+
+	/// Function to decode from in[] to *dict
+	lzma_ret (*code)(void *coder,
+			lzma_dict *restrict dict, const uint8_t *restrict in,
+			size_t *restrict in_pos, size_t in_size);
+
+	void (*reset)(void *coder, const void *options);
+
+	/// Set the uncompressed size
+	void (*set_uncompressed)(void *coder, lzma_vli uncompressed_size);
+
+	/// Free allocated resources
+	void (*end)(void *coder, const lzma_allocator *allocator);
+
+} lzma_lz_decoder;
+
+
+#define LZMA_LZ_DECODER_INIT \
+	(lzma_lz_decoder){ \
+		.coder = NULL, \
+		.code = NULL, \
+		.reset = NULL, \
+		.set_uncompressed = NULL, \
+		.end = NULL, \
+	}
+
+
+extern lzma_ret lzma_lz_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters,
+		lzma_ret (*lz_init)(lzma_lz_decoder *lz,
+			const lzma_allocator *allocator, const void *options,
+			lzma_lz_options *lz_options));
+
+extern uint64_t lzma_lz_decoder_memusage(size_t dictionary_size);
+
+extern void lzma_lz_decoder_uncompressed(
+		void *coder, lzma_vli uncompressed_size);
+
+
+//////////////////////
+// Inline functions //
+//////////////////////
+
+/// Get a byte from the history buffer.
+static inline uint8_t
+dict_get(const lzma_dict *const dict, const uint32_t distance)
+{
+	return dict->buf[dict->pos - distance - 1
+			+ (distance < dict->pos ? 0 : dict->size)];
+}
+
+
+/// Test if dictionary is empty.
+static inline bool
+dict_is_empty(const lzma_dict *const dict)
+{
+	return dict->full == 0;
+}
+
+
+/// Validate the match distance
+static inline bool
+dict_is_distance_valid(const lzma_dict *const dict, const size_t distance)
+{
+	return dict->full > distance;
+}
+
+
+/// Repeat *len bytes at distance.
+static inline bool
+dict_repeat(lzma_dict *dict, uint32_t distance, uint32_t *len)
+{
+	// Don't write past the end of the dictionary.
+	const size_t dict_avail = dict->limit - dict->pos;
+	uint32_t left = my_min(dict_avail, *len);
+	*len -= left;
+
+	// Repeat a block of data from the history. Because memcpy() is faster
+	// than copying byte by byte in a loop, the copying process gets split
+	// into three cases.
+	if (distance < left) {
+		// Source and target areas overlap, thus we can't use
+		// memcpy() nor even memmove() safely.
+		do {
+			dict->buf[dict->pos] = dict_get(dict, distance);
+			++dict->pos;
+		} while (--left > 0);
+
+	} else if (distance < dict->pos) {
+		// The easiest and fastest case
+		memcpy(dict->buf + dict->pos,
+				dict->buf + dict->pos - distance - 1,
+				left);
+		dict->pos += left;
+
+	} else {
+		// The bigger the dictionary, the more rare this
+		// case occurs. We need to "wrap" the dict, thus
+		// we might need two memcpy() to copy all the data.
+		assert(dict->full == dict->size);
+		const uint32_t copy_pos
+				= dict->pos - distance - 1 + dict->size;
+		uint32_t copy_size = dict->size - copy_pos;
+
+		if (copy_size < left) {
+			memmove(dict->buf + dict->pos, dict->buf + copy_pos,
+					copy_size);
+			dict->pos += copy_size;
+			copy_size = left - copy_size;
+			memcpy(dict->buf + dict->pos, dict->buf, copy_size);
+			dict->pos += copy_size;
+		} else {
+			memmove(dict->buf + dict->pos, dict->buf + copy_pos,
+					left);
+			dict->pos += left;
+		}
+	}
+
+	// Update how full the dictionary is.
+	if (dict->full < dict->pos)
+		dict->full = dict->pos;
+
+	return unlikely(*len != 0);
+}
+
+
+/// Puts one byte into the dictionary. Returns true if the dictionary was
+/// already full and the byte couldn't be added.
+static inline bool
+dict_put(lzma_dict *dict, uint8_t byte)
+{
+	if (unlikely(dict->pos == dict->limit))
+		return true;
+
+	dict->buf[dict->pos++] = byte;
+
+	if (dict->pos > dict->full)
+		dict->full = dict->pos;
+
+	return false;
+}
+
+
+/// Copies arbitrary amount of data into the dictionary.
+static inline void
+dict_write(lzma_dict *restrict dict, const uint8_t *restrict in,
+		size_t *restrict in_pos, size_t in_size,
+		size_t *restrict left)
+{
+	// NOTE: If we are being given more data than the size of the
+	// dictionary, it could be possible to optimize the LZ decoder
+	// so that not everything needs to go through the dictionary.
+	// This shouldn't be very common thing in practice though, and
+	// the slowdown of one extra memcpy() isn't bad compared to how
+	// much time it would have taken if the data were compressed.
+
+	if (in_size - *in_pos > *left)
+		in_size = *in_pos + *left;
+
+	*left -= lzma_bufcpy(in, in_pos, in_size,
+			dict->buf, &dict->pos, dict->limit);
+
+	if (dict->pos > dict->full)
+		dict->full = dict->pos;
+
+	return;
+}
+
+
+static inline void
+dict_reset(lzma_dict *dict)
+{
+	dict->need_reset = true;
+	return;
+}
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/lz/lz_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/lz/lz_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lz/lz_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,583 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lz_encoder.c
-/// \brief      LZ in window
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lz_encoder.h"
-#include "lz_encoder_hash.h"
-
-// See lz_encoder_hash.h. This is a bit hackish but avoids making
-// endianness a conditional in makefiles.
-#if defined(WORDS_BIGENDIAN) && !defined(HAVE_SMALL)
-#	include "lz_encoder_hash_table.h"
-#endif
-
-
-struct lzma_coder_s {
-	/// LZ-based encoder e.g. LZMA
-	lzma_lz_encoder lz;
-
-	/// History buffer and match finder
-	lzma_mf mf;
-
-	/// Next coder in the chain
-	lzma_next_coder next;
-};
-
-
-/// \brief      Moves the data in the input window to free space for new data
-///
-/// mf->buffer is a sliding input window, which keeps mf->keep_size_before
-/// bytes of input history available all the time. Now and then we need to
-/// "slide" the buffer to make space for the new data to the end of the
-/// buffer. At the same time, data older than keep_size_before is dropped.
-///
-static void
-move_window(lzma_mf *mf)
-{
-	// Align the move to a multiple of 16 bytes. Some LZ-based encoders
-	// like LZMA use the lowest bits of mf->read_pos to know the
-	// alignment of the uncompressed data. We also get better speed
-	// for memmove() with aligned buffers.
-	assert(mf->read_pos > mf->keep_size_before);
-	const uint32_t move_offset
-		= (mf->read_pos - mf->keep_size_before) & ~UINT32_C(15);
-
-	assert(mf->write_pos > move_offset);
-	const size_t move_size = mf->write_pos - move_offset;
-
-	assert(move_offset + move_size <= mf->size);
-
-	memmove(mf->buffer, mf->buffer + move_offset, move_size);
-
-	mf->offset += move_offset;
-	mf->read_pos -= move_offset;
-	mf->read_limit -= move_offset;
-	mf->write_pos -= move_offset;
-
-	return;
-}
-
-
-/// \brief      Tries to fill the input window (mf->buffer)
-///
-/// If we are the last encoder in the chain, our input data is in in[].
-/// Otherwise we call the next filter in the chain to process in[] and
-/// write its output to mf->buffer.
-///
-/// This function must not be called once it has returned LZMA_STREAM_END.
-///
-static lzma_ret
-fill_window(lzma_coder *coder, lzma_allocator *allocator, const uint8_t *in,
-		size_t *in_pos, size_t in_size, lzma_action action)
-{
-	assert(coder->mf.read_pos <= coder->mf.write_pos);
-
-	// Move the sliding window if needed.
-	if (coder->mf.read_pos >= coder->mf.size - coder->mf.keep_size_after)
-		move_window(&coder->mf);
-
-	// Maybe this is ugly, but lzma_mf uses uint32_t for most things
-	// (which I find cleanest), but we need size_t here when filling
-	// the history window.
-	size_t write_pos = coder->mf.write_pos;
-	lzma_ret ret;
-	if (coder->next.code == NULL) {
-		// Not using a filter, simply memcpy() as much as possible.
-		lzma_bufcpy(in, in_pos, in_size, coder->mf.buffer,
-				&write_pos, coder->mf.size);
-
-		ret = action != LZMA_RUN && *in_pos == in_size
-				? LZMA_STREAM_END : LZMA_OK;
-
-	} else {
-		ret = coder->next.code(coder->next.coder, allocator,
-				in, in_pos, in_size,
-				coder->mf.buffer, &write_pos,
-				coder->mf.size, action);
-	}
-
-	coder->mf.write_pos = write_pos;
-
-	// If end of stream has been reached or flushing completed, we allow
-	// the encoder to process all the input (that is, read_pos is allowed
-	// to reach write_pos). Otherwise we keep keep_size_after bytes
-	// available as prebuffer.
-	if (ret == LZMA_STREAM_END) {
-		assert(*in_pos == in_size);
-		ret = LZMA_OK;
-		coder->mf.action = action;
-		coder->mf.read_limit = coder->mf.write_pos;
-
-	} else if (coder->mf.write_pos > coder->mf.keep_size_after) {
-		// This needs to be done conditionally, because if we got
-		// only little new input, there may be too little input
-		// to do any encoding yet.
-		coder->mf.read_limit = coder->mf.write_pos
-				- coder->mf.keep_size_after;
-	}
-
-	// Restart the match finder after finished LZMA_SYNC_FLUSH.
-	if (coder->mf.pending > 0
-			&& coder->mf.read_pos < coder->mf.read_limit) {
-		// Match finder may update coder->pending and expects it to
-		// start from zero, so use a temporary variable.
-		const size_t pending = coder->mf.pending;
-		coder->mf.pending = 0;
-
-		// Rewind read_pos so that the match finder can hash
-		// the pending bytes.
-		assert(coder->mf.read_pos >= pending);
-		coder->mf.read_pos -= pending;
-
-		// Call the skip function directly instead of using
-		// mf_skip(), since we don't want to touch mf->read_ahead.
-		coder->mf.skip(&coder->mf, pending);
-	}
-
-	return ret;
-}
-
-
-static lzma_ret
-lz_encode(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)
-{
-	while (*out_pos < out_size
-			&& (*in_pos < in_size || action != LZMA_RUN)) {
-		// Read more data to coder->mf.buffer if needed.
-		if (coder->mf.action == LZMA_RUN && coder->mf.read_pos
-				>= coder->mf.read_limit)
-			return_if_error(fill_window(coder, allocator,
-					in, in_pos, in_size, action));
-
-		// Encode
-		const lzma_ret ret = coder->lz.code(coder->lz.coder,
-				&coder->mf, out, out_pos, out_size);
-		if (ret != LZMA_OK) {
-			// Setting this to LZMA_RUN for cases when we are
-			// flushing. It doesn't matter when finishing or if
-			// an error occurred.
-			coder->mf.action = LZMA_RUN;
-			return ret;
-		}
-	}
-
-	return LZMA_OK;
-}
-
-
-static bool
-lz_encoder_prepare(lzma_mf *mf, lzma_allocator *allocator,
-		const lzma_lz_options *lz_options)
-{
-	// For now, the dictionary size is limited to 1.5 GiB. This may grow
-	// in the future if needed, but it needs a little more work than just
-	// changing this check.
-	if (lz_options->dict_size < LZMA_DICT_SIZE_MIN
-			|| lz_options->dict_size
-				> (UINT32_C(1) << 30) + (UINT32_C(1) << 29)
-			|| lz_options->nice_len > lz_options->match_len_max)
-		return true;
-
-	mf->keep_size_before = lz_options->before_size + lz_options->dict_size;
-
-	mf->keep_size_after = lz_options->after_size
-			+ lz_options->match_len_max;
-
-	// To avoid constant memmove()s, allocate some extra space. Since
-	// memmove()s become more expensive when the size of the buffer
-	// increases, we reserve more space when a large dictionary is
-	// used to make the memmove() calls rarer.
-	//
-	// This works with dictionaries up to about 3 GiB. If bigger
-	// dictionary is wanted, some extra work is needed:
-	//   - Several variables in lzma_mf have to be changed from uint32_t
-	//     to size_t.
-	//   - Memory usage calculation needs something too, e.g. use uint64_t
-	//     for mf->size.
-	uint32_t reserve = lz_options->dict_size / 2;
-	if (reserve > (UINT32_C(1) << 30))
-		reserve /= 2;
-
-	reserve += (lz_options->before_size + lz_options->match_len_max
-			+ lz_options->after_size) / 2 + (UINT32_C(1) << 19);
-
-	const uint32_t old_size = mf->size;
-	mf->size = mf->keep_size_before + reserve + mf->keep_size_after;
-
-	// Deallocate the old history buffer if it exists but has different
-	// size than what is needed now.
-	if (mf->buffer != NULL && old_size != mf->size) {
-		lzma_free(mf->buffer, allocator);
-		mf->buffer = NULL;
-	}
-
-	// Match finder options
-	mf->match_len_max = lz_options->match_len_max;
-	mf->nice_len = lz_options->nice_len;
-
-	// cyclic_size has to stay smaller than 2 Gi. Note that this doesn't
-	// mean limiting dictionary size to less than 2 GiB. With a match
-	// finder that uses multibyte resolution (hashes start at e.g. every
-	// fourth byte), cyclic_size would stay below 2 Gi even when
-	// dictionary size is greater than 2 GiB.
-	//
-	// It would be possible to allow cyclic_size >= 2 Gi, but then we
-	// would need to be careful to use 64-bit types in various places
-	// (size_t could do since we would need bigger than 32-bit address
-	// space anyway). It would also require either zeroing a multigigabyte
-	// buffer at initialization (waste of time and RAM) or allow
-	// normalization in lz_encoder_mf.c to access uninitialized
-	// memory to keep the code simpler. The current way is simple and
-	// still allows pretty big dictionaries, so I don't expect these
-	// limits to change.
-	mf->cyclic_size = lz_options->dict_size + 1;
-
-	// Validate the match finder ID and setup the function pointers.
-	switch (lz_options->match_finder) {
-#ifdef HAVE_MF_HC3
-	case LZMA_MF_HC3:
-		mf->find = &lzma_mf_hc3_find;
-		mf->skip = &lzma_mf_hc3_skip;
-		break;
-#endif
-#ifdef HAVE_MF_HC4
-	case LZMA_MF_HC4:
-		mf->find = &lzma_mf_hc4_find;
-		mf->skip = &lzma_mf_hc4_skip;
-		break;
-#endif
-#ifdef HAVE_MF_BT2
-	case LZMA_MF_BT2:
-		mf->find = &lzma_mf_bt2_find;
-		mf->skip = &lzma_mf_bt2_skip;
-		break;
-#endif
-#ifdef HAVE_MF_BT3
-	case LZMA_MF_BT3:
-		mf->find = &lzma_mf_bt3_find;
-		mf->skip = &lzma_mf_bt3_skip;
-		break;
-#endif
-#ifdef HAVE_MF_BT4
-	case LZMA_MF_BT4:
-		mf->find = &lzma_mf_bt4_find;
-		mf->skip = &lzma_mf_bt4_skip;
-		break;
-#endif
-
-	default:
-		return true;
-	}
-
-	// Calculate the sizes of mf->hash and mf->son and check that
-	// nice_len is big enough for the selected match finder.
-	const uint32_t hash_bytes = lz_options->match_finder & 0x0F;
-	if (hash_bytes > mf->nice_len)
-		return true;
-
-	const bool is_bt = (lz_options->match_finder & 0x10) != 0;
-	uint32_t hs;
-
-	if (hash_bytes == 2) {
-		hs = 0xFFFF;
-	} else {
-		// Round dictionary size up to the next 2^n - 1 so it can
-		// be used as a hash mask.
-		hs = lz_options->dict_size - 1;
-		hs |= hs >> 1;
-		hs |= hs >> 2;
-		hs |= hs >> 4;
-		hs |= hs >> 8;
-		hs >>= 1;
-		hs |= 0xFFFF;
-
-		if (hs > (UINT32_C(1) << 24)) {
-			if (hash_bytes == 3)
-				hs = (UINT32_C(1) << 24) - 1;
-			else
-				hs >>= 1;
-		}
-	}
-
-	mf->hash_mask = hs;
-
-	++hs;
-	if (hash_bytes > 2)
-		hs += HASH_2_SIZE;
-	if (hash_bytes > 3)
-		hs += HASH_3_SIZE;
-/*
-	No match finder uses this at the moment.
-	if (mf->hash_bytes > 4)
-		hs += HASH_4_SIZE;
-*/
-
-	// If the above code calculating hs is modified, make sure that
-	// this assertion stays valid (UINT32_MAX / 5 is not strictly the
-	// exact limit). If it doesn't, you need to calculate that
-	// hash_size_sum + sons_count cannot overflow.
-	assert(hs < UINT32_MAX / 5);
-
-	const uint32_t old_count = mf->hash_size_sum + mf->sons_count;
-	mf->hash_size_sum = hs;
-	mf->sons_count = mf->cyclic_size;
-	if (is_bt)
-		mf->sons_count *= 2;
-
-	const uint32_t new_count = mf->hash_size_sum + mf->sons_count;
-
-	// Deallocate the old hash array if it exists and has different size
-	// than what is needed now.
-	if (old_count != new_count) {
-		lzma_free(mf->hash, allocator);
-		mf->hash = NULL;
-	}
-
-	// Maximum number of match finder cycles
-	mf->depth = lz_options->depth;
-	if (mf->depth == 0) {
-		if (is_bt)
-			mf->depth = 16 + mf->nice_len / 2;
-		else
-			mf->depth = 4 + mf->nice_len / 4;
-	}
-
-	return false;
-}
-
-
-static bool
-lz_encoder_init(lzma_mf *mf, lzma_allocator *allocator,
-		const lzma_lz_options *lz_options)
-{
-	// Allocate the history buffer.
-	if (mf->buffer == NULL) {
-		mf->buffer = lzma_alloc(mf->size, allocator);
-		if (mf->buffer == NULL)
-			return true;
-	}
-
-	// Use cyclic_size as initial mf->offset. This allows
-	// avoiding a few branches in the match finders. The downside is
-	// that match finder needs to be normalized more often, which may
-	// hurt performance with huge dictionaries.
-	mf->offset = mf->cyclic_size;
-	mf->read_pos = 0;
-	mf->read_ahead = 0;
-	mf->read_limit = 0;
-	mf->write_pos = 0;
-	mf->pending = 0;
-
-	// Allocate match finder's hash array.
-	const size_t alloc_count = mf->hash_size_sum + mf->sons_count;
-
-#if UINT32_MAX >= SIZE_MAX / 4
-	// Check for integer overflow. (Huge dictionaries are not
-	// possible on 32-bit CPU.)
-	if (alloc_count > SIZE_MAX / sizeof(uint32_t))
-		return true;
-#endif
-
-	if (mf->hash == NULL) {
-		mf->hash = lzma_alloc(alloc_count * sizeof(uint32_t),
-				allocator);
-		if (mf->hash == NULL)
-			return true;
-	}
-
-	mf->son = mf->hash + mf->hash_size_sum;
-	mf->cyclic_pos = 0;
-
-	// Initialize the hash table. Since EMPTY_HASH_VALUE is zero, we
-	// can use memset().
-/*
-	for (uint32_t i = 0; i < hash_size_sum; ++i)
-		mf->hash[i] = EMPTY_HASH_VALUE;
-*/
-	memzero(mf->hash, (size_t)(mf->hash_size_sum) * sizeof(uint32_t));
-
-	// We don't need to initialize mf->son, but not doing that will
-	// make Valgrind complain in normalization (see normalize() in
-	// lz_encoder_mf.c).
-	//
-	// Skipping this initialization is *very* good when big dictionary is
-	// used but only small amount of data gets actually compressed: most
-	// of the mf->hash won't get actually allocated by the kernel, so
-	// we avoid wasting RAM and improve initialization speed a lot.
-	//memzero(mf->son, (size_t)(mf->sons_count) * sizeof(uint32_t));
-
-	// Handle preset dictionary.
-	if (lz_options->preset_dict != NULL
-			&& lz_options->preset_dict_size > 0) {
-		// If the preset dictionary is bigger than the actual
-		// dictionary, use only the tail.
-		mf->write_pos = my_min(lz_options->preset_dict_size, mf->size);
-		memcpy(mf->buffer, lz_options->preset_dict
-				+ lz_options->preset_dict_size - mf->write_pos,
-				mf->write_pos);
-		mf->action = LZMA_SYNC_FLUSH;
-		mf->skip(mf, mf->write_pos);
-	}
-
-	mf->action = LZMA_RUN;
-
-	return false;
-}
-
-
-extern uint64_t
-lzma_lz_encoder_memusage(const lzma_lz_options *lz_options)
-{
-	// Old buffers must not exist when calling lz_encoder_prepare().
-	lzma_mf mf = {
-		.buffer = NULL,
-		.hash = NULL,
-		.hash_size_sum = 0,
-		.sons_count = 0,
-	};
-
-	// Setup the size information into mf.
-	if (lz_encoder_prepare(&mf, NULL, lz_options))
-		return UINT64_MAX;
-
-	// Calculate the memory usage.
-	return (uint64_t)(mf.hash_size_sum + mf.sons_count)
-				* sizeof(uint32_t)
-			+ (uint64_t)(mf.size) + sizeof(lzma_coder);
-}
-
-
-static void
-lz_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-
-	lzma_free(coder->mf.hash, allocator);
-	lzma_free(coder->mf.buffer, allocator);
-
-	if (coder->lz.end != NULL)
-		coder->lz.end(coder->lz.coder, allocator);
-	else
-		lzma_free(coder->lz.coder, allocator);
-
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_ret
-lz_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
-		const lzma_filter *filters_null lzma_attribute((__unused__)),
-		const lzma_filter *reversed_filters)
-{
-	if (coder->lz.options_update == NULL)
-		return LZMA_PROG_ERROR;
-
-	return_if_error(coder->lz.options_update(
-			coder->lz.coder, reversed_filters));
-
-	return lzma_next_filter_update(
-			&coder->next, allocator, reversed_filters + 1);
-}
-
-
-extern lzma_ret
-lzma_lz_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters,
-		lzma_ret (*lz_init)(lzma_lz_encoder *lz,
-			lzma_allocator *allocator, const void *options,
-			lzma_lz_options *lz_options))
-{
-#ifdef HAVE_SMALL
-	// We need that the CRC32 table has been initialized.
-	lzma_crc32_init();
-#endif
-
-	// Allocate and initialize the base data structure.
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &lz_encode;
-		next->end = &lz_encoder_end;
-		next->update = &lz_encoder_update;
-
-		next->coder->lz.coder = NULL;
-		next->coder->lz.code = NULL;
-		next->coder->lz.end = NULL;
-
-		next->coder->mf.buffer = NULL;
-		next->coder->mf.hash = NULL;
-		next->coder->mf.hash_size_sum = 0;
-		next->coder->mf.sons_count = 0;
-
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	// Initialize the LZ-based encoder.
-	lzma_lz_options lz_options;
-	return_if_error(lz_init(&next->coder->lz, allocator,
-			filters[0].options, &lz_options));
-
-	// Setup the size information into next->coder->mf and deallocate
-	// old buffers if they have wrong size.
-	if (lz_encoder_prepare(&next->coder->mf, allocator, &lz_options))
-		return LZMA_OPTIONS_ERROR;
-
-	// Allocate new buffers if needed, and do the rest of
-	// the initialization.
-	if (lz_encoder_init(&next->coder->mf, allocator, &lz_options))
-		return LZMA_MEM_ERROR;
-
-	// Initialize the next filter in the chain, if any.
-	return lzma_next_filter_init(&next->coder->next, allocator,
-			filters + 1);
-}
-
-
-extern LZMA_API(lzma_bool)
-lzma_mf_is_supported(lzma_match_finder mf)
-{
-	bool ret = false;
-
-#ifdef HAVE_MF_HC3
-	if (mf == LZMA_MF_HC3)
-		ret = true;
-#endif
-
-#ifdef HAVE_MF_HC4
-	if (mf == LZMA_MF_HC4)
-		ret = true;
-#endif
-
-#ifdef HAVE_MF_BT2
-	if (mf == LZMA_MF_BT2)
-		ret = true;
-#endif
-
-#ifdef HAVE_MF_BT3
-	if (mf == LZMA_MF_BT3)
-		ret = true;
-#endif
-
-#ifdef HAVE_MF_BT4
-	if (mf == LZMA_MF_BT4)
-		ret = true;
-#endif
-
-	return ret;
-}

Copied: vendor/xz/5.2.3/src/liblzma/lz/lz_encoder.c (from rev 11013, vendor/xz/dist/src/liblzma/lz/lz_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lz/lz_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lz/lz_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,616 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lz_encoder.c
+/// \brief      LZ in window
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lz_encoder.h"
+#include "lz_encoder_hash.h"
+
+// See lz_encoder_hash.h. This is a bit hackish but avoids making
+// endianness a conditional in makefiles.
+#if defined(WORDS_BIGENDIAN) && !defined(HAVE_SMALL)
+#	include "lz_encoder_hash_table.h"
+#endif
+
+#include "memcmplen.h"
+
+
+typedef struct {
+	/// LZ-based encoder e.g. LZMA
+	lzma_lz_encoder lz;
+
+	/// History buffer and match finder
+	lzma_mf mf;
+
+	/// Next coder in the chain
+	lzma_next_coder next;
+} lzma_coder;
+
+
+/// \brief      Moves the data in the input window to free space for new data
+///
+/// mf->buffer is a sliding input window, which keeps mf->keep_size_before
+/// bytes of input history available all the time. Now and then we need to
+/// "slide" the buffer to make space for the new data to the end of the
+/// buffer. At the same time, data older than keep_size_before is dropped.
+///
+static void
+move_window(lzma_mf *mf)
+{
+	// Align the move to a multiple of 16 bytes. Some LZ-based encoders
+	// like LZMA use the lowest bits of mf->read_pos to know the
+	// alignment of the uncompressed data. We also get better speed
+	// for memmove() with aligned buffers.
+	assert(mf->read_pos > mf->keep_size_before);
+	const uint32_t move_offset
+		= (mf->read_pos - mf->keep_size_before) & ~UINT32_C(15);
+
+	assert(mf->write_pos > move_offset);
+	const size_t move_size = mf->write_pos - move_offset;
+
+	assert(move_offset + move_size <= mf->size);
+
+	memmove(mf->buffer, mf->buffer + move_offset, move_size);
+
+	mf->offset += move_offset;
+	mf->read_pos -= move_offset;
+	mf->read_limit -= move_offset;
+	mf->write_pos -= move_offset;
+
+	return;
+}
+
+
+/// \brief      Tries to fill the input window (mf->buffer)
+///
+/// If we are the last encoder in the chain, our input data is in in[].
+/// Otherwise we call the next filter in the chain to process in[] and
+/// write its output to mf->buffer.
+///
+/// This function must not be called once it has returned LZMA_STREAM_END.
+///
+static lzma_ret
+fill_window(lzma_coder *coder, const lzma_allocator *allocator,
+		const uint8_t *in, size_t *in_pos, size_t in_size,
+		lzma_action action)
+{
+	assert(coder->mf.read_pos <= coder->mf.write_pos);
+
+	// Move the sliding window if needed.
+	if (coder->mf.read_pos >= coder->mf.size - coder->mf.keep_size_after)
+		move_window(&coder->mf);
+
+	// Maybe this is ugly, but lzma_mf uses uint32_t for most things
+	// (which I find cleanest), but we need size_t here when filling
+	// the history window.
+	size_t write_pos = coder->mf.write_pos;
+	lzma_ret ret;
+	if (coder->next.code == NULL) {
+		// Not using a filter, simply memcpy() as much as possible.
+		lzma_bufcpy(in, in_pos, in_size, coder->mf.buffer,
+				&write_pos, coder->mf.size);
+
+		ret = action != LZMA_RUN && *in_pos == in_size
+				? LZMA_STREAM_END : LZMA_OK;
+
+	} else {
+		ret = coder->next.code(coder->next.coder, allocator,
+				in, in_pos, in_size,
+				coder->mf.buffer, &write_pos,
+				coder->mf.size, action);
+	}
+
+	coder->mf.write_pos = write_pos;
+
+	// Silence Valgrind. lzma_memcmplen() can read extra bytes
+	// and Valgrind will give warnings if those bytes are uninitialized
+	// because Valgrind cannot see that the values of the uninitialized
+	// bytes are eventually ignored.
+	memzero(coder->mf.buffer + write_pos, LZMA_MEMCMPLEN_EXTRA);
+
+	// If end of stream has been reached or flushing completed, we allow
+	// the encoder to process all the input (that is, read_pos is allowed
+	// to reach write_pos). Otherwise we keep keep_size_after bytes
+	// available as prebuffer.
+	if (ret == LZMA_STREAM_END) {
+		assert(*in_pos == in_size);
+		ret = LZMA_OK;
+		coder->mf.action = action;
+		coder->mf.read_limit = coder->mf.write_pos;
+
+	} else if (coder->mf.write_pos > coder->mf.keep_size_after) {
+		// This needs to be done conditionally, because if we got
+		// only little new input, there may be too little input
+		// to do any encoding yet.
+		coder->mf.read_limit = coder->mf.write_pos
+				- coder->mf.keep_size_after;
+	}
+
+	// Restart the match finder after finished LZMA_SYNC_FLUSH.
+	if (coder->mf.pending > 0
+			&& coder->mf.read_pos < coder->mf.read_limit) {
+		// Match finder may update coder->pending and expects it to
+		// start from zero, so use a temporary variable.
+		const uint32_t pending = coder->mf.pending;
+		coder->mf.pending = 0;
+
+		// Rewind read_pos so that the match finder can hash
+		// the pending bytes.
+		assert(coder->mf.read_pos >= pending);
+		coder->mf.read_pos -= pending;
+
+		// Call the skip function directly instead of using
+		// mf_skip(), since we don't want to touch mf->read_ahead.
+		coder->mf.skip(&coder->mf, pending);
+	}
+
+	return ret;
+}
+
+
+static lzma_ret
+lz_encode(void *coder_ptr, const 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)
+{
+	lzma_coder *coder = coder_ptr;
+
+	while (*out_pos < out_size
+			&& (*in_pos < in_size || action != LZMA_RUN)) {
+		// Read more data to coder->mf.buffer if needed.
+		if (coder->mf.action == LZMA_RUN && coder->mf.read_pos
+				>= coder->mf.read_limit)
+			return_if_error(fill_window(coder, allocator,
+					in, in_pos, in_size, action));
+
+		// Encode
+		const lzma_ret ret = coder->lz.code(coder->lz.coder,
+				&coder->mf, out, out_pos, out_size);
+		if (ret != LZMA_OK) {
+			// Setting this to LZMA_RUN for cases when we are
+			// flushing. It doesn't matter when finishing or if
+			// an error occurred.
+			coder->mf.action = LZMA_RUN;
+			return ret;
+		}
+	}
+
+	return LZMA_OK;
+}
+
+
+static bool
+lz_encoder_prepare(lzma_mf *mf, const lzma_allocator *allocator,
+		const lzma_lz_options *lz_options)
+{
+	// For now, the dictionary size is limited to 1.5 GiB. This may grow
+	// in the future if needed, but it needs a little more work than just
+	// changing this check.
+	if (lz_options->dict_size < LZMA_DICT_SIZE_MIN
+			|| lz_options->dict_size
+				> (UINT32_C(1) << 30) + (UINT32_C(1) << 29)
+			|| lz_options->nice_len > lz_options->match_len_max)
+		return true;
+
+	mf->keep_size_before = lz_options->before_size + lz_options->dict_size;
+
+	mf->keep_size_after = lz_options->after_size
+			+ lz_options->match_len_max;
+
+	// To avoid constant memmove()s, allocate some extra space. Since
+	// memmove()s become more expensive when the size of the buffer
+	// increases, we reserve more space when a large dictionary is
+	// used to make the memmove() calls rarer.
+	//
+	// This works with dictionaries up to about 3 GiB. If bigger
+	// dictionary is wanted, some extra work is needed:
+	//   - Several variables in lzma_mf have to be changed from uint32_t
+	//     to size_t.
+	//   - Memory usage calculation needs something too, e.g. use uint64_t
+	//     for mf->size.
+	uint32_t reserve = lz_options->dict_size / 2;
+	if (reserve > (UINT32_C(1) << 30))
+		reserve /= 2;
+
+	reserve += (lz_options->before_size + lz_options->match_len_max
+			+ lz_options->after_size) / 2 + (UINT32_C(1) << 19);
+
+	const uint32_t old_size = mf->size;
+	mf->size = mf->keep_size_before + reserve + mf->keep_size_after;
+
+	// Deallocate the old history buffer if it exists but has different
+	// size than what is needed now.
+	if (mf->buffer != NULL && old_size != mf->size) {
+		lzma_free(mf->buffer, allocator);
+		mf->buffer = NULL;
+	}
+
+	// Match finder options
+	mf->match_len_max = lz_options->match_len_max;
+	mf->nice_len = lz_options->nice_len;
+
+	// cyclic_size has to stay smaller than 2 Gi. Note that this doesn't
+	// mean limiting dictionary size to less than 2 GiB. With a match
+	// finder that uses multibyte resolution (hashes start at e.g. every
+	// fourth byte), cyclic_size would stay below 2 Gi even when
+	// dictionary size is greater than 2 GiB.
+	//
+	// It would be possible to allow cyclic_size >= 2 Gi, but then we
+	// would need to be careful to use 64-bit types in various places
+	// (size_t could do since we would need bigger than 32-bit address
+	// space anyway). It would also require either zeroing a multigigabyte
+	// buffer at initialization (waste of time and RAM) or allow
+	// normalization in lz_encoder_mf.c to access uninitialized
+	// memory to keep the code simpler. The current way is simple and
+	// still allows pretty big dictionaries, so I don't expect these
+	// limits to change.
+	mf->cyclic_size = lz_options->dict_size + 1;
+
+	// Validate the match finder ID and setup the function pointers.
+	switch (lz_options->match_finder) {
+#ifdef HAVE_MF_HC3
+	case LZMA_MF_HC3:
+		mf->find = &lzma_mf_hc3_find;
+		mf->skip = &lzma_mf_hc3_skip;
+		break;
+#endif
+#ifdef HAVE_MF_HC4
+	case LZMA_MF_HC4:
+		mf->find = &lzma_mf_hc4_find;
+		mf->skip = &lzma_mf_hc4_skip;
+		break;
+#endif
+#ifdef HAVE_MF_BT2
+	case LZMA_MF_BT2:
+		mf->find = &lzma_mf_bt2_find;
+		mf->skip = &lzma_mf_bt2_skip;
+		break;
+#endif
+#ifdef HAVE_MF_BT3
+	case LZMA_MF_BT3:
+		mf->find = &lzma_mf_bt3_find;
+		mf->skip = &lzma_mf_bt3_skip;
+		break;
+#endif
+#ifdef HAVE_MF_BT4
+	case LZMA_MF_BT4:
+		mf->find = &lzma_mf_bt4_find;
+		mf->skip = &lzma_mf_bt4_skip;
+		break;
+#endif
+
+	default:
+		return true;
+	}
+
+	// Calculate the sizes of mf->hash and mf->son and check that
+	// nice_len is big enough for the selected match finder.
+	const uint32_t hash_bytes = lz_options->match_finder & 0x0F;
+	if (hash_bytes > mf->nice_len)
+		return true;
+
+	const bool is_bt = (lz_options->match_finder & 0x10) != 0;
+	uint32_t hs;
+
+	if (hash_bytes == 2) {
+		hs = 0xFFFF;
+	} else {
+		// Round dictionary size up to the next 2^n - 1 so it can
+		// be used as a hash mask.
+		hs = lz_options->dict_size - 1;
+		hs |= hs >> 1;
+		hs |= hs >> 2;
+		hs |= hs >> 4;
+		hs |= hs >> 8;
+		hs >>= 1;
+		hs |= 0xFFFF;
+
+		if (hs > (UINT32_C(1) << 24)) {
+			if (hash_bytes == 3)
+				hs = (UINT32_C(1) << 24) - 1;
+			else
+				hs >>= 1;
+		}
+	}
+
+	mf->hash_mask = hs;
+
+	++hs;
+	if (hash_bytes > 2)
+		hs += HASH_2_SIZE;
+	if (hash_bytes > 3)
+		hs += HASH_3_SIZE;
+/*
+	No match finder uses this at the moment.
+	if (mf->hash_bytes > 4)
+		hs += HASH_4_SIZE;
+*/
+
+	const uint32_t old_hash_count = mf->hash_count;
+	const uint32_t old_sons_count = mf->sons_count;
+	mf->hash_count = hs;
+	mf->sons_count = mf->cyclic_size;
+	if (is_bt)
+		mf->sons_count *= 2;
+
+	// Deallocate the old hash array if it exists and has different size
+	// than what is needed now.
+	if (old_hash_count != mf->hash_count
+			|| old_sons_count != mf->sons_count) {
+		lzma_free(mf->hash, allocator);
+		mf->hash = NULL;
+
+		lzma_free(mf->son, allocator);
+		mf->son = NULL;
+	}
+
+	// Maximum number of match finder cycles
+	mf->depth = lz_options->depth;
+	if (mf->depth == 0) {
+		if (is_bt)
+			mf->depth = 16 + mf->nice_len / 2;
+		else
+			mf->depth = 4 + mf->nice_len / 4;
+	}
+
+	return false;
+}
+
+
+static bool
+lz_encoder_init(lzma_mf *mf, const lzma_allocator *allocator,
+		const lzma_lz_options *lz_options)
+{
+	// Allocate the history buffer.
+	if (mf->buffer == NULL) {
+		// lzma_memcmplen() is used for the dictionary buffer
+		// so we need to allocate a few extra bytes to prevent
+		// it from reading past the end of the buffer.
+		mf->buffer = lzma_alloc(mf->size + LZMA_MEMCMPLEN_EXTRA,
+				allocator);
+		if (mf->buffer == NULL)
+			return true;
+
+		// Keep Valgrind happy with lzma_memcmplen() and initialize
+		// the extra bytes whose value may get read but which will
+		// effectively get ignored.
+		memzero(mf->buffer + mf->size, LZMA_MEMCMPLEN_EXTRA);
+	}
+
+	// Use cyclic_size as initial mf->offset. This allows
+	// avoiding a few branches in the match finders. The downside is
+	// that match finder needs to be normalized more often, which may
+	// hurt performance with huge dictionaries.
+	mf->offset = mf->cyclic_size;
+	mf->read_pos = 0;
+	mf->read_ahead = 0;
+	mf->read_limit = 0;
+	mf->write_pos = 0;
+	mf->pending = 0;
+
+#if UINT32_MAX >= SIZE_MAX / 4
+	// Check for integer overflow. (Huge dictionaries are not
+	// possible on 32-bit CPU.)
+	if (mf->hash_count > SIZE_MAX / sizeof(uint32_t)
+			|| mf->sons_count > SIZE_MAX / sizeof(uint32_t))
+		return true;
+#endif
+
+	// Allocate and initialize the hash table. Since EMPTY_HASH_VALUE
+	// is zero, we can use lzma_alloc_zero() or memzero() for mf->hash.
+	//
+	// We don't need to initialize mf->son, but not doing that may
+	// make Valgrind complain in normalization (see normalize() in
+	// lz_encoder_mf.c). Skipping the initialization is *very* good
+	// when big dictionary is used but only small amount of data gets
+	// actually compressed: most of the mf->son won't get actually
+	// allocated by the kernel, so we avoid wasting RAM and improve
+	// initialization speed a lot.
+	if (mf->hash == NULL) {
+		mf->hash = lzma_alloc_zero(mf->hash_count * sizeof(uint32_t),
+				allocator);
+		mf->son = lzma_alloc(mf->sons_count * sizeof(uint32_t),
+				allocator);
+
+		if (mf->hash == NULL || mf->son == NULL) {
+			lzma_free(mf->hash, allocator);
+			mf->hash = NULL;
+
+			lzma_free(mf->son, allocator);
+			mf->son = NULL;
+
+			return true;
+		}
+	} else {
+/*
+		for (uint32_t i = 0; i < mf->hash_count; ++i)
+			mf->hash[i] = EMPTY_HASH_VALUE;
+*/
+		memzero(mf->hash, mf->hash_count * sizeof(uint32_t));
+	}
+
+	mf->cyclic_pos = 0;
+
+	// Handle preset dictionary.
+	if (lz_options->preset_dict != NULL
+			&& lz_options->preset_dict_size > 0) {
+		// If the preset dictionary is bigger than the actual
+		// dictionary, use only the tail.
+		mf->write_pos = my_min(lz_options->preset_dict_size, mf->size);
+		memcpy(mf->buffer, lz_options->preset_dict
+				+ lz_options->preset_dict_size - mf->write_pos,
+				mf->write_pos);
+		mf->action = LZMA_SYNC_FLUSH;
+		mf->skip(mf, mf->write_pos);
+	}
+
+	mf->action = LZMA_RUN;
+
+	return false;
+}
+
+
+extern uint64_t
+lzma_lz_encoder_memusage(const lzma_lz_options *lz_options)
+{
+	// Old buffers must not exist when calling lz_encoder_prepare().
+	lzma_mf mf = {
+		.buffer = NULL,
+		.hash = NULL,
+		.son = NULL,
+		.hash_count = 0,
+		.sons_count = 0,
+	};
+
+	// Setup the size information into mf.
+	if (lz_encoder_prepare(&mf, NULL, lz_options))
+		return UINT64_MAX;
+
+	// Calculate the memory usage.
+	return ((uint64_t)(mf.hash_count) + mf.sons_count) * sizeof(uint32_t)
+			+ mf.size + sizeof(lzma_coder);
+}
+
+
+static void
+lz_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_coder *coder = coder_ptr;
+
+	lzma_next_end(&coder->next, allocator);
+
+	lzma_free(coder->mf.son, allocator);
+	lzma_free(coder->mf.hash, allocator);
+	lzma_free(coder->mf.buffer, allocator);
+
+	if (coder->lz.end != NULL)
+		coder->lz.end(coder->lz.coder, allocator);
+	else
+		lzma_free(coder->lz.coder, allocator);
+
+	lzma_free(coder, allocator);
+	return;
+}
+
+
+static lzma_ret
+lz_encoder_update(void *coder_ptr, const lzma_allocator *allocator,
+		const lzma_filter *filters_null lzma_attribute((__unused__)),
+		const lzma_filter *reversed_filters)
+{
+	lzma_coder *coder = coder_ptr;
+
+	if (coder->lz.options_update == NULL)
+		return LZMA_PROG_ERROR;
+
+	return_if_error(coder->lz.options_update(
+			coder->lz.coder, reversed_filters));
+
+	return lzma_next_filter_update(
+			&coder->next, allocator, reversed_filters + 1);
+}
+
+
+extern lzma_ret
+lzma_lz_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters,
+		lzma_ret (*lz_init)(lzma_lz_encoder *lz,
+			const lzma_allocator *allocator, const void *options,
+			lzma_lz_options *lz_options))
+{
+#ifdef HAVE_SMALL
+	// We need that the CRC32 table has been initialized.
+	lzma_crc32_init();
+#endif
+
+	// Allocate and initialize the base data structure.
+	lzma_coder *coder = next->coder;
+	if (coder == NULL) {
+		coder = lzma_alloc(sizeof(lzma_coder), allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		next->coder = coder;
+		next->code = &lz_encode;
+		next->end = &lz_encoder_end;
+		next->update = &lz_encoder_update;
+
+		coder->lz.coder = NULL;
+		coder->lz.code = NULL;
+		coder->lz.end = NULL;
+
+		// mf.size is initialized to silence Valgrind
+		// when used on optimized binaries (GCC may reorder
+		// code in a way that Valgrind gets unhappy).
+		coder->mf.buffer = NULL;
+		coder->mf.size = 0;
+		coder->mf.hash = NULL;
+		coder->mf.son = NULL;
+		coder->mf.hash_count = 0;
+		coder->mf.sons_count = 0;
+
+		coder->next = LZMA_NEXT_CODER_INIT;
+	}
+
+	// Initialize the LZ-based encoder.
+	lzma_lz_options lz_options;
+	return_if_error(lz_init(&coder->lz, allocator,
+			filters[0].options, &lz_options));
+
+	// Setup the size information into coder->mf and deallocate
+	// old buffers if they have wrong size.
+	if (lz_encoder_prepare(&coder->mf, allocator, &lz_options))
+		return LZMA_OPTIONS_ERROR;
+
+	// Allocate new buffers if needed, and do the rest of
+	// the initialization.
+	if (lz_encoder_init(&coder->mf, allocator, &lz_options))
+		return LZMA_MEM_ERROR;
+
+	// Initialize the next filter in the chain, if any.
+	return lzma_next_filter_init(&coder->next, allocator, filters + 1);
+}
+
+
+extern LZMA_API(lzma_bool)
+lzma_mf_is_supported(lzma_match_finder mf)
+{
+	bool ret = false;
+
+#ifdef HAVE_MF_HC3
+	if (mf == LZMA_MF_HC3)
+		ret = true;
+#endif
+
+#ifdef HAVE_MF_HC4
+	if (mf == LZMA_MF_HC4)
+		ret = true;
+#endif
+
+#ifdef HAVE_MF_BT2
+	if (mf == LZMA_MF_BT2)
+		ret = true;
+#endif
+
+#ifdef HAVE_MF_BT3
+	if (mf == LZMA_MF_BT3)
+		ret = true;
+#endif
+
+#ifdef HAVE_MF_BT4
+	if (mf == LZMA_MF_BT4)
+		ret = true;
+#endif
+
+	return ret;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/lz/lz_encoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/lz/lz_encoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lz/lz_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,328 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lz_encoder.h
-/// \brief      LZ in window and match finder API
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZ_ENCODER_H
-#define LZMA_LZ_ENCODER_H
-
-#include "common.h"
-
-
-/// A table of these is used by the LZ-based encoder to hold
-/// the length-distance pairs found by the match finder.
-typedef struct {
-	uint32_t len;
-	uint32_t dist;
-} lzma_match;
-
-
-typedef struct lzma_mf_s lzma_mf;
-struct lzma_mf_s {
-	///////////////
-	// In Window //
-	///////////////
-
-	/// Pointer to buffer with data to be compressed
-	uint8_t *buffer;
-
-	/// Total size of the allocated buffer (that is, including all
-	/// the extra space)
-	uint32_t size;
-
-	/// Number of bytes that must be kept available in our input history.
-	/// That is, once keep_size_before bytes have been processed,
-	/// buffer[read_pos - keep_size_before] is the oldest byte that
-	/// must be available for reading.
-	uint32_t keep_size_before;
-
-	/// Number of bytes that must be kept in buffer after read_pos.
-	/// That is, read_pos <= write_pos - keep_size_after as long as
-	/// action is LZMA_RUN; when action != LZMA_RUN, read_pos is allowed
-	/// to reach write_pos so that the last bytes get encoded too.
-	uint32_t keep_size_after;
-
-	/// Match finders store locations of matches using 32-bit integers.
-	/// To avoid adjusting several megabytes of integers every time the
-	/// input window is moved with move_window, we only adjust the
-	/// offset of the buffer. Thus, buffer[value_in_hash_table - offset]
-	/// is the byte pointed by value_in_hash_table.
-	uint32_t offset;
-
-	/// buffer[read_pos] is the next byte to run through the match
-	/// finder. This is incremented in the match finder once the byte
-	/// has been processed.
-	uint32_t read_pos;
-
-	/// Number of bytes that have been ran through the match finder, but
-	/// which haven't been encoded by the LZ-based encoder yet.
-	uint32_t read_ahead;
-
-	/// As long as read_pos is less than read_limit, there is enough
-	/// input available in buffer for at least one encoding loop.
-	///
-	/// Because of the stateful API, read_limit may and will get greater
-	/// than read_pos quite often. This is taken into account when
-	/// calculating the value for keep_size_after.
-	uint32_t read_limit;
-
-	/// buffer[write_pos] is the first byte that doesn't contain valid
-	/// uncompressed data; that is, the next input byte will be copied
-	/// to buffer[write_pos].
-	uint32_t write_pos;
-
-	/// Number of bytes not hashed before read_pos. This is needed to
-	/// restart the match finder after LZMA_SYNC_FLUSH.
-	uint32_t pending;
-
-	//////////////////
-	// Match Finder //
-	//////////////////
-
-	/// Find matches. Returns the number of distance-length pairs written
-	/// to the matches array. This is called only via lzma_mf_find().
-	uint32_t (*find)(lzma_mf *mf, lzma_match *matches);
-
-	/// Skips num bytes. This is like find() but doesn't make the
-	/// distance-length pairs available, thus being a little faster.
-	/// This is called only via mf_skip().
-	void (*skip)(lzma_mf *mf, uint32_t num);
-
-	uint32_t *hash;
-	uint32_t *son;
-	uint32_t cyclic_pos;
-	uint32_t cyclic_size; // Must be dictionary size + 1.
-	uint32_t hash_mask;
-
-	/// Maximum number of loops in the match finder
-	uint32_t depth;
-
-	/// Maximum length of a match that the match finder will try to find.
-	uint32_t nice_len;
-
-	/// Maximum length of a match supported by the LZ-based encoder.
-	/// If the longest match found by the match finder is nice_len,
-	/// mf_find() tries to expand it up to match_len_max bytes.
-	uint32_t match_len_max;
-
-	/// When running out of input, binary tree match finders need to know
-	/// if it is due to flushing or finishing. The action is used also
-	/// by the LZ-based encoders themselves.
-	lzma_action action;
-
-	/// Number of elements in hash[]
-	uint32_t hash_size_sum;
-
-	/// Number of elements in son[]
-	uint32_t sons_count;
-};
-
-
-typedef struct {
-	/// Extra amount of data to keep available before the "actual"
-	/// dictionary.
-	size_t before_size;
-
-	/// Size of the history buffer
-	size_t dict_size;
-
-	/// Extra amount of data to keep available after the "actual"
-	/// dictionary.
-	size_t after_size;
-
-	/// Maximum length of a match that the LZ-based encoder can accept.
-	/// This is used to extend matches of length nice_len to the
-	/// maximum possible length.
-	size_t match_len_max;
-
-	/// Match finder will search matches up to this length.
-	/// This must be less than or equal to match_len_max.
-	size_t nice_len;
-
-	/// Type of the match finder to use
-	lzma_match_finder match_finder;
-
-	/// Maximum search depth
-	uint32_t depth;
-
-	/// TODO: Comment
-	const uint8_t *preset_dict;
-
-	uint32_t preset_dict_size;
-
-} lzma_lz_options;
-
-
-// The total usable buffer space at any moment outside the match finder:
-// before_size + dict_size + after_size + match_len_max
-//
-// In reality, there's some extra space allocated to prevent the number of
-// memmove() calls reasonable. The bigger the dict_size is, the bigger
-// this extra buffer will be since with bigger dictionaries memmove() would
-// also take longer.
-//
-// A single encoder loop in the LZ-based encoder may call the match finder
-// (mf_find() or mf_skip()) at most after_size times. In other words,
-// a single encoder loop may increment lzma_mf.read_pos at most after_size
-// times. Since matches are looked up to
-// lzma_mf.buffer[lzma_mf.read_pos + match_len_max - 1], the total
-// amount of extra buffer needed after dict_size becomes
-// after_size + match_len_max.
-//
-// before_size has two uses. The first one is to keep literals available
-// in cases when the LZ-based encoder has made some read ahead.
-// TODO: Maybe this could be changed by making the LZ-based encoders to
-// store the actual literals as they do with length-distance pairs.
-//
-// Algorithms such as LZMA2 first try to compress a chunk, and then check
-// if the encoded result is smaller than the uncompressed one. If the chunk
-// was uncompressible, it is better to store it in uncompressed form in
-// the output stream. To do this, the whole uncompressed chunk has to be
-// still available in the history buffer. before_size achieves that.
-
-
-typedef struct {
-	/// Data specific to the LZ-based encoder
-	lzma_coder *coder;
-
-	/// Function to encode from *dict to out[]
-	lzma_ret (*code)(lzma_coder *restrict coder,
-			lzma_mf *restrict mf, uint8_t *restrict out,
-			size_t *restrict out_pos, size_t out_size);
-
-	/// Free allocated resources
-	void (*end)(lzma_coder *coder, lzma_allocator *allocator);
-
-	/// Update the options in the middle of the encoding.
-	lzma_ret (*options_update)(lzma_coder *coder,
-			const lzma_filter *filter);
-
-} lzma_lz_encoder;
-
-
-// Basic steps:
-//  1. Input gets copied into the dictionary.
-//  2. Data in dictionary gets run through the match finder byte by byte.
-//  3. The literals and matches are encoded using e.g. LZMA.
-//
-// The bytes that have been ran through the match finder, but not encoded yet,
-// are called `read ahead'.
-
-
-/// Get pointer to the first byte not ran through the match finder
-static inline const uint8_t *
-mf_ptr(const lzma_mf *mf)
-{
-	return mf->buffer + mf->read_pos;
-}
-
-
-/// Get the number of bytes that haven't been ran through the match finder yet.
-static inline uint32_t
-mf_avail(const lzma_mf *mf)
-{
-	return mf->write_pos - mf->read_pos;
-}
-
-
-/// Get the number of bytes that haven't been encoded yet (some of these
-/// bytes may have been ran through the match finder though).
-static inline uint32_t
-mf_unencoded(const lzma_mf *mf)
-{
-	return mf->write_pos - mf->read_pos + mf->read_ahead;
-}
-
-
-/// Calculate the absolute offset from the beginning of the most recent
-/// dictionary reset. Only the lowest four bits are important, so there's no
-/// problem that we don't know the 64-bit size of the data encoded so far.
-///
-/// NOTE: When moving the input window, we need to do it so that the lowest
-/// bits of dict->read_pos are not modified to keep this macro working
-/// as intended.
-static inline uint32_t
-mf_position(const lzma_mf *mf)
-{
-	return mf->read_pos - mf->read_ahead;
-}
-
-
-/// Since everything else begins with mf_, use it also for lzma_mf_find().
-#define mf_find lzma_mf_find
-
-
-/// Skip the given number of bytes. This is used when a good match was found.
-/// For example, if mf_find() finds a match of 200 bytes long, the first byte
-/// of that match was already consumed by mf_find(), and the rest 199 bytes
-/// have to be skipped with mf_skip(mf, 199).
-static inline void
-mf_skip(lzma_mf *mf, uint32_t amount)
-{
-	if (amount != 0) {
-		mf->skip(mf, amount);
-		mf->read_ahead += amount;
-	}
-}
-
-
-/// Copies at most *left number of bytes from the history buffer
-/// to out[]. This is needed by LZMA2 to encode uncompressed chunks.
-static inline void
-mf_read(lzma_mf *mf, uint8_t *out, size_t *out_pos, size_t out_size,
-		size_t *left)
-{
-	const size_t out_avail = out_size - *out_pos;
-	const size_t copy_size = my_min(out_avail, *left);
-
-	assert(mf->read_ahead == 0);
-	assert(mf->read_pos >= *left);
-
-	memcpy(out + *out_pos, mf->buffer + mf->read_pos - *left,
-			copy_size);
-
-	*out_pos += copy_size;
-	*left -= copy_size;
-	return;
-}
-
-
-extern lzma_ret lzma_lz_encoder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters,
-		lzma_ret (*lz_init)(lzma_lz_encoder *lz,
-			lzma_allocator *allocator, const void *options,
-			lzma_lz_options *lz_options));
-
-
-extern uint64_t lzma_lz_encoder_memusage(const lzma_lz_options *lz_options);
-
-
-// These are only for LZ encoder's internal use.
-extern uint32_t lzma_mf_find(
-		lzma_mf *mf, uint32_t *count, lzma_match *matches);
-
-extern uint32_t lzma_mf_hc3_find(lzma_mf *dict, lzma_match *matches);
-extern void lzma_mf_hc3_skip(lzma_mf *dict, uint32_t amount);
-
-extern uint32_t lzma_mf_hc4_find(lzma_mf *dict, lzma_match *matches);
-extern void lzma_mf_hc4_skip(lzma_mf *dict, uint32_t amount);
-
-extern uint32_t lzma_mf_bt2_find(lzma_mf *dict, lzma_match *matches);
-extern void lzma_mf_bt2_skip(lzma_mf *dict, uint32_t amount);
-
-extern uint32_t lzma_mf_bt3_find(lzma_mf *dict, lzma_match *matches);
-extern void lzma_mf_bt3_skip(lzma_mf *dict, uint32_t amount);
-
-extern uint32_t lzma_mf_bt4_find(lzma_mf *dict, lzma_match *matches);
-extern void lzma_mf_bt4_skip(lzma_mf *dict, uint32_t amount);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/lz/lz_encoder.h (from rev 11013, vendor/xz/dist/src/liblzma/lz/lz_encoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lz/lz_encoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lz/lz_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,327 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lz_encoder.h
+/// \brief      LZ in window and match finder API
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZ_ENCODER_H
+#define LZMA_LZ_ENCODER_H
+
+#include "common.h"
+
+
+/// A table of these is used by the LZ-based encoder to hold
+/// the length-distance pairs found by the match finder.
+typedef struct {
+	uint32_t len;
+	uint32_t dist;
+} lzma_match;
+
+
+typedef struct lzma_mf_s lzma_mf;
+struct lzma_mf_s {
+	///////////////
+	// In Window //
+	///////////////
+
+	/// Pointer to buffer with data to be compressed
+	uint8_t *buffer;
+
+	/// Total size of the allocated buffer (that is, including all
+	/// the extra space)
+	uint32_t size;
+
+	/// Number of bytes that must be kept available in our input history.
+	/// That is, once keep_size_before bytes have been processed,
+	/// buffer[read_pos - keep_size_before] is the oldest byte that
+	/// must be available for reading.
+	uint32_t keep_size_before;
+
+	/// Number of bytes that must be kept in buffer after read_pos.
+	/// That is, read_pos <= write_pos - keep_size_after as long as
+	/// action is LZMA_RUN; when action != LZMA_RUN, read_pos is allowed
+	/// to reach write_pos so that the last bytes get encoded too.
+	uint32_t keep_size_after;
+
+	/// Match finders store locations of matches using 32-bit integers.
+	/// To avoid adjusting several megabytes of integers every time the
+	/// input window is moved with move_window, we only adjust the
+	/// offset of the buffer. Thus, buffer[value_in_hash_table - offset]
+	/// is the byte pointed by value_in_hash_table.
+	uint32_t offset;
+
+	/// buffer[read_pos] is the next byte to run through the match
+	/// finder. This is incremented in the match finder once the byte
+	/// has been processed.
+	uint32_t read_pos;
+
+	/// Number of bytes that have been ran through the match finder, but
+	/// which haven't been encoded by the LZ-based encoder yet.
+	uint32_t read_ahead;
+
+	/// As long as read_pos is less than read_limit, there is enough
+	/// input available in buffer for at least one encoding loop.
+	///
+	/// Because of the stateful API, read_limit may and will get greater
+	/// than read_pos quite often. This is taken into account when
+	/// calculating the value for keep_size_after.
+	uint32_t read_limit;
+
+	/// buffer[write_pos] is the first byte that doesn't contain valid
+	/// uncompressed data; that is, the next input byte will be copied
+	/// to buffer[write_pos].
+	uint32_t write_pos;
+
+	/// Number of bytes not hashed before read_pos. This is needed to
+	/// restart the match finder after LZMA_SYNC_FLUSH.
+	uint32_t pending;
+
+	//////////////////
+	// Match Finder //
+	//////////////////
+
+	/// Find matches. Returns the number of distance-length pairs written
+	/// to the matches array. This is called only via lzma_mf_find().
+	uint32_t (*find)(lzma_mf *mf, lzma_match *matches);
+
+	/// Skips num bytes. This is like find() but doesn't make the
+	/// distance-length pairs available, thus being a little faster.
+	/// This is called only via mf_skip().
+	void (*skip)(lzma_mf *mf, uint32_t num);
+
+	uint32_t *hash;
+	uint32_t *son;
+	uint32_t cyclic_pos;
+	uint32_t cyclic_size; // Must be dictionary size + 1.
+	uint32_t hash_mask;
+
+	/// Maximum number of loops in the match finder
+	uint32_t depth;
+
+	/// Maximum length of a match that the match finder will try to find.
+	uint32_t nice_len;
+
+	/// Maximum length of a match supported by the LZ-based encoder.
+	/// If the longest match found by the match finder is nice_len,
+	/// mf_find() tries to expand it up to match_len_max bytes.
+	uint32_t match_len_max;
+
+	/// When running out of input, binary tree match finders need to know
+	/// if it is due to flushing or finishing. The action is used also
+	/// by the LZ-based encoders themselves.
+	lzma_action action;
+
+	/// Number of elements in hash[]
+	uint32_t hash_count;
+
+	/// Number of elements in son[]
+	uint32_t sons_count;
+};
+
+
+typedef struct {
+	/// Extra amount of data to keep available before the "actual"
+	/// dictionary.
+	size_t before_size;
+
+	/// Size of the history buffer
+	size_t dict_size;
+
+	/// Extra amount of data to keep available after the "actual"
+	/// dictionary.
+	size_t after_size;
+
+	/// Maximum length of a match that the LZ-based encoder can accept.
+	/// This is used to extend matches of length nice_len to the
+	/// maximum possible length.
+	size_t match_len_max;
+
+	/// Match finder will search matches up to this length.
+	/// This must be less than or equal to match_len_max.
+	size_t nice_len;
+
+	/// Type of the match finder to use
+	lzma_match_finder match_finder;
+
+	/// Maximum search depth
+	uint32_t depth;
+
+	/// TODO: Comment
+	const uint8_t *preset_dict;
+
+	uint32_t preset_dict_size;
+
+} lzma_lz_options;
+
+
+// The total usable buffer space at any moment outside the match finder:
+// before_size + dict_size + after_size + match_len_max
+//
+// In reality, there's some extra space allocated to prevent the number of
+// memmove() calls reasonable. The bigger the dict_size is, the bigger
+// this extra buffer will be since with bigger dictionaries memmove() would
+// also take longer.
+//
+// A single encoder loop in the LZ-based encoder may call the match finder
+// (mf_find() or mf_skip()) at most after_size times. In other words,
+// a single encoder loop may increment lzma_mf.read_pos at most after_size
+// times. Since matches are looked up to
+// lzma_mf.buffer[lzma_mf.read_pos + match_len_max - 1], the total
+// amount of extra buffer needed after dict_size becomes
+// after_size + match_len_max.
+//
+// before_size has two uses. The first one is to keep literals available
+// in cases when the LZ-based encoder has made some read ahead.
+// TODO: Maybe this could be changed by making the LZ-based encoders to
+// store the actual literals as they do with length-distance pairs.
+//
+// Algorithms such as LZMA2 first try to compress a chunk, and then check
+// if the encoded result is smaller than the uncompressed one. If the chunk
+// was uncompressible, it is better to store it in uncompressed form in
+// the output stream. To do this, the whole uncompressed chunk has to be
+// still available in the history buffer. before_size achieves that.
+
+
+typedef struct {
+	/// Data specific to the LZ-based encoder
+	void *coder;
+
+	/// Function to encode from *dict to out[]
+	lzma_ret (*code)(void *coder,
+			lzma_mf *restrict mf, uint8_t *restrict out,
+			size_t *restrict out_pos, size_t out_size);
+
+	/// Free allocated resources
+	void (*end)(void *coder, const lzma_allocator *allocator);
+
+	/// Update the options in the middle of the encoding.
+	lzma_ret (*options_update)(void *coder, const lzma_filter *filter);
+
+} lzma_lz_encoder;
+
+
+// Basic steps:
+//  1. Input gets copied into the dictionary.
+//  2. Data in dictionary gets run through the match finder byte by byte.
+//  3. The literals and matches are encoded using e.g. LZMA.
+//
+// The bytes that have been ran through the match finder, but not encoded yet,
+// are called `read ahead'.
+
+
+/// Get pointer to the first byte not ran through the match finder
+static inline const uint8_t *
+mf_ptr(const lzma_mf *mf)
+{
+	return mf->buffer + mf->read_pos;
+}
+
+
+/// Get the number of bytes that haven't been ran through the match finder yet.
+static inline uint32_t
+mf_avail(const lzma_mf *mf)
+{
+	return mf->write_pos - mf->read_pos;
+}
+
+
+/// Get the number of bytes that haven't been encoded yet (some of these
+/// bytes may have been ran through the match finder though).
+static inline uint32_t
+mf_unencoded(const lzma_mf *mf)
+{
+	return mf->write_pos - mf->read_pos + mf->read_ahead;
+}
+
+
+/// Calculate the absolute offset from the beginning of the most recent
+/// dictionary reset. Only the lowest four bits are important, so there's no
+/// problem that we don't know the 64-bit size of the data encoded so far.
+///
+/// NOTE: When moving the input window, we need to do it so that the lowest
+/// bits of dict->read_pos are not modified to keep this macro working
+/// as intended.
+static inline uint32_t
+mf_position(const lzma_mf *mf)
+{
+	return mf->read_pos - mf->read_ahead;
+}
+
+
+/// Since everything else begins with mf_, use it also for lzma_mf_find().
+#define mf_find lzma_mf_find
+
+
+/// Skip the given number of bytes. This is used when a good match was found.
+/// For example, if mf_find() finds a match of 200 bytes long, the first byte
+/// of that match was already consumed by mf_find(), and the rest 199 bytes
+/// have to be skipped with mf_skip(mf, 199).
+static inline void
+mf_skip(lzma_mf *mf, uint32_t amount)
+{
+	if (amount != 0) {
+		mf->skip(mf, amount);
+		mf->read_ahead += amount;
+	}
+}
+
+
+/// Copies at most *left number of bytes from the history buffer
+/// to out[]. This is needed by LZMA2 to encode uncompressed chunks.
+static inline void
+mf_read(lzma_mf *mf, uint8_t *out, size_t *out_pos, size_t out_size,
+		size_t *left)
+{
+	const size_t out_avail = out_size - *out_pos;
+	const size_t copy_size = my_min(out_avail, *left);
+
+	assert(mf->read_ahead == 0);
+	assert(mf->read_pos >= *left);
+
+	memcpy(out + *out_pos, mf->buffer + mf->read_pos - *left,
+			copy_size);
+
+	*out_pos += copy_size;
+	*left -= copy_size;
+	return;
+}
+
+
+extern lzma_ret lzma_lz_encoder_init(
+		lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters,
+		lzma_ret (*lz_init)(lzma_lz_encoder *lz,
+			const lzma_allocator *allocator, const void *options,
+			lzma_lz_options *lz_options));
+
+
+extern uint64_t lzma_lz_encoder_memusage(const lzma_lz_options *lz_options);
+
+
+// These are only for LZ encoder's internal use.
+extern uint32_t lzma_mf_find(
+		lzma_mf *mf, uint32_t *count, lzma_match *matches);
+
+extern uint32_t lzma_mf_hc3_find(lzma_mf *dict, lzma_match *matches);
+extern void lzma_mf_hc3_skip(lzma_mf *dict, uint32_t amount);
+
+extern uint32_t lzma_mf_hc4_find(lzma_mf *dict, lzma_match *matches);
+extern void lzma_mf_hc4_skip(lzma_mf *dict, uint32_t amount);
+
+extern uint32_t lzma_mf_bt2_find(lzma_mf *dict, lzma_match *matches);
+extern void lzma_mf_bt2_skip(lzma_mf *dict, uint32_t amount);
+
+extern uint32_t lzma_mf_bt3_find(lzma_mf *dict, lzma_match *matches);
+extern void lzma_mf_bt3_skip(lzma_mf *dict, uint32_t amount);
+
+extern uint32_t lzma_mf_bt4_find(lzma_mf *dict, lzma_match *matches);
+extern void lzma_mf_bt4_skip(lzma_mf *dict, uint32_t amount);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/lz/lz_encoder_mf.c
===================================================================
--- vendor/xz/dist/src/liblzma/lz/lz_encoder_mf.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lz/lz_encoder_mf.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,753 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lz_encoder_mf.c
-/// \brief      Match finders
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lz_encoder.h"
-#include "lz_encoder_hash.h"
-
-
-/// \brief      Find matches starting from the current byte
-///
-/// \return     The length of the longest match found
-extern uint32_t
-lzma_mf_find(lzma_mf *mf, uint32_t *count_ptr, lzma_match *matches)
-{
-	// Call the match finder. It returns the number of length-distance
-	// pairs found.
-	// FIXME: Minimum count is zero, what _exactly_ is the maximum?
-	const uint32_t count = mf->find(mf, matches);
-
-	// Length of the longest match; assume that no matches were found
-	// and thus the maximum length is zero.
-	uint32_t len_best = 0;
-
-	if (count > 0) {
-#ifndef NDEBUG
-		// Validate the matches.
-		for (uint32_t i = 0; i < count; ++i) {
-			assert(matches[i].len <= mf->nice_len);
-			assert(matches[i].dist < mf->read_pos);
-			assert(memcmp(mf_ptr(mf) - 1,
-				mf_ptr(mf) - matches[i].dist - 2,
-				matches[i].len) == 0);
-		}
-#endif
-
-		// The last used element in the array contains
-		// the longest match.
-		len_best = matches[count - 1].len;
-
-		// If a match of maximum search length was found, try to
-		// extend the match to maximum possible length.
-		if (len_best == mf->nice_len) {
-			// The limit for the match length is either the
-			// maximum match length supported by the LZ-based
-			// encoder or the number of bytes left in the
-			// dictionary, whichever is smaller.
-			uint32_t limit = mf_avail(mf) + 1;
-			if (limit > mf->match_len_max)
-				limit = mf->match_len_max;
-
-			// Pointer to the byte we just ran through
-			// the match finder.
-			const uint8_t *p1 = mf_ptr(mf) - 1;
-
-			// Pointer to the beginning of the match. We need -1
-			// here because the match distances are zero based.
-			const uint8_t *p2 = p1 - matches[count - 1].dist - 1;
-
-			while (len_best < limit
-					&& p1[len_best] == p2[len_best])
-				++len_best;
-		}
-	}
-
-	*count_ptr = count;
-
-	// Finally update the read position to indicate that match finder was
-	// run for this dictionary offset.
-	++mf->read_ahead;
-
-	return len_best;
-}
-
-
-/// Hash value to indicate unused element in the hash. Since we start the
-/// positions from dict_size + 1, zero is always too far to qualify
-/// as usable match position.
-#define EMPTY_HASH_VALUE 0
-
-
-/// Normalization must be done when lzma_mf.offset + lzma_mf.read_pos
-/// reaches MUST_NORMALIZE_POS.
-#define MUST_NORMALIZE_POS UINT32_MAX
-
-
-/// \brief      Normalizes hash values
-///
-/// The hash arrays store positions of match candidates. The positions are
-/// relative to an arbitrary offset that is not the same as the absolute
-/// offset in the input stream. The relative position of the current byte
-/// is lzma_mf.offset + lzma_mf.read_pos. The distances of the matches are
-/// the differences of the current read position and the position found from
-/// the hash.
-///
-/// To prevent integer overflows of the offsets stored in the hash arrays,
-/// we need to "normalize" the stored values now and then. During the
-/// normalization, we drop values that indicate distance greater than the
-/// dictionary size, thus making space for new values.
-static void
-normalize(lzma_mf *mf)
-{
-	assert(mf->read_pos + mf->offset == MUST_NORMALIZE_POS);
-
-	// In future we may not want to touch the lowest bits, because there
-	// may be match finders that use larger resolution than one byte.
-	const uint32_t subvalue
-			= (MUST_NORMALIZE_POS - mf->cyclic_size);
-				// & (~(UINT32_C(1) << 10) - 1);
-
-	const uint32_t count = mf->hash_size_sum + mf->sons_count;
-	uint32_t *hash = mf->hash;
-
-	for (uint32_t i = 0; i < count; ++i) {
-		// If the distance is greater than the dictionary size,
-		// we can simply mark the hash element as empty.
-		//
-		// NOTE: Only the first mf->hash_size_sum elements are
-		// initialized for sure. There may be uninitialized elements
-		// in mf->son. Since we go through both mf->hash and
-		// mf->son here in normalization, Valgrind may complain
-		// that the "if" below depends on uninitialized value. In
-		// this case it is safe to ignore the warning. See also the
-		// comments in lz_encoder_init() in lz_encoder.c.
-		if (hash[i] <= subvalue)
-			hash[i] = EMPTY_HASH_VALUE;
-		else
-			hash[i] -= subvalue;
-	}
-
-	// Update offset to match the new locations.
-	mf->offset -= subvalue;
-
-	return;
-}
-
-
-/// Mark the current byte as processed from point of view of the match finder.
-static void
-move_pos(lzma_mf *mf)
-{
-	if (++mf->cyclic_pos == mf->cyclic_size)
-		mf->cyclic_pos = 0;
-
-	++mf->read_pos;
-	assert(mf->read_pos <= mf->write_pos);
-
-	if (unlikely(mf->read_pos + mf->offset == UINT32_MAX))
-		normalize(mf);
-}
-
-
-/// When flushing, we cannot run the match finder unless there is nice_len
-/// bytes available in the dictionary. Instead, we skip running the match
-/// finder (indicating that no match was found), and count how many bytes we
-/// have ignored this way.
-///
-/// When new data is given after the flushing was completed, the match finder
-/// is restarted by rewinding mf->read_pos backwards by mf->pending. Then
-/// the missed bytes are added to the hash using the match finder's skip
-/// function (with small amount of input, it may start using mf->pending
-/// again if flushing).
-///
-/// Due to this rewinding, we don't touch cyclic_pos or test for
-/// normalization. It will be done when the match finder's skip function
-/// catches up after a flush.
-static void
-move_pending(lzma_mf *mf)
-{
-	++mf->read_pos;
-	assert(mf->read_pos <= mf->write_pos);
-	++mf->pending;
-}
-
-
-/// Calculate len_limit and determine if there is enough input to run
-/// the actual match finder code. Sets up "cur" and "pos". This macro
-/// is used by all find functions and binary tree skip functions. Hash
-/// chain skip function doesn't need len_limit so a simpler code is used
-/// in them.
-#define header(is_bt, len_min, ret_op) \
-	uint32_t len_limit = mf_avail(mf); \
-	if (mf->nice_len <= len_limit) { \
-		len_limit = mf->nice_len; \
-	} else if (len_limit < (len_min) \
-			|| (is_bt && mf->action == LZMA_SYNC_FLUSH)) { \
-		assert(mf->action != LZMA_RUN); \
-		move_pending(mf); \
-		ret_op; \
-	} \
-	const uint8_t *cur = mf_ptr(mf); \
-	const uint32_t pos = mf->read_pos + mf->offset
-
-
-/// Header for find functions. "return 0" indicates that zero matches
-/// were found.
-#define header_find(is_bt, len_min) \
-	header(is_bt, len_min, return 0); \
-	uint32_t matches_count = 0
-
-
-/// Header for a loop in a skip function. "continue" tells to skip the rest
-/// of the code in the loop.
-#define header_skip(is_bt, len_min) \
-	header(is_bt, len_min, continue)
-
-
-/// Calls hc_find_func() or bt_find_func() and calculates the total number
-/// of matches found. Updates the dictionary position and returns the number
-/// of matches found.
-#define call_find(func, len_best) \
-do { \
-	matches_count = func(len_limit, pos, cur, cur_match, mf->depth, \
-				mf->son, mf->cyclic_pos, mf->cyclic_size, \
-				matches + matches_count, len_best) \
-			- matches; \
-	move_pos(mf); \
-	return matches_count; \
-} while (0)
-
-
-////////////////
-// Hash Chain //
-////////////////
-
-#if defined(HAVE_MF_HC3) || defined(HAVE_MF_HC4)
-///
-///
-/// \param      len_limit       Don't look for matches longer than len_limit.
-/// \param      pos             lzma_mf.read_pos + lzma_mf.offset
-/// \param      cur             Pointer to current byte (mf_ptr(mf))
-/// \param      cur_match       Start position of the current match candidate
-/// \param      depth           Maximum length of the hash chain
-/// \param      son             lzma_mf.son (contains the hash chain)
-/// \param      cyclic_pos
-/// \param      cyclic_size
-/// \param      matches         Array to hold the matches.
-/// \param      len_best        The length of the longest match found so far.
-static lzma_match *
-hc_find_func(
-		const uint32_t len_limit,
-		const uint32_t pos,
-		const uint8_t *const cur,
-		uint32_t cur_match,
-		uint32_t depth,
-		uint32_t *const son,
-		const uint32_t cyclic_pos,
-		const uint32_t cyclic_size,
-		lzma_match *matches,
-		uint32_t len_best)
-{
-	son[cyclic_pos] = cur_match;
-
-	while (true) {
-		const uint32_t delta = pos - cur_match;
-		if (depth-- == 0 || delta >= cyclic_size)
-			return matches;
-
-		const uint8_t *const pb = cur - delta;
-		cur_match = son[cyclic_pos - delta
-				+ (delta > cyclic_pos ? cyclic_size : 0)];
-
-		if (pb[len_best] == cur[len_best] && pb[0] == cur[0]) {
-			uint32_t len = 0;
-			while (++len != len_limit)
-				if (pb[len] != cur[len])
-					break;
-
-			if (len_best < len) {
-				len_best = len;
-				matches->len = len;
-				matches->dist = delta - 1;
-				++matches;
-
-				if (len == len_limit)
-					return matches;
-			}
-		}
-	}
-}
-
-
-#define hc_find(len_best) \
-	call_find(hc_find_func, len_best)
-
-
-#define hc_skip() \
-do { \
-	mf->son[mf->cyclic_pos] = cur_match; \
-	move_pos(mf); \
-} while (0)
-
-#endif
-
-
-#ifdef HAVE_MF_HC3
-extern uint32_t
-lzma_mf_hc3_find(lzma_mf *mf, lzma_match *matches)
-{
-	header_find(false, 3);
-
-	hash_3_calc();
-
-	const uint32_t delta2 = pos - mf->hash[hash_2_value];
-	const uint32_t cur_match = mf->hash[FIX_3_HASH_SIZE + hash_value];
-
-	mf->hash[hash_2_value] = pos;
-	mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
-
-	uint32_t len_best = 2;
-
-	if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
-		for ( ; len_best != len_limit; ++len_best)
-			if (*(cur + len_best - delta2) != cur[len_best])
-				break;
-
-		matches[0].len = len_best;
-		matches[0].dist = delta2 - 1;
-		matches_count = 1;
-
-		if (len_best == len_limit) {
-			hc_skip();
-			return 1; // matches_count
-		}
-	}
-
-	hc_find(len_best);
-}
-
-
-extern void
-lzma_mf_hc3_skip(lzma_mf *mf, uint32_t amount)
-{
-	do {
-		if (mf_avail(mf) < 3) {
-			move_pending(mf);
-			continue;
-		}
-
-		const uint8_t *cur = mf_ptr(mf);
-		const uint32_t pos = mf->read_pos + mf->offset;
-
-		hash_3_calc();
-
-		const uint32_t cur_match
-				= mf->hash[FIX_3_HASH_SIZE + hash_value];
-
-		mf->hash[hash_2_value] = pos;
-		mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
-
-		hc_skip();
-
-	} while (--amount != 0);
-}
-#endif
-
-
-#ifdef HAVE_MF_HC4
-extern uint32_t
-lzma_mf_hc4_find(lzma_mf *mf, lzma_match *matches)
-{
-	header_find(false, 4);
-
-	hash_4_calc();
-
-	uint32_t delta2 = pos - mf->hash[hash_2_value];
-	const uint32_t delta3
-			= pos - mf->hash[FIX_3_HASH_SIZE + hash_3_value];
-	const uint32_t cur_match = mf->hash[FIX_4_HASH_SIZE + hash_value];
-
-	mf->hash[hash_2_value ] = pos;
-	mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
-	mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
-
-	uint32_t len_best = 1;
-
-	if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
-		len_best = 2;
-		matches[0].len = 2;
-		matches[0].dist = delta2 - 1;
-		matches_count = 1;
-	}
-
-	if (delta2 != delta3 && delta3 < mf->cyclic_size
-			&& *(cur - delta3) == *cur) {
-		len_best = 3;
-		matches[matches_count++].dist = delta3 - 1;
-		delta2 = delta3;
-	}
-
-	if (matches_count != 0) {
-		for ( ; len_best != len_limit; ++len_best)
-			if (*(cur + len_best - delta2) != cur[len_best])
-				break;
-
-		matches[matches_count - 1].len = len_best;
-
-		if (len_best == len_limit) {
-			hc_skip();
-			return matches_count;
-		}
-	}
-
-	if (len_best < 3)
-		len_best = 3;
-
-	hc_find(len_best);
-}
-
-
-extern void
-lzma_mf_hc4_skip(lzma_mf *mf, uint32_t amount)
-{
-	do {
-		if (mf_avail(mf) < 4) {
-			move_pending(mf);
-			continue;
-		}
-
-		const uint8_t *cur = mf_ptr(mf);
-		const uint32_t pos = mf->read_pos + mf->offset;
-
-		hash_4_calc();
-
-		const uint32_t cur_match
-				= mf->hash[FIX_4_HASH_SIZE + hash_value];
-
-		mf->hash[hash_2_value] = pos;
-		mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
-		mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
-
-		hc_skip();
-
-	} while (--amount != 0);
-}
-#endif
-
-
-/////////////////
-// Binary Tree //
-/////////////////
-
-#if defined(HAVE_MF_BT2) || defined(HAVE_MF_BT3) || defined(HAVE_MF_BT4)
-static lzma_match *
-bt_find_func(
-		const uint32_t len_limit,
-		const uint32_t pos,
-		const uint8_t *const cur,
-		uint32_t cur_match,
-		uint32_t depth,
-		uint32_t *const son,
-		const uint32_t cyclic_pos,
-		const uint32_t cyclic_size,
-		lzma_match *matches,
-		uint32_t len_best)
-{
-	uint32_t *ptr0 = son + (cyclic_pos << 1) + 1;
-	uint32_t *ptr1 = son + (cyclic_pos << 1);
-
-	uint32_t len0 = 0;
-	uint32_t len1 = 0;
-
-	while (true) {
-		const uint32_t delta = pos - cur_match;
-		if (depth-- == 0 || delta >= cyclic_size) {
-			*ptr0 = EMPTY_HASH_VALUE;
-			*ptr1 = EMPTY_HASH_VALUE;
-			return matches;
-		}
-
-		uint32_t *const pair = son + ((cyclic_pos - delta
-				+ (delta > cyclic_pos ? cyclic_size : 0))
-				<< 1);
-
-		const uint8_t *const pb = cur - delta;
-		uint32_t len = my_min(len0, len1);
-
-		if (pb[len] == cur[len]) {
-			while (++len != len_limit)
-				if (pb[len] != cur[len])
-					break;
-
-			if (len_best < len) {
-				len_best = len;
-				matches->len = len;
-				matches->dist = delta - 1;
-				++matches;
-
-				if (len == len_limit) {
-					*ptr1 = pair[0];
-					*ptr0 = pair[1];
-					return matches;
-				}
-			}
-		}
-
-		if (pb[len] < cur[len]) {
-			*ptr1 = cur_match;
-			ptr1 = pair + 1;
-			cur_match = *ptr1;
-			len1 = len;
-		} else {
-			*ptr0 = cur_match;
-			ptr0 = pair;
-			cur_match = *ptr0;
-			len0 = len;
-		}
-	}
-}
-
-
-static void
-bt_skip_func(
-		const uint32_t len_limit,
-		const uint32_t pos,
-		const uint8_t *const cur,
-		uint32_t cur_match,
-		uint32_t depth,
-		uint32_t *const son,
-		const uint32_t cyclic_pos,
-		const uint32_t cyclic_size)
-{
-	uint32_t *ptr0 = son + (cyclic_pos << 1) + 1;
-	uint32_t *ptr1 = son + (cyclic_pos << 1);
-
-	uint32_t len0 = 0;
-	uint32_t len1 = 0;
-
-	while (true) {
-		const uint32_t delta = pos - cur_match;
-		if (depth-- == 0 || delta >= cyclic_size) {
-			*ptr0 = EMPTY_HASH_VALUE;
-			*ptr1 = EMPTY_HASH_VALUE;
-			return;
-		}
-
-		uint32_t *pair = son + ((cyclic_pos - delta
-				+ (delta > cyclic_pos ? cyclic_size : 0))
-				<< 1);
-		const uint8_t *pb = cur - delta;
-		uint32_t len = my_min(len0, len1);
-
-		if (pb[len] == cur[len]) {
-			while (++len != len_limit)
-				if (pb[len] != cur[len])
-					break;
-
-			if (len == len_limit) {
-				*ptr1 = pair[0];
-				*ptr0 = pair[1];
-				return;
-			}
-		}
-
-		if (pb[len] < cur[len]) {
-			*ptr1 = cur_match;
-			ptr1 = pair + 1;
-			cur_match = *ptr1;
-			len1 = len;
-		} else {
-			*ptr0 = cur_match;
-			ptr0 = pair;
-			cur_match = *ptr0;
-			len0 = len;
-		}
-	}
-}
-
-
-#define bt_find(len_best) \
-	call_find(bt_find_func, len_best)
-
-#define bt_skip() \
-do { \
-	bt_skip_func(len_limit, pos, cur, cur_match, mf->depth, \
-			mf->son, mf->cyclic_pos, \
-			mf->cyclic_size); \
-	move_pos(mf); \
-} while (0)
-
-#endif
-
-
-#ifdef HAVE_MF_BT2
-extern uint32_t
-lzma_mf_bt2_find(lzma_mf *mf, lzma_match *matches)
-{
-	header_find(true, 2);
-
-	hash_2_calc();
-
-	const uint32_t cur_match = mf->hash[hash_value];
-	mf->hash[hash_value] = pos;
-
-	bt_find(1);
-}
-
-
-extern void
-lzma_mf_bt2_skip(lzma_mf *mf, uint32_t amount)
-{
-	do {
-		header_skip(true, 2);
-
-		hash_2_calc();
-
-		const uint32_t cur_match = mf->hash[hash_value];
-		mf->hash[hash_value] = pos;
-
-		bt_skip();
-
-	} while (--amount != 0);
-}
-#endif
-
-
-#ifdef HAVE_MF_BT3
-extern uint32_t
-lzma_mf_bt3_find(lzma_mf *mf, lzma_match *matches)
-{
-	header_find(true, 3);
-
-	hash_3_calc();
-
-	const uint32_t delta2 = pos - mf->hash[hash_2_value];
-	const uint32_t cur_match = mf->hash[FIX_3_HASH_SIZE + hash_value];
-
-	mf->hash[hash_2_value] = pos;
-	mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
-
-	uint32_t len_best = 2;
-
-	if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
-		for ( ; len_best != len_limit; ++len_best)
-			if (*(cur + len_best - delta2) != cur[len_best])
-				break;
-
-		matches[0].len = len_best;
-		matches[0].dist = delta2 - 1;
-		matches_count = 1;
-
-		if (len_best == len_limit) {
-			bt_skip();
-			return 1; // matches_count
-		}
-	}
-
-	bt_find(len_best);
-}
-
-
-extern void
-lzma_mf_bt3_skip(lzma_mf *mf, uint32_t amount)
-{
-	do {
-		header_skip(true, 3);
-
-		hash_3_calc();
-
-		const uint32_t cur_match
-				= mf->hash[FIX_3_HASH_SIZE + hash_value];
-
-		mf->hash[hash_2_value] = pos;
-		mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
-
-		bt_skip();
-
-	} while (--amount != 0);
-}
-#endif
-
-
-#ifdef HAVE_MF_BT4
-extern uint32_t
-lzma_mf_bt4_find(lzma_mf *mf, lzma_match *matches)
-{
-	header_find(true, 4);
-
-	hash_4_calc();
-
-	uint32_t delta2 = pos - mf->hash[hash_2_value];
-	const uint32_t delta3
-			= pos - mf->hash[FIX_3_HASH_SIZE + hash_3_value];
-	const uint32_t cur_match = mf->hash[FIX_4_HASH_SIZE + hash_value];
-
-	mf->hash[hash_2_value] = pos;
-	mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
-	mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
-
-	uint32_t len_best = 1;
-
-	if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
-		len_best = 2;
-		matches[0].len = 2;
-		matches[0].dist = delta2 - 1;
-		matches_count = 1;
-	}
-
-	if (delta2 != delta3 && delta3 < mf->cyclic_size
-			&& *(cur - delta3) == *cur) {
-		len_best = 3;
-		matches[matches_count++].dist = delta3 - 1;
-		delta2 = delta3;
-	}
-
-	if (matches_count != 0) {
-		for ( ; len_best != len_limit; ++len_best)
-			if (*(cur + len_best - delta2) != cur[len_best])
-				break;
-
-		matches[matches_count - 1].len = len_best;
-
-		if (len_best == len_limit) {
-			bt_skip();
-			return matches_count;
-		}
-	}
-
-	if (len_best < 3)
-		len_best = 3;
-
-	bt_find(len_best);
-}
-
-
-extern void
-lzma_mf_bt4_skip(lzma_mf *mf, uint32_t amount)
-{
-	do {
-		header_skip(true, 4);
-
-		hash_4_calc();
-
-		const uint32_t cur_match
-				= mf->hash[FIX_4_HASH_SIZE + hash_value];
-
-		mf->hash[hash_2_value] = pos;
-		mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
-		mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
-
-		bt_skip();
-
-	} while (--amount != 0);
-}
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/lz/lz_encoder_mf.c (from rev 9176, vendor/xz/dist/src/liblzma/lz/lz_encoder_mf.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lz/lz_encoder_mf.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lz/lz_encoder_mf.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,744 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lz_encoder_mf.c
+/// \brief      Match finders
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lz_encoder.h"
+#include "lz_encoder_hash.h"
+#include "memcmplen.h"
+
+
+/// \brief      Find matches starting from the current byte
+///
+/// \return     The length of the longest match found
+extern uint32_t
+lzma_mf_find(lzma_mf *mf, uint32_t *count_ptr, lzma_match *matches)
+{
+	// Call the match finder. It returns the number of length-distance
+	// pairs found.
+	// FIXME: Minimum count is zero, what _exactly_ is the maximum?
+	const uint32_t count = mf->find(mf, matches);
+
+	// Length of the longest match; assume that no matches were found
+	// and thus the maximum length is zero.
+	uint32_t len_best = 0;
+
+	if (count > 0) {
+#ifndef NDEBUG
+		// Validate the matches.
+		for (uint32_t i = 0; i < count; ++i) {
+			assert(matches[i].len <= mf->nice_len);
+			assert(matches[i].dist < mf->read_pos);
+			assert(memcmp(mf_ptr(mf) - 1,
+				mf_ptr(mf) - matches[i].dist - 2,
+				matches[i].len) == 0);
+		}
+#endif
+
+		// The last used element in the array contains
+		// the longest match.
+		len_best = matches[count - 1].len;
+
+		// If a match of maximum search length was found, try to
+		// extend the match to maximum possible length.
+		if (len_best == mf->nice_len) {
+			// The limit for the match length is either the
+			// maximum match length supported by the LZ-based
+			// encoder or the number of bytes left in the
+			// dictionary, whichever is smaller.
+			uint32_t limit = mf_avail(mf) + 1;
+			if (limit > mf->match_len_max)
+				limit = mf->match_len_max;
+
+			// Pointer to the byte we just ran through
+			// the match finder.
+			const uint8_t *p1 = mf_ptr(mf) - 1;
+
+			// Pointer to the beginning of the match. We need -1
+			// here because the match distances are zero based.
+			const uint8_t *p2 = p1 - matches[count - 1].dist - 1;
+
+			len_best = lzma_memcmplen(p1, p2, len_best, limit);
+		}
+	}
+
+	*count_ptr = count;
+
+	// Finally update the read position to indicate that match finder was
+	// run for this dictionary offset.
+	++mf->read_ahead;
+
+	return len_best;
+}
+
+
+/// Hash value to indicate unused element in the hash. Since we start the
+/// positions from dict_size + 1, zero is always too far to qualify
+/// as usable match position.
+#define EMPTY_HASH_VALUE 0
+
+
+/// Normalization must be done when lzma_mf.offset + lzma_mf.read_pos
+/// reaches MUST_NORMALIZE_POS.
+#define MUST_NORMALIZE_POS UINT32_MAX
+
+
+/// \brief      Normalizes hash values
+///
+/// The hash arrays store positions of match candidates. The positions are
+/// relative to an arbitrary offset that is not the same as the absolute
+/// offset in the input stream. The relative position of the current byte
+/// is lzma_mf.offset + lzma_mf.read_pos. The distances of the matches are
+/// the differences of the current read position and the position found from
+/// the hash.
+///
+/// To prevent integer overflows of the offsets stored in the hash arrays,
+/// we need to "normalize" the stored values now and then. During the
+/// normalization, we drop values that indicate distance greater than the
+/// dictionary size, thus making space for new values.
+static void
+normalize(lzma_mf *mf)
+{
+	assert(mf->read_pos + mf->offset == MUST_NORMALIZE_POS);
+
+	// In future we may not want to touch the lowest bits, because there
+	// may be match finders that use larger resolution than one byte.
+	const uint32_t subvalue
+			= (MUST_NORMALIZE_POS - mf->cyclic_size);
+				// & (~(UINT32_C(1) << 10) - 1);
+
+	for (uint32_t i = 0; i < mf->hash_count; ++i) {
+		// If the distance is greater than the dictionary size,
+		// we can simply mark the hash element as empty.
+		if (mf->hash[i] <= subvalue)
+			mf->hash[i] = EMPTY_HASH_VALUE;
+		else
+			mf->hash[i] -= subvalue;
+	}
+
+	for (uint32_t i = 0; i < mf->sons_count; ++i) {
+		// Do the same for mf->son.
+		//
+		// NOTE: There may be uninitialized elements in mf->son.
+		// Valgrind may complain that the "if" below depends on
+		// an uninitialized value. In this case it is safe to ignore
+		// the warning. See also the comments in lz_encoder_init()
+		// in lz_encoder.c.
+		if (mf->son[i] <= subvalue)
+			mf->son[i] = EMPTY_HASH_VALUE;
+		else
+			mf->son[i] -= subvalue;
+	}
+
+	// Update offset to match the new locations.
+	mf->offset -= subvalue;
+
+	return;
+}
+
+
+/// Mark the current byte as processed from point of view of the match finder.
+static void
+move_pos(lzma_mf *mf)
+{
+	if (++mf->cyclic_pos == mf->cyclic_size)
+		mf->cyclic_pos = 0;
+
+	++mf->read_pos;
+	assert(mf->read_pos <= mf->write_pos);
+
+	if (unlikely(mf->read_pos + mf->offset == UINT32_MAX))
+		normalize(mf);
+}
+
+
+/// When flushing, we cannot run the match finder unless there is nice_len
+/// bytes available in the dictionary. Instead, we skip running the match
+/// finder (indicating that no match was found), and count how many bytes we
+/// have ignored this way.
+///
+/// When new data is given after the flushing was completed, the match finder
+/// is restarted by rewinding mf->read_pos backwards by mf->pending. Then
+/// the missed bytes are added to the hash using the match finder's skip
+/// function (with small amount of input, it may start using mf->pending
+/// again if flushing).
+///
+/// Due to this rewinding, we don't touch cyclic_pos or test for
+/// normalization. It will be done when the match finder's skip function
+/// catches up after a flush.
+static void
+move_pending(lzma_mf *mf)
+{
+	++mf->read_pos;
+	assert(mf->read_pos <= mf->write_pos);
+	++mf->pending;
+}
+
+
+/// Calculate len_limit and determine if there is enough input to run
+/// the actual match finder code. Sets up "cur" and "pos". This macro
+/// is used by all find functions and binary tree skip functions. Hash
+/// chain skip function doesn't need len_limit so a simpler code is used
+/// in them.
+#define header(is_bt, len_min, ret_op) \
+	uint32_t len_limit = mf_avail(mf); \
+	if (mf->nice_len <= len_limit) { \
+		len_limit = mf->nice_len; \
+	} else if (len_limit < (len_min) \
+			|| (is_bt && mf->action == LZMA_SYNC_FLUSH)) { \
+		assert(mf->action != LZMA_RUN); \
+		move_pending(mf); \
+		ret_op; \
+	} \
+	const uint8_t *cur = mf_ptr(mf); \
+	const uint32_t pos = mf->read_pos + mf->offset
+
+
+/// Header for find functions. "return 0" indicates that zero matches
+/// were found.
+#define header_find(is_bt, len_min) \
+	header(is_bt, len_min, return 0); \
+	uint32_t matches_count = 0
+
+
+/// Header for a loop in a skip function. "continue" tells to skip the rest
+/// of the code in the loop.
+#define header_skip(is_bt, len_min) \
+	header(is_bt, len_min, continue)
+
+
+/// Calls hc_find_func() or bt_find_func() and calculates the total number
+/// of matches found. Updates the dictionary position and returns the number
+/// of matches found.
+#define call_find(func, len_best) \
+do { \
+	matches_count = func(len_limit, pos, cur, cur_match, mf->depth, \
+				mf->son, mf->cyclic_pos, mf->cyclic_size, \
+				matches + matches_count, len_best) \
+			- matches; \
+	move_pos(mf); \
+	return matches_count; \
+} while (0)
+
+
+////////////////
+// Hash Chain //
+////////////////
+
+#if defined(HAVE_MF_HC3) || defined(HAVE_MF_HC4)
+///
+///
+/// \param      len_limit       Don't look for matches longer than len_limit.
+/// \param      pos             lzma_mf.read_pos + lzma_mf.offset
+/// \param      cur             Pointer to current byte (mf_ptr(mf))
+/// \param      cur_match       Start position of the current match candidate
+/// \param      depth           Maximum length of the hash chain
+/// \param      son             lzma_mf.son (contains the hash chain)
+/// \param      cyclic_pos
+/// \param      cyclic_size
+/// \param      matches         Array to hold the matches.
+/// \param      len_best        The length of the longest match found so far.
+static lzma_match *
+hc_find_func(
+		const uint32_t len_limit,
+		const uint32_t pos,
+		const uint8_t *const cur,
+		uint32_t cur_match,
+		uint32_t depth,
+		uint32_t *const son,
+		const uint32_t cyclic_pos,
+		const uint32_t cyclic_size,
+		lzma_match *matches,
+		uint32_t len_best)
+{
+	son[cyclic_pos] = cur_match;
+
+	while (true) {
+		const uint32_t delta = pos - cur_match;
+		if (depth-- == 0 || delta >= cyclic_size)
+			return matches;
+
+		const uint8_t *const pb = cur - delta;
+		cur_match = son[cyclic_pos - delta
+				+ (delta > cyclic_pos ? cyclic_size : 0)];
+
+		if (pb[len_best] == cur[len_best] && pb[0] == cur[0]) {
+			uint32_t len = lzma_memcmplen(pb, cur, 1, len_limit);
+
+			if (len_best < len) {
+				len_best = len;
+				matches->len = len;
+				matches->dist = delta - 1;
+				++matches;
+
+				if (len == len_limit)
+					return matches;
+			}
+		}
+	}
+}
+
+
+#define hc_find(len_best) \
+	call_find(hc_find_func, len_best)
+
+
+#define hc_skip() \
+do { \
+	mf->son[mf->cyclic_pos] = cur_match; \
+	move_pos(mf); \
+} while (0)
+
+#endif
+
+
+#ifdef HAVE_MF_HC3
+extern uint32_t
+lzma_mf_hc3_find(lzma_mf *mf, lzma_match *matches)
+{
+	header_find(false, 3);
+
+	hash_3_calc();
+
+	const uint32_t delta2 = pos - mf->hash[hash_2_value];
+	const uint32_t cur_match = mf->hash[FIX_3_HASH_SIZE + hash_value];
+
+	mf->hash[hash_2_value] = pos;
+	mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
+
+	uint32_t len_best = 2;
+
+	if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
+		len_best = lzma_memcmplen(cur - delta2, cur,
+				len_best, len_limit);
+
+		matches[0].len = len_best;
+		matches[0].dist = delta2 - 1;
+		matches_count = 1;
+
+		if (len_best == len_limit) {
+			hc_skip();
+			return 1; // matches_count
+		}
+	}
+
+	hc_find(len_best);
+}
+
+
+extern void
+lzma_mf_hc3_skip(lzma_mf *mf, uint32_t amount)
+{
+	do {
+		if (mf_avail(mf) < 3) {
+			move_pending(mf);
+			continue;
+		}
+
+		const uint8_t *cur = mf_ptr(mf);
+		const uint32_t pos = mf->read_pos + mf->offset;
+
+		hash_3_calc();
+
+		const uint32_t cur_match
+				= mf->hash[FIX_3_HASH_SIZE + hash_value];
+
+		mf->hash[hash_2_value] = pos;
+		mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
+
+		hc_skip();
+
+	} while (--amount != 0);
+}
+#endif
+
+
+#ifdef HAVE_MF_HC4
+extern uint32_t
+lzma_mf_hc4_find(lzma_mf *mf, lzma_match *matches)
+{
+	header_find(false, 4);
+
+	hash_4_calc();
+
+	uint32_t delta2 = pos - mf->hash[hash_2_value];
+	const uint32_t delta3
+			= pos - mf->hash[FIX_3_HASH_SIZE + hash_3_value];
+	const uint32_t cur_match = mf->hash[FIX_4_HASH_SIZE + hash_value];
+
+	mf->hash[hash_2_value ] = pos;
+	mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
+	mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
+
+	uint32_t len_best = 1;
+
+	if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
+		len_best = 2;
+		matches[0].len = 2;
+		matches[0].dist = delta2 - 1;
+		matches_count = 1;
+	}
+
+	if (delta2 != delta3 && delta3 < mf->cyclic_size
+			&& *(cur - delta3) == *cur) {
+		len_best = 3;
+		matches[matches_count++].dist = delta3 - 1;
+		delta2 = delta3;
+	}
+
+	if (matches_count != 0) {
+		len_best = lzma_memcmplen(cur - delta2, cur,
+				len_best, len_limit);
+
+		matches[matches_count - 1].len = len_best;
+
+		if (len_best == len_limit) {
+			hc_skip();
+			return matches_count;
+		}
+	}
+
+	if (len_best < 3)
+		len_best = 3;
+
+	hc_find(len_best);
+}
+
+
+extern void
+lzma_mf_hc4_skip(lzma_mf *mf, uint32_t amount)
+{
+	do {
+		if (mf_avail(mf) < 4) {
+			move_pending(mf);
+			continue;
+		}
+
+		const uint8_t *cur = mf_ptr(mf);
+		const uint32_t pos = mf->read_pos + mf->offset;
+
+		hash_4_calc();
+
+		const uint32_t cur_match
+				= mf->hash[FIX_4_HASH_SIZE + hash_value];
+
+		mf->hash[hash_2_value] = pos;
+		mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
+		mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
+
+		hc_skip();
+
+	} while (--amount != 0);
+}
+#endif
+
+
+/////////////////
+// Binary Tree //
+/////////////////
+
+#if defined(HAVE_MF_BT2) || defined(HAVE_MF_BT3) || defined(HAVE_MF_BT4)
+static lzma_match *
+bt_find_func(
+		const uint32_t len_limit,
+		const uint32_t pos,
+		const uint8_t *const cur,
+		uint32_t cur_match,
+		uint32_t depth,
+		uint32_t *const son,
+		const uint32_t cyclic_pos,
+		const uint32_t cyclic_size,
+		lzma_match *matches,
+		uint32_t len_best)
+{
+	uint32_t *ptr0 = son + (cyclic_pos << 1) + 1;
+	uint32_t *ptr1 = son + (cyclic_pos << 1);
+
+	uint32_t len0 = 0;
+	uint32_t len1 = 0;
+
+	while (true) {
+		const uint32_t delta = pos - cur_match;
+		if (depth-- == 0 || delta >= cyclic_size) {
+			*ptr0 = EMPTY_HASH_VALUE;
+			*ptr1 = EMPTY_HASH_VALUE;
+			return matches;
+		}
+
+		uint32_t *const pair = son + ((cyclic_pos - delta
+				+ (delta > cyclic_pos ? cyclic_size : 0))
+				<< 1);
+
+		const uint8_t *const pb = cur - delta;
+		uint32_t len = my_min(len0, len1);
+
+		if (pb[len] == cur[len]) {
+			len = lzma_memcmplen(pb, cur, len + 1, len_limit);
+
+			if (len_best < len) {
+				len_best = len;
+				matches->len = len;
+				matches->dist = delta - 1;
+				++matches;
+
+				if (len == len_limit) {
+					*ptr1 = pair[0];
+					*ptr0 = pair[1];
+					return matches;
+				}
+			}
+		}
+
+		if (pb[len] < cur[len]) {
+			*ptr1 = cur_match;
+			ptr1 = pair + 1;
+			cur_match = *ptr1;
+			len1 = len;
+		} else {
+			*ptr0 = cur_match;
+			ptr0 = pair;
+			cur_match = *ptr0;
+			len0 = len;
+		}
+	}
+}
+
+
+static void
+bt_skip_func(
+		const uint32_t len_limit,
+		const uint32_t pos,
+		const uint8_t *const cur,
+		uint32_t cur_match,
+		uint32_t depth,
+		uint32_t *const son,
+		const uint32_t cyclic_pos,
+		const uint32_t cyclic_size)
+{
+	uint32_t *ptr0 = son + (cyclic_pos << 1) + 1;
+	uint32_t *ptr1 = son + (cyclic_pos << 1);
+
+	uint32_t len0 = 0;
+	uint32_t len1 = 0;
+
+	while (true) {
+		const uint32_t delta = pos - cur_match;
+		if (depth-- == 0 || delta >= cyclic_size) {
+			*ptr0 = EMPTY_HASH_VALUE;
+			*ptr1 = EMPTY_HASH_VALUE;
+			return;
+		}
+
+		uint32_t *pair = son + ((cyclic_pos - delta
+				+ (delta > cyclic_pos ? cyclic_size : 0))
+				<< 1);
+		const uint8_t *pb = cur - delta;
+		uint32_t len = my_min(len0, len1);
+
+		if (pb[len] == cur[len]) {
+			len = lzma_memcmplen(pb, cur, len + 1, len_limit);
+
+			if (len == len_limit) {
+				*ptr1 = pair[0];
+				*ptr0 = pair[1];
+				return;
+			}
+		}
+
+		if (pb[len] < cur[len]) {
+			*ptr1 = cur_match;
+			ptr1 = pair + 1;
+			cur_match = *ptr1;
+			len1 = len;
+		} else {
+			*ptr0 = cur_match;
+			ptr0 = pair;
+			cur_match = *ptr0;
+			len0 = len;
+		}
+	}
+}
+
+
+#define bt_find(len_best) \
+	call_find(bt_find_func, len_best)
+
+#define bt_skip() \
+do { \
+	bt_skip_func(len_limit, pos, cur, cur_match, mf->depth, \
+			mf->son, mf->cyclic_pos, \
+			mf->cyclic_size); \
+	move_pos(mf); \
+} while (0)
+
+#endif
+
+
+#ifdef HAVE_MF_BT2
+extern uint32_t
+lzma_mf_bt2_find(lzma_mf *mf, lzma_match *matches)
+{
+	header_find(true, 2);
+
+	hash_2_calc();
+
+	const uint32_t cur_match = mf->hash[hash_value];
+	mf->hash[hash_value] = pos;
+
+	bt_find(1);
+}
+
+
+extern void
+lzma_mf_bt2_skip(lzma_mf *mf, uint32_t amount)
+{
+	do {
+		header_skip(true, 2);
+
+		hash_2_calc();
+
+		const uint32_t cur_match = mf->hash[hash_value];
+		mf->hash[hash_value] = pos;
+
+		bt_skip();
+
+	} while (--amount != 0);
+}
+#endif
+
+
+#ifdef HAVE_MF_BT3
+extern uint32_t
+lzma_mf_bt3_find(lzma_mf *mf, lzma_match *matches)
+{
+	header_find(true, 3);
+
+	hash_3_calc();
+
+	const uint32_t delta2 = pos - mf->hash[hash_2_value];
+	const uint32_t cur_match = mf->hash[FIX_3_HASH_SIZE + hash_value];
+
+	mf->hash[hash_2_value] = pos;
+	mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
+
+	uint32_t len_best = 2;
+
+	if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
+		len_best = lzma_memcmplen(
+				cur, cur - delta2, len_best, len_limit);
+
+		matches[0].len = len_best;
+		matches[0].dist = delta2 - 1;
+		matches_count = 1;
+
+		if (len_best == len_limit) {
+			bt_skip();
+			return 1; // matches_count
+		}
+	}
+
+	bt_find(len_best);
+}
+
+
+extern void
+lzma_mf_bt3_skip(lzma_mf *mf, uint32_t amount)
+{
+	do {
+		header_skip(true, 3);
+
+		hash_3_calc();
+
+		const uint32_t cur_match
+				= mf->hash[FIX_3_HASH_SIZE + hash_value];
+
+		mf->hash[hash_2_value] = pos;
+		mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
+
+		bt_skip();
+
+	} while (--amount != 0);
+}
+#endif
+
+
+#ifdef HAVE_MF_BT4
+extern uint32_t
+lzma_mf_bt4_find(lzma_mf *mf, lzma_match *matches)
+{
+	header_find(true, 4);
+
+	hash_4_calc();
+
+	uint32_t delta2 = pos - mf->hash[hash_2_value];
+	const uint32_t delta3
+			= pos - mf->hash[FIX_3_HASH_SIZE + hash_3_value];
+	const uint32_t cur_match = mf->hash[FIX_4_HASH_SIZE + hash_value];
+
+	mf->hash[hash_2_value] = pos;
+	mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
+	mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
+
+	uint32_t len_best = 1;
+
+	if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
+		len_best = 2;
+		matches[0].len = 2;
+		matches[0].dist = delta2 - 1;
+		matches_count = 1;
+	}
+
+	if (delta2 != delta3 && delta3 < mf->cyclic_size
+			&& *(cur - delta3) == *cur) {
+		len_best = 3;
+		matches[matches_count++].dist = delta3 - 1;
+		delta2 = delta3;
+	}
+
+	if (matches_count != 0) {
+		len_best = lzma_memcmplen(
+				cur, cur - delta2, len_best, len_limit);
+
+		matches[matches_count - 1].len = len_best;
+
+		if (len_best == len_limit) {
+			bt_skip();
+			return matches_count;
+		}
+	}
+
+	if (len_best < 3)
+		len_best = 3;
+
+	bt_find(len_best);
+}
+
+
+extern void
+lzma_mf_bt4_skip(lzma_mf *mf, uint32_t amount)
+{
+	do {
+		header_skip(true, 4);
+
+		hash_4_calc();
+
+		const uint32_t cur_match
+				= mf->hash[FIX_4_HASH_SIZE + hash_value];
+
+		mf->hash[hash_2_value] = pos;
+		mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
+		mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
+
+		bt_skip();
+
+	} while (--amount != 0);
+}
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/Makefile.inc
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/Makefile.inc	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/Makefile.inc	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,43 +0,0 @@
-##
-## Author: Lasse Collin
-##
-## This file has been put into the public domain.
-## You can do whatever you want with this file.
-##
-
-EXTRA_DIST += lzma/fastpos_tablegen.c
-
-liblzma_la_SOURCES += lzma/lzma_common.h
-
-if COND_ENCODER_LZMA1
-liblzma_la_SOURCES += \
-	lzma/fastpos.h \
-	lzma/lzma_encoder.h \
-	lzma/lzma_encoder.c \
-	lzma/lzma_encoder_presets.c \
-	lzma/lzma_encoder_private.h \
-	lzma/lzma_encoder_optimum_fast.c \
-	lzma/lzma_encoder_optimum_normal.c
-
-if !COND_SMALL
-liblzma_la_SOURCES += lzma/fastpos_table.c
-endif
-endif
-
-if COND_DECODER_LZMA1
-liblzma_la_SOURCES += \
-	lzma/lzma_decoder.c \
-	lzma/lzma_decoder.h
-endif
-
-if COND_ENCODER_LZMA2
-liblzma_la_SOURCES += \
-	lzma/lzma2_encoder.c \
-	lzma/lzma2_encoder.h
-endif
-
-if COND_DECODER_LZMA2
-liblzma_la_SOURCES += \
-	lzma/lzma2_decoder.c \
-	lzma/lzma2_decoder.h
-endif

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/fastpos.h
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/fastpos.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/fastpos.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,140 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       fastpos.h
-/// \brief      Kind of two-bit version of bit scan reverse
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_FASTPOS_H
-#define LZMA_FASTPOS_H
-
-// LZMA encodes match distances (positions) by storing the highest two
-// bits using a six-bit value [0, 63], and then the missing lower bits.
-// Dictionary size is also stored using this encoding in the new .lzma
-// file format header.
-//
-// fastpos.h provides a way to quickly find out the correct six-bit
-// values. The following table gives some examples of this encoding:
-//
-//      pos   return
-//       0       0
-//       1       1
-//       2       2
-//       3       3
-//       4       4
-//       5       4
-//       6       5
-//       7       5
-//       8       6
-//      11       6
-//      12       7
-//     ...      ...
-//      15       7
-//      16       8
-//      17       8
-//     ...      ...
-//      23       8
-//      24       9
-//      25       9
-//     ...      ...
-//
-//
-// Provided functions or macros
-// ----------------------------
-//
-// get_pos_slot(pos) is the basic version. get_pos_slot_2(pos)
-// assumes that pos >= FULL_DISTANCES, thus the result is at least
-// FULL_DISTANCES_BITS * 2. Using get_pos_slot(pos) instead of
-// get_pos_slot_2(pos) would give the same result, but get_pos_slot_2(pos)
-// should be tiny bit faster due to the assumption being made.
-//
-//
-// Size vs. speed
-// --------------
-//
-// With some CPUs that have fast BSR (bit scan reverse) instruction, the
-// size optimized version is slightly faster than the bigger table based
-// approach. Such CPUs include Intel Pentium Pro, Pentium II, Pentium III
-// and Core 2 (possibly others). AMD K7 seems to have slower BSR, but that
-// would still have speed roughly comparable to the table version. Older
-// x86 CPUs like the original Pentium have very slow BSR; on those systems
-// the table version is a lot faster.
-//
-// On some CPUs, the table version is a lot faster when using position
-// dependent code, but with position independent code the size optimized
-// version is slightly faster. This occurs at least on 32-bit SPARC (no
-// ASM optimizations).
-//
-// I'm making the table version the default, because that has good speed
-// on all systems I have tried. The size optimized version is sometimes
-// slightly faster, but sometimes it is a lot slower.
-
-#ifdef HAVE_SMALL
-#	define get_pos_slot(pos) ((pos) <= 4 ? (pos) : get_pos_slot_2(pos))
-
-static inline uint32_t
-get_pos_slot_2(uint32_t pos)
-{
-	const uint32_t i = bsr32(pos);
-	return (i + i) + ((pos >> (i - 1)) & 1);
-}
-
-
-#else
-
-#define FASTPOS_BITS 13
-
-extern const uint8_t lzma_fastpos[1 << FASTPOS_BITS];
-
-
-#define fastpos_shift(extra, n) \
-	((extra) + (n) * (FASTPOS_BITS - 1))
-
-#define fastpos_limit(extra, n) \
-	(UINT32_C(1) << (FASTPOS_BITS + fastpos_shift(extra, n)))
-
-#define fastpos_result(pos, extra, n) \
-	lzma_fastpos[(pos) >> fastpos_shift(extra, n)] \
-			+ 2 * fastpos_shift(extra, n)
-
-
-static inline uint32_t
-get_pos_slot(uint32_t pos)
-{
-	// If it is small enough, we can pick the result directly from
-	// the precalculated table.
-	if (pos < fastpos_limit(0, 0))
-		return lzma_fastpos[pos];
-
-	if (pos < fastpos_limit(0, 1))
-		return fastpos_result(pos, 0, 1);
-
-	return fastpos_result(pos, 0, 2);
-}
-
-
-#ifdef FULL_DISTANCES_BITS
-static inline uint32_t
-get_pos_slot_2(uint32_t pos)
-{
-	assert(pos >= FULL_DISTANCES);
-
-	if (pos < fastpos_limit(FULL_DISTANCES_BITS - 1, 0))
-		return fastpos_result(pos, FULL_DISTANCES_BITS - 1, 0);
-
-	if (pos < fastpos_limit(FULL_DISTANCES_BITS - 1, 1))
-		return fastpos_result(pos, FULL_DISTANCES_BITS - 1, 1);
-
-	return fastpos_result(pos, FULL_DISTANCES_BITS - 1, 2);
-}
-#endif
-
-#endif
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/lzma/fastpos.h (from rev 9176, vendor/xz/dist/src/liblzma/lzma/fastpos.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lzma/fastpos.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lzma/fastpos.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,141 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       fastpos.h
+/// \brief      Kind of two-bit version of bit scan reverse
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_FASTPOS_H
+#define LZMA_FASTPOS_H
+
+// LZMA encodes match distances by storing the highest two bits using
+// a six-bit value [0, 63], and then the missing lower bits.
+// Dictionary size is also stored using this encoding in the .xz
+// file format header.
+//
+// fastpos.h provides a way to quickly find out the correct six-bit
+// values. The following table gives some examples of this encoding:
+//
+//     dist   return
+//       0       0
+//       1       1
+//       2       2
+//       3       3
+//       4       4
+//       5       4
+//       6       5
+//       7       5
+//       8       6
+//      11       6
+//      12       7
+//     ...      ...
+//      15       7
+//      16       8
+//      17       8
+//     ...      ...
+//      23       8
+//      24       9
+//      25       9
+//     ...      ...
+//
+//
+// Provided functions or macros
+// ----------------------------
+//
+// get_dist_slot(dist) is the basic version. get_dist_slot_2(dist)
+// assumes that dist >= FULL_DISTANCES, thus the result is at least
+// FULL_DISTANCES_BITS * 2. Using get_dist_slot(dist) instead of
+// get_dist_slot_2(dist) would give the same result, but get_dist_slot_2(dist)
+// should be tiny bit faster due to the assumption being made.
+//
+//
+// Size vs. speed
+// --------------
+//
+// With some CPUs that have fast BSR (bit scan reverse) instruction, the
+// size optimized version is slightly faster than the bigger table based
+// approach. Such CPUs include Intel Pentium Pro, Pentium II, Pentium III
+// and Core 2 (possibly others). AMD K7 seems to have slower BSR, but that
+// would still have speed roughly comparable to the table version. Older
+// x86 CPUs like the original Pentium have very slow BSR; on those systems
+// the table version is a lot faster.
+//
+// On some CPUs, the table version is a lot faster when using position
+// dependent code, but with position independent code the size optimized
+// version is slightly faster. This occurs at least on 32-bit SPARC (no
+// ASM optimizations).
+//
+// I'm making the table version the default, because that has good speed
+// on all systems I have tried. The size optimized version is sometimes
+// slightly faster, but sometimes it is a lot slower.
+
+#ifdef HAVE_SMALL
+#	define get_dist_slot(dist) \
+		((dist) <= 4 ? (dist) : get_dist_slot_2(dist))
+
+static inline uint32_t
+get_dist_slot_2(uint32_t dist)
+{
+	const uint32_t i = bsr32(dist);
+	return (i + i) + ((dist >> (i - 1)) & 1);
+}
+
+
+#else
+
+#define FASTPOS_BITS 13
+
+extern const uint8_t lzma_fastpos[1 << FASTPOS_BITS];
+
+
+#define fastpos_shift(extra, n) \
+	((extra) + (n) * (FASTPOS_BITS - 1))
+
+#define fastpos_limit(extra, n) \
+	(UINT32_C(1) << (FASTPOS_BITS + fastpos_shift(extra, n)))
+
+#define fastpos_result(dist, extra, n) \
+	lzma_fastpos[(dist) >> fastpos_shift(extra, n)] \
+			+ 2 * fastpos_shift(extra, n)
+
+
+static inline uint32_t
+get_dist_slot(uint32_t dist)
+{
+	// If it is small enough, we can pick the result directly from
+	// the precalculated table.
+	if (dist < fastpos_limit(0, 0))
+		return lzma_fastpos[dist];
+
+	if (dist < fastpos_limit(0, 1))
+		return fastpos_result(dist, 0, 1);
+
+	return fastpos_result(dist, 0, 2);
+}
+
+
+#ifdef FULL_DISTANCES_BITS
+static inline uint32_t
+get_dist_slot_2(uint32_t dist)
+{
+	assert(dist >= FULL_DISTANCES);
+
+	if (dist < fastpos_limit(FULL_DISTANCES_BITS - 1, 0))
+		return fastpos_result(dist, FULL_DISTANCES_BITS - 1, 0);
+
+	if (dist < fastpos_limit(FULL_DISTANCES_BITS - 1, 1))
+		return fastpos_result(dist, FULL_DISTANCES_BITS - 1, 1);
+
+	return fastpos_result(dist, FULL_DISTANCES_BITS - 1, 2);
+}
+#endif
+
+#endif
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/lzma2_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/lzma2_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma2_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,304 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma2_decoder.c
-/// \brief      LZMA2 decoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lzma2_decoder.h"
-#include "lz_decoder.h"
-#include "lzma_decoder.h"
-
-
-struct lzma_coder_s {
-	enum sequence {
-		SEQ_CONTROL,
-		SEQ_UNCOMPRESSED_1,
-		SEQ_UNCOMPRESSED_2,
-		SEQ_COMPRESSED_0,
-		SEQ_COMPRESSED_1,
-		SEQ_PROPERTIES,
-		SEQ_LZMA,
-		SEQ_COPY,
-	} sequence;
-
-	/// Sequence after the size fields have been decoded.
-	enum sequence next_sequence;
-
-	/// LZMA decoder
-	lzma_lz_decoder lzma;
-
-	/// Uncompressed size of LZMA chunk
-	size_t uncompressed_size;
-
-	/// Compressed size of the chunk (naturally equals to uncompressed
-	/// size of uncompressed chunk)
-	size_t compressed_size;
-
-	/// True if properties are needed. This is false before the
-	/// first LZMA chunk.
-	bool need_properties;
-
-	/// True if dictionary reset is needed. This is false before the
-	/// first chunk (LZMA or uncompressed).
-	bool need_dictionary_reset;
-
-	lzma_options_lzma options;
-};
-
-
-static lzma_ret
-lzma2_decode(lzma_coder *restrict coder, lzma_dict *restrict dict,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size)
-{
-	// With SEQ_LZMA it is possible that no new input is needed to do
-	// some progress. The rest of the sequences assume that there is
-	// at least one byte of input.
-	while (*in_pos < in_size || coder->sequence == SEQ_LZMA)
-	switch (coder->sequence) {
-	case SEQ_CONTROL: {
-		const uint32_t control = in[*in_pos];
-		++*in_pos;
-
-		// End marker
-		if (control == 0x00)
-			return LZMA_STREAM_END;
-
-		if (control >= 0xE0 || control == 1) {
-			// Dictionary reset implies that next LZMA chunk has
-			// to set new properties.
-			coder->need_properties = true;
-			coder->need_dictionary_reset = true;
-		} else if (coder->need_dictionary_reset) {
-			return LZMA_DATA_ERROR;
-		}
-
-		if (control >= 0x80) {
-			// LZMA chunk. The highest five bits of the
-			// uncompressed size are taken from the control byte.
-			coder->uncompressed_size = (control & 0x1F) << 16;
-			coder->sequence = SEQ_UNCOMPRESSED_1;
-
-			// See if there are new properties or if we need to
-			// reset the state.
-			if (control >= 0xC0) {
-				// When there are new properties, state reset
-				// is done at SEQ_PROPERTIES.
-				coder->need_properties = false;
-				coder->next_sequence = SEQ_PROPERTIES;
-
-			} else if (coder->need_properties) {
-				return LZMA_DATA_ERROR;
-
-			} else {
-				coder->next_sequence = SEQ_LZMA;
-
-				// If only state reset is wanted with old
-				// properties, do the resetting here for
-				// simplicity.
-				if (control >= 0xA0)
-					coder->lzma.reset(coder->lzma.coder,
-							&coder->options);
-			}
-		} else {
-			// Invalid control values
-			if (control > 2)
-				return LZMA_DATA_ERROR;
-
-			// It's uncompressed chunk
-			coder->sequence = SEQ_COMPRESSED_0;
-			coder->next_sequence = SEQ_COPY;
-		}
-
-		if (coder->need_dictionary_reset) {
-			// Finish the dictionary reset and let the caller
-			// flush the dictionary to the actual output buffer.
-			coder->need_dictionary_reset = false;
-			dict_reset(dict);
-			return LZMA_OK;
-		}
-
-		break;
-	}
-
-	case SEQ_UNCOMPRESSED_1:
-		coder->uncompressed_size += (uint32_t)(in[(*in_pos)++]) << 8;
-		coder->sequence = SEQ_UNCOMPRESSED_2;
-		break;
-
-	case SEQ_UNCOMPRESSED_2:
-		coder->uncompressed_size += in[(*in_pos)++] + 1;
-		coder->sequence = SEQ_COMPRESSED_0;
-		coder->lzma.set_uncompressed(coder->lzma.coder,
-				coder->uncompressed_size);
-		break;
-
-	case SEQ_COMPRESSED_0:
-		coder->compressed_size = (uint32_t)(in[(*in_pos)++]) << 8;
-		coder->sequence = SEQ_COMPRESSED_1;
-		break;
-
-	case SEQ_COMPRESSED_1:
-		coder->compressed_size += in[(*in_pos)++] + 1;
-		coder->sequence = coder->next_sequence;
-		break;
-
-	case SEQ_PROPERTIES:
-		if (lzma_lzma_lclppb_decode(&coder->options, in[(*in_pos)++]))
-			return LZMA_DATA_ERROR;
-
-		coder->lzma.reset(coder->lzma.coder, &coder->options);
-
-		coder->sequence = SEQ_LZMA;
-		break;
-
-	case SEQ_LZMA: {
-		// Store the start offset so that we can update
-		// coder->compressed_size later.
-		const size_t in_start = *in_pos;
-
-		// Decode from in[] to *dict.
-		const lzma_ret ret = coder->lzma.code(coder->lzma.coder,
-				dict, in, in_pos, in_size);
-
-		// Validate and update coder->compressed_size.
-		const size_t in_used = *in_pos - in_start;
-		if (in_used > coder->compressed_size)
-			return LZMA_DATA_ERROR;
-
-		coder->compressed_size -= in_used;
-
-		// Return if we didn't finish the chunk, or an error occurred.
-		if (ret != LZMA_STREAM_END)
-			return ret;
-
-		// The LZMA decoder must have consumed the whole chunk now.
-		// We don't need to worry about uncompressed size since it
-		// is checked by the LZMA decoder.
-		if (coder->compressed_size != 0)
-			return LZMA_DATA_ERROR;
-
-		coder->sequence = SEQ_CONTROL;
-		break;
-	}
-
-	case SEQ_COPY: {
-		// Copy from input to the dictionary as is.
-		dict_write(dict, in, in_pos, in_size, &coder->compressed_size);
-		if (coder->compressed_size != 0)
-			return LZMA_OK;
-
-		coder->sequence = SEQ_CONTROL;
-		break;
-	}
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-
-	return LZMA_OK;
-}
-
-
-static void
-lzma2_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	assert(coder->lzma.end == NULL);
-	lzma_free(coder->lzma.coder, allocator);
-
-	lzma_free(coder, allocator);
-
-	return;
-}
-
-
-static lzma_ret
-lzma2_decoder_init(lzma_lz_decoder *lz, lzma_allocator *allocator,
-		const void *opt, lzma_lz_options *lz_options)
-{
-	if (lz->coder == NULL) {
-		lz->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (lz->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		lz->code = &lzma2_decode;
-		lz->end = &lzma2_decoder_end;
-
-		lz->coder->lzma = LZMA_LZ_DECODER_INIT;
-	}
-
-	const lzma_options_lzma *options = opt;
-
-	lz->coder->sequence = SEQ_CONTROL;
-	lz->coder->need_properties = true;
-	lz->coder->need_dictionary_reset = options->preset_dict == NULL
-			|| options->preset_dict_size == 0;
-
-	return lzma_lzma_decoder_create(&lz->coder->lzma,
-			allocator, options, lz_options);
-}
-
-
-extern lzma_ret
-lzma_lzma2_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	// LZMA2 can only be the last filter in the chain. This is enforced
-	// by the raw_decoder initialization.
-	assert(filters[1].init == NULL);
-
-	return lzma_lz_decoder_init(next, allocator, filters,
-			&lzma2_decoder_init);
-}
-
-
-extern uint64_t
-lzma_lzma2_decoder_memusage(const void *options)
-{
-	return sizeof(lzma_coder)
-			+ lzma_lzma_decoder_memusage_nocheck(options);
-}
-
-
-extern lzma_ret
-lzma_lzma2_props_decode(void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size)
-{
-	if (props_size != 1)
-		return LZMA_OPTIONS_ERROR;
-
-	// Check that reserved bits are unset.
-	if (props[0] & 0xC0)
-		return LZMA_OPTIONS_ERROR;
-
-	// Decode the dictionary size.
-	if (props[0] > 40)
-		return LZMA_OPTIONS_ERROR;
-
-	lzma_options_lzma *opt = lzma_alloc(
-			sizeof(lzma_options_lzma), allocator);
-	if (opt == NULL)
-		return LZMA_MEM_ERROR;
-
-	if (props[0] == 40) {
-		opt->dict_size = UINT32_MAX;
-	} else {
-		opt->dict_size = 2 | (props[0] & 1);
-		opt->dict_size <<= props[0] / 2 + 11;
-	}
-
-	opt->preset_dict = NULL;
-	opt->preset_dict_size = 0;
-
-	*options = opt;
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/lzma/lzma2_decoder.c (from rev 11013, vendor/xz/dist/src/liblzma/lzma/lzma2_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lzma/lzma2_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma2_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,310 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lzma2_decoder.c
+/// \brief      LZMA2 decoder
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lzma2_decoder.h"
+#include "lz_decoder.h"
+#include "lzma_decoder.h"
+
+
+typedef struct {
+	enum sequence {
+		SEQ_CONTROL,
+		SEQ_UNCOMPRESSED_1,
+		SEQ_UNCOMPRESSED_2,
+		SEQ_COMPRESSED_0,
+		SEQ_COMPRESSED_1,
+		SEQ_PROPERTIES,
+		SEQ_LZMA,
+		SEQ_COPY,
+	} sequence;
+
+	/// Sequence after the size fields have been decoded.
+	enum sequence next_sequence;
+
+	/// LZMA decoder
+	lzma_lz_decoder lzma;
+
+	/// Uncompressed size of LZMA chunk
+	size_t uncompressed_size;
+
+	/// Compressed size of the chunk (naturally equals to uncompressed
+	/// size of uncompressed chunk)
+	size_t compressed_size;
+
+	/// True if properties are needed. This is false before the
+	/// first LZMA chunk.
+	bool need_properties;
+
+	/// True if dictionary reset is needed. This is false before the
+	/// first chunk (LZMA or uncompressed).
+	bool need_dictionary_reset;
+
+	lzma_options_lzma options;
+} lzma_lzma2_coder;
+
+
+static lzma_ret
+lzma2_decode(void *coder_ptr, lzma_dict *restrict dict,
+		const uint8_t *restrict in, size_t *restrict in_pos,
+		size_t in_size)
+{
+	lzma_lzma2_coder *restrict coder = coder_ptr;
+
+	// With SEQ_LZMA it is possible that no new input is needed to do
+	// some progress. The rest of the sequences assume that there is
+	// at least one byte of input.
+	while (*in_pos < in_size || coder->sequence == SEQ_LZMA)
+	switch (coder->sequence) {
+	case SEQ_CONTROL: {
+		const uint32_t control = in[*in_pos];
+		++*in_pos;
+
+		// End marker
+		if (control == 0x00)
+			return LZMA_STREAM_END;
+
+		if (control >= 0xE0 || control == 1) {
+			// Dictionary reset implies that next LZMA chunk has
+			// to set new properties.
+			coder->need_properties = true;
+			coder->need_dictionary_reset = true;
+		} else if (coder->need_dictionary_reset) {
+			return LZMA_DATA_ERROR;
+		}
+
+		if (control >= 0x80) {
+			// LZMA chunk. The highest five bits of the
+			// uncompressed size are taken from the control byte.
+			coder->uncompressed_size = (control & 0x1F) << 16;
+			coder->sequence = SEQ_UNCOMPRESSED_1;
+
+			// See if there are new properties or if we need to
+			// reset the state.
+			if (control >= 0xC0) {
+				// When there are new properties, state reset
+				// is done at SEQ_PROPERTIES.
+				coder->need_properties = false;
+				coder->next_sequence = SEQ_PROPERTIES;
+
+			} else if (coder->need_properties) {
+				return LZMA_DATA_ERROR;
+
+			} else {
+				coder->next_sequence = SEQ_LZMA;
+
+				// If only state reset is wanted with old
+				// properties, do the resetting here for
+				// simplicity.
+				if (control >= 0xA0)
+					coder->lzma.reset(coder->lzma.coder,
+							&coder->options);
+			}
+		} else {
+			// Invalid control values
+			if (control > 2)
+				return LZMA_DATA_ERROR;
+
+			// It's uncompressed chunk
+			coder->sequence = SEQ_COMPRESSED_0;
+			coder->next_sequence = SEQ_COPY;
+		}
+
+		if (coder->need_dictionary_reset) {
+			// Finish the dictionary reset and let the caller
+			// flush the dictionary to the actual output buffer.
+			coder->need_dictionary_reset = false;
+			dict_reset(dict);
+			return LZMA_OK;
+		}
+
+		break;
+	}
+
+	case SEQ_UNCOMPRESSED_1:
+		coder->uncompressed_size += (uint32_t)(in[(*in_pos)++]) << 8;
+		coder->sequence = SEQ_UNCOMPRESSED_2;
+		break;
+
+	case SEQ_UNCOMPRESSED_2:
+		coder->uncompressed_size += in[(*in_pos)++] + 1;
+		coder->sequence = SEQ_COMPRESSED_0;
+		coder->lzma.set_uncompressed(coder->lzma.coder,
+				coder->uncompressed_size);
+		break;
+
+	case SEQ_COMPRESSED_0:
+		coder->compressed_size = (uint32_t)(in[(*in_pos)++]) << 8;
+		coder->sequence = SEQ_COMPRESSED_1;
+		break;
+
+	case SEQ_COMPRESSED_1:
+		coder->compressed_size += in[(*in_pos)++] + 1;
+		coder->sequence = coder->next_sequence;
+		break;
+
+	case SEQ_PROPERTIES:
+		if (lzma_lzma_lclppb_decode(&coder->options, in[(*in_pos)++]))
+			return LZMA_DATA_ERROR;
+
+		coder->lzma.reset(coder->lzma.coder, &coder->options);
+
+		coder->sequence = SEQ_LZMA;
+		break;
+
+	case SEQ_LZMA: {
+		// Store the start offset so that we can update
+		// coder->compressed_size later.
+		const size_t in_start = *in_pos;
+
+		// Decode from in[] to *dict.
+		const lzma_ret ret = coder->lzma.code(coder->lzma.coder,
+				dict, in, in_pos, in_size);
+
+		// Validate and update coder->compressed_size.
+		const size_t in_used = *in_pos - in_start;
+		if (in_used > coder->compressed_size)
+			return LZMA_DATA_ERROR;
+
+		coder->compressed_size -= in_used;
+
+		// Return if we didn't finish the chunk, or an error occurred.
+		if (ret != LZMA_STREAM_END)
+			return ret;
+
+		// The LZMA decoder must have consumed the whole chunk now.
+		// We don't need to worry about uncompressed size since it
+		// is checked by the LZMA decoder.
+		if (coder->compressed_size != 0)
+			return LZMA_DATA_ERROR;
+
+		coder->sequence = SEQ_CONTROL;
+		break;
+	}
+
+	case SEQ_COPY: {
+		// Copy from input to the dictionary as is.
+		dict_write(dict, in, in_pos, in_size, &coder->compressed_size);
+		if (coder->compressed_size != 0)
+			return LZMA_OK;
+
+		coder->sequence = SEQ_CONTROL;
+		break;
+	}
+
+	default:
+		assert(0);
+		return LZMA_PROG_ERROR;
+	}
+
+	return LZMA_OK;
+}
+
+
+static void
+lzma2_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_lzma2_coder *coder = coder_ptr;
+
+	assert(coder->lzma.end == NULL);
+	lzma_free(coder->lzma.coder, allocator);
+
+	lzma_free(coder, allocator);
+
+	return;
+}
+
+
+static lzma_ret
+lzma2_decoder_init(lzma_lz_decoder *lz, const lzma_allocator *allocator,
+		const void *opt, lzma_lz_options *lz_options)
+{
+	lzma_lzma2_coder *coder = lz->coder;
+	if (coder == NULL) {
+		coder = lzma_alloc(sizeof(lzma_lzma2_coder), allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		lz->coder = coder;
+		lz->code = &lzma2_decode;
+		lz->end = &lzma2_decoder_end;
+
+		coder->lzma = LZMA_LZ_DECODER_INIT;
+	}
+
+	const lzma_options_lzma *options = opt;
+
+	coder->sequence = SEQ_CONTROL;
+	coder->need_properties = true;
+	coder->need_dictionary_reset = options->preset_dict == NULL
+			|| options->preset_dict_size == 0;
+
+	return lzma_lzma_decoder_create(&coder->lzma,
+			allocator, options, lz_options);
+}
+
+
+extern lzma_ret
+lzma_lzma2_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	// LZMA2 can only be the last filter in the chain. This is enforced
+	// by the raw_decoder initialization.
+	assert(filters[1].init == NULL);
+
+	return lzma_lz_decoder_init(next, allocator, filters,
+			&lzma2_decoder_init);
+}
+
+
+extern uint64_t
+lzma_lzma2_decoder_memusage(const void *options)
+{
+	return sizeof(lzma_lzma2_coder)
+			+ lzma_lzma_decoder_memusage_nocheck(options);
+}
+
+
+extern lzma_ret
+lzma_lzma2_props_decode(void **options, const lzma_allocator *allocator,
+		const uint8_t *props, size_t props_size)
+{
+	if (props_size != 1)
+		return LZMA_OPTIONS_ERROR;
+
+	// Check that reserved bits are unset.
+	if (props[0] & 0xC0)
+		return LZMA_OPTIONS_ERROR;
+
+	// Decode the dictionary size.
+	if (props[0] > 40)
+		return LZMA_OPTIONS_ERROR;
+
+	lzma_options_lzma *opt = lzma_alloc(
+			sizeof(lzma_options_lzma), allocator);
+	if (opt == NULL)
+		return LZMA_MEM_ERROR;
+
+	if (props[0] == 40) {
+		opt->dict_size = UINT32_MAX;
+	} else {
+		opt->dict_size = 2 | (props[0] & 1);
+		opt->dict_size <<= props[0] / 2 + 11;
+	}
+
+	opt->preset_dict = NULL;
+	opt->preset_dict_size = 0;
+
+	*options = opt;
+
+	return LZMA_OK;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/lzma2_decoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/lzma2_decoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma2_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,28 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma2_decoder.h
-/// \brief      LZMA2 decoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZMA2_DECODER_H
-#define LZMA_LZMA2_DECODER_H
-
-#include "common.h"
-
-extern lzma_ret lzma_lzma2_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern uint64_t lzma_lzma2_decoder_memusage(const void *options);
-
-extern lzma_ret lzma_lzma2_props_decode(
-		void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/lzma/lzma2_decoder.h (from rev 9176, vendor/xz/dist/src/liblzma/lzma/lzma2_decoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lzma/lzma2_decoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma2_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,29 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lzma2_decoder.h
+/// \brief      LZMA2 decoder
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZMA2_DECODER_H
+#define LZMA_LZMA2_DECODER_H
+
+#include "common.h"
+
+extern lzma_ret lzma_lzma2_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+extern uint64_t lzma_lzma2_decoder_memusage(const void *options);
+
+extern lzma_ret lzma_lzma2_props_decode(
+		void **options, const lzma_allocator *allocator,
+		const uint8_t *props, size_t props_size);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/lzma2_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/lzma2_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma2_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,393 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma2_encoder.c
-/// \brief      LZMA2 encoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lz_encoder.h"
-#include "lzma_encoder.h"
-#include "fastpos.h"
-#include "lzma2_encoder.h"
-
-
-struct lzma_coder_s {
-	enum {
-		SEQ_INIT,
-		SEQ_LZMA_ENCODE,
-		SEQ_LZMA_COPY,
-		SEQ_UNCOMPRESSED_HEADER,
-		SEQ_UNCOMPRESSED_COPY,
-	} sequence;
-
-	/// LZMA encoder
-	lzma_coder *lzma;
-
-	/// LZMA options currently in use.
-	lzma_options_lzma opt_cur;
-
-	bool need_properties;
-	bool need_state_reset;
-	bool need_dictionary_reset;
-
-	/// Uncompressed size of a chunk
-	size_t uncompressed_size;
-
-	/// Compressed size of a chunk (excluding headers); this is also used
-	/// to indicate the end of buf[] in SEQ_LZMA_COPY.
-	size_t compressed_size;
-
-	/// Read position in buf[]
-	size_t buf_pos;
-
-	/// Buffer to hold the chunk header and LZMA compressed data
-	uint8_t buf[LZMA2_HEADER_MAX + LZMA2_CHUNK_MAX];
-};
-
-
-static void
-lzma2_header_lzma(lzma_coder *coder)
-{
-	assert(coder->uncompressed_size > 0);
-	assert(coder->uncompressed_size <= LZMA2_UNCOMPRESSED_MAX);
-	assert(coder->compressed_size > 0);
-	assert(coder->compressed_size <= LZMA2_CHUNK_MAX);
-
-	size_t pos;
-
-	if (coder->need_properties) {
-		pos = 0;
-
-		if (coder->need_dictionary_reset)
-			coder->buf[pos] = 0x80 + (3 << 5);
-		else
-			coder->buf[pos] = 0x80 + (2 << 5);
-	} else {
-		pos = 1;
-
-		if (coder->need_state_reset)
-			coder->buf[pos] = 0x80 + (1 << 5);
-		else
-			coder->buf[pos] = 0x80;
-	}
-
-	// Set the start position for copying.
-	coder->buf_pos = pos;
-
-	// Uncompressed size
-	size_t size = coder->uncompressed_size - 1;
-	coder->buf[pos++] += size >> 16;
-	coder->buf[pos++] = (size >> 8) & 0xFF;
-	coder->buf[pos++] = size & 0xFF;
-
-	// Compressed size
-	size = coder->compressed_size - 1;
-	coder->buf[pos++] = size >> 8;
-	coder->buf[pos++] = size & 0xFF;
-
-	// Properties, if needed
-	if (coder->need_properties)
-		lzma_lzma_lclppb_encode(&coder->opt_cur, coder->buf + pos);
-
-	coder->need_properties = false;
-	coder->need_state_reset = false;
-	coder->need_dictionary_reset = false;
-
-	// The copying code uses coder->compressed_size to indicate the end
-	// of coder->buf[], so we need add the maximum size of the header here.
-	coder->compressed_size += LZMA2_HEADER_MAX;
-
-	return;
-}
-
-
-static void
-lzma2_header_uncompressed(lzma_coder *coder)
-{
-	assert(coder->uncompressed_size > 0);
-	assert(coder->uncompressed_size <= LZMA2_CHUNK_MAX);
-
-	// If this is the first chunk, we need to include dictionary
-	// reset indicator.
-	if (coder->need_dictionary_reset)
-		coder->buf[0] = 1;
-	else
-		coder->buf[0] = 2;
-
-	coder->need_dictionary_reset = false;
-
-	// "Compressed" size
-	coder->buf[1] = (coder->uncompressed_size - 1) >> 8;
-	coder->buf[2] = (coder->uncompressed_size - 1) & 0xFF;
-
-	// Set the start position for copying.
-	coder->buf_pos = 0;
-	return;
-}
-
-
-static lzma_ret
-lzma2_encode(lzma_coder *restrict coder, lzma_mf *restrict mf,
-		uint8_t *restrict out, size_t *restrict out_pos,
-		size_t out_size)
-{
-	while (*out_pos < out_size)
-	switch (coder->sequence) {
-	case SEQ_INIT:
-		// If there's no input left and we are flushing or finishing,
-		// don't start a new chunk.
-		if (mf_unencoded(mf) == 0) {
-			// Write end of payload marker if finishing.
-			if (mf->action == LZMA_FINISH)
-				out[(*out_pos)++] = 0;
-
-			return mf->action == LZMA_RUN
-					? LZMA_OK : LZMA_STREAM_END;
-		}
-
-		if (coder->need_state_reset)
-			return_if_error(lzma_lzma_encoder_reset(
-					coder->lzma, &coder->opt_cur));
-
-		coder->uncompressed_size = 0;
-		coder->compressed_size = 0;
-		coder->sequence = SEQ_LZMA_ENCODE;
-
-	// Fall through
-
-	case SEQ_LZMA_ENCODE: {
-		// Calculate how much more uncompressed data this chunk
-		// could accept.
-		const uint32_t left = LZMA2_UNCOMPRESSED_MAX
-				- coder->uncompressed_size;
-		uint32_t limit;
-
-		if (left < mf->match_len_max) {
-			// Must flush immediately since the next LZMA symbol
-			// could make the uncompressed size of the chunk too
-			// big.
-			limit = 0;
-		} else {
-			// Calculate maximum read_limit that is OK from point
-			// of view of LZMA2 chunk size.
-			limit = mf->read_pos - mf->read_ahead
-					+ left - mf->match_len_max;
-		}
-
-		// Save the start position so that we can update
-		// coder->uncompressed_size.
-		const uint32_t read_start = mf->read_pos - mf->read_ahead;
-
-		// Call the LZMA encoder until the chunk is finished.
-		const lzma_ret ret = lzma_lzma_encode(coder->lzma, mf,
-				coder->buf + LZMA2_HEADER_MAX,
-				&coder->compressed_size,
-				LZMA2_CHUNK_MAX, limit);
-
-		coder->uncompressed_size += mf->read_pos - mf->read_ahead
-				- read_start;
-
-		assert(coder->compressed_size <= LZMA2_CHUNK_MAX);
-		assert(coder->uncompressed_size <= LZMA2_UNCOMPRESSED_MAX);
-
-		if (ret != LZMA_STREAM_END)
-			return LZMA_OK;
-
-		// See if the chunk compressed. If it didn't, we encode it
-		// as uncompressed chunk. This saves a few bytes of space
-		// and makes decoding faster.
-		if (coder->compressed_size >= coder->uncompressed_size) {
-			coder->uncompressed_size += mf->read_ahead;
-			assert(coder->uncompressed_size
-					<= LZMA2_UNCOMPRESSED_MAX);
-			mf->read_ahead = 0;
-			lzma2_header_uncompressed(coder);
-			coder->need_state_reset = true;
-			coder->sequence = SEQ_UNCOMPRESSED_HEADER;
-			break;
-		}
-
-		// The chunk did compress at least by one byte, so we store
-		// the chunk as LZMA.
-		lzma2_header_lzma(coder);
-
-		coder->sequence = SEQ_LZMA_COPY;
-	}
-
-	// Fall through
-
-	case SEQ_LZMA_COPY:
-		// Copy the compressed chunk along its headers to the
-		// output buffer.
-		lzma_bufcpy(coder->buf, &coder->buf_pos,
-				coder->compressed_size,
-				out, out_pos, out_size);
-		if (coder->buf_pos != coder->compressed_size)
-			return LZMA_OK;
-
-		coder->sequence = SEQ_INIT;
-		break;
-
-	case SEQ_UNCOMPRESSED_HEADER:
-		// Copy the three-byte header to indicate uncompressed chunk.
-		lzma_bufcpy(coder->buf, &coder->buf_pos,
-				LZMA2_HEADER_UNCOMPRESSED,
-				out, out_pos, out_size);
-		if (coder->buf_pos != LZMA2_HEADER_UNCOMPRESSED)
-			return LZMA_OK;
-
-		coder->sequence = SEQ_UNCOMPRESSED_COPY;
-
-	// Fall through
-
-	case SEQ_UNCOMPRESSED_COPY:
-		// Copy the uncompressed data as is from the dictionary
-		// to the output buffer.
-		mf_read(mf, out, out_pos, out_size, &coder->uncompressed_size);
-		if (coder->uncompressed_size != 0)
-			return LZMA_OK;
-
-		coder->sequence = SEQ_INIT;
-		break;
-	}
-
-	return LZMA_OK;
-}
-
-
-static void
-lzma2_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_free(coder->lzma, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_ret
-lzma2_encoder_options_update(lzma_coder *coder, const lzma_filter *filter)
-{
-	// New options can be set only when there is no incomplete chunk.
-	// This is the case at the beginning of the raw stream and right
-	// after LZMA_SYNC_FLUSH.
-	if (filter->options == NULL || coder->sequence != SEQ_INIT)
-		return LZMA_PROG_ERROR;
-
-	// Look if there are new options. At least for now,
-	// only lc/lp/pb can be changed.
-	const lzma_options_lzma *opt = filter->options;
-	if (coder->opt_cur.lc != opt->lc || coder->opt_cur.lp != opt->lp
-			|| coder->opt_cur.pb != opt->pb) {
-		// Validate the options.
-		if (opt->lc > LZMA_LCLP_MAX || opt->lp > LZMA_LCLP_MAX
-				|| opt->lc + opt->lp > LZMA_LCLP_MAX
-				|| opt->pb > LZMA_PB_MAX)
-			return LZMA_OPTIONS_ERROR;
-
-		// The new options will be used when the encoder starts
-		// a new LZMA2 chunk.
-		coder->opt_cur.lc = opt->lc;
-		coder->opt_cur.lp = opt->lp;
-		coder->opt_cur.pb = opt->pb;
-		coder->need_properties = true;
-		coder->need_state_reset = true;
-	}
-
-	return LZMA_OK;
-}
-
-
-static lzma_ret
-lzma2_encoder_init(lzma_lz_encoder *lz, lzma_allocator *allocator,
-		const void *options, lzma_lz_options *lz_options)
-{
-	if (options == NULL)
-		return LZMA_PROG_ERROR;
-
-	if (lz->coder == NULL) {
-		lz->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (lz->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		lz->code = &lzma2_encode;
-		lz->end = &lzma2_encoder_end;
-		lz->options_update = &lzma2_encoder_options_update;
-
-		lz->coder->lzma = NULL;
-	}
-
-	lz->coder->opt_cur = *(const lzma_options_lzma *)(options);
-
-	lz->coder->sequence = SEQ_INIT;
-	lz->coder->need_properties = true;
-	lz->coder->need_state_reset = false;
-	lz->coder->need_dictionary_reset
-			= lz->coder->opt_cur.preset_dict == NULL
-			|| lz->coder->opt_cur.preset_dict_size == 0;
-
-	// Initialize LZMA encoder
-	return_if_error(lzma_lzma_encoder_create(&lz->coder->lzma, allocator,
-			&lz->coder->opt_cur, lz_options));
-
-	// Make sure that we will always have enough history available in
-	// case we need to use uncompressed chunks. They are used when the
-	// compressed size of a chunk is not smaller than the uncompressed
-	// size, so we need to have at least LZMA2_COMPRESSED_MAX bytes
-	// history available.
-	if (lz_options->before_size + lz_options->dict_size < LZMA2_CHUNK_MAX)
-		lz_options->before_size
-				= LZMA2_CHUNK_MAX - lz_options->dict_size;
-
-	return LZMA_OK;
-}
-
-
-extern lzma_ret
-lzma_lzma2_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	return lzma_lz_encoder_init(
-			next, allocator, filters, &lzma2_encoder_init);
-}
-
-
-extern uint64_t
-lzma_lzma2_encoder_memusage(const void *options)
-{
-	const uint64_t lzma_mem = lzma_lzma_encoder_memusage(options);
-	if (lzma_mem == UINT64_MAX)
-		return UINT64_MAX;
-
-	return sizeof(lzma_coder) + lzma_mem;
-}
-
-
-extern lzma_ret
-lzma_lzma2_props_encode(const void *options, uint8_t *out)
-{
-	const lzma_options_lzma *const opt = options;
-	uint32_t d = my_max(opt->dict_size, LZMA_DICT_SIZE_MIN);
-
-	// Round up to the next 2^n - 1 or 2^n + 2^(n - 1) - 1 depending
-	// on which one is the next:
-	--d;
-	d |= d >> 2;
-	d |= d >> 3;
-	d |= d >> 4;
-	d |= d >> 8;
-	d |= d >> 16;
-
-	// Get the highest two bits using the proper encoding:
-	if (d == UINT32_MAX)
-		out[0] = 40;
-	else
-		out[0] = get_pos_slot(d + 1) - 24;
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/lzma/lzma2_encoder.c (from rev 11013, vendor/xz/dist/src/liblzma/lzma/lzma2_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lzma/lzma2_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma2_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,410 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lzma2_encoder.c
+/// \brief      LZMA2 encoder
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lz_encoder.h"
+#include "lzma_encoder.h"
+#include "fastpos.h"
+#include "lzma2_encoder.h"
+
+
+typedef struct {
+	enum {
+		SEQ_INIT,
+		SEQ_LZMA_ENCODE,
+		SEQ_LZMA_COPY,
+		SEQ_UNCOMPRESSED_HEADER,
+		SEQ_UNCOMPRESSED_COPY,
+	} sequence;
+
+	/// LZMA encoder
+	void *lzma;
+
+	/// LZMA options currently in use.
+	lzma_options_lzma opt_cur;
+
+	bool need_properties;
+	bool need_state_reset;
+	bool need_dictionary_reset;
+
+	/// Uncompressed size of a chunk
+	size_t uncompressed_size;
+
+	/// Compressed size of a chunk (excluding headers); this is also used
+	/// to indicate the end of buf[] in SEQ_LZMA_COPY.
+	size_t compressed_size;
+
+	/// Read position in buf[]
+	size_t buf_pos;
+
+	/// Buffer to hold the chunk header and LZMA compressed data
+	uint8_t buf[LZMA2_HEADER_MAX + LZMA2_CHUNK_MAX];
+} lzma_lzma2_coder;
+
+
+static void
+lzma2_header_lzma(lzma_lzma2_coder *coder)
+{
+	assert(coder->uncompressed_size > 0);
+	assert(coder->uncompressed_size <= LZMA2_UNCOMPRESSED_MAX);
+	assert(coder->compressed_size > 0);
+	assert(coder->compressed_size <= LZMA2_CHUNK_MAX);
+
+	size_t pos;
+
+	if (coder->need_properties) {
+		pos = 0;
+
+		if (coder->need_dictionary_reset)
+			coder->buf[pos] = 0x80 + (3 << 5);
+		else
+			coder->buf[pos] = 0x80 + (2 << 5);
+	} else {
+		pos = 1;
+
+		if (coder->need_state_reset)
+			coder->buf[pos] = 0x80 + (1 << 5);
+		else
+			coder->buf[pos] = 0x80;
+	}
+
+	// Set the start position for copying.
+	coder->buf_pos = pos;
+
+	// Uncompressed size
+	size_t size = coder->uncompressed_size - 1;
+	coder->buf[pos++] += size >> 16;
+	coder->buf[pos++] = (size >> 8) & 0xFF;
+	coder->buf[pos++] = size & 0xFF;
+
+	// Compressed size
+	size = coder->compressed_size - 1;
+	coder->buf[pos++] = size >> 8;
+	coder->buf[pos++] = size & 0xFF;
+
+	// Properties, if needed
+	if (coder->need_properties)
+		lzma_lzma_lclppb_encode(&coder->opt_cur, coder->buf + pos);
+
+	coder->need_properties = false;
+	coder->need_state_reset = false;
+	coder->need_dictionary_reset = false;
+
+	// The copying code uses coder->compressed_size to indicate the end
+	// of coder->buf[], so we need add the maximum size of the header here.
+	coder->compressed_size += LZMA2_HEADER_MAX;
+
+	return;
+}
+
+
+static void
+lzma2_header_uncompressed(lzma_lzma2_coder *coder)
+{
+	assert(coder->uncompressed_size > 0);
+	assert(coder->uncompressed_size <= LZMA2_CHUNK_MAX);
+
+	// If this is the first chunk, we need to include dictionary
+	// reset indicator.
+	if (coder->need_dictionary_reset)
+		coder->buf[0] = 1;
+	else
+		coder->buf[0] = 2;
+
+	coder->need_dictionary_reset = false;
+
+	// "Compressed" size
+	coder->buf[1] = (coder->uncompressed_size - 1) >> 8;
+	coder->buf[2] = (coder->uncompressed_size - 1) & 0xFF;
+
+	// Set the start position for copying.
+	coder->buf_pos = 0;
+	return;
+}
+
+
+static lzma_ret
+lzma2_encode(void *coder_ptr, lzma_mf *restrict mf,
+		uint8_t *restrict out, size_t *restrict out_pos,
+		size_t out_size)
+{
+	lzma_lzma2_coder *restrict coder = coder_ptr;
+
+	while (*out_pos < out_size)
+	switch (coder->sequence) {
+	case SEQ_INIT:
+		// If there's no input left and we are flushing or finishing,
+		// don't start a new chunk.
+		if (mf_unencoded(mf) == 0) {
+			// Write end of payload marker if finishing.
+			if (mf->action == LZMA_FINISH)
+				out[(*out_pos)++] = 0;
+
+			return mf->action == LZMA_RUN
+					? LZMA_OK : LZMA_STREAM_END;
+		}
+
+		if (coder->need_state_reset)
+			return_if_error(lzma_lzma_encoder_reset(
+					coder->lzma, &coder->opt_cur));
+
+		coder->uncompressed_size = 0;
+		coder->compressed_size = 0;
+		coder->sequence = SEQ_LZMA_ENCODE;
+
+	// Fall through
+
+	case SEQ_LZMA_ENCODE: {
+		// Calculate how much more uncompressed data this chunk
+		// could accept.
+		const uint32_t left = LZMA2_UNCOMPRESSED_MAX
+				- coder->uncompressed_size;
+		uint32_t limit;
+
+		if (left < mf->match_len_max) {
+			// Must flush immediately since the next LZMA symbol
+			// could make the uncompressed size of the chunk too
+			// big.
+			limit = 0;
+		} else {
+			// Calculate maximum read_limit that is OK from point
+			// of view of LZMA2 chunk size.
+			limit = mf->read_pos - mf->read_ahead
+					+ left - mf->match_len_max;
+		}
+
+		// Save the start position so that we can update
+		// coder->uncompressed_size.
+		const uint32_t read_start = mf->read_pos - mf->read_ahead;
+
+		// Call the LZMA encoder until the chunk is finished.
+		const lzma_ret ret = lzma_lzma_encode(coder->lzma, mf,
+				coder->buf + LZMA2_HEADER_MAX,
+				&coder->compressed_size,
+				LZMA2_CHUNK_MAX, limit);
+
+		coder->uncompressed_size += mf->read_pos - mf->read_ahead
+				- read_start;
+
+		assert(coder->compressed_size <= LZMA2_CHUNK_MAX);
+		assert(coder->uncompressed_size <= LZMA2_UNCOMPRESSED_MAX);
+
+		if (ret != LZMA_STREAM_END)
+			return LZMA_OK;
+
+		// See if the chunk compressed. If it didn't, we encode it
+		// as uncompressed chunk. This saves a few bytes of space
+		// and makes decoding faster.
+		if (coder->compressed_size >= coder->uncompressed_size) {
+			coder->uncompressed_size += mf->read_ahead;
+			assert(coder->uncompressed_size
+					<= LZMA2_UNCOMPRESSED_MAX);
+			mf->read_ahead = 0;
+			lzma2_header_uncompressed(coder);
+			coder->need_state_reset = true;
+			coder->sequence = SEQ_UNCOMPRESSED_HEADER;
+			break;
+		}
+
+		// The chunk did compress at least by one byte, so we store
+		// the chunk as LZMA.
+		lzma2_header_lzma(coder);
+
+		coder->sequence = SEQ_LZMA_COPY;
+	}
+
+	// Fall through
+
+	case SEQ_LZMA_COPY:
+		// Copy the compressed chunk along its headers to the
+		// output buffer.
+		lzma_bufcpy(coder->buf, &coder->buf_pos,
+				coder->compressed_size,
+				out, out_pos, out_size);
+		if (coder->buf_pos != coder->compressed_size)
+			return LZMA_OK;
+
+		coder->sequence = SEQ_INIT;
+		break;
+
+	case SEQ_UNCOMPRESSED_HEADER:
+		// Copy the three-byte header to indicate uncompressed chunk.
+		lzma_bufcpy(coder->buf, &coder->buf_pos,
+				LZMA2_HEADER_UNCOMPRESSED,
+				out, out_pos, out_size);
+		if (coder->buf_pos != LZMA2_HEADER_UNCOMPRESSED)
+			return LZMA_OK;
+
+		coder->sequence = SEQ_UNCOMPRESSED_COPY;
+
+	// Fall through
+
+	case SEQ_UNCOMPRESSED_COPY:
+		// Copy the uncompressed data as is from the dictionary
+		// to the output buffer.
+		mf_read(mf, out, out_pos, out_size, &coder->uncompressed_size);
+		if (coder->uncompressed_size != 0)
+			return LZMA_OK;
+
+		coder->sequence = SEQ_INIT;
+		break;
+	}
+
+	return LZMA_OK;
+}
+
+
+static void
+lzma2_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_lzma2_coder *coder = coder_ptr;
+	lzma_free(coder->lzma, allocator);
+	lzma_free(coder, allocator);
+	return;
+}
+
+
+static lzma_ret
+lzma2_encoder_options_update(void *coder_ptr, const lzma_filter *filter)
+{
+	lzma_lzma2_coder *coder = coder_ptr;
+
+	// New options can be set only when there is no incomplete chunk.
+	// This is the case at the beginning of the raw stream and right
+	// after LZMA_SYNC_FLUSH.
+	if (filter->options == NULL || coder->sequence != SEQ_INIT)
+		return LZMA_PROG_ERROR;
+
+	// Look if there are new options. At least for now,
+	// only lc/lp/pb can be changed.
+	const lzma_options_lzma *opt = filter->options;
+	if (coder->opt_cur.lc != opt->lc || coder->opt_cur.lp != opt->lp
+			|| coder->opt_cur.pb != opt->pb) {
+		// Validate the options.
+		if (opt->lc > LZMA_LCLP_MAX || opt->lp > LZMA_LCLP_MAX
+				|| opt->lc + opt->lp > LZMA_LCLP_MAX
+				|| opt->pb > LZMA_PB_MAX)
+			return LZMA_OPTIONS_ERROR;
+
+		// The new options will be used when the encoder starts
+		// a new LZMA2 chunk.
+		coder->opt_cur.lc = opt->lc;
+		coder->opt_cur.lp = opt->lp;
+		coder->opt_cur.pb = opt->pb;
+		coder->need_properties = true;
+		coder->need_state_reset = true;
+	}
+
+	return LZMA_OK;
+}
+
+
+static lzma_ret
+lzma2_encoder_init(lzma_lz_encoder *lz, const lzma_allocator *allocator,
+		const void *options, lzma_lz_options *lz_options)
+{
+	if (options == NULL)
+		return LZMA_PROG_ERROR;
+
+	lzma_lzma2_coder *coder = lz->coder;
+	if (coder == NULL) {
+		coder = lzma_alloc(sizeof(lzma_lzma2_coder), allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		lz->coder = coder;
+		lz->code = &lzma2_encode;
+		lz->end = &lzma2_encoder_end;
+		lz->options_update = &lzma2_encoder_options_update;
+
+		coder->lzma = NULL;
+	}
+
+	coder->opt_cur = *(const lzma_options_lzma *)(options);
+
+	coder->sequence = SEQ_INIT;
+	coder->need_properties = true;
+	coder->need_state_reset = false;
+	coder->need_dictionary_reset
+			= coder->opt_cur.preset_dict == NULL
+			|| coder->opt_cur.preset_dict_size == 0;
+
+	// Initialize LZMA encoder
+	return_if_error(lzma_lzma_encoder_create(&coder->lzma, allocator,
+			&coder->opt_cur, lz_options));
+
+	// Make sure that we will always have enough history available in
+	// case we need to use uncompressed chunks. They are used when the
+	// compressed size of a chunk is not smaller than the uncompressed
+	// size, so we need to have at least LZMA2_COMPRESSED_MAX bytes
+	// history available.
+	if (lz_options->before_size + lz_options->dict_size < LZMA2_CHUNK_MAX)
+		lz_options->before_size
+				= LZMA2_CHUNK_MAX - lz_options->dict_size;
+
+	return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_lzma2_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	return lzma_lz_encoder_init(
+			next, allocator, filters, &lzma2_encoder_init);
+}
+
+
+extern uint64_t
+lzma_lzma2_encoder_memusage(const void *options)
+{
+	const uint64_t lzma_mem = lzma_lzma_encoder_memusage(options);
+	if (lzma_mem == UINT64_MAX)
+		return UINT64_MAX;
+
+	return sizeof(lzma_lzma2_coder) + lzma_mem;
+}
+
+
+extern lzma_ret
+lzma_lzma2_props_encode(const void *options, uint8_t *out)
+{
+	const lzma_options_lzma *const opt = options;
+	uint32_t d = my_max(opt->dict_size, LZMA_DICT_SIZE_MIN);
+
+	// Round up to the next 2^n - 1 or 2^n + 2^(n - 1) - 1 depending
+	// on which one is the next:
+	--d;
+	d |= d >> 2;
+	d |= d >> 3;
+	d |= d >> 4;
+	d |= d >> 8;
+	d |= d >> 16;
+
+	// Get the highest two bits using the proper encoding:
+	if (d == UINT32_MAX)
+		out[0] = 40;
+	else
+		out[0] = get_dist_slot(d + 1) - 24;
+
+	return LZMA_OK;
+}
+
+
+extern uint64_t
+lzma_lzma2_block_size(const void *options)
+{
+	const lzma_options_lzma *const opt = options;
+
+	// Use at least 1 MiB to keep compression ratio better.
+	return my_max((uint64_t)(opt->dict_size) * 3, UINT64_C(1) << 20);
+}

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/lzma2_encoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/lzma2_encoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma2_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,41 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma2_encoder.h
-/// \brief      LZMA2 encoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZMA2_ENCODER_H
-#define LZMA_LZMA2_ENCODER_H
-
-#include "common.h"
-
-
-/// Maximum number of bytes of actual data per chunk (no headers)
-#define LZMA2_CHUNK_MAX (UINT32_C(1) << 16)
-
-/// Maximum uncompressed size of LZMA chunk (no headers)
-#define LZMA2_UNCOMPRESSED_MAX (UINT32_C(1) << 21)
-
-/// Maximum size of LZMA2 headers
-#define LZMA2_HEADER_MAX 6
-
-/// Size of a header for uncompressed chunk
-#define LZMA2_HEADER_UNCOMPRESSED 3
-
-
-extern lzma_ret lzma_lzma2_encoder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters);
-
-extern uint64_t lzma_lzma2_encoder_memusage(const void *options);
-
-extern lzma_ret lzma_lzma2_props_encode(const void *options, uint8_t *out);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/lzma/lzma2_encoder.h (from rev 9176, vendor/xz/dist/src/liblzma/lzma/lzma2_encoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lzma/lzma2_encoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma2_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,43 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lzma2_encoder.h
+/// \brief      LZMA2 encoder
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZMA2_ENCODER_H
+#define LZMA_LZMA2_ENCODER_H
+
+#include "common.h"
+
+
+/// Maximum number of bytes of actual data per chunk (no headers)
+#define LZMA2_CHUNK_MAX (UINT32_C(1) << 16)
+
+/// Maximum uncompressed size of LZMA chunk (no headers)
+#define LZMA2_UNCOMPRESSED_MAX (UINT32_C(1) << 21)
+
+/// Maximum size of LZMA2 headers
+#define LZMA2_HEADER_MAX 6
+
+/// Size of a header for uncompressed chunk
+#define LZMA2_HEADER_UNCOMPRESSED 3
+
+
+extern lzma_ret lzma_lzma2_encoder_init(
+		lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+extern uint64_t lzma_lzma2_encoder_memusage(const void *options);
+
+extern lzma_ret lzma_lzma2_props_encode(const void *options, uint8_t *out);
+
+extern uint64_t lzma_lzma2_block_size(const void *options);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/lzma_common.h
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/lzma_common.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_common.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,223 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_common.h
-/// \brief      Private definitions common to LZMA encoder and decoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZMA_COMMON_H
-#define LZMA_LZMA_COMMON_H
-
-#include "common.h"
-#include "range_common.h"
-
-
-///////////////////
-// Miscellaneous //
-///////////////////
-
-/// Maximum number of position states. A position state is the lowest pos bits
-/// number of bits of the current uncompressed offset. In some places there
-/// are different sets of probabilities for different pos states.
-#define POS_STATES_MAX (1 << LZMA_PB_MAX)
-
-
-/// Validates lc, lp, and pb.
-static inline bool
-is_lclppb_valid(const lzma_options_lzma *options)
-{
-	return options->lc <= LZMA_LCLP_MAX && options->lp <= LZMA_LCLP_MAX
-			&& options->lc + options->lp <= LZMA_LCLP_MAX
-			&& options->pb <= LZMA_PB_MAX;
-}
-
-
-///////////
-// State //
-///////////
-
-/// This enum is used to track which events have occurred most recently and
-/// in which order. This information is used to predict the next event.
-///
-/// Events:
-///  - Literal: One 8-bit byte
-///  - Match: Repeat a chunk of data at some distance
-///  - Long repeat: Multi-byte match at a recently seen distance
-///  - Short repeat: One-byte repeat at a recently seen distance
-///
-/// The event names are in from STATE_oldest_older_previous. REP means
-/// either short or long repeated match, and NONLIT means any non-literal.
-typedef enum {
-	STATE_LIT_LIT,
-	STATE_MATCH_LIT_LIT,
-	STATE_REP_LIT_LIT,
-	STATE_SHORTREP_LIT_LIT,
-	STATE_MATCH_LIT,
-	STATE_REP_LIT,
-	STATE_SHORTREP_LIT,
-	STATE_LIT_MATCH,
-	STATE_LIT_LONGREP,
-	STATE_LIT_SHORTREP,
-	STATE_NONLIT_MATCH,
-	STATE_NONLIT_REP,
-} lzma_lzma_state;
-
-
-/// Total number of states
-#define STATES 12
-
-/// The lowest 7 states indicate that the previous state was a literal.
-#define LIT_STATES 7
-
-
-/// Indicate that the latest state was a literal.
-#define update_literal(state) \
-	state = ((state) <= STATE_SHORTREP_LIT_LIT \
-			? STATE_LIT_LIT \
-			: ((state) <= STATE_LIT_SHORTREP \
-				? (state) - 3 \
-				: (state) - 6))
-
-/// Indicate that the latest state was a match.
-#define update_match(state) \
-	state = ((state) < LIT_STATES ? STATE_LIT_MATCH : STATE_NONLIT_MATCH)
-
-/// Indicate that the latest state was a long repeated match.
-#define update_long_rep(state) \
-	state = ((state) < LIT_STATES ? STATE_LIT_LONGREP : STATE_NONLIT_REP)
-
-/// Indicate that the latest state was a short match.
-#define update_short_rep(state) \
-	state = ((state) < LIT_STATES ? STATE_LIT_SHORTREP : STATE_NONLIT_REP)
-
-/// Test if the previous state was a literal.
-#define is_literal_state(state) \
-	((state) < LIT_STATES)
-
-
-/////////////
-// Literal //
-/////////////
-
-/// Each literal coder is divided in three sections:
-///   - 0x001-0x0FF: Without match byte
-///   - 0x101-0x1FF: With match byte; match bit is 0
-///   - 0x201-0x2FF: With match byte; match bit is 1
-///
-/// Match byte is used when the previous LZMA symbol was something else than
-/// a literal (that is, it was some kind of match).
-#define LITERAL_CODER_SIZE 0x300
-
-/// Maximum number of literal coders
-#define LITERAL_CODERS_MAX (1 << LZMA_LCLP_MAX)
-
-/// Locate the literal coder for the next literal byte. The choice depends on
-///   - the lowest literal_pos_bits bits of the position of the current
-///     byte; and
-///   - the highest literal_context_bits bits of the previous byte.
-#define literal_subcoder(probs, lc, lp_mask, pos, prev_byte) \
-	((probs)[(((pos) & lp_mask) << lc) + ((prev_byte) >> (8 - lc))])
-
-
-static inline void
-literal_init(probability (*probs)[LITERAL_CODER_SIZE],
-		uint32_t lc, uint32_t lp)
-{
-	assert(lc + lp <= LZMA_LCLP_MAX);
-
-	const uint32_t coders = 1U << (lc + lp);
-
-	for (uint32_t i = 0; i < coders; ++i)
-		for (uint32_t j = 0; j < LITERAL_CODER_SIZE; ++j)
-			bit_reset(probs[i][j]);
-
-	return;
-}
-
-
-//////////////////
-// Match length //
-//////////////////
-
-// Minimum length of a match is two bytes.
-#define MATCH_LEN_MIN 2
-
-// Match length is encoded with 4, 5, or 10 bits.
-//
-// Length   Bits
-//  2-9      4 = Choice=0 + 3 bits
-// 10-17     5 = Choice=1 + Choice2=0 + 3 bits
-// 18-273   10 = Choice=1 + Choice2=1 + 8 bits
-#define LEN_LOW_BITS 3
-#define LEN_LOW_SYMBOLS (1 << LEN_LOW_BITS)
-#define LEN_MID_BITS 3
-#define LEN_MID_SYMBOLS (1 << LEN_MID_BITS)
-#define LEN_HIGH_BITS 8
-#define LEN_HIGH_SYMBOLS (1 << LEN_HIGH_BITS)
-#define LEN_SYMBOLS (LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS + LEN_HIGH_SYMBOLS)
-
-// Maximum length of a match is 273 which is a result of the encoding
-// described above.
-#define MATCH_LEN_MAX (MATCH_LEN_MIN + LEN_SYMBOLS - 1)
-
-
-////////////////////
-// Match distance //
-////////////////////
-
-// Different set of probabilities is used for match distances that have very
-// short match length: Lengths of 2, 3, and 4 bytes have a separate set of
-// probabilities for each length. The matches with longer length use a shared
-// set of probabilities.
-#define LEN_TO_POS_STATES 4
-
-// Macro to get the index of the appropriate probability array.
-#define get_len_to_pos_state(len) \
-	((len) < LEN_TO_POS_STATES + MATCH_LEN_MIN \
-		? (len) - MATCH_LEN_MIN \
-		: LEN_TO_POS_STATES - 1)
-
-// The highest two bits of a match distance (pos slot) are encoded using six
-// bits. See fastpos.h for more explanation.
-#define POS_SLOT_BITS 6
-#define POS_SLOTS (1 << POS_SLOT_BITS)
-
-// Match distances up to 127 are fully encoded using probabilities. Since
-// the highest two bits (pos slot) are always encoded using six bits, the
-// distances 0-3 don't need any additional bits to encode, since the pos
-// slot itself is the same as the actual distance. START_POS_MODEL_INDEX
-// indicates the first pos slot where at least one additional bit is needed.
-#define START_POS_MODEL_INDEX 4
-
-// Match distances greater than 127 are encoded in three pieces:
-//   - pos slot: the highest two bits
-//   - direct bits: 2-26 bits below the highest two bits
-//   - alignment bits: four lowest bits
-//
-// Direct bits don't use any probabilities.
-//
-// The pos slot value of 14 is for distances 128-191 (see the table in
-// fastpos.h to understand why).
-#define END_POS_MODEL_INDEX 14
-
-// Pos slots that indicate a distance <= 127.
-#define FULL_DISTANCES_BITS (END_POS_MODEL_INDEX / 2)
-#define FULL_DISTANCES (1 << FULL_DISTANCES_BITS)
-
-// For match distances greater than 127, only the highest two bits and the
-// lowest four bits (alignment) is encoded using probabilities.
-#define ALIGN_BITS 4
-#define ALIGN_TABLE_SIZE (1 << ALIGN_BITS)
-#define ALIGN_MASK (ALIGN_TABLE_SIZE - 1)
-
-// LZMA remembers the four most recent match distances. Reusing these distances
-// tends to take less space than re-encoding the actual distance value.
-#define REP_DISTANCES 4
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/lzma/lzma_common.h (from rev 9176, vendor/xz/dist/src/liblzma/lzma/lzma_common.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lzma/lzma_common.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_common.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,224 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lzma_common.h
+/// \brief      Private definitions common to LZMA encoder and decoder
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZMA_COMMON_H
+#define LZMA_LZMA_COMMON_H
+
+#include "common.h"
+#include "range_common.h"
+
+
+///////////////////
+// Miscellaneous //
+///////////////////
+
+/// Maximum number of position states. A position state is the lowest pos bits
+/// number of bits of the current uncompressed offset. In some places there
+/// are different sets of probabilities for different pos states.
+#define POS_STATES_MAX (1 << LZMA_PB_MAX)
+
+
+/// Validates lc, lp, and pb.
+static inline bool
+is_lclppb_valid(const lzma_options_lzma *options)
+{
+	return options->lc <= LZMA_LCLP_MAX && options->lp <= LZMA_LCLP_MAX
+			&& options->lc + options->lp <= LZMA_LCLP_MAX
+			&& options->pb <= LZMA_PB_MAX;
+}
+
+
+///////////
+// State //
+///////////
+
+/// This enum is used to track which events have occurred most recently and
+/// in which order. This information is used to predict the next event.
+///
+/// Events:
+///  - Literal: One 8-bit byte
+///  - Match: Repeat a chunk of data at some distance
+///  - Long repeat: Multi-byte match at a recently seen distance
+///  - Short repeat: One-byte repeat at a recently seen distance
+///
+/// The event names are in from STATE_oldest_older_previous. REP means
+/// either short or long repeated match, and NONLIT means any non-literal.
+typedef enum {
+	STATE_LIT_LIT,
+	STATE_MATCH_LIT_LIT,
+	STATE_REP_LIT_LIT,
+	STATE_SHORTREP_LIT_LIT,
+	STATE_MATCH_LIT,
+	STATE_REP_LIT,
+	STATE_SHORTREP_LIT,
+	STATE_LIT_MATCH,
+	STATE_LIT_LONGREP,
+	STATE_LIT_SHORTREP,
+	STATE_NONLIT_MATCH,
+	STATE_NONLIT_REP,
+} lzma_lzma_state;
+
+
+/// Total number of states
+#define STATES 12
+
+/// The lowest 7 states indicate that the previous state was a literal.
+#define LIT_STATES 7
+
+
+/// Indicate that the latest state was a literal.
+#define update_literal(state) \
+	state = ((state) <= STATE_SHORTREP_LIT_LIT \
+			? STATE_LIT_LIT \
+			: ((state) <= STATE_LIT_SHORTREP \
+				? (state) - 3 \
+				: (state) - 6))
+
+/// Indicate that the latest state was a match.
+#define update_match(state) \
+	state = ((state) < LIT_STATES ? STATE_LIT_MATCH : STATE_NONLIT_MATCH)
+
+/// Indicate that the latest state was a long repeated match.
+#define update_long_rep(state) \
+	state = ((state) < LIT_STATES ? STATE_LIT_LONGREP : STATE_NONLIT_REP)
+
+/// Indicate that the latest state was a short match.
+#define update_short_rep(state) \
+	state = ((state) < LIT_STATES ? STATE_LIT_SHORTREP : STATE_NONLIT_REP)
+
+/// Test if the previous state was a literal.
+#define is_literal_state(state) \
+	((state) < LIT_STATES)
+
+
+/////////////
+// Literal //
+/////////////
+
+/// Each literal coder is divided in three sections:
+///   - 0x001-0x0FF: Without match byte
+///   - 0x101-0x1FF: With match byte; match bit is 0
+///   - 0x201-0x2FF: With match byte; match bit is 1
+///
+/// Match byte is used when the previous LZMA symbol was something else than
+/// a literal (that is, it was some kind of match).
+#define LITERAL_CODER_SIZE 0x300
+
+/// Maximum number of literal coders
+#define LITERAL_CODERS_MAX (1 << LZMA_LCLP_MAX)
+
+/// Locate the literal coder for the next literal byte. The choice depends on
+///   - the lowest literal_pos_bits bits of the position of the current
+///     byte; and
+///   - the highest literal_context_bits bits of the previous byte.
+#define literal_subcoder(probs, lc, lp_mask, pos, prev_byte) \
+	((probs)[(((pos) & lp_mask) << lc) + ((prev_byte) >> (8 - lc))])
+
+
+static inline void
+literal_init(probability (*probs)[LITERAL_CODER_SIZE],
+		uint32_t lc, uint32_t lp)
+{
+	assert(lc + lp <= LZMA_LCLP_MAX);
+
+	const uint32_t coders = 1U << (lc + lp);
+
+	for (uint32_t i = 0; i < coders; ++i)
+		for (uint32_t j = 0; j < LITERAL_CODER_SIZE; ++j)
+			bit_reset(probs[i][j]);
+
+	return;
+}
+
+
+//////////////////
+// Match length //
+//////////////////
+
+// Minimum length of a match is two bytes.
+#define MATCH_LEN_MIN 2
+
+// Match length is encoded with 4, 5, or 10 bits.
+//
+// Length   Bits
+//  2-9      4 = Choice=0 + 3 bits
+// 10-17     5 = Choice=1 + Choice2=0 + 3 bits
+// 18-273   10 = Choice=1 + Choice2=1 + 8 bits
+#define LEN_LOW_BITS 3
+#define LEN_LOW_SYMBOLS (1 << LEN_LOW_BITS)
+#define LEN_MID_BITS 3
+#define LEN_MID_SYMBOLS (1 << LEN_MID_BITS)
+#define LEN_HIGH_BITS 8
+#define LEN_HIGH_SYMBOLS (1 << LEN_HIGH_BITS)
+#define LEN_SYMBOLS (LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS + LEN_HIGH_SYMBOLS)
+
+// Maximum length of a match is 273 which is a result of the encoding
+// described above.
+#define MATCH_LEN_MAX (MATCH_LEN_MIN + LEN_SYMBOLS - 1)
+
+
+////////////////////
+// Match distance //
+////////////////////
+
+// Different sets of probabilities are used for match distances that have very
+// short match length: Lengths of 2, 3, and 4 bytes have a separate set of
+// probabilities for each length. The matches with longer length use a shared
+// set of probabilities.
+#define DIST_STATES 4
+
+// Macro to get the index of the appropriate probability array.
+#define get_dist_state(len) \
+	((len) < DIST_STATES + MATCH_LEN_MIN \
+		? (len) - MATCH_LEN_MIN \
+		: DIST_STATES - 1)
+
+// The highest two bits of a match distance (distance slot) are encoded
+// using six bits. See fastpos.h for more explanation.
+#define DIST_SLOT_BITS 6
+#define DIST_SLOTS (1 << DIST_SLOT_BITS)
+
+// Match distances up to 127 are fully encoded using probabilities. Since
+// the highest two bits (distance slot) are always encoded using six bits,
+// the distances 0-3 don't need any additional bits to encode, since the
+// distance slot itself is the same as the actual distance. DIST_MODEL_START
+// indicates the first distance slot where at least one additional bit is
+// needed.
+#define DIST_MODEL_START 4
+
+// Match distances greater than 127 are encoded in three pieces:
+//   - distance slot: the highest two bits
+//   - direct bits: 2-26 bits below the highest two bits
+//   - alignment bits: four lowest bits
+//
+// Direct bits don't use any probabilities.
+//
+// The distance slot value of 14 is for distances 128-191 (see the table in
+// fastpos.h to understand why).
+#define DIST_MODEL_END 14
+
+// Distance slots that indicate a distance <= 127.
+#define FULL_DISTANCES_BITS (DIST_MODEL_END / 2)
+#define FULL_DISTANCES (1 << FULL_DISTANCES_BITS)
+
+// For match distances greater than 127, only the highest two bits and the
+// lowest four bits (alignment) is encoded using probabilities.
+#define ALIGN_BITS 4
+#define ALIGN_SIZE (1 << ALIGN_BITS)
+#define ALIGN_MASK (ALIGN_SIZE - 1)
+
+// LZMA remembers the four most recent match distances. Reusing these distances
+// tends to take less space than re-encoding the actual distance value.
+#define REPS 4
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/lzma_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/lzma_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,1057 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_decoder.c
-/// \brief      LZMA decoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lz_decoder.h"
-#include "lzma_common.h"
-#include "lzma_decoder.h"
-#include "range_decoder.h"
-
-
-#ifdef HAVE_SMALL
-
-// Macros for (somewhat) size-optimized code.
-#define seq_4(seq) seq
-
-#define seq_6(seq) seq
-
-#define seq_8(seq) seq
-
-#define seq_len(seq) \
-	seq ## _CHOICE, \
-	seq ## _CHOICE2, \
-	seq ## _BITTREE
-
-#define len_decode(target, ld, pos_state, seq) \
-do { \
-case seq ## _CHOICE: \
-	rc_if_0(ld.choice, seq ## _CHOICE) { \
-		rc_update_0(ld.choice); \
-		probs = ld.low[pos_state];\
-		limit = LEN_LOW_SYMBOLS; \
-		target = MATCH_LEN_MIN; \
-	} else { \
-		rc_update_1(ld.choice); \
-case seq ## _CHOICE2: \
-		rc_if_0(ld.choice2, seq ## _CHOICE2) { \
-			rc_update_0(ld.choice2); \
-			probs = ld.mid[pos_state]; \
-			limit = LEN_MID_SYMBOLS; \
-			target = MATCH_LEN_MIN + LEN_LOW_SYMBOLS; \
-		} else { \
-			rc_update_1(ld.choice2); \
-			probs = ld.high; \
-			limit = LEN_HIGH_SYMBOLS; \
-			target = MATCH_LEN_MIN + LEN_LOW_SYMBOLS \
-					+ LEN_MID_SYMBOLS; \
-		} \
-	} \
-	symbol = 1; \
-case seq ## _BITTREE: \
-	do { \
-		rc_bit(probs[symbol], , , seq ## _BITTREE); \
-	} while (symbol < limit); \
-	target += symbol - limit; \
-} while (0)
-
-#else // HAVE_SMALL
-
-// Unrolled versions
-#define seq_4(seq) \
-	seq ## 0, \
-	seq ## 1, \
-	seq ## 2, \
-	seq ## 3
-
-#define seq_6(seq) \
-	seq ## 0, \
-	seq ## 1, \
-	seq ## 2, \
-	seq ## 3, \
-	seq ## 4, \
-	seq ## 5
-
-#define seq_8(seq) \
-	seq ## 0, \
-	seq ## 1, \
-	seq ## 2, \
-	seq ## 3, \
-	seq ## 4, \
-	seq ## 5, \
-	seq ## 6, \
-	seq ## 7
-
-#define seq_len(seq) \
-	seq ## _CHOICE, \
-	seq ## _LOW0, \
-	seq ## _LOW1, \
-	seq ## _LOW2, \
-	seq ## _CHOICE2, \
-	seq ## _MID0, \
-	seq ## _MID1, \
-	seq ## _MID2, \
-	seq ## _HIGH0, \
-	seq ## _HIGH1, \
-	seq ## _HIGH2, \
-	seq ## _HIGH3, \
-	seq ## _HIGH4, \
-	seq ## _HIGH5, \
-	seq ## _HIGH6, \
-	seq ## _HIGH7
-
-#define len_decode(target, ld, pos_state, seq) \
-do { \
-	symbol = 1; \
-case seq ## _CHOICE: \
-	rc_if_0(ld.choice, seq ## _CHOICE) { \
-		rc_update_0(ld.choice); \
-		rc_bit_case(ld.low[pos_state][symbol], , , seq ## _LOW0); \
-		rc_bit_case(ld.low[pos_state][symbol], , , seq ## _LOW1); \
-		rc_bit_case(ld.low[pos_state][symbol], , , seq ## _LOW2); \
-		target = symbol - LEN_LOW_SYMBOLS + MATCH_LEN_MIN; \
-	} else { \
-		rc_update_1(ld.choice); \
-case seq ## _CHOICE2: \
-		rc_if_0(ld.choice2, seq ## _CHOICE2) { \
-			rc_update_0(ld.choice2); \
-			rc_bit_case(ld.mid[pos_state][symbol], , , \
-					seq ## _MID0); \
-			rc_bit_case(ld.mid[pos_state][symbol], , , \
-					seq ## _MID1); \
-			rc_bit_case(ld.mid[pos_state][symbol], , , \
-					seq ## _MID2); \
-			target = symbol - LEN_MID_SYMBOLS \
-					+ MATCH_LEN_MIN + LEN_LOW_SYMBOLS; \
-		} else { \
-			rc_update_1(ld.choice2); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH0); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH1); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH2); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH3); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH4); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH5); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH6); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH7); \
-			target = symbol - LEN_HIGH_SYMBOLS \
-					+ MATCH_LEN_MIN \
-					+ LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS; \
-		} \
-	} \
-} while (0)
-
-#endif // HAVE_SMALL
-
-
-/// Length decoder probabilities; see comments in lzma_common.h.
-typedef struct {
-	probability choice;
-	probability choice2;
-	probability low[POS_STATES_MAX][LEN_LOW_SYMBOLS];
-	probability mid[POS_STATES_MAX][LEN_MID_SYMBOLS];
-	probability high[LEN_HIGH_SYMBOLS];
-} lzma_length_decoder;
-
-
-struct lzma_coder_s {
-	///////////////////
-	// Probabilities //
-	///////////////////
-
-	/// Literals; see comments in lzma_common.h.
-	probability literal[LITERAL_CODERS_MAX][LITERAL_CODER_SIZE];
-
-	/// If 1, it's a match. Otherwise it's a single 8-bit literal.
-	probability is_match[STATES][POS_STATES_MAX];
-
-	/// If 1, it's a repeated match. The distance is one of rep0 .. rep3.
-	probability is_rep[STATES];
-
-	/// If 0, distance of a repeated match is rep0.
-	/// Otherwise check is_rep1.
-	probability is_rep0[STATES];
-
-	/// If 0, distance of a repeated match is rep1.
-	/// Otherwise check is_rep2.
-	probability is_rep1[STATES];
-
-	/// If 0, distance of a repeated match is rep2. Otherwise it is rep3.
-	probability is_rep2[STATES];
-
-	/// If 1, the repeated match has length of one byte. Otherwise
-	/// the length is decoded from rep_len_decoder.
-	probability is_rep0_long[STATES][POS_STATES_MAX];
-
-	/// Probability tree for the highest two bits of the match distance.
-	/// There is a separate probability tree for match lengths of
-	/// 2 (i.e. MATCH_LEN_MIN), 3, 4, and [5, 273].
-	probability pos_slot[LEN_TO_POS_STATES][POS_SLOTS];
-
-	/// Probability trees for additional bits for match distance when the
-	/// distance is in the range [4, 127].
-	probability pos_special[FULL_DISTANCES - END_POS_MODEL_INDEX];
-
-	/// Probability tree for the lowest four bits of a match distance
-	/// that is equal to or greater than 128.
-	probability pos_align[ALIGN_TABLE_SIZE];
-
-	/// Length of a normal match
-	lzma_length_decoder match_len_decoder;
-
-	/// Length of a repeated match
-	lzma_length_decoder rep_len_decoder;
-
-	///////////////////
-	// Decoder state //
-	///////////////////
-
-	// Range coder
-	lzma_range_decoder rc;
-
-	// Types of the most recently seen LZMA symbols
-	lzma_lzma_state state;
-
-	uint32_t rep0;      ///< Distance of the latest match
-	uint32_t rep1;      ///< Distance of second latest match
-	uint32_t rep2;      ///< Distance of third latest match
-	uint32_t rep3;      ///< Distance of fourth latest match
-
-	uint32_t pos_mask; // (1U << pb) - 1
-	uint32_t literal_context_bits;
-	uint32_t literal_pos_mask;
-
-	/// Uncompressed size as bytes, or LZMA_VLI_UNKNOWN if end of
-	/// payload marker is expected.
-	lzma_vli uncompressed_size;
-
-	////////////////////////////////
-	// State of incomplete symbol //
-	////////////////////////////////
-
-	/// Position where to continue the decoder loop
-	enum {
-		SEQ_NORMALIZE,
-		SEQ_IS_MATCH,
-		seq_8(SEQ_LITERAL),
-		seq_8(SEQ_LITERAL_MATCHED),
-		SEQ_LITERAL_WRITE,
-		SEQ_IS_REP,
-		seq_len(SEQ_MATCH_LEN),
-		seq_6(SEQ_POS_SLOT),
-		SEQ_POS_MODEL,
-		SEQ_DIRECT,
-		seq_4(SEQ_ALIGN),
-		SEQ_EOPM,
-		SEQ_IS_REP0,
-		SEQ_SHORTREP,
-		SEQ_IS_REP0_LONG,
-		SEQ_IS_REP1,
-		SEQ_IS_REP2,
-		seq_len(SEQ_REP_LEN),
-		SEQ_COPY,
-	} sequence;
-
-	/// Base of the current probability tree
-	probability *probs;
-
-	/// Symbol being decoded. This is also used as an index variable in
-	/// bittree decoders: probs[symbol]
-	uint32_t symbol;
-
-	/// Used as a loop termination condition on bittree decoders and
-	/// direct bits decoder.
-	uint32_t limit;
-
-	/// Matched literal decoder: 0x100 or 0 to help avoiding branches.
-	/// Bittree reverse decoders: Offset of the next bit: 1 << offset
-	uint32_t offset;
-
-	/// If decoding a literal: match byte.
-	/// If decoding a match: length of the match.
-	uint32_t len;
-};
-
-
-static lzma_ret
-lzma_decode(lzma_coder *restrict coder, lzma_dict *restrict dictptr,
-		const uint8_t *restrict in,
-		size_t *restrict in_pos, size_t in_size)
-{
-	////////////////////
-	// Initialization //
-	////////////////////
-
-	if (!rc_read_init(&coder->rc, in, in_pos, in_size))
-		return LZMA_OK;
-
-	///////////////
-	// Variables //
-	///////////////
-
-	// Making local copies of often-used variables improves both
-	// speed and readability.
-
-	lzma_dict dict = *dictptr;
-
-	const size_t dict_start = dict.pos;
-
-	// Range decoder
-	rc_to_local(coder->rc, *in_pos);
-
-	// State
-	uint32_t state = coder->state;
-	uint32_t rep0 = coder->rep0;
-	uint32_t rep1 = coder->rep1;
-	uint32_t rep2 = coder->rep2;
-	uint32_t rep3 = coder->rep3;
-
-	const uint32_t pos_mask = coder->pos_mask;
-
-	// These variables are actually needed only if we last time ran
-	// out of input in the middle of the decoder loop.
-	probability *probs = coder->probs;
-	uint32_t symbol = coder->symbol;
-	uint32_t limit = coder->limit;
-	uint32_t offset = coder->offset;
-	uint32_t len = coder->len;
-
-	const uint32_t literal_pos_mask = coder->literal_pos_mask;
-	const uint32_t literal_context_bits = coder->literal_context_bits;
-
-	// Temporary variables
-	uint32_t pos_state = dict.pos & pos_mask;
-
-	lzma_ret ret = LZMA_OK;
-
-	// If uncompressed size is known, there must be no end of payload
-	// marker.
-	const bool no_eopm = coder->uncompressed_size
-			!= LZMA_VLI_UNKNOWN;
-	if (no_eopm && coder->uncompressed_size < dict.limit - dict.pos)
-		dict.limit = dict.pos + (size_t)(coder->uncompressed_size);
-
-	// The main decoder loop. The "switch" is used to restart the decoder at
-	// correct location. Once restarted, the "switch" is no longer used.
-	switch (coder->sequence)
-	while (true) {
-		// Calculate new pos_state. This is skipped on the first loop
-		// since we already calculated it when setting up the local
-		// variables.
-		pos_state = dict.pos & pos_mask;
-
-	case SEQ_NORMALIZE:
-	case SEQ_IS_MATCH:
-		if (unlikely(no_eopm && dict.pos == dict.limit))
-			break;
-
-		rc_if_0(coder->is_match[state][pos_state], SEQ_IS_MATCH) {
-			rc_update_0(coder->is_match[state][pos_state]);
-
-			// It's a literal i.e. a single 8-bit byte.
-
-			probs = literal_subcoder(coder->literal,
-					literal_context_bits, literal_pos_mask,
-					dict.pos, dict_get(&dict, 0));
-			symbol = 1;
-
-			if (is_literal_state(state)) {
-				// Decode literal without match byte.
-#ifdef HAVE_SMALL
-	case SEQ_LITERAL:
-				do {
-					rc_bit(probs[symbol], , , SEQ_LITERAL);
-				} while (symbol < (1 << 8));
-#else
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL0);
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL1);
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL2);
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL3);
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL4);
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL5);
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL6);
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL7);
-#endif
-			} else {
-				// Decode literal with match byte.
-				//
-				// We store the byte we compare against
-				// ("match byte") to "len" to minimize the
-				// number of variables we need to store
-				// between decoder calls.
-				len = dict_get(&dict, rep0) << 1;
-
-				// The usage of "offset" allows omitting some
-				// branches, which should give tiny speed
-				// improvement on some CPUs. "offset" gets
-				// set to zero if match_bit didn't match.
-				offset = 0x100;
-
-#ifdef HAVE_SMALL
-	case SEQ_LITERAL_MATCHED:
-				do {
-					const uint32_t match_bit
-							= len & offset;
-					const uint32_t subcoder_index
-							= offset + match_bit
-							+ symbol;
-
-					rc_bit(probs[subcoder_index],
-							offset &= ~match_bit,
-							offset &= match_bit,
-							SEQ_LITERAL_MATCHED);
-
-					// It seems to be faster to do this
-					// here instead of putting it to the
-					// beginning of the loop and then
-					// putting the "case" in the middle
-					// of the loop.
-					len <<= 1;
-
-				} while (symbol < (1 << 8));
-#else
-				// Unroll the loop.
-				uint32_t match_bit;
-				uint32_t subcoder_index;
-
-#	define d(seq) \
-		case seq: \
-			match_bit = len & offset; \
-			subcoder_index = offset + match_bit + symbol; \
-			rc_bit(probs[subcoder_index], \
-					offset &= ~match_bit, \
-					offset &= match_bit, \
-					seq)
-
-				d(SEQ_LITERAL_MATCHED0);
-				len <<= 1;
-				d(SEQ_LITERAL_MATCHED1);
-				len <<= 1;
-				d(SEQ_LITERAL_MATCHED2);
-				len <<= 1;
-				d(SEQ_LITERAL_MATCHED3);
-				len <<= 1;
-				d(SEQ_LITERAL_MATCHED4);
-				len <<= 1;
-				d(SEQ_LITERAL_MATCHED5);
-				len <<= 1;
-				d(SEQ_LITERAL_MATCHED6);
-				len <<= 1;
-				d(SEQ_LITERAL_MATCHED7);
-#	undef d
-#endif
-			}
-
-			//update_literal(state);
-			// Use a lookup table to update to literal state,
-			// since compared to other state updates, this would
-			// need two branches.
-			static const lzma_lzma_state next_state[] = {
-				STATE_LIT_LIT,
-				STATE_LIT_LIT,
-				STATE_LIT_LIT,
-				STATE_LIT_LIT,
-				STATE_MATCH_LIT_LIT,
-				STATE_REP_LIT_LIT,
-				STATE_SHORTREP_LIT_LIT,
-				STATE_MATCH_LIT,
-				STATE_REP_LIT,
-				STATE_SHORTREP_LIT,
-				STATE_MATCH_LIT,
-				STATE_REP_LIT
-			};
-			state = next_state[state];
-
-	case SEQ_LITERAL_WRITE:
-			if (unlikely(dict_put(&dict, symbol))) {
-				coder->sequence = SEQ_LITERAL_WRITE;
-				goto out;
-			}
-
-			continue;
-		}
-
-		// Instead of a new byte we are going to get a byte range
-		// (distance and length) which will be repeated from our
-		// output history.
-
-		rc_update_1(coder->is_match[state][pos_state]);
-
-	case SEQ_IS_REP:
-		rc_if_0(coder->is_rep[state], SEQ_IS_REP) {
-			// Not a repeated match
-			rc_update_0(coder->is_rep[state]);
-			update_match(state);
-
-			// The latest three match distances are kept in
-			// memory in case there are repeated matches.
-			rep3 = rep2;
-			rep2 = rep1;
-			rep1 = rep0;
-
-			// Decode the length of the match.
-			len_decode(len, coder->match_len_decoder,
-					pos_state, SEQ_MATCH_LEN);
-
-			// Prepare to decode the highest two bits of the
-			// match distance.
-			probs = coder->pos_slot[get_len_to_pos_state(len)];
-			symbol = 1;
-
-#ifdef HAVE_SMALL
-	case SEQ_POS_SLOT:
-			do {
-				rc_bit(probs[symbol], , , SEQ_POS_SLOT);
-			} while (symbol < POS_SLOTS);
-#else
-			rc_bit_case(probs[symbol], , , SEQ_POS_SLOT0);
-			rc_bit_case(probs[symbol], , , SEQ_POS_SLOT1);
-			rc_bit_case(probs[symbol], , , SEQ_POS_SLOT2);
-			rc_bit_case(probs[symbol], , , SEQ_POS_SLOT3);
-			rc_bit_case(probs[symbol], , , SEQ_POS_SLOT4);
-			rc_bit_case(probs[symbol], , , SEQ_POS_SLOT5);
-#endif
-			// Get rid of the highest bit that was needed for
-			// indexing of the probability array.
-			symbol -= POS_SLOTS;
-			assert(symbol <= 63);
-
-			if (symbol < START_POS_MODEL_INDEX) {
-				// Match distances [0, 3] have only two bits.
-				rep0 = symbol;
-			} else {
-				// Decode the lowest [1, 29] bits of
-				// the match distance.
-				limit = (symbol >> 1) - 1;
-				assert(limit >= 1 && limit <= 30);
-				rep0 = 2 + (symbol & 1);
-
-				if (symbol < END_POS_MODEL_INDEX) {
-					// Prepare to decode the low bits for
-					// a distance of [4, 127].
-					assert(limit <= 5);
-					rep0 <<= limit;
-					assert(rep0 <= 96);
-					// -1 is fine, because we start
-					// decoding at probs[1], not probs[0].
-					// NOTE: This violates the C standard,
-					// since we are doing pointer
-					// arithmetic past the beginning of
-					// the array.
-					assert((int32_t)(rep0 - symbol - 1)
-							>= -1);
-					assert((int32_t)(rep0 - symbol - 1)
-							<= 82);
-					probs = coder->pos_special + rep0
-							- symbol - 1;
-					symbol = 1;
-					offset = 0;
-	case SEQ_POS_MODEL:
-#ifdef HAVE_SMALL
-					do {
-						rc_bit(probs[symbol], ,
-							rep0 += 1 << offset,
-							SEQ_POS_MODEL);
-					} while (++offset < limit);
-#else
-					switch (limit) {
-					case 5:
-						assert(offset == 0);
-						rc_bit(probs[symbol], ,
-							rep0 += 1,
-							SEQ_POS_MODEL);
-						++offset;
-						--limit;
-					case 4:
-						rc_bit(probs[symbol], ,
-							rep0 += 1 << offset,
-							SEQ_POS_MODEL);
-						++offset;
-						--limit;
-					case 3:
-						rc_bit(probs[symbol], ,
-							rep0 += 1 << offset,
-							SEQ_POS_MODEL);
-						++offset;
-						--limit;
-					case 2:
-						rc_bit(probs[symbol], ,
-							rep0 += 1 << offset,
-							SEQ_POS_MODEL);
-						++offset;
-						--limit;
-					case 1:
-						// We need "symbol" only for
-						// indexing the probability
-						// array, thus we can use
-						// rc_bit_last() here to omit
-						// the unneeded updating of
-						// "symbol".
-						rc_bit_last(probs[symbol], ,
-							rep0 += 1 << offset,
-							SEQ_POS_MODEL);
-					}
-#endif
-				} else {
-					// The distance is >= 128. Decode the
-					// lower bits without probabilities
-					// except the lowest four bits.
-					assert(symbol >= 14);
-					assert(limit >= 6);
-					limit -= ALIGN_BITS;
-					assert(limit >= 2);
-	case SEQ_DIRECT:
-					// Not worth manual unrolling
-					do {
-						rc_direct(rep0, SEQ_DIRECT);
-					} while (--limit > 0);
-
-					// Decode the lowest four bits using
-					// probabilities.
-					rep0 <<= ALIGN_BITS;
-					symbol = 1;
-#ifdef HAVE_SMALL
-					offset = 0;
-	case SEQ_ALIGN:
-					do {
-						rc_bit(coder->pos_align[
-								symbol], ,
-							rep0 += 1 << offset,
-							SEQ_ALIGN);
-					} while (++offset < ALIGN_BITS);
-#else
-	case SEQ_ALIGN0:
-					rc_bit(coder->pos_align[symbol], ,
-							rep0 += 1, SEQ_ALIGN0);
-	case SEQ_ALIGN1:
-					rc_bit(coder->pos_align[symbol], ,
-							rep0 += 2, SEQ_ALIGN1);
-	case SEQ_ALIGN2:
-					rc_bit(coder->pos_align[symbol], ,
-							rep0 += 4, SEQ_ALIGN2);
-	case SEQ_ALIGN3:
-					// Like in SEQ_POS_MODEL, we don't
-					// need "symbol" for anything else
-					// than indexing the probability array.
-					rc_bit_last(coder->pos_align[symbol], ,
-							rep0 += 8, SEQ_ALIGN3);
-#endif
-
-					if (rep0 == UINT32_MAX) {
-						// End of payload marker was
-						// found. It must not be
-						// present if uncompressed
-						// size is known.
-						if (coder->uncompressed_size
-						!= LZMA_VLI_UNKNOWN) {
-							ret = LZMA_DATA_ERROR;
-							goto out;
-						}
-
-	case SEQ_EOPM:
-						// LZMA1 stream with
-						// end-of-payload marker.
-						rc_normalize(SEQ_EOPM);
-						ret = LZMA_STREAM_END;
-						goto out;
-					}
-				}
-			}
-
-			// Validate the distance we just decoded.
-			if (unlikely(!dict_is_distance_valid(&dict, rep0))) {
-				ret = LZMA_DATA_ERROR;
-				goto out;
-			}
-
-		} else {
-			rc_update_1(coder->is_rep[state]);
-
-			// Repeated match
-			//
-			// The match distance is a value that we have had
-			// earlier. The latest four match distances are
-			// available as rep0, rep1, rep2 and rep3. We will
-			// now decode which of them is the new distance.
-			//
-			// There cannot be a match if we haven't produced
-			// any output, so check that first.
-			if (unlikely(!dict_is_distance_valid(&dict, 0))) {
-				ret = LZMA_DATA_ERROR;
-				goto out;
-			}
-
-	case SEQ_IS_REP0:
-			rc_if_0(coder->is_rep0[state], SEQ_IS_REP0) {
-				rc_update_0(coder->is_rep0[state]);
-				// The distance is rep0.
-
-	case SEQ_IS_REP0_LONG:
-				rc_if_0(coder->is_rep0_long[state][pos_state],
-						SEQ_IS_REP0_LONG) {
-					rc_update_0(coder->is_rep0_long[
-							state][pos_state]);
-
-					update_short_rep(state);
-
-	case SEQ_SHORTREP:
-					if (unlikely(dict_put(&dict, dict_get(
-							&dict, rep0)))) {
-						coder->sequence = SEQ_SHORTREP;
-						goto out;
-					}
-
-					continue;
-				}
-
-				// Repeating more than one byte at
-				// distance of rep0.
-				rc_update_1(coder->is_rep0_long[
-						state][pos_state]);
-
-			} else {
-				rc_update_1(coder->is_rep0[state]);
-
-	case SEQ_IS_REP1:
-				// The distance is rep1, rep2 or rep3. Once
-				// we find out which one of these three, it
-				// is stored to rep0 and rep1, rep2 and rep3
-				// are updated accordingly.
-				rc_if_0(coder->is_rep1[state], SEQ_IS_REP1) {
-					rc_update_0(coder->is_rep1[state]);
-
-					const uint32_t distance = rep1;
-					rep1 = rep0;
-					rep0 = distance;
-
-				} else {
-					rc_update_1(coder->is_rep1[state]);
-	case SEQ_IS_REP2:
-					rc_if_0(coder->is_rep2[state],
-							SEQ_IS_REP2) {
-						rc_update_0(coder->is_rep2[
-								state]);
-
-						const uint32_t distance = rep2;
-						rep2 = rep1;
-						rep1 = rep0;
-						rep0 = distance;
-
-					} else {
-						rc_update_1(coder->is_rep2[
-								state]);
-
-						const uint32_t distance = rep3;
-						rep3 = rep2;
-						rep2 = rep1;
-						rep1 = rep0;
-						rep0 = distance;
-					}
-				}
-			}
-
-			update_long_rep(state);
-
-			// Decode the length of the repeated match.
-			len_decode(len, coder->rep_len_decoder,
-					pos_state, SEQ_REP_LEN);
-		}
-
-		/////////////////////////////////
-		// Repeat from history buffer. //
-		/////////////////////////////////
-
-		// The length is always between these limits. There is no way
-		// to trigger the algorithm to set len outside this range.
-		assert(len >= MATCH_LEN_MIN);
-		assert(len <= MATCH_LEN_MAX);
-
-	case SEQ_COPY:
-		// Repeat len bytes from distance of rep0.
-		if (unlikely(dict_repeat(&dict, rep0, &len))) {
-			coder->sequence = SEQ_COPY;
-			goto out;
-		}
-	}
-
-	rc_normalize(SEQ_NORMALIZE);
-	coder->sequence = SEQ_IS_MATCH;
-
-out:
-	// Save state
-
-	// NOTE: Must not copy dict.limit.
-	dictptr->pos = dict.pos;
-	dictptr->full = dict.full;
-
-	rc_from_local(coder->rc, *in_pos);
-
-	coder->state = state;
-	coder->rep0 = rep0;
-	coder->rep1 = rep1;
-	coder->rep2 = rep2;
-	coder->rep3 = rep3;
-
-	coder->probs = probs;
-	coder->symbol = symbol;
-	coder->limit = limit;
-	coder->offset = offset;
-	coder->len = len;
-
-	// Update the remaining amount of uncompressed data if uncompressed
-	// size was known.
-	if (coder->uncompressed_size != LZMA_VLI_UNKNOWN) {
-		coder->uncompressed_size -= dict.pos - dict_start;
-
-		// Since there cannot be end of payload marker if the
-		// uncompressed size was known, we check here if we
-		// finished decoding.
-		if (coder->uncompressed_size == 0 && ret == LZMA_OK
-				&& coder->sequence != SEQ_NORMALIZE)
-			ret = coder->sequence == SEQ_IS_MATCH
-					? LZMA_STREAM_END : LZMA_DATA_ERROR;
-	}
-
-	// We can do an additional check in the range decoder to catch some
-	// corrupted files.
-	if (ret == LZMA_STREAM_END) {
-		if (!rc_is_finished(coder->rc))
-			ret = LZMA_DATA_ERROR;
-
-		// Reset the range decoder so that it is ready to reinitialize
-		// for a new LZMA2 chunk.
-		rc_reset(coder->rc);
-	}
-
-	return ret;
-}
-
-
-
-static void
-lzma_decoder_uncompressed(lzma_coder *coder, lzma_vli uncompressed_size)
-{
-	coder->uncompressed_size = uncompressed_size;
-}
-
-/*
-extern void
-lzma_lzma_decoder_uncompressed(void *coder_ptr, lzma_vli uncompressed_size)
-{
-	// This is hack.
-	(*(lzma_coder **)(coder))->uncompressed_size = uncompressed_size;
-}
-*/
-
-static void
-lzma_decoder_reset(lzma_coder *coder, const void *opt)
-{
-	const lzma_options_lzma *options = opt;
-
-	// NOTE: We assume that lc/lp/pb are valid since they were
-	// successfully decoded with lzma_lzma_decode_properties().
-
-	// Calculate pos_mask. We don't need pos_bits as is for anything.
-	coder->pos_mask = (1U << options->pb) - 1;
-
-	// Initialize the literal decoder.
-	literal_init(coder->literal, options->lc, options->lp);
-
-	coder->literal_context_bits = options->lc;
-	coder->literal_pos_mask = (1U << options->lp) - 1;
-
-	// State
-	coder->state = STATE_LIT_LIT;
-	coder->rep0 = 0;
-	coder->rep1 = 0;
-	coder->rep2 = 0;
-	coder->rep3 = 0;
-	coder->pos_mask = (1U << options->pb) - 1;
-
-	// Range decoder
-	rc_reset(coder->rc);
-
-	// Bit and bittree decoders
-	for (uint32_t i = 0; i < STATES; ++i) {
-		for (uint32_t j = 0; j <= coder->pos_mask; ++j) {
-			bit_reset(coder->is_match[i][j]);
-			bit_reset(coder->is_rep0_long[i][j]);
-		}
-
-		bit_reset(coder->is_rep[i]);
-		bit_reset(coder->is_rep0[i]);
-		bit_reset(coder->is_rep1[i]);
-		bit_reset(coder->is_rep2[i]);
-	}
-
-	for (uint32_t i = 0; i < LEN_TO_POS_STATES; ++i)
-		bittree_reset(coder->pos_slot[i], POS_SLOT_BITS);
-
-	for (uint32_t i = 0; i < FULL_DISTANCES - END_POS_MODEL_INDEX; ++i)
-		bit_reset(coder->pos_special[i]);
-
-	bittree_reset(coder->pos_align, ALIGN_BITS);
-
-	// Len decoders (also bit/bittree)
-	const uint32_t num_pos_states = 1U << options->pb;
-	bit_reset(coder->match_len_decoder.choice);
-	bit_reset(coder->match_len_decoder.choice2);
-	bit_reset(coder->rep_len_decoder.choice);
-	bit_reset(coder->rep_len_decoder.choice2);
-
-	for (uint32_t pos_state = 0; pos_state < num_pos_states; ++pos_state) {
-		bittree_reset(coder->match_len_decoder.low[pos_state],
-				LEN_LOW_BITS);
-		bittree_reset(coder->match_len_decoder.mid[pos_state],
-				LEN_MID_BITS);
-
-		bittree_reset(coder->rep_len_decoder.low[pos_state],
-				LEN_LOW_BITS);
-		bittree_reset(coder->rep_len_decoder.mid[pos_state],
-				LEN_MID_BITS);
-	}
-
-	bittree_reset(coder->match_len_decoder.high, LEN_HIGH_BITS);
-	bittree_reset(coder->rep_len_decoder.high, LEN_HIGH_BITS);
-
-	coder->sequence = SEQ_IS_MATCH;
-	coder->probs = NULL;
-	coder->symbol = 0;
-	coder->limit = 0;
-	coder->offset = 0;
-	coder->len = 0;
-
-	return;
-}
-
-
-extern lzma_ret
-lzma_lzma_decoder_create(lzma_lz_decoder *lz, lzma_allocator *allocator,
-		const void *opt, lzma_lz_options *lz_options)
-{
-	if (lz->coder == NULL) {
-		lz->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (lz->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		lz->code = &lzma_decode;
-		lz->reset = &lzma_decoder_reset;
-		lz->set_uncompressed = &lzma_decoder_uncompressed;
-	}
-
-	// All dictionary sizes are OK here. LZ decoder will take care of
-	// the special cases.
-	const lzma_options_lzma *options = opt;
-	lz_options->dict_size = options->dict_size;
-	lz_options->preset_dict = options->preset_dict;
-	lz_options->preset_dict_size = options->preset_dict_size;
-
-	return LZMA_OK;
-}
-
-
-/// Allocate and initialize LZMA decoder. This is used only via LZ
-/// initialization (lzma_lzma_decoder_init() passes function pointer to
-/// the LZ initialization).
-static lzma_ret
-lzma_decoder_init(lzma_lz_decoder *lz, lzma_allocator *allocator,
-		const void *options, lzma_lz_options *lz_options)
-{
-	if (!is_lclppb_valid(options))
-		return LZMA_PROG_ERROR;
-
-	return_if_error(lzma_lzma_decoder_create(
-			lz, allocator, options, lz_options));
-
-	lzma_decoder_reset(lz->coder, options);
-	lzma_decoder_uncompressed(lz->coder, LZMA_VLI_UNKNOWN);
-
-	return LZMA_OK;
-}
-
-
-extern lzma_ret
-lzma_lzma_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	// LZMA can only be the last filter in the chain. This is enforced
-	// by the raw_decoder initialization.
-	assert(filters[1].init == NULL);
-
-	return lzma_lz_decoder_init(next, allocator, filters,
-			&lzma_decoder_init);
-}
-
-
-extern bool
-lzma_lzma_lclppb_decode(lzma_options_lzma *options, uint8_t byte)
-{
-	if (byte > (4 * 5 + 4) * 9 + 8)
-		return true;
-
-	// See the file format specification to understand this.
-	options->pb = byte / (9 * 5);
-	byte -= options->pb * 9 * 5;
-	options->lp = byte / 9;
-	options->lc = byte - options->lp * 9;
-
-	return options->lc + options->lp > LZMA_LCLP_MAX;
-}
-
-
-extern uint64_t
-lzma_lzma_decoder_memusage_nocheck(const void *options)
-{
-	const lzma_options_lzma *const opt = options;
-	return sizeof(lzma_coder) + lzma_lz_decoder_memusage(opt->dict_size);
-}
-
-
-extern uint64_t
-lzma_lzma_decoder_memusage(const void *options)
-{
-	if (!is_lclppb_valid(options))
-		return UINT64_MAX;
-
-	return lzma_lzma_decoder_memusage_nocheck(options);
-}
-
-
-extern lzma_ret
-lzma_lzma_props_decode(void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size)
-{
-	if (props_size != 5)
-		return LZMA_OPTIONS_ERROR;
-
-	lzma_options_lzma *opt
-			= lzma_alloc(sizeof(lzma_options_lzma), allocator);
-	if (opt == NULL)
-		return LZMA_MEM_ERROR;
-
-	if (lzma_lzma_lclppb_decode(opt, props[0]))
-		goto error;
-
-	// All dictionary sizes are accepted, including zero. LZ decoder
-	// will automatically use a dictionary at least a few KiB even if
-	// a smaller dictionary is requested.
-	opt->dict_size = unaligned_read32le(props + 1);
-
-	opt->preset_dict = NULL;
-	opt->preset_dict_size = 0;
-
-	*options = opt;
-
-	return LZMA_OK;
-
-error:
-	lzma_free(opt, allocator);
-	return LZMA_OPTIONS_ERROR;
-}

Copied: vendor/xz/5.2.3/src/liblzma/lzma/lzma_decoder.c (from rev 11013, vendor/xz/dist/src/liblzma/lzma/lzma_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lzma/lzma_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,1058 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lzma_decoder.c
+/// \brief      LZMA decoder
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lz_decoder.h"
+#include "lzma_common.h"
+#include "lzma_decoder.h"
+#include "range_decoder.h"
+
+
+#ifdef HAVE_SMALL
+
+// Macros for (somewhat) size-optimized code.
+#define seq_4(seq) seq
+
+#define seq_6(seq) seq
+
+#define seq_8(seq) seq
+
+#define seq_len(seq) \
+	seq ## _CHOICE, \
+	seq ## _CHOICE2, \
+	seq ## _BITTREE
+
+#define len_decode(target, ld, pos_state, seq) \
+do { \
+case seq ## _CHOICE: \
+	rc_if_0(ld.choice, seq ## _CHOICE) { \
+		rc_update_0(ld.choice); \
+		probs = ld.low[pos_state];\
+		limit = LEN_LOW_SYMBOLS; \
+		target = MATCH_LEN_MIN; \
+	} else { \
+		rc_update_1(ld.choice); \
+case seq ## _CHOICE2: \
+		rc_if_0(ld.choice2, seq ## _CHOICE2) { \
+			rc_update_0(ld.choice2); \
+			probs = ld.mid[pos_state]; \
+			limit = LEN_MID_SYMBOLS; \
+			target = MATCH_LEN_MIN + LEN_LOW_SYMBOLS; \
+		} else { \
+			rc_update_1(ld.choice2); \
+			probs = ld.high; \
+			limit = LEN_HIGH_SYMBOLS; \
+			target = MATCH_LEN_MIN + LEN_LOW_SYMBOLS \
+					+ LEN_MID_SYMBOLS; \
+		} \
+	} \
+	symbol = 1; \
+case seq ## _BITTREE: \
+	do { \
+		rc_bit(probs[symbol], , , seq ## _BITTREE); \
+	} while (symbol < limit); \
+	target += symbol - limit; \
+} while (0)
+
+#else // HAVE_SMALL
+
+// Unrolled versions
+#define seq_4(seq) \
+	seq ## 0, \
+	seq ## 1, \
+	seq ## 2, \
+	seq ## 3
+
+#define seq_6(seq) \
+	seq ## 0, \
+	seq ## 1, \
+	seq ## 2, \
+	seq ## 3, \
+	seq ## 4, \
+	seq ## 5
+
+#define seq_8(seq) \
+	seq ## 0, \
+	seq ## 1, \
+	seq ## 2, \
+	seq ## 3, \
+	seq ## 4, \
+	seq ## 5, \
+	seq ## 6, \
+	seq ## 7
+
+#define seq_len(seq) \
+	seq ## _CHOICE, \
+	seq ## _LOW0, \
+	seq ## _LOW1, \
+	seq ## _LOW2, \
+	seq ## _CHOICE2, \
+	seq ## _MID0, \
+	seq ## _MID1, \
+	seq ## _MID2, \
+	seq ## _HIGH0, \
+	seq ## _HIGH1, \
+	seq ## _HIGH2, \
+	seq ## _HIGH3, \
+	seq ## _HIGH4, \
+	seq ## _HIGH5, \
+	seq ## _HIGH6, \
+	seq ## _HIGH7
+
+#define len_decode(target, ld, pos_state, seq) \
+do { \
+	symbol = 1; \
+case seq ## _CHOICE: \
+	rc_if_0(ld.choice, seq ## _CHOICE) { \
+		rc_update_0(ld.choice); \
+		rc_bit_case(ld.low[pos_state][symbol], , , seq ## _LOW0); \
+		rc_bit_case(ld.low[pos_state][symbol], , , seq ## _LOW1); \
+		rc_bit_case(ld.low[pos_state][symbol], , , seq ## _LOW2); \
+		target = symbol - LEN_LOW_SYMBOLS + MATCH_LEN_MIN; \
+	} else { \
+		rc_update_1(ld.choice); \
+case seq ## _CHOICE2: \
+		rc_if_0(ld.choice2, seq ## _CHOICE2) { \
+			rc_update_0(ld.choice2); \
+			rc_bit_case(ld.mid[pos_state][symbol], , , \
+					seq ## _MID0); \
+			rc_bit_case(ld.mid[pos_state][symbol], , , \
+					seq ## _MID1); \
+			rc_bit_case(ld.mid[pos_state][symbol], , , \
+					seq ## _MID2); \
+			target = symbol - LEN_MID_SYMBOLS \
+					+ MATCH_LEN_MIN + LEN_LOW_SYMBOLS; \
+		} else { \
+			rc_update_1(ld.choice2); \
+			rc_bit_case(ld.high[symbol], , , seq ## _HIGH0); \
+			rc_bit_case(ld.high[symbol], , , seq ## _HIGH1); \
+			rc_bit_case(ld.high[symbol], , , seq ## _HIGH2); \
+			rc_bit_case(ld.high[symbol], , , seq ## _HIGH3); \
+			rc_bit_case(ld.high[symbol], , , seq ## _HIGH4); \
+			rc_bit_case(ld.high[symbol], , , seq ## _HIGH5); \
+			rc_bit_case(ld.high[symbol], , , seq ## _HIGH6); \
+			rc_bit_case(ld.high[symbol], , , seq ## _HIGH7); \
+			target = symbol - LEN_HIGH_SYMBOLS \
+					+ MATCH_LEN_MIN \
+					+ LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS; \
+		} \
+	} \
+} while (0)
+
+#endif // HAVE_SMALL
+
+
+/// Length decoder probabilities; see comments in lzma_common.h.
+typedef struct {
+	probability choice;
+	probability choice2;
+	probability low[POS_STATES_MAX][LEN_LOW_SYMBOLS];
+	probability mid[POS_STATES_MAX][LEN_MID_SYMBOLS];
+	probability high[LEN_HIGH_SYMBOLS];
+} lzma_length_decoder;
+
+
+typedef struct {
+	///////////////////
+	// Probabilities //
+	///////////////////
+
+	/// Literals; see comments in lzma_common.h.
+	probability literal[LITERAL_CODERS_MAX][LITERAL_CODER_SIZE];
+
+	/// If 1, it's a match. Otherwise it's a single 8-bit literal.
+	probability is_match[STATES][POS_STATES_MAX];
+
+	/// If 1, it's a repeated match. The distance is one of rep0 .. rep3.
+	probability is_rep[STATES];
+
+	/// If 0, distance of a repeated match is rep0.
+	/// Otherwise check is_rep1.
+	probability is_rep0[STATES];
+
+	/// If 0, distance of a repeated match is rep1.
+	/// Otherwise check is_rep2.
+	probability is_rep1[STATES];
+
+	/// If 0, distance of a repeated match is rep2. Otherwise it is rep3.
+	probability is_rep2[STATES];
+
+	/// If 1, the repeated match has length of one byte. Otherwise
+	/// the length is decoded from rep_len_decoder.
+	probability is_rep0_long[STATES][POS_STATES_MAX];
+
+	/// Probability tree for the highest two bits of the match distance.
+	/// There is a separate probability tree for match lengths of
+	/// 2 (i.e. MATCH_LEN_MIN), 3, 4, and [5, 273].
+	probability dist_slot[DIST_STATES][DIST_SLOTS];
+
+	/// Probability trees for additional bits for match distance when the
+	/// distance is in the range [4, 127].
+	probability pos_special[FULL_DISTANCES - DIST_MODEL_END];
+
+	/// Probability tree for the lowest four bits of a match distance
+	/// that is equal to or greater than 128.
+	probability pos_align[ALIGN_SIZE];
+
+	/// Length of a normal match
+	lzma_length_decoder match_len_decoder;
+
+	/// Length of a repeated match
+	lzma_length_decoder rep_len_decoder;
+
+	///////////////////
+	// Decoder state //
+	///////////////////
+
+	// Range coder
+	lzma_range_decoder rc;
+
+	// Types of the most recently seen LZMA symbols
+	lzma_lzma_state state;
+
+	uint32_t rep0;      ///< Distance of the latest match
+	uint32_t rep1;      ///< Distance of second latest match
+	uint32_t rep2;      ///< Distance of third latest match
+	uint32_t rep3;      ///< Distance of fourth latest match
+
+	uint32_t pos_mask; // (1U << pb) - 1
+	uint32_t literal_context_bits;
+	uint32_t literal_pos_mask;
+
+	/// Uncompressed size as bytes, or LZMA_VLI_UNKNOWN if end of
+	/// payload marker is expected.
+	lzma_vli uncompressed_size;
+
+	////////////////////////////////
+	// State of incomplete symbol //
+	////////////////////////////////
+
+	/// Position where to continue the decoder loop
+	enum {
+		SEQ_NORMALIZE,
+		SEQ_IS_MATCH,
+		seq_8(SEQ_LITERAL),
+		seq_8(SEQ_LITERAL_MATCHED),
+		SEQ_LITERAL_WRITE,
+		SEQ_IS_REP,
+		seq_len(SEQ_MATCH_LEN),
+		seq_6(SEQ_DIST_SLOT),
+		SEQ_DIST_MODEL,
+		SEQ_DIRECT,
+		seq_4(SEQ_ALIGN),
+		SEQ_EOPM,
+		SEQ_IS_REP0,
+		SEQ_SHORTREP,
+		SEQ_IS_REP0_LONG,
+		SEQ_IS_REP1,
+		SEQ_IS_REP2,
+		seq_len(SEQ_REP_LEN),
+		SEQ_COPY,
+	} sequence;
+
+	/// Base of the current probability tree
+	probability *probs;
+
+	/// Symbol being decoded. This is also used as an index variable in
+	/// bittree decoders: probs[symbol]
+	uint32_t symbol;
+
+	/// Used as a loop termination condition on bittree decoders and
+	/// direct bits decoder.
+	uint32_t limit;
+
+	/// Matched literal decoder: 0x100 or 0 to help avoiding branches.
+	/// Bittree reverse decoders: Offset of the next bit: 1 << offset
+	uint32_t offset;
+
+	/// If decoding a literal: match byte.
+	/// If decoding a match: length of the match.
+	uint32_t len;
+} lzma_lzma1_decoder;
+
+
+static lzma_ret
+lzma_decode(void *coder_ptr, lzma_dict *restrict dictptr,
+		const uint8_t *restrict in,
+		size_t *restrict in_pos, size_t in_size)
+{
+	lzma_lzma1_decoder *restrict coder = coder_ptr;
+
+	////////////////////
+	// Initialization //
+	////////////////////
+
+	{
+		const lzma_ret ret = rc_read_init(
+				&coder->rc, in, in_pos, in_size);
+		if (ret != LZMA_STREAM_END)
+			return ret;
+	}
+
+	///////////////
+	// Variables //
+	///////////////
+
+	// Making local copies of often-used variables improves both
+	// speed and readability.
+
+	lzma_dict dict = *dictptr;
+
+	const size_t dict_start = dict.pos;
+
+	// Range decoder
+	rc_to_local(coder->rc, *in_pos);
+
+	// State
+	uint32_t state = coder->state;
+	uint32_t rep0 = coder->rep0;
+	uint32_t rep1 = coder->rep1;
+	uint32_t rep2 = coder->rep2;
+	uint32_t rep3 = coder->rep3;
+
+	const uint32_t pos_mask = coder->pos_mask;
+
+	// These variables are actually needed only if we last time ran
+	// out of input in the middle of the decoder loop.
+	probability *probs = coder->probs;
+	uint32_t symbol = coder->symbol;
+	uint32_t limit = coder->limit;
+	uint32_t offset = coder->offset;
+	uint32_t len = coder->len;
+
+	const uint32_t literal_pos_mask = coder->literal_pos_mask;
+	const uint32_t literal_context_bits = coder->literal_context_bits;
+
+	// Temporary variables
+	uint32_t pos_state = dict.pos & pos_mask;
+
+	lzma_ret ret = LZMA_OK;
+
+	// If uncompressed size is known, there must be no end of payload
+	// marker.
+	const bool no_eopm = coder->uncompressed_size
+			!= LZMA_VLI_UNKNOWN;
+	if (no_eopm && coder->uncompressed_size < dict.limit - dict.pos)
+		dict.limit = dict.pos + (size_t)(coder->uncompressed_size);
+
+	// The main decoder loop. The "switch" is used to restart the decoder at
+	// correct location. Once restarted, the "switch" is no longer used.
+	switch (coder->sequence)
+	while (true) {
+		// Calculate new pos_state. This is skipped on the first loop
+		// since we already calculated it when setting up the local
+		// variables.
+		pos_state = dict.pos & pos_mask;
+
+	case SEQ_NORMALIZE:
+	case SEQ_IS_MATCH:
+		if (unlikely(no_eopm && dict.pos == dict.limit))
+			break;
+
+		rc_if_0(coder->is_match[state][pos_state], SEQ_IS_MATCH) {
+			rc_update_0(coder->is_match[state][pos_state]);
+
+			// It's a literal i.e. a single 8-bit byte.
+
+			probs = literal_subcoder(coder->literal,
+					literal_context_bits, literal_pos_mask,
+					dict.pos, dict_get(&dict, 0));
+			symbol = 1;
+
+			if (is_literal_state(state)) {
+				// Decode literal without match byte.
+#ifdef HAVE_SMALL
+	case SEQ_LITERAL:
+				do {
+					rc_bit(probs[symbol], , , SEQ_LITERAL);
+				} while (symbol < (1 << 8));
+#else
+				rc_bit_case(probs[symbol], , , SEQ_LITERAL0);
+				rc_bit_case(probs[symbol], , , SEQ_LITERAL1);
+				rc_bit_case(probs[symbol], , , SEQ_LITERAL2);
+				rc_bit_case(probs[symbol], , , SEQ_LITERAL3);
+				rc_bit_case(probs[symbol], , , SEQ_LITERAL4);
+				rc_bit_case(probs[symbol], , , SEQ_LITERAL5);
+				rc_bit_case(probs[symbol], , , SEQ_LITERAL6);
+				rc_bit_case(probs[symbol], , , SEQ_LITERAL7);
+#endif
+			} else {
+				// Decode literal with match byte.
+				//
+				// We store the byte we compare against
+				// ("match byte") to "len" to minimize the
+				// number of variables we need to store
+				// between decoder calls.
+				len = dict_get(&dict, rep0) << 1;
+
+				// The usage of "offset" allows omitting some
+				// branches, which should give tiny speed
+				// improvement on some CPUs. "offset" gets
+				// set to zero if match_bit didn't match.
+				offset = 0x100;
+
+#ifdef HAVE_SMALL
+	case SEQ_LITERAL_MATCHED:
+				do {
+					const uint32_t match_bit
+							= len & offset;
+					const uint32_t subcoder_index
+							= offset + match_bit
+							+ symbol;
+
+					rc_bit(probs[subcoder_index],
+							offset &= ~match_bit,
+							offset &= match_bit,
+							SEQ_LITERAL_MATCHED);
+
+					// It seems to be faster to do this
+					// here instead of putting it to the
+					// beginning of the loop and then
+					// putting the "case" in the middle
+					// of the loop.
+					len <<= 1;
+
+				} while (symbol < (1 << 8));
+#else
+				// Unroll the loop.
+				uint32_t match_bit;
+				uint32_t subcoder_index;
+
+#	define d(seq) \
+		case seq: \
+			match_bit = len & offset; \
+			subcoder_index = offset + match_bit + symbol; \
+			rc_bit(probs[subcoder_index], \
+					offset &= ~match_bit, \
+					offset &= match_bit, \
+					seq)
+
+				d(SEQ_LITERAL_MATCHED0);
+				len <<= 1;
+				d(SEQ_LITERAL_MATCHED1);
+				len <<= 1;
+				d(SEQ_LITERAL_MATCHED2);
+				len <<= 1;
+				d(SEQ_LITERAL_MATCHED3);
+				len <<= 1;
+				d(SEQ_LITERAL_MATCHED4);
+				len <<= 1;
+				d(SEQ_LITERAL_MATCHED5);
+				len <<= 1;
+				d(SEQ_LITERAL_MATCHED6);
+				len <<= 1;
+				d(SEQ_LITERAL_MATCHED7);
+#	undef d
+#endif
+			}
+
+			//update_literal(state);
+			// Use a lookup table to update to literal state,
+			// since compared to other state updates, this would
+			// need two branches.
+			static const lzma_lzma_state next_state[] = {
+				STATE_LIT_LIT,
+				STATE_LIT_LIT,
+				STATE_LIT_LIT,
+				STATE_LIT_LIT,
+				STATE_MATCH_LIT_LIT,
+				STATE_REP_LIT_LIT,
+				STATE_SHORTREP_LIT_LIT,
+				STATE_MATCH_LIT,
+				STATE_REP_LIT,
+				STATE_SHORTREP_LIT,
+				STATE_MATCH_LIT,
+				STATE_REP_LIT
+			};
+			state = next_state[state];
+
+	case SEQ_LITERAL_WRITE:
+			if (unlikely(dict_put(&dict, symbol))) {
+				coder->sequence = SEQ_LITERAL_WRITE;
+				goto out;
+			}
+
+			continue;
+		}
+
+		// Instead of a new byte we are going to get a byte range
+		// (distance and length) which will be repeated from our
+		// output history.
+
+		rc_update_1(coder->is_match[state][pos_state]);
+
+	case SEQ_IS_REP:
+		rc_if_0(coder->is_rep[state], SEQ_IS_REP) {
+			// Not a repeated match
+			rc_update_0(coder->is_rep[state]);
+			update_match(state);
+
+			// The latest three match distances are kept in
+			// memory in case there are repeated matches.
+			rep3 = rep2;
+			rep2 = rep1;
+			rep1 = rep0;
+
+			// Decode the length of the match.
+			len_decode(len, coder->match_len_decoder,
+					pos_state, SEQ_MATCH_LEN);
+
+			// Prepare to decode the highest two bits of the
+			// match distance.
+			probs = coder->dist_slot[get_dist_state(len)];
+			symbol = 1;
+
+#ifdef HAVE_SMALL
+	case SEQ_DIST_SLOT:
+			do {
+				rc_bit(probs[symbol], , , SEQ_DIST_SLOT);
+			} while (symbol < DIST_SLOTS);
+#else
+			rc_bit_case(probs[symbol], , , SEQ_DIST_SLOT0);
+			rc_bit_case(probs[symbol], , , SEQ_DIST_SLOT1);
+			rc_bit_case(probs[symbol], , , SEQ_DIST_SLOT2);
+			rc_bit_case(probs[symbol], , , SEQ_DIST_SLOT3);
+			rc_bit_case(probs[symbol], , , SEQ_DIST_SLOT4);
+			rc_bit_case(probs[symbol], , , SEQ_DIST_SLOT5);
+#endif
+			// Get rid of the highest bit that was needed for
+			// indexing of the probability array.
+			symbol -= DIST_SLOTS;
+			assert(symbol <= 63);
+
+			if (symbol < DIST_MODEL_START) {
+				// Match distances [0, 3] have only two bits.
+				rep0 = symbol;
+			} else {
+				// Decode the lowest [1, 29] bits of
+				// the match distance.
+				limit = (symbol >> 1) - 1;
+				assert(limit >= 1 && limit <= 30);
+				rep0 = 2 + (symbol & 1);
+
+				if (symbol < DIST_MODEL_END) {
+					// Prepare to decode the low bits for
+					// a distance of [4, 127].
+					assert(limit <= 5);
+					rep0 <<= limit;
+					assert(rep0 <= 96);
+					// -1 is fine, because we start
+					// decoding at probs[1], not probs[0].
+					// NOTE: This violates the C standard,
+					// since we are doing pointer
+					// arithmetic past the beginning of
+					// the array.
+					assert((int32_t)(rep0 - symbol - 1)
+							>= -1);
+					assert((int32_t)(rep0 - symbol - 1)
+							<= 82);
+					probs = coder->pos_special + rep0
+							- symbol - 1;
+					symbol = 1;
+					offset = 0;
+	case SEQ_DIST_MODEL:
+#ifdef HAVE_SMALL
+					do {
+						rc_bit(probs[symbol], ,
+							rep0 += 1 << offset,
+							SEQ_DIST_MODEL);
+					} while (++offset < limit);
+#else
+					switch (limit) {
+					case 5:
+						assert(offset == 0);
+						rc_bit(probs[symbol], ,
+							rep0 += 1,
+							SEQ_DIST_MODEL);
+						++offset;
+						--limit;
+					case 4:
+						rc_bit(probs[symbol], ,
+							rep0 += 1 << offset,
+							SEQ_DIST_MODEL);
+						++offset;
+						--limit;
+					case 3:
+						rc_bit(probs[symbol], ,
+							rep0 += 1 << offset,
+							SEQ_DIST_MODEL);
+						++offset;
+						--limit;
+					case 2:
+						rc_bit(probs[symbol], ,
+							rep0 += 1 << offset,
+							SEQ_DIST_MODEL);
+						++offset;
+						--limit;
+					case 1:
+						// We need "symbol" only for
+						// indexing the probability
+						// array, thus we can use
+						// rc_bit_last() here to omit
+						// the unneeded updating of
+						// "symbol".
+						rc_bit_last(probs[symbol], ,
+							rep0 += 1 << offset,
+							SEQ_DIST_MODEL);
+					}
+#endif
+				} else {
+					// The distance is >= 128. Decode the
+					// lower bits without probabilities
+					// except the lowest four bits.
+					assert(symbol >= 14);
+					assert(limit >= 6);
+					limit -= ALIGN_BITS;
+					assert(limit >= 2);
+	case SEQ_DIRECT:
+					// Not worth manual unrolling
+					do {
+						rc_direct(rep0, SEQ_DIRECT);
+					} while (--limit > 0);
+
+					// Decode the lowest four bits using
+					// probabilities.
+					rep0 <<= ALIGN_BITS;
+					symbol = 1;
+#ifdef HAVE_SMALL
+					offset = 0;
+	case SEQ_ALIGN:
+					do {
+						rc_bit(coder->pos_align[
+								symbol], ,
+							rep0 += 1 << offset,
+							SEQ_ALIGN);
+					} while (++offset < ALIGN_BITS);
+#else
+	case SEQ_ALIGN0:
+					rc_bit(coder->pos_align[symbol], ,
+							rep0 += 1, SEQ_ALIGN0);
+	case SEQ_ALIGN1:
+					rc_bit(coder->pos_align[symbol], ,
+							rep0 += 2, SEQ_ALIGN1);
+	case SEQ_ALIGN2:
+					rc_bit(coder->pos_align[symbol], ,
+							rep0 += 4, SEQ_ALIGN2);
+	case SEQ_ALIGN3:
+					// Like in SEQ_DIST_MODEL, we don't
+					// need "symbol" for anything else
+					// than indexing the probability array.
+					rc_bit_last(coder->pos_align[symbol], ,
+							rep0 += 8, SEQ_ALIGN3);
+#endif
+
+					if (rep0 == UINT32_MAX) {
+						// End of payload marker was
+						// found. It must not be
+						// present if uncompressed
+						// size is known.
+						if (coder->uncompressed_size
+						!= LZMA_VLI_UNKNOWN) {
+							ret = LZMA_DATA_ERROR;
+							goto out;
+						}
+
+	case SEQ_EOPM:
+						// LZMA1 stream with
+						// end-of-payload marker.
+						rc_normalize(SEQ_EOPM);
+						ret = LZMA_STREAM_END;
+						goto out;
+					}
+				}
+			}
+
+			// Validate the distance we just decoded.
+			if (unlikely(!dict_is_distance_valid(&dict, rep0))) {
+				ret = LZMA_DATA_ERROR;
+				goto out;
+			}
+
+		} else {
+			rc_update_1(coder->is_rep[state]);
+
+			// Repeated match
+			//
+			// The match distance is a value that we have had
+			// earlier. The latest four match distances are
+			// available as rep0, rep1, rep2 and rep3. We will
+			// now decode which of them is the new distance.
+			//
+			// There cannot be a match if we haven't produced
+			// any output, so check that first.
+			if (unlikely(!dict_is_distance_valid(&dict, 0))) {
+				ret = LZMA_DATA_ERROR;
+				goto out;
+			}
+
+	case SEQ_IS_REP0:
+			rc_if_0(coder->is_rep0[state], SEQ_IS_REP0) {
+				rc_update_0(coder->is_rep0[state]);
+				// The distance is rep0.
+
+	case SEQ_IS_REP0_LONG:
+				rc_if_0(coder->is_rep0_long[state][pos_state],
+						SEQ_IS_REP0_LONG) {
+					rc_update_0(coder->is_rep0_long[
+							state][pos_state]);
+
+					update_short_rep(state);
+
+	case SEQ_SHORTREP:
+					if (unlikely(dict_put(&dict, dict_get(
+							&dict, rep0)))) {
+						coder->sequence = SEQ_SHORTREP;
+						goto out;
+					}
+
+					continue;
+				}
+
+				// Repeating more than one byte at
+				// distance of rep0.
+				rc_update_1(coder->is_rep0_long[
+						state][pos_state]);
+
+			} else {
+				rc_update_1(coder->is_rep0[state]);
+
+	case SEQ_IS_REP1:
+				// The distance is rep1, rep2 or rep3. Once
+				// we find out which one of these three, it
+				// is stored to rep0 and rep1, rep2 and rep3
+				// are updated accordingly.
+				rc_if_0(coder->is_rep1[state], SEQ_IS_REP1) {
+					rc_update_0(coder->is_rep1[state]);
+
+					const uint32_t distance = rep1;
+					rep1 = rep0;
+					rep0 = distance;
+
+				} else {
+					rc_update_1(coder->is_rep1[state]);
+	case SEQ_IS_REP2:
+					rc_if_0(coder->is_rep2[state],
+							SEQ_IS_REP2) {
+						rc_update_0(coder->is_rep2[
+								state]);
+
+						const uint32_t distance = rep2;
+						rep2 = rep1;
+						rep1 = rep0;
+						rep0 = distance;
+
+					} else {
+						rc_update_1(coder->is_rep2[
+								state]);
+
+						const uint32_t distance = rep3;
+						rep3 = rep2;
+						rep2 = rep1;
+						rep1 = rep0;
+						rep0 = distance;
+					}
+				}
+			}
+
+			update_long_rep(state);
+
+			// Decode the length of the repeated match.
+			len_decode(len, coder->rep_len_decoder,
+					pos_state, SEQ_REP_LEN);
+		}
+
+		/////////////////////////////////
+		// Repeat from history buffer. //
+		/////////////////////////////////
+
+		// The length is always between these limits. There is no way
+		// to trigger the algorithm to set len outside this range.
+		assert(len >= MATCH_LEN_MIN);
+		assert(len <= MATCH_LEN_MAX);
+
+	case SEQ_COPY:
+		// Repeat len bytes from distance of rep0.
+		if (unlikely(dict_repeat(&dict, rep0, &len))) {
+			coder->sequence = SEQ_COPY;
+			goto out;
+		}
+	}
+
+	rc_normalize(SEQ_NORMALIZE);
+	coder->sequence = SEQ_IS_MATCH;
+
+out:
+	// Save state
+
+	// NOTE: Must not copy dict.limit.
+	dictptr->pos = dict.pos;
+	dictptr->full = dict.full;
+
+	rc_from_local(coder->rc, *in_pos);
+
+	coder->state = state;
+	coder->rep0 = rep0;
+	coder->rep1 = rep1;
+	coder->rep2 = rep2;
+	coder->rep3 = rep3;
+
+	coder->probs = probs;
+	coder->symbol = symbol;
+	coder->limit = limit;
+	coder->offset = offset;
+	coder->len = len;
+
+	// Update the remaining amount of uncompressed data if uncompressed
+	// size was known.
+	if (coder->uncompressed_size != LZMA_VLI_UNKNOWN) {
+		coder->uncompressed_size -= dict.pos - dict_start;
+
+		// Since there cannot be end of payload marker if the
+		// uncompressed size was known, we check here if we
+		// finished decoding.
+		if (coder->uncompressed_size == 0 && ret == LZMA_OK
+				&& coder->sequence != SEQ_NORMALIZE)
+			ret = coder->sequence == SEQ_IS_MATCH
+					? LZMA_STREAM_END : LZMA_DATA_ERROR;
+	}
+
+	// We can do an additional check in the range decoder to catch some
+	// corrupted files.
+	if (ret == LZMA_STREAM_END) {
+		if (!rc_is_finished(coder->rc))
+			ret = LZMA_DATA_ERROR;
+
+		// Reset the range decoder so that it is ready to reinitialize
+		// for a new LZMA2 chunk.
+		rc_reset(coder->rc);
+	}
+
+	return ret;
+}
+
+
+
+static void
+lzma_decoder_uncompressed(void *coder_ptr, lzma_vli uncompressed_size)
+{
+	lzma_lzma1_decoder *coder = coder_ptr;
+	coder->uncompressed_size = uncompressed_size;
+}
+
+
+static void
+lzma_decoder_reset(void *coder_ptr, const void *opt)
+{
+	lzma_lzma1_decoder *coder = coder_ptr;
+	const lzma_options_lzma *options = opt;
+
+	// NOTE: We assume that lc/lp/pb are valid since they were
+	// successfully decoded with lzma_lzma_decode_properties().
+
+	// Calculate pos_mask. We don't need pos_bits as is for anything.
+	coder->pos_mask = (1U << options->pb) - 1;
+
+	// Initialize the literal decoder.
+	literal_init(coder->literal, options->lc, options->lp);
+
+	coder->literal_context_bits = options->lc;
+	coder->literal_pos_mask = (1U << options->lp) - 1;
+
+	// State
+	coder->state = STATE_LIT_LIT;
+	coder->rep0 = 0;
+	coder->rep1 = 0;
+	coder->rep2 = 0;
+	coder->rep3 = 0;
+	coder->pos_mask = (1U << options->pb) - 1;
+
+	// Range decoder
+	rc_reset(coder->rc);
+
+	// Bit and bittree decoders
+	for (uint32_t i = 0; i < STATES; ++i) {
+		for (uint32_t j = 0; j <= coder->pos_mask; ++j) {
+			bit_reset(coder->is_match[i][j]);
+			bit_reset(coder->is_rep0_long[i][j]);
+		}
+
+		bit_reset(coder->is_rep[i]);
+		bit_reset(coder->is_rep0[i]);
+		bit_reset(coder->is_rep1[i]);
+		bit_reset(coder->is_rep2[i]);
+	}
+
+	for (uint32_t i = 0; i < DIST_STATES; ++i)
+		bittree_reset(coder->dist_slot[i], DIST_SLOT_BITS);
+
+	for (uint32_t i = 0; i < FULL_DISTANCES - DIST_MODEL_END; ++i)
+		bit_reset(coder->pos_special[i]);
+
+	bittree_reset(coder->pos_align, ALIGN_BITS);
+
+	// Len decoders (also bit/bittree)
+	const uint32_t num_pos_states = 1U << options->pb;
+	bit_reset(coder->match_len_decoder.choice);
+	bit_reset(coder->match_len_decoder.choice2);
+	bit_reset(coder->rep_len_decoder.choice);
+	bit_reset(coder->rep_len_decoder.choice2);
+
+	for (uint32_t pos_state = 0; pos_state < num_pos_states; ++pos_state) {
+		bittree_reset(coder->match_len_decoder.low[pos_state],
+				LEN_LOW_BITS);
+		bittree_reset(coder->match_len_decoder.mid[pos_state],
+				LEN_MID_BITS);
+
+		bittree_reset(coder->rep_len_decoder.low[pos_state],
+				LEN_LOW_BITS);
+		bittree_reset(coder->rep_len_decoder.mid[pos_state],
+				LEN_MID_BITS);
+	}
+
+	bittree_reset(coder->match_len_decoder.high, LEN_HIGH_BITS);
+	bittree_reset(coder->rep_len_decoder.high, LEN_HIGH_BITS);
+
+	coder->sequence = SEQ_IS_MATCH;
+	coder->probs = NULL;
+	coder->symbol = 0;
+	coder->limit = 0;
+	coder->offset = 0;
+	coder->len = 0;
+
+	return;
+}
+
+
+extern lzma_ret
+lzma_lzma_decoder_create(lzma_lz_decoder *lz, const lzma_allocator *allocator,
+		const void *opt, lzma_lz_options *lz_options)
+{
+	if (lz->coder == NULL) {
+		lz->coder = lzma_alloc(sizeof(lzma_lzma1_decoder), allocator);
+		if (lz->coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		lz->code = &lzma_decode;
+		lz->reset = &lzma_decoder_reset;
+		lz->set_uncompressed = &lzma_decoder_uncompressed;
+	}
+
+	// All dictionary sizes are OK here. LZ decoder will take care of
+	// the special cases.
+	const lzma_options_lzma *options = opt;
+	lz_options->dict_size = options->dict_size;
+	lz_options->preset_dict = options->preset_dict;
+	lz_options->preset_dict_size = options->preset_dict_size;
+
+	return LZMA_OK;
+}
+
+
+/// Allocate and initialize LZMA decoder. This is used only via LZ
+/// initialization (lzma_lzma_decoder_init() passes function pointer to
+/// the LZ initialization).
+static lzma_ret
+lzma_decoder_init(lzma_lz_decoder *lz, const lzma_allocator *allocator,
+		const void *options, lzma_lz_options *lz_options)
+{
+	if (!is_lclppb_valid(options))
+		return LZMA_PROG_ERROR;
+
+	return_if_error(lzma_lzma_decoder_create(
+			lz, allocator, options, lz_options));
+
+	lzma_decoder_reset(lz->coder, options);
+	lzma_decoder_uncompressed(lz->coder, LZMA_VLI_UNKNOWN);
+
+	return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_lzma_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	// LZMA can only be the last filter in the chain. This is enforced
+	// by the raw_decoder initialization.
+	assert(filters[1].init == NULL);
+
+	return lzma_lz_decoder_init(next, allocator, filters,
+			&lzma_decoder_init);
+}
+
+
+extern bool
+lzma_lzma_lclppb_decode(lzma_options_lzma *options, uint8_t byte)
+{
+	if (byte > (4 * 5 + 4) * 9 + 8)
+		return true;
+
+	// See the file format specification to understand this.
+	options->pb = byte / (9 * 5);
+	byte -= options->pb * 9 * 5;
+	options->lp = byte / 9;
+	options->lc = byte - options->lp * 9;
+
+	return options->lc + options->lp > LZMA_LCLP_MAX;
+}
+
+
+extern uint64_t
+lzma_lzma_decoder_memusage_nocheck(const void *options)
+{
+	const lzma_options_lzma *const opt = options;
+	return sizeof(lzma_lzma1_decoder)
+			+ lzma_lz_decoder_memusage(opt->dict_size);
+}
+
+
+extern uint64_t
+lzma_lzma_decoder_memusage(const void *options)
+{
+	if (!is_lclppb_valid(options))
+		return UINT64_MAX;
+
+	return lzma_lzma_decoder_memusage_nocheck(options);
+}
+
+
+extern lzma_ret
+lzma_lzma_props_decode(void **options, const lzma_allocator *allocator,
+		const uint8_t *props, size_t props_size)
+{
+	if (props_size != 5)
+		return LZMA_OPTIONS_ERROR;
+
+	lzma_options_lzma *opt
+			= lzma_alloc(sizeof(lzma_options_lzma), allocator);
+	if (opt == NULL)
+		return LZMA_MEM_ERROR;
+
+	if (lzma_lzma_lclppb_decode(opt, props[0]))
+		goto error;
+
+	// All dictionary sizes are accepted, including zero. LZ decoder
+	// will automatically use a dictionary at least a few KiB even if
+	// a smaller dictionary is requested.
+	opt->dict_size = unaligned_read32le(props + 1);
+
+	opt->preset_dict = NULL;
+	opt->preset_dict_size = 0;
+
+	*options = opt;
+
+	return LZMA_OK;
+
+error:
+	lzma_free(opt, allocator);
+	return LZMA_OPTIONS_ERROR;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/lzma_decoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/lzma_decoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,52 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_decoder.h
-/// \brief      LZMA decoder API
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZMA_DECODER_H
-#define LZMA_LZMA_DECODER_H
-
-#include "common.h"
-
-
-/// Allocates and initializes LZMA decoder
-extern lzma_ret lzma_lzma_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern uint64_t lzma_lzma_decoder_memusage(const void *options);
-
-extern lzma_ret lzma_lzma_props_decode(
-		void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size);
-
-
-/// \brief      Decodes the LZMA Properties byte (lc/lp/pb)
-///
-/// \return     true if error occurred, false on success
-///
-extern bool lzma_lzma_lclppb_decode(
-		lzma_options_lzma *options, uint8_t byte);
-
-
-#ifdef LZMA_LZ_DECODER_H
-/// Allocate and setup function pointers only. This is used by LZMA1 and
-/// LZMA2 decoders.
-extern lzma_ret lzma_lzma_decoder_create(
-		lzma_lz_decoder *lz, lzma_allocator *allocator,
-		const void *opt, lzma_lz_options *lz_options);
-
-/// Gets memory usage without validating lc/lp/pb. This is used by LZMA2
-/// decoder, because raw LZMA2 decoding doesn't need lc/lp/pb.
-extern uint64_t lzma_lzma_decoder_memusage_nocheck(const void *options);
-
-#endif
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/lzma/lzma_decoder.h (from rev 9176, vendor/xz/dist/src/liblzma/lzma/lzma_decoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lzma/lzma_decoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,53 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lzma_decoder.h
+/// \brief      LZMA decoder API
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZMA_DECODER_H
+#define LZMA_LZMA_DECODER_H
+
+#include "common.h"
+
+
+/// Allocates and initializes LZMA decoder
+extern lzma_ret lzma_lzma_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+extern uint64_t lzma_lzma_decoder_memusage(const void *options);
+
+extern lzma_ret lzma_lzma_props_decode(
+		void **options, const lzma_allocator *allocator,
+		const uint8_t *props, size_t props_size);
+
+
+/// \brief      Decodes the LZMA Properties byte (lc/lp/pb)
+///
+/// \return     true if error occurred, false on success
+///
+extern bool lzma_lzma_lclppb_decode(
+		lzma_options_lzma *options, uint8_t byte);
+
+
+#ifdef LZMA_LZ_DECODER_H
+/// Allocate and setup function pointers only. This is used by LZMA1 and
+/// LZMA2 decoders.
+extern lzma_ret lzma_lzma_decoder_create(
+		lzma_lz_decoder *lz, const lzma_allocator *allocator,
+		const void *opt, lzma_lz_options *lz_options);
+
+/// Gets memory usage without validating lc/lp/pb. This is used by LZMA2
+/// decoder, because raw LZMA2 decoding doesn't need lc/lp/pb.
+extern uint64_t lzma_lzma_decoder_memusage_nocheck(const void *options);
+
+#endif
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/lzma_encoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,675 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_encoder.c
-/// \brief      LZMA encoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lzma2_encoder.h"
-#include "lzma_encoder_private.h"
-#include "fastpos.h"
-
-
-/////////////
-// Literal //
-/////////////
-
-static inline void
-literal_matched(lzma_range_encoder *rc, probability *subcoder,
-		uint32_t match_byte, uint32_t symbol)
-{
-	uint32_t offset = 0x100;
-	symbol += UINT32_C(1) << 8;
-
-	do {
-		match_byte <<= 1;
-		const uint32_t match_bit = match_byte & offset;
-		const uint32_t subcoder_index
-				= offset + match_bit + (symbol >> 8);
-		const uint32_t bit = (symbol >> 7) & 1;
-		rc_bit(rc, &subcoder[subcoder_index], bit);
-
-		symbol <<= 1;
-		offset &= ~(match_byte ^ symbol);
-
-	} while (symbol < (UINT32_C(1) << 16));
-}
-
-
-static inline void
-literal(lzma_coder *coder, lzma_mf *mf, uint32_t position)
-{
-	// Locate the literal byte to be encoded and the subcoder.
-	const uint8_t cur_byte = mf->buffer[
-			mf->read_pos - mf->read_ahead];
-	probability *subcoder = literal_subcoder(coder->literal,
-			coder->literal_context_bits, coder->literal_pos_mask,
-			position, mf->buffer[mf->read_pos - mf->read_ahead - 1]);
-
-	if (is_literal_state(coder->state)) {
-		// Previous LZMA-symbol was a literal. Encode a normal
-		// literal without a match byte.
-		rc_bittree(&coder->rc, subcoder, 8, cur_byte);
-	} else {
-		// Previous LZMA-symbol was a match. Use the last byte of
-		// the match as a "match byte". That is, compare the bits
-		// of the current literal and the match byte.
-		const uint8_t match_byte = mf->buffer[
-				mf->read_pos - coder->reps[0] - 1
-				- mf->read_ahead];
-		literal_matched(&coder->rc, subcoder, match_byte, cur_byte);
-	}
-
-	update_literal(coder->state);
-}
-
-
-//////////////////
-// Match length //
-//////////////////
-
-static void
-length_update_prices(lzma_length_encoder *lc, const uint32_t pos_state)
-{
-	const uint32_t table_size = lc->table_size;
-	lc->counters[pos_state] = table_size;
-
-	const uint32_t a0 = rc_bit_0_price(lc->choice);
-	const uint32_t a1 = rc_bit_1_price(lc->choice);
-	const uint32_t b0 = a1 + rc_bit_0_price(lc->choice2);
-	const uint32_t b1 = a1 + rc_bit_1_price(lc->choice2);
-	uint32_t *const prices = lc->prices[pos_state];
-
-	uint32_t i;
-	for (i = 0; i < table_size && i < LEN_LOW_SYMBOLS; ++i)
-		prices[i] = a0 + rc_bittree_price(lc->low[pos_state],
-				LEN_LOW_BITS, i);
-
-	for (; i < table_size && i < LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS; ++i)
-		prices[i] = b0 + rc_bittree_price(lc->mid[pos_state],
-				LEN_MID_BITS, i - LEN_LOW_SYMBOLS);
-
-	for (; i < table_size; ++i)
-		prices[i] = b1 + rc_bittree_price(lc->high, LEN_HIGH_BITS,
-				i - LEN_LOW_SYMBOLS - LEN_MID_SYMBOLS);
-
-	return;
-}
-
-
-static inline void
-length(lzma_range_encoder *rc, lzma_length_encoder *lc,
-		const uint32_t pos_state, uint32_t len, const bool fast_mode)
-{
-	assert(len <= MATCH_LEN_MAX);
-	len -= MATCH_LEN_MIN;
-
-	if (len < LEN_LOW_SYMBOLS) {
-		rc_bit(rc, &lc->choice, 0);
-		rc_bittree(rc, lc->low[pos_state], LEN_LOW_BITS, len);
-	} else {
-		rc_bit(rc, &lc->choice, 1);
-		len -= LEN_LOW_SYMBOLS;
-
-		if (len < LEN_MID_SYMBOLS) {
-			rc_bit(rc, &lc->choice2, 0);
-			rc_bittree(rc, lc->mid[pos_state], LEN_MID_BITS, len);
-		} else {
-			rc_bit(rc, &lc->choice2, 1);
-			len -= LEN_MID_SYMBOLS;
-			rc_bittree(rc, lc->high, LEN_HIGH_BITS, len);
-		}
-	}
-
-	// Only getoptimum uses the prices so don't update the table when
-	// in fast mode.
-	if (!fast_mode)
-		if (--lc->counters[pos_state] == 0)
-			length_update_prices(lc, pos_state);
-}
-
-
-///////////
-// Match //
-///////////
-
-static inline void
-match(lzma_coder *coder, const uint32_t pos_state,
-		const uint32_t distance, const uint32_t len)
-{
-	update_match(coder->state);
-
-	length(&coder->rc, &coder->match_len_encoder, pos_state, len,
-			coder->fast_mode);
-
-	const uint32_t pos_slot = get_pos_slot(distance);
-	const uint32_t len_to_pos_state = get_len_to_pos_state(len);
-	rc_bittree(&coder->rc, coder->pos_slot[len_to_pos_state],
-			POS_SLOT_BITS, pos_slot);
-
-	if (pos_slot >= START_POS_MODEL_INDEX) {
-		const uint32_t footer_bits = (pos_slot >> 1) - 1;
-		const uint32_t base = (2 | (pos_slot & 1)) << footer_bits;
-		const uint32_t pos_reduced = distance - base;
-
-		if (pos_slot < END_POS_MODEL_INDEX) {
-			// Careful here: base - pos_slot - 1 can be -1, but
-			// rc_bittree_reverse starts at probs[1], not probs[0].
-			rc_bittree_reverse(&coder->rc,
-				coder->pos_special + base - pos_slot - 1,
-				footer_bits, pos_reduced);
-		} else {
-			rc_direct(&coder->rc, pos_reduced >> ALIGN_BITS,
-					footer_bits - ALIGN_BITS);
-			rc_bittree_reverse(
-					&coder->rc, coder->pos_align,
-					ALIGN_BITS, pos_reduced & ALIGN_MASK);
-			++coder->align_price_count;
-		}
-	}
-
-	coder->reps[3] = coder->reps[2];
-	coder->reps[2] = coder->reps[1];
-	coder->reps[1] = coder->reps[0];
-	coder->reps[0] = distance;
-	++coder->match_price_count;
-}
-
-
-////////////////////
-// Repeated match //
-////////////////////
-
-static inline void
-rep_match(lzma_coder *coder, const uint32_t pos_state,
-		const uint32_t rep, const uint32_t len)
-{
-	if (rep == 0) {
-		rc_bit(&coder->rc, &coder->is_rep0[coder->state], 0);
-		rc_bit(&coder->rc,
-				&coder->is_rep0_long[coder->state][pos_state],
-				len != 1);
-	} else {
-		const uint32_t distance = coder->reps[rep];
-		rc_bit(&coder->rc, &coder->is_rep0[coder->state], 1);
-
-		if (rep == 1) {
-			rc_bit(&coder->rc, &coder->is_rep1[coder->state], 0);
-		} else {
-			rc_bit(&coder->rc, &coder->is_rep1[coder->state], 1);
-			rc_bit(&coder->rc, &coder->is_rep2[coder->state],
-					rep - 2);
-
-			if (rep == 3)
-				coder->reps[3] = coder->reps[2];
-
-			coder->reps[2] = coder->reps[1];
-		}
-
-		coder->reps[1] = coder->reps[0];
-		coder->reps[0] = distance;
-	}
-
-	if (len == 1) {
-		update_short_rep(coder->state);
-	} else {
-		length(&coder->rc, &coder->rep_len_encoder, pos_state, len,
-				coder->fast_mode);
-		update_long_rep(coder->state);
-	}
-}
-
-
-//////////
-// Main //
-//////////
-
-static void
-encode_symbol(lzma_coder *coder, lzma_mf *mf,
-		uint32_t back, uint32_t len, uint32_t position)
-{
-	const uint32_t pos_state = position & coder->pos_mask;
-
-	if (back == UINT32_MAX) {
-		// Literal i.e. eight-bit byte
-		assert(len == 1);
-		rc_bit(&coder->rc,
-				&coder->is_match[coder->state][pos_state], 0);
-		literal(coder, mf, position);
-	} else {
-		// Some type of match
-		rc_bit(&coder->rc,
-			&coder->is_match[coder->state][pos_state], 1);
-
-		if (back < REP_DISTANCES) {
-			// It's a repeated match i.e. the same distance
-			// has been used earlier.
-			rc_bit(&coder->rc, &coder->is_rep[coder->state], 1);
-			rep_match(coder, pos_state, back, len);
-		} else {
-			// Normal match
-			rc_bit(&coder->rc, &coder->is_rep[coder->state], 0);
-			match(coder, pos_state, back - REP_DISTANCES, len);
-		}
-	}
-
-	assert(mf->read_ahead >= len);
-	mf->read_ahead -= len;
-}
-
-
-static bool
-encode_init(lzma_coder *coder, lzma_mf *mf)
-{
-	assert(mf_position(mf) == 0);
-
-	if (mf->read_pos == mf->read_limit) {
-		if (mf->action == LZMA_RUN)
-			return false; // We cannot do anything.
-
-		// We are finishing (we cannot get here when flushing).
-		assert(mf->write_pos == mf->read_pos);
-		assert(mf->action == LZMA_FINISH);
-	} else {
-		// Do the actual initialization. The first LZMA symbol must
-		// always be a literal.
-		mf_skip(mf, 1);
-		mf->read_ahead = 0;
-		rc_bit(&coder->rc, &coder->is_match[0][0], 0);
-		rc_bittree(&coder->rc, coder->literal[0], 8, mf->buffer[0]);
-	}
-
-	// Initialization is done (except if empty file).
-	coder->is_initialized = true;
-
-	return true;
-}
-
-
-static void
-encode_eopm(lzma_coder *coder, uint32_t position)
-{
-	const uint32_t pos_state = position & coder->pos_mask;
-	rc_bit(&coder->rc, &coder->is_match[coder->state][pos_state], 1);
-	rc_bit(&coder->rc, &coder->is_rep[coder->state], 0);
-	match(coder, pos_state, UINT32_MAX, MATCH_LEN_MIN);
-}
-
-
-/// Number of bytes that a single encoding loop in lzma_lzma_encode() can
-/// consume from the dictionary. This limit comes from lzma_lzma_optimum()
-/// and may need to be updated if that function is significantly modified.
-#define LOOP_INPUT_MAX (OPTS + 1)
-
-
-extern lzma_ret
-lzma_lzma_encode(lzma_coder *restrict coder, lzma_mf *restrict mf,
-		uint8_t *restrict out, size_t *restrict out_pos,
-		size_t out_size, uint32_t limit)
-{
-	// Initialize the stream if no data has been encoded yet.
-	if (!coder->is_initialized && !encode_init(coder, mf))
-		return LZMA_OK;
-
-	// Get the lowest bits of the uncompressed offset from the LZ layer.
-	uint32_t position = mf_position(mf);
-
-	while (true) {
-		// Encode pending bits, if any. Calling this before encoding
-		// the next symbol is needed only with plain LZMA, since
-		// LZMA2 always provides big enough buffer to flush
-		// everything out from the range encoder. For the same reason,
-		// rc_encode() never returns true when this function is used
-		// as part of LZMA2 encoder.
-		if (rc_encode(&coder->rc, out, out_pos, out_size)) {
-			assert(limit == UINT32_MAX);
-			return LZMA_OK;
-		}
-
-		// With LZMA2 we need to take care that compressed size of
-		// a chunk doesn't get too big.
-		// FIXME? Check if this could be improved.
-		if (limit != UINT32_MAX
-				&& (mf->read_pos - mf->read_ahead >= limit
-					|| *out_pos + rc_pending(&coder->rc)
-						>= LZMA2_CHUNK_MAX
-							- LOOP_INPUT_MAX))
-			break;
-
-		// Check that there is some input to process.
-		if (mf->read_pos >= mf->read_limit) {
-			if (mf->action == LZMA_RUN)
-				return LZMA_OK;
-
-			if (mf->read_ahead == 0)
-				break;
-		}
-
-		// Get optimal match (repeat position and length).
-		// Value ranges for pos:
-		//   - [0, REP_DISTANCES): repeated match
-		//   - [REP_DISTANCES, UINT32_MAX):
-		//     match at (pos - REP_DISTANCES)
-		//   - UINT32_MAX: not a match but a literal
-		// Value ranges for len:
-		//   - [MATCH_LEN_MIN, MATCH_LEN_MAX]
-		uint32_t len;
-		uint32_t back;
-
-		if (coder->fast_mode)
-			lzma_lzma_optimum_fast(coder, mf, &back, &len);
-		else
-			lzma_lzma_optimum_normal(
-					coder, mf, &back, &len, position);
-
-		encode_symbol(coder, mf, back, len, position);
-
-		position += len;
-	}
-
-	if (!coder->is_flushed) {
-		coder->is_flushed = true;
-
-		// We don't support encoding plain LZMA streams without EOPM,
-		// and LZMA2 doesn't use EOPM at LZMA level.
-		if (limit == UINT32_MAX)
-			encode_eopm(coder, position);
-
-		// Flush the remaining bytes from the range encoder.
-		rc_flush(&coder->rc);
-
-		// Copy the remaining bytes to the output buffer. If there
-		// isn't enough output space, we will copy out the remaining
-		// bytes on the next call to this function by using
-		// the rc_encode() call in the encoding loop above.
-		if (rc_encode(&coder->rc, out, out_pos, out_size)) {
-			assert(limit == UINT32_MAX);
-			return LZMA_OK;
-		}
-	}
-
-	// Make it ready for the next LZMA2 chunk.
-	coder->is_flushed = false;
-
-	return LZMA_STREAM_END;
-}
-
-
-static lzma_ret
-lzma_encode(lzma_coder *restrict coder, lzma_mf *restrict mf,
-		uint8_t *restrict out, size_t *restrict out_pos,
-		size_t out_size)
-{
-	// Plain LZMA has no support for sync-flushing.
-	if (unlikely(mf->action == LZMA_SYNC_FLUSH))
-		return LZMA_OPTIONS_ERROR;
-
-	return lzma_lzma_encode(coder, mf, out, out_pos, out_size, UINT32_MAX);
-}
-
-
-////////////////////
-// Initialization //
-////////////////////
-
-static bool
-is_options_valid(const lzma_options_lzma *options)
-{
-	// Validate some of the options. LZ encoder validates nice_len too
-	// but we need a valid value here earlier.
-	return is_lclppb_valid(options)
-			&& options->nice_len >= MATCH_LEN_MIN
-			&& options->nice_len <= MATCH_LEN_MAX
-			&& (options->mode == LZMA_MODE_FAST
-				|| options->mode == LZMA_MODE_NORMAL);
-}
-
-
-static void
-set_lz_options(lzma_lz_options *lz_options, const lzma_options_lzma *options)
-{
-	// LZ encoder initialization does the validation for these so we
-	// don't need to validate here.
-	lz_options->before_size = OPTS;
-	lz_options->dict_size = options->dict_size;
-	lz_options->after_size = LOOP_INPUT_MAX;
-	lz_options->match_len_max = MATCH_LEN_MAX;
-	lz_options->nice_len = options->nice_len;
-	lz_options->match_finder = options->mf;
-	lz_options->depth = options->depth;
-	lz_options->preset_dict = options->preset_dict;
-	lz_options->preset_dict_size = options->preset_dict_size;
-	return;
-}
-
-
-static void
-length_encoder_reset(lzma_length_encoder *lencoder,
-		const uint32_t num_pos_states, const bool fast_mode)
-{
-	bit_reset(lencoder->choice);
-	bit_reset(lencoder->choice2);
-
-	for (size_t pos_state = 0; pos_state < num_pos_states; ++pos_state) {
-		bittree_reset(lencoder->low[pos_state], LEN_LOW_BITS);
-		bittree_reset(lencoder->mid[pos_state], LEN_MID_BITS);
-	}
-
-	bittree_reset(lencoder->high, LEN_HIGH_BITS);
-
-	if (!fast_mode)
-		for (size_t pos_state = 0; pos_state < num_pos_states;
-				++pos_state)
-			length_update_prices(lencoder, pos_state);
-
-	return;
-}
-
-
-extern lzma_ret
-lzma_lzma_encoder_reset(lzma_coder *coder, const lzma_options_lzma *options)
-{
-	if (!is_options_valid(options))
-		return LZMA_OPTIONS_ERROR;
-
-	coder->pos_mask = (1U << options->pb) - 1;
-	coder->literal_context_bits = options->lc;
-	coder->literal_pos_mask = (1U << options->lp) - 1;
-
-	// Range coder
-	rc_reset(&coder->rc);
-
-	// State
-	coder->state = STATE_LIT_LIT;
-	for (size_t i = 0; i < REP_DISTANCES; ++i)
-		coder->reps[i] = 0;
-
-	literal_init(coder->literal, options->lc, options->lp);
-
-	// Bit encoders
-	for (size_t i = 0; i < STATES; ++i) {
-		for (size_t j = 0; j <= coder->pos_mask; ++j) {
-			bit_reset(coder->is_match[i][j]);
-			bit_reset(coder->is_rep0_long[i][j]);
-		}
-
-		bit_reset(coder->is_rep[i]);
-		bit_reset(coder->is_rep0[i]);
-		bit_reset(coder->is_rep1[i]);
-		bit_reset(coder->is_rep2[i]);
-	}
-
-	for (size_t i = 0; i < FULL_DISTANCES - END_POS_MODEL_INDEX; ++i)
-		bit_reset(coder->pos_special[i]);
-
-	// Bit tree encoders
-	for (size_t i = 0; i < LEN_TO_POS_STATES; ++i)
-		bittree_reset(coder->pos_slot[i], POS_SLOT_BITS);
-
-	bittree_reset(coder->pos_align, ALIGN_BITS);
-
-	// Length encoders
-	length_encoder_reset(&coder->match_len_encoder,
-			1U << options->pb, coder->fast_mode);
-
-	length_encoder_reset(&coder->rep_len_encoder,
-			1U << options->pb, coder->fast_mode);
-
-	// Price counts are incremented every time appropriate probabilities
-	// are changed. price counts are set to zero when the price tables
-	// are updated, which is done when the appropriate price counts have
-	// big enough value, and lzma_mf.read_ahead == 0 which happens at
-	// least every OPTS (a few thousand) possible price count increments.
-	//
-	// By resetting price counts to UINT32_MAX / 2, we make sure that the
-	// price tables will be initialized before they will be used (since
-	// the value is definitely big enough), and that it is OK to increment
-	// price counts without risk of integer overflow (since UINT32_MAX / 2
-	// is small enough). The current code doesn't increment price counts
-	// before initializing price tables, but it maybe done in future if
-	// we add support for saving the state between LZMA2 chunks.
-	coder->match_price_count = UINT32_MAX / 2;
-	coder->align_price_count = UINT32_MAX / 2;
-
-	coder->opts_end_index = 0;
-	coder->opts_current_index = 0;
-
-	return LZMA_OK;
-}
-
-
-extern lzma_ret
-lzma_lzma_encoder_create(lzma_coder **coder_ptr, lzma_allocator *allocator,
-		const lzma_options_lzma *options, lzma_lz_options *lz_options)
-{
-	// Allocate lzma_coder if it wasn't already allocated.
-	if (*coder_ptr == NULL) {
-		*coder_ptr = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (*coder_ptr == NULL)
-			return LZMA_MEM_ERROR;
-	}
-
-	lzma_coder *coder = *coder_ptr;
-
-	// Set compression mode. We haven't validates the options yet,
-	// but it's OK here, since nothing bad happens with invalid
-	// options in the code below, and they will get rejected by
-	// lzma_lzma_encoder_reset() call at the end of this function.
-	switch (options->mode) {
-		case LZMA_MODE_FAST:
-			coder->fast_mode = true;
-			break;
-
-		case LZMA_MODE_NORMAL: {
-			coder->fast_mode = false;
-
-			// Set dist_table_size.
-			// Round the dictionary size up to next 2^n.
-			uint32_t log_size = 0;
-			while ((UINT32_C(1) << log_size) < options->dict_size)
-				++log_size;
-
-			coder->dist_table_size = log_size * 2;
-
-			// Length encoders' price table size
-			coder->match_len_encoder.table_size
-				= options->nice_len + 1 - MATCH_LEN_MIN;
-			coder->rep_len_encoder.table_size
-				= options->nice_len + 1 - MATCH_LEN_MIN;
-			break;
-		}
-
-		default:
-			return LZMA_OPTIONS_ERROR;
-	}
-
-	// We don't need to write the first byte as literal if there is
-	// a non-empty preset dictionary. encode_init() wouldn't even work
-	// if there is a non-empty preset dictionary, because encode_init()
-	// assumes that position is zero and previous byte is also zero.
-	coder->is_initialized = options->preset_dict != NULL
-			&& options->preset_dict_size > 0;
-	coder->is_flushed = false;
-
-	set_lz_options(lz_options, options);
-
-	return lzma_lzma_encoder_reset(coder, options);
-}
-
-
-static lzma_ret
-lzma_encoder_init(lzma_lz_encoder *lz, lzma_allocator *allocator,
-		const void *options, lzma_lz_options *lz_options)
-{
-	lz->code = &lzma_encode;
-	return lzma_lzma_encoder_create(
-			&lz->coder, allocator, options, lz_options);
-}
-
-
-extern lzma_ret
-lzma_lzma_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	return lzma_lz_encoder_init(
-			next, allocator, filters, &lzma_encoder_init);
-}
-
-
-extern uint64_t
-lzma_lzma_encoder_memusage(const void *options)
-{
-	if (!is_options_valid(options))
-		return UINT64_MAX;
-
-	lzma_lz_options lz_options;
-	set_lz_options(&lz_options, options);
-
-	const uint64_t lz_memusage = lzma_lz_encoder_memusage(&lz_options);
-	if (lz_memusage == UINT64_MAX)
-		return UINT64_MAX;
-
-	return (uint64_t)(sizeof(lzma_coder)) + lz_memusage;
-}
-
-
-extern bool
-lzma_lzma_lclppb_encode(const lzma_options_lzma *options, uint8_t *byte)
-{
-	if (!is_lclppb_valid(options))
-		return true;
-
-	*byte = (options->pb * 5 + options->lp) * 9 + options->lc;
-	assert(*byte <= (4 * 5 + 4) * 9 + 8);
-
-	return false;
-}
-
-
-#ifdef HAVE_ENCODER_LZMA1
-extern lzma_ret
-lzma_lzma_props_encode(const void *options, uint8_t *out)
-{
-	const lzma_options_lzma *const opt = options;
-
-	if (lzma_lzma_lclppb_encode(opt, out))
-		return LZMA_PROG_ERROR;
-
-	unaligned_write32le(out + 1, opt->dict_size);
-
-	return LZMA_OK;
-}
-#endif
-
-
-extern LZMA_API(lzma_bool)
-lzma_mode_is_supported(lzma_mode mode)
-{
-	return mode == LZMA_MODE_FAST || mode == LZMA_MODE_NORMAL;
-}

Copied: vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder.c (from rev 11013, vendor/xz/dist/src/liblzma/lzma/lzma_encoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,677 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lzma_encoder.c
+/// \brief      LZMA encoder
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lzma2_encoder.h"
+#include "lzma_encoder_private.h"
+#include "fastpos.h"
+
+
+/////////////
+// Literal //
+/////////////
+
+static inline void
+literal_matched(lzma_range_encoder *rc, probability *subcoder,
+		uint32_t match_byte, uint32_t symbol)
+{
+	uint32_t offset = 0x100;
+	symbol += UINT32_C(1) << 8;
+
+	do {
+		match_byte <<= 1;
+		const uint32_t match_bit = match_byte & offset;
+		const uint32_t subcoder_index
+				= offset + match_bit + (symbol >> 8);
+		const uint32_t bit = (symbol >> 7) & 1;
+		rc_bit(rc, &subcoder[subcoder_index], bit);
+
+		symbol <<= 1;
+		offset &= ~(match_byte ^ symbol);
+
+	} while (symbol < (UINT32_C(1) << 16));
+}
+
+
+static inline void
+literal(lzma_lzma1_encoder *coder, lzma_mf *mf, uint32_t position)
+{
+	// Locate the literal byte to be encoded and the subcoder.
+	const uint8_t cur_byte = mf->buffer[
+			mf->read_pos - mf->read_ahead];
+	probability *subcoder = literal_subcoder(coder->literal,
+			coder->literal_context_bits, coder->literal_pos_mask,
+			position, mf->buffer[mf->read_pos - mf->read_ahead - 1]);
+
+	if (is_literal_state(coder->state)) {
+		// Previous LZMA-symbol was a literal. Encode a normal
+		// literal without a match byte.
+		rc_bittree(&coder->rc, subcoder, 8, cur_byte);
+	} else {
+		// Previous LZMA-symbol was a match. Use the last byte of
+		// the match as a "match byte". That is, compare the bits
+		// of the current literal and the match byte.
+		const uint8_t match_byte = mf->buffer[
+				mf->read_pos - coder->reps[0] - 1
+				- mf->read_ahead];
+		literal_matched(&coder->rc, subcoder, match_byte, cur_byte);
+	}
+
+	update_literal(coder->state);
+}
+
+
+//////////////////
+// Match length //
+//////////////////
+
+static void
+length_update_prices(lzma_length_encoder *lc, const uint32_t pos_state)
+{
+	const uint32_t table_size = lc->table_size;
+	lc->counters[pos_state] = table_size;
+
+	const uint32_t a0 = rc_bit_0_price(lc->choice);
+	const uint32_t a1 = rc_bit_1_price(lc->choice);
+	const uint32_t b0 = a1 + rc_bit_0_price(lc->choice2);
+	const uint32_t b1 = a1 + rc_bit_1_price(lc->choice2);
+	uint32_t *const prices = lc->prices[pos_state];
+
+	uint32_t i;
+	for (i = 0; i < table_size && i < LEN_LOW_SYMBOLS; ++i)
+		prices[i] = a0 + rc_bittree_price(lc->low[pos_state],
+				LEN_LOW_BITS, i);
+
+	for (; i < table_size && i < LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS; ++i)
+		prices[i] = b0 + rc_bittree_price(lc->mid[pos_state],
+				LEN_MID_BITS, i - LEN_LOW_SYMBOLS);
+
+	for (; i < table_size; ++i)
+		prices[i] = b1 + rc_bittree_price(lc->high, LEN_HIGH_BITS,
+				i - LEN_LOW_SYMBOLS - LEN_MID_SYMBOLS);
+
+	return;
+}
+
+
+static inline void
+length(lzma_range_encoder *rc, lzma_length_encoder *lc,
+		const uint32_t pos_state, uint32_t len, const bool fast_mode)
+{
+	assert(len <= MATCH_LEN_MAX);
+	len -= MATCH_LEN_MIN;
+
+	if (len < LEN_LOW_SYMBOLS) {
+		rc_bit(rc, &lc->choice, 0);
+		rc_bittree(rc, lc->low[pos_state], LEN_LOW_BITS, len);
+	} else {
+		rc_bit(rc, &lc->choice, 1);
+		len -= LEN_LOW_SYMBOLS;
+
+		if (len < LEN_MID_SYMBOLS) {
+			rc_bit(rc, &lc->choice2, 0);
+			rc_bittree(rc, lc->mid[pos_state], LEN_MID_BITS, len);
+		} else {
+			rc_bit(rc, &lc->choice2, 1);
+			len -= LEN_MID_SYMBOLS;
+			rc_bittree(rc, lc->high, LEN_HIGH_BITS, len);
+		}
+	}
+
+	// Only getoptimum uses the prices so don't update the table when
+	// in fast mode.
+	if (!fast_mode)
+		if (--lc->counters[pos_state] == 0)
+			length_update_prices(lc, pos_state);
+}
+
+
+///////////
+// Match //
+///////////
+
+static inline void
+match(lzma_lzma1_encoder *coder, const uint32_t pos_state,
+		const uint32_t distance, const uint32_t len)
+{
+	update_match(coder->state);
+
+	length(&coder->rc, &coder->match_len_encoder, pos_state, len,
+			coder->fast_mode);
+
+	const uint32_t dist_slot = get_dist_slot(distance);
+	const uint32_t dist_state = get_dist_state(len);
+	rc_bittree(&coder->rc, coder->dist_slot[dist_state],
+			DIST_SLOT_BITS, dist_slot);
+
+	if (dist_slot >= DIST_MODEL_START) {
+		const uint32_t footer_bits = (dist_slot >> 1) - 1;
+		const uint32_t base = (2 | (dist_slot & 1)) << footer_bits;
+		const uint32_t dist_reduced = distance - base;
+
+		if (dist_slot < DIST_MODEL_END) {
+			// Careful here: base - dist_slot - 1 can be -1, but
+			// rc_bittree_reverse starts at probs[1], not probs[0].
+			rc_bittree_reverse(&coder->rc,
+				coder->dist_special + base - dist_slot - 1,
+				footer_bits, dist_reduced);
+		} else {
+			rc_direct(&coder->rc, dist_reduced >> ALIGN_BITS,
+					footer_bits - ALIGN_BITS);
+			rc_bittree_reverse(
+					&coder->rc, coder->dist_align,
+					ALIGN_BITS, dist_reduced & ALIGN_MASK);
+			++coder->align_price_count;
+		}
+	}
+
+	coder->reps[3] = coder->reps[2];
+	coder->reps[2] = coder->reps[1];
+	coder->reps[1] = coder->reps[0];
+	coder->reps[0] = distance;
+	++coder->match_price_count;
+}
+
+
+////////////////////
+// Repeated match //
+////////////////////
+
+static inline void
+rep_match(lzma_lzma1_encoder *coder, const uint32_t pos_state,
+		const uint32_t rep, const uint32_t len)
+{
+	if (rep == 0) {
+		rc_bit(&coder->rc, &coder->is_rep0[coder->state], 0);
+		rc_bit(&coder->rc,
+				&coder->is_rep0_long[coder->state][pos_state],
+				len != 1);
+	} else {
+		const uint32_t distance = coder->reps[rep];
+		rc_bit(&coder->rc, &coder->is_rep0[coder->state], 1);
+
+		if (rep == 1) {
+			rc_bit(&coder->rc, &coder->is_rep1[coder->state], 0);
+		} else {
+			rc_bit(&coder->rc, &coder->is_rep1[coder->state], 1);
+			rc_bit(&coder->rc, &coder->is_rep2[coder->state],
+					rep - 2);
+
+			if (rep == 3)
+				coder->reps[3] = coder->reps[2];
+
+			coder->reps[2] = coder->reps[1];
+		}
+
+		coder->reps[1] = coder->reps[0];
+		coder->reps[0] = distance;
+	}
+
+	if (len == 1) {
+		update_short_rep(coder->state);
+	} else {
+		length(&coder->rc, &coder->rep_len_encoder, pos_state, len,
+				coder->fast_mode);
+		update_long_rep(coder->state);
+	}
+}
+
+
+//////////
+// Main //
+//////////
+
+static void
+encode_symbol(lzma_lzma1_encoder *coder, lzma_mf *mf,
+		uint32_t back, uint32_t len, uint32_t position)
+{
+	const uint32_t pos_state = position & coder->pos_mask;
+
+	if (back == UINT32_MAX) {
+		// Literal i.e. eight-bit byte
+		assert(len == 1);
+		rc_bit(&coder->rc,
+				&coder->is_match[coder->state][pos_state], 0);
+		literal(coder, mf, position);
+	} else {
+		// Some type of match
+		rc_bit(&coder->rc,
+			&coder->is_match[coder->state][pos_state], 1);
+
+		if (back < REPS) {
+			// It's a repeated match i.e. the same distance
+			// has been used earlier.
+			rc_bit(&coder->rc, &coder->is_rep[coder->state], 1);
+			rep_match(coder, pos_state, back, len);
+		} else {
+			// Normal match
+			rc_bit(&coder->rc, &coder->is_rep[coder->state], 0);
+			match(coder, pos_state, back - REPS, len);
+		}
+	}
+
+	assert(mf->read_ahead >= len);
+	mf->read_ahead -= len;
+}
+
+
+static bool
+encode_init(lzma_lzma1_encoder *coder, lzma_mf *mf)
+{
+	assert(mf_position(mf) == 0);
+
+	if (mf->read_pos == mf->read_limit) {
+		if (mf->action == LZMA_RUN)
+			return false; // We cannot do anything.
+
+		// We are finishing (we cannot get here when flushing).
+		assert(mf->write_pos == mf->read_pos);
+		assert(mf->action == LZMA_FINISH);
+	} else {
+		// Do the actual initialization. The first LZMA symbol must
+		// always be a literal.
+		mf_skip(mf, 1);
+		mf->read_ahead = 0;
+		rc_bit(&coder->rc, &coder->is_match[0][0], 0);
+		rc_bittree(&coder->rc, coder->literal[0], 8, mf->buffer[0]);
+	}
+
+	// Initialization is done (except if empty file).
+	coder->is_initialized = true;
+
+	return true;
+}
+
+
+static void
+encode_eopm(lzma_lzma1_encoder *coder, uint32_t position)
+{
+	const uint32_t pos_state = position & coder->pos_mask;
+	rc_bit(&coder->rc, &coder->is_match[coder->state][pos_state], 1);
+	rc_bit(&coder->rc, &coder->is_rep[coder->state], 0);
+	match(coder, pos_state, UINT32_MAX, MATCH_LEN_MIN);
+}
+
+
+/// Number of bytes that a single encoding loop in lzma_lzma_encode() can
+/// consume from the dictionary. This limit comes from lzma_lzma_optimum()
+/// and may need to be updated if that function is significantly modified.
+#define LOOP_INPUT_MAX (OPTS + 1)
+
+
+extern lzma_ret
+lzma_lzma_encode(lzma_lzma1_encoder *restrict coder, lzma_mf *restrict mf,
+		uint8_t *restrict out, size_t *restrict out_pos,
+		size_t out_size, uint32_t limit)
+{
+	// Initialize the stream if no data has been encoded yet.
+	if (!coder->is_initialized && !encode_init(coder, mf))
+		return LZMA_OK;
+
+	// Get the lowest bits of the uncompressed offset from the LZ layer.
+	uint32_t position = mf_position(mf);
+
+	while (true) {
+		// Encode pending bits, if any. Calling this before encoding
+		// the next symbol is needed only with plain LZMA, since
+		// LZMA2 always provides big enough buffer to flush
+		// everything out from the range encoder. For the same reason,
+		// rc_encode() never returns true when this function is used
+		// as part of LZMA2 encoder.
+		if (rc_encode(&coder->rc, out, out_pos, out_size)) {
+			assert(limit == UINT32_MAX);
+			return LZMA_OK;
+		}
+
+		// With LZMA2 we need to take care that compressed size of
+		// a chunk doesn't get too big.
+		// FIXME? Check if this could be improved.
+		if (limit != UINT32_MAX
+				&& (mf->read_pos - mf->read_ahead >= limit
+					|| *out_pos + rc_pending(&coder->rc)
+						>= LZMA2_CHUNK_MAX
+							- LOOP_INPUT_MAX))
+			break;
+
+		// Check that there is some input to process.
+		if (mf->read_pos >= mf->read_limit) {
+			if (mf->action == LZMA_RUN)
+				return LZMA_OK;
+
+			if (mf->read_ahead == 0)
+				break;
+		}
+
+		// Get optimal match (repeat position and length).
+		// Value ranges for pos:
+		//   - [0, REPS): repeated match
+		//   - [REPS, UINT32_MAX):
+		//     match at (pos - REPS)
+		//   - UINT32_MAX: not a match but a literal
+		// Value ranges for len:
+		//   - [MATCH_LEN_MIN, MATCH_LEN_MAX]
+		uint32_t len;
+		uint32_t back;
+
+		if (coder->fast_mode)
+			lzma_lzma_optimum_fast(coder, mf, &back, &len);
+		else
+			lzma_lzma_optimum_normal(
+					coder, mf, &back, &len, position);
+
+		encode_symbol(coder, mf, back, len, position);
+
+		position += len;
+	}
+
+	if (!coder->is_flushed) {
+		coder->is_flushed = true;
+
+		// We don't support encoding plain LZMA streams without EOPM,
+		// and LZMA2 doesn't use EOPM at LZMA level.
+		if (limit == UINT32_MAX)
+			encode_eopm(coder, position);
+
+		// Flush the remaining bytes from the range encoder.
+		rc_flush(&coder->rc);
+
+		// Copy the remaining bytes to the output buffer. If there
+		// isn't enough output space, we will copy out the remaining
+		// bytes on the next call to this function by using
+		// the rc_encode() call in the encoding loop above.
+		if (rc_encode(&coder->rc, out, out_pos, out_size)) {
+			assert(limit == UINT32_MAX);
+			return LZMA_OK;
+		}
+	}
+
+	// Make it ready for the next LZMA2 chunk.
+	coder->is_flushed = false;
+
+	return LZMA_STREAM_END;
+}
+
+
+static lzma_ret
+lzma_encode(void *coder, lzma_mf *restrict mf,
+		uint8_t *restrict out, size_t *restrict out_pos,
+		size_t out_size)
+{
+	// Plain LZMA has no support for sync-flushing.
+	if (unlikely(mf->action == LZMA_SYNC_FLUSH))
+		return LZMA_OPTIONS_ERROR;
+
+	return lzma_lzma_encode(coder, mf, out, out_pos, out_size, UINT32_MAX);
+}
+
+
+////////////////////
+// Initialization //
+////////////////////
+
+static bool
+is_options_valid(const lzma_options_lzma *options)
+{
+	// Validate some of the options. LZ encoder validates nice_len too
+	// but we need a valid value here earlier.
+	return is_lclppb_valid(options)
+			&& options->nice_len >= MATCH_LEN_MIN
+			&& options->nice_len <= MATCH_LEN_MAX
+			&& (options->mode == LZMA_MODE_FAST
+				|| options->mode == LZMA_MODE_NORMAL);
+}
+
+
+static void
+set_lz_options(lzma_lz_options *lz_options, const lzma_options_lzma *options)
+{
+	// LZ encoder initialization does the validation for these so we
+	// don't need to validate here.
+	lz_options->before_size = OPTS;
+	lz_options->dict_size = options->dict_size;
+	lz_options->after_size = LOOP_INPUT_MAX;
+	lz_options->match_len_max = MATCH_LEN_MAX;
+	lz_options->nice_len = options->nice_len;
+	lz_options->match_finder = options->mf;
+	lz_options->depth = options->depth;
+	lz_options->preset_dict = options->preset_dict;
+	lz_options->preset_dict_size = options->preset_dict_size;
+	return;
+}
+
+
+static void
+length_encoder_reset(lzma_length_encoder *lencoder,
+		const uint32_t num_pos_states, const bool fast_mode)
+{
+	bit_reset(lencoder->choice);
+	bit_reset(lencoder->choice2);
+
+	for (size_t pos_state = 0; pos_state < num_pos_states; ++pos_state) {
+		bittree_reset(lencoder->low[pos_state], LEN_LOW_BITS);
+		bittree_reset(lencoder->mid[pos_state], LEN_MID_BITS);
+	}
+
+	bittree_reset(lencoder->high, LEN_HIGH_BITS);
+
+	if (!fast_mode)
+		for (uint32_t pos_state = 0; pos_state < num_pos_states;
+				++pos_state)
+			length_update_prices(lencoder, pos_state);
+
+	return;
+}
+
+
+extern lzma_ret
+lzma_lzma_encoder_reset(lzma_lzma1_encoder *coder,
+		const lzma_options_lzma *options)
+{
+	if (!is_options_valid(options))
+		return LZMA_OPTIONS_ERROR;
+
+	coder->pos_mask = (1U << options->pb) - 1;
+	coder->literal_context_bits = options->lc;
+	coder->literal_pos_mask = (1U << options->lp) - 1;
+
+	// Range coder
+	rc_reset(&coder->rc);
+
+	// State
+	coder->state = STATE_LIT_LIT;
+	for (size_t i = 0; i < REPS; ++i)
+		coder->reps[i] = 0;
+
+	literal_init(coder->literal, options->lc, options->lp);
+
+	// Bit encoders
+	for (size_t i = 0; i < STATES; ++i) {
+		for (size_t j = 0; j <= coder->pos_mask; ++j) {
+			bit_reset(coder->is_match[i][j]);
+			bit_reset(coder->is_rep0_long[i][j]);
+		}
+
+		bit_reset(coder->is_rep[i]);
+		bit_reset(coder->is_rep0[i]);
+		bit_reset(coder->is_rep1[i]);
+		bit_reset(coder->is_rep2[i]);
+	}
+
+	for (size_t i = 0; i < FULL_DISTANCES - DIST_MODEL_END; ++i)
+		bit_reset(coder->dist_special[i]);
+
+	// Bit tree encoders
+	for (size_t i = 0; i < DIST_STATES; ++i)
+		bittree_reset(coder->dist_slot[i], DIST_SLOT_BITS);
+
+	bittree_reset(coder->dist_align, ALIGN_BITS);
+
+	// Length encoders
+	length_encoder_reset(&coder->match_len_encoder,
+			1U << options->pb, coder->fast_mode);
+
+	length_encoder_reset(&coder->rep_len_encoder,
+			1U << options->pb, coder->fast_mode);
+
+	// Price counts are incremented every time appropriate probabilities
+	// are changed. price counts are set to zero when the price tables
+	// are updated, which is done when the appropriate price counts have
+	// big enough value, and lzma_mf.read_ahead == 0 which happens at
+	// least every OPTS (a few thousand) possible price count increments.
+	//
+	// By resetting price counts to UINT32_MAX / 2, we make sure that the
+	// price tables will be initialized before they will be used (since
+	// the value is definitely big enough), and that it is OK to increment
+	// price counts without risk of integer overflow (since UINT32_MAX / 2
+	// is small enough). The current code doesn't increment price counts
+	// before initializing price tables, but it maybe done in future if
+	// we add support for saving the state between LZMA2 chunks.
+	coder->match_price_count = UINT32_MAX / 2;
+	coder->align_price_count = UINT32_MAX / 2;
+
+	coder->opts_end_index = 0;
+	coder->opts_current_index = 0;
+
+	return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_lzma_encoder_create(void **coder_ptr,
+		const lzma_allocator *allocator,
+		const lzma_options_lzma *options, lzma_lz_options *lz_options)
+{
+	// Allocate lzma_lzma1_encoder if it wasn't already allocated.
+	if (*coder_ptr == NULL) {
+		*coder_ptr = lzma_alloc(sizeof(lzma_lzma1_encoder), allocator);
+		if (*coder_ptr == NULL)
+			return LZMA_MEM_ERROR;
+	}
+
+	lzma_lzma1_encoder *coder = *coder_ptr;
+
+	// Set compression mode. We haven't validates the options yet,
+	// but it's OK here, since nothing bad happens with invalid
+	// options in the code below, and they will get rejected by
+	// lzma_lzma_encoder_reset() call at the end of this function.
+	switch (options->mode) {
+		case LZMA_MODE_FAST:
+			coder->fast_mode = true;
+			break;
+
+		case LZMA_MODE_NORMAL: {
+			coder->fast_mode = false;
+
+			// Set dist_table_size.
+			// Round the dictionary size up to next 2^n.
+			uint32_t log_size = 0;
+			while ((UINT32_C(1) << log_size) < options->dict_size)
+				++log_size;
+
+			coder->dist_table_size = log_size * 2;
+
+			// Length encoders' price table size
+			coder->match_len_encoder.table_size
+				= options->nice_len + 1 - MATCH_LEN_MIN;
+			coder->rep_len_encoder.table_size
+				= options->nice_len + 1 - MATCH_LEN_MIN;
+			break;
+		}
+
+		default:
+			return LZMA_OPTIONS_ERROR;
+	}
+
+	// We don't need to write the first byte as literal if there is
+	// a non-empty preset dictionary. encode_init() wouldn't even work
+	// if there is a non-empty preset dictionary, because encode_init()
+	// assumes that position is zero and previous byte is also zero.
+	coder->is_initialized = options->preset_dict != NULL
+			&& options->preset_dict_size > 0;
+	coder->is_flushed = false;
+
+	set_lz_options(lz_options, options);
+
+	return lzma_lzma_encoder_reset(coder, options);
+}
+
+
+static lzma_ret
+lzma_encoder_init(lzma_lz_encoder *lz, const lzma_allocator *allocator,
+		const void *options, lzma_lz_options *lz_options)
+{
+	lz->code = &lzma_encode;
+	return lzma_lzma_encoder_create(
+			&lz->coder, allocator, options, lz_options);
+}
+
+
+extern lzma_ret
+lzma_lzma_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	return lzma_lz_encoder_init(
+			next, allocator, filters, &lzma_encoder_init);
+}
+
+
+extern uint64_t
+lzma_lzma_encoder_memusage(const void *options)
+{
+	if (!is_options_valid(options))
+		return UINT64_MAX;
+
+	lzma_lz_options lz_options;
+	set_lz_options(&lz_options, options);
+
+	const uint64_t lz_memusage = lzma_lz_encoder_memusage(&lz_options);
+	if (lz_memusage == UINT64_MAX)
+		return UINT64_MAX;
+
+	return (uint64_t)(sizeof(lzma_lzma1_encoder)) + lz_memusage;
+}
+
+
+extern bool
+lzma_lzma_lclppb_encode(const lzma_options_lzma *options, uint8_t *byte)
+{
+	if (!is_lclppb_valid(options))
+		return true;
+
+	*byte = (options->pb * 5 + options->lp) * 9 + options->lc;
+	assert(*byte <= (4 * 5 + 4) * 9 + 8);
+
+	return false;
+}
+
+
+#ifdef HAVE_ENCODER_LZMA1
+extern lzma_ret
+lzma_lzma_props_encode(const void *options, uint8_t *out)
+{
+	const lzma_options_lzma *const opt = options;
+
+	if (lzma_lzma_lclppb_encode(opt, out))
+		return LZMA_PROG_ERROR;
+
+	unaligned_write32le(out + 1, opt->dict_size);
+
+	return LZMA_OK;
+}
+#endif
+
+
+extern LZMA_API(lzma_bool)
+lzma_mode_is_supported(lzma_mode mode)
+{
+	return mode == LZMA_MODE_FAST || mode == LZMA_MODE_NORMAL;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/lzma_encoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,54 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_encoder.h
-/// \brief      LZMA encoder API
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZMA_ENCODER_H
-#define LZMA_LZMA_ENCODER_H
-
-#include "common.h"
-
-
-extern lzma_ret lzma_lzma_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-
-extern uint64_t lzma_lzma_encoder_memusage(const void *options);
-
-extern lzma_ret lzma_lzma_props_encode(const void *options, uint8_t *out);
-
-
-/// Encodes lc/lp/pb into one byte. Returns false on success and true on error.
-extern bool lzma_lzma_lclppb_encode(
-		const lzma_options_lzma *options, uint8_t *byte);
-
-
-#ifdef LZMA_LZ_ENCODER_H
-
-/// Initializes raw LZMA encoder; this is used by LZMA2.
-extern lzma_ret lzma_lzma_encoder_create(
-		lzma_coder **coder_ptr, lzma_allocator *allocator,
-		const lzma_options_lzma *options, lzma_lz_options *lz_options);
-
-
-/// Resets an already initialized LZMA encoder; this is used by LZMA2.
-extern lzma_ret lzma_lzma_encoder_reset(
-		lzma_coder *coder, const lzma_options_lzma *options);
-
-
-extern lzma_ret lzma_lzma_encode(lzma_coder *restrict coder,
-		lzma_mf *restrict mf, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size,
-		uint32_t read_limit);
-
-#endif
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder.h (from rev 11013, vendor/xz/dist/src/liblzma/lzma/lzma_encoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,58 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lzma_encoder.h
+/// \brief      LZMA encoder API
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZMA_ENCODER_H
+#define LZMA_LZMA_ENCODER_H
+
+#include "common.h"
+
+
+typedef struct lzma_lzma1_encoder_s lzma_lzma1_encoder;
+
+
+extern lzma_ret lzma_lzma_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+
+extern uint64_t lzma_lzma_encoder_memusage(const void *options);
+
+extern lzma_ret lzma_lzma_props_encode(const void *options, uint8_t *out);
+
+
+/// Encodes lc/lp/pb into one byte. Returns false on success and true on error.
+extern bool lzma_lzma_lclppb_encode(
+		const lzma_options_lzma *options, uint8_t *byte);
+
+
+#ifdef LZMA_LZ_ENCODER_H
+
+/// Initializes raw LZMA encoder; this is used by LZMA2.
+extern lzma_ret lzma_lzma_encoder_create(
+		void **coder_ptr, const lzma_allocator *allocator,
+		const lzma_options_lzma *options, lzma_lz_options *lz_options);
+
+
+/// Resets an already initialized LZMA encoder; this is used by LZMA2.
+extern lzma_ret lzma_lzma_encoder_reset(
+		lzma_lzma1_encoder *coder, const lzma_options_lzma *options);
+
+
+extern lzma_ret lzma_lzma_encode(lzma_lzma1_encoder *restrict coder,
+		lzma_mf *restrict mf, uint8_t *restrict out,
+		size_t *restrict out_pos, size_t out_size,
+		uint32_t read_limit);
+
+#endif
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_optimum_fast.c
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/lzma_encoder_optimum_fast.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_optimum_fast.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,179 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_encoder_optimum_fast.c
-//
-//  Author:     Igor Pavlov
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lzma_encoder_private.h"
-
-
-#define change_pair(small_dist, big_dist) \
-	(((big_dist) >> 7) > (small_dist))
-
-
-extern void
-lzma_lzma_optimum_fast(lzma_coder *restrict coder, lzma_mf *restrict mf,
-		uint32_t *restrict back_res, uint32_t *restrict len_res)
-{
-	const uint32_t nice_len = mf->nice_len;
-
-	uint32_t len_main;
-	uint32_t matches_count;
-	if (mf->read_ahead == 0) {
-		len_main = mf_find(mf, &matches_count, coder->matches);
-	} else {
-		assert(mf->read_ahead == 1);
-		len_main = coder->longest_match_length;
-		matches_count = coder->matches_count;
-	}
-
-	const uint8_t *buf = mf_ptr(mf) - 1;
-	const uint32_t buf_avail = my_min(mf_avail(mf) + 1, MATCH_LEN_MAX);
-
-	if (buf_avail < 2) {
-		// There's not enough input left to encode a match.
-		*back_res = UINT32_MAX;
-		*len_res = 1;
-		return;
-	}
-
-	// Look for repeated matches; scan the previous four match distances
-	uint32_t rep_len = 0;
-	uint32_t rep_index = 0;
-
-	for (uint32_t i = 0; i < REP_DISTANCES; ++i) {
-		// Pointer to the beginning of the match candidate
-		const uint8_t *const buf_back = buf - coder->reps[i] - 1;
-
-		// If the first two bytes (2 == MATCH_LEN_MIN) do not match,
-		// this rep is not useful.
-		if (not_equal_16(buf, buf_back))
-			continue;
-
-		// The first two bytes matched.
-		// Calculate the length of the match.
-		uint32_t len;
-		for (len = 2; len < buf_avail
-				&& buf[len] == buf_back[len]; ++len) ;
-
-		// If we have found a repeated match that is at least
-		// nice_len long, return it immediately.
-		if (len >= nice_len) {
-			*back_res = i;
-			*len_res = len;
-			mf_skip(mf, len - 1);
-			return;
-		}
-
-		if (len > rep_len) {
-			rep_index = i;
-			rep_len = len;
-		}
-	}
-
-	// We didn't find a long enough repeated match. Encode it as a normal
-	// match if the match length is at least nice_len.
-	if (len_main >= nice_len) {
-		*back_res = coder->matches[matches_count - 1].dist
-				+ REP_DISTANCES;
-		*len_res = len_main;
-		mf_skip(mf, len_main - 1);
-		return;
-	}
-
-	uint32_t back_main = 0;
-	if (len_main >= 2) {
-		back_main = coder->matches[matches_count - 1].dist;
-
-		while (matches_count > 1 && len_main ==
-				coder->matches[matches_count - 2].len + 1) {
-			if (!change_pair(coder->matches[
-						matches_count - 2].dist,
-					back_main))
-				break;
-
-			--matches_count;
-			len_main = coder->matches[matches_count - 1].len;
-			back_main = coder->matches[matches_count - 1].dist;
-		}
-
-		if (len_main == 2 && back_main >= 0x80)
-			len_main = 1;
-	}
-
-	if (rep_len >= 2) {
-		if (rep_len + 1 >= len_main
-				|| (rep_len + 2 >= len_main
-					&& back_main > (UINT32_C(1) << 9))
-				|| (rep_len + 3 >= len_main
-					&& back_main > (UINT32_C(1) << 15))) {
-			*back_res = rep_index;
-			*len_res = rep_len;
-			mf_skip(mf, rep_len - 1);
-			return;
-		}
-	}
-
-	if (len_main < 2 || buf_avail <= 2) {
-		*back_res = UINT32_MAX;
-		*len_res = 1;
-		return;
-	}
-
-	// Get the matches for the next byte. If we find a better match,
-	// the current byte is encoded as a literal.
-	coder->longest_match_length = mf_find(mf,
-			&coder->matches_count, coder->matches);
-
-	if (coder->longest_match_length >= 2) {
-		const uint32_t new_dist = coder->matches[
-				coder->matches_count - 1].dist;
-
-		if ((coder->longest_match_length >= len_main
-					&& new_dist < back_main)
-				|| (coder->longest_match_length == len_main + 1
-					&& !change_pair(back_main, new_dist))
-				|| (coder->longest_match_length > len_main + 1)
-				|| (coder->longest_match_length + 1 >= len_main
-					&& len_main >= 3
-					&& change_pair(new_dist, back_main))) {
-			*back_res = UINT32_MAX;
-			*len_res = 1;
-			return;
-		}
-	}
-
-	// In contrast to LZMA SDK, dictionary could not have been moved
-	// between mf_find() calls, thus it is safe to just increment
-	// the old buf pointer instead of recalculating it with mf_ptr().
-	++buf;
-
-	const uint32_t limit = len_main - 1;
-
-	for (uint32_t i = 0; i < REP_DISTANCES; ++i) {
-		const uint8_t *const buf_back = buf - coder->reps[i] - 1;
-
-		if (not_equal_16(buf, buf_back))
-			continue;
-
-		uint32_t len;
-		for (len = 2; len < limit
-				&& buf[len] == buf_back[len]; ++len) ;
-
-		if (len >= limit) {
-			*back_res = UINT32_MAX;
-			*len_res = 1;
-			return;
-		}
-	}
-
-	*back_res = back_main + REP_DISTANCES;
-	*len_res = len_main;
-	mf_skip(mf, len_main - 2);
-	return;
-}

Copied: vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_optimum_fast.c (from rev 11013, vendor/xz/dist/src/liblzma/lzma/lzma_encoder_optimum_fast.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_optimum_fast.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_optimum_fast.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,170 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lzma_encoder_optimum_fast.c
+//
+//  Author:     Igor Pavlov
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lzma_encoder_private.h"
+#include "memcmplen.h"
+
+
+#define change_pair(small_dist, big_dist) \
+	(((big_dist) >> 7) > (small_dist))
+
+
+extern void
+lzma_lzma_optimum_fast(lzma_lzma1_encoder *restrict coder,
+		lzma_mf *restrict mf,
+		uint32_t *restrict back_res, uint32_t *restrict len_res)
+{
+	const uint32_t nice_len = mf->nice_len;
+
+	uint32_t len_main;
+	uint32_t matches_count;
+	if (mf->read_ahead == 0) {
+		len_main = mf_find(mf, &matches_count, coder->matches);
+	} else {
+		assert(mf->read_ahead == 1);
+		len_main = coder->longest_match_length;
+		matches_count = coder->matches_count;
+	}
+
+	const uint8_t *buf = mf_ptr(mf) - 1;
+	const uint32_t buf_avail = my_min(mf_avail(mf) + 1, MATCH_LEN_MAX);
+
+	if (buf_avail < 2) {
+		// There's not enough input left to encode a match.
+		*back_res = UINT32_MAX;
+		*len_res = 1;
+		return;
+	}
+
+	// Look for repeated matches; scan the previous four match distances
+	uint32_t rep_len = 0;
+	uint32_t rep_index = 0;
+
+	for (uint32_t i = 0; i < REPS; ++i) {
+		// Pointer to the beginning of the match candidate
+		const uint8_t *const buf_back = buf - coder->reps[i] - 1;
+
+		// If the first two bytes (2 == MATCH_LEN_MIN) do not match,
+		// this rep is not useful.
+		if (not_equal_16(buf, buf_back))
+			continue;
+
+		// The first two bytes matched.
+		// Calculate the length of the match.
+		const uint32_t len = lzma_memcmplen(
+				buf, buf_back, 2, buf_avail);
+
+		// If we have found a repeated match that is at least
+		// nice_len long, return it immediately.
+		if (len >= nice_len) {
+			*back_res = i;
+			*len_res = len;
+			mf_skip(mf, len - 1);
+			return;
+		}
+
+		if (len > rep_len) {
+			rep_index = i;
+			rep_len = len;
+		}
+	}
+
+	// We didn't find a long enough repeated match. Encode it as a normal
+	// match if the match length is at least nice_len.
+	if (len_main >= nice_len) {
+		*back_res = coder->matches[matches_count - 1].dist + REPS;
+		*len_res = len_main;
+		mf_skip(mf, len_main - 1);
+		return;
+	}
+
+	uint32_t back_main = 0;
+	if (len_main >= 2) {
+		back_main = coder->matches[matches_count - 1].dist;
+
+		while (matches_count > 1 && len_main ==
+				coder->matches[matches_count - 2].len + 1) {
+			if (!change_pair(coder->matches[
+						matches_count - 2].dist,
+					back_main))
+				break;
+
+			--matches_count;
+			len_main = coder->matches[matches_count - 1].len;
+			back_main = coder->matches[matches_count - 1].dist;
+		}
+
+		if (len_main == 2 && back_main >= 0x80)
+			len_main = 1;
+	}
+
+	if (rep_len >= 2) {
+		if (rep_len + 1 >= len_main
+				|| (rep_len + 2 >= len_main
+					&& back_main > (UINT32_C(1) << 9))
+				|| (rep_len + 3 >= len_main
+					&& back_main > (UINT32_C(1) << 15))) {
+			*back_res = rep_index;
+			*len_res = rep_len;
+			mf_skip(mf, rep_len - 1);
+			return;
+		}
+	}
+
+	if (len_main < 2 || buf_avail <= 2) {
+		*back_res = UINT32_MAX;
+		*len_res = 1;
+		return;
+	}
+
+	// Get the matches for the next byte. If we find a better match,
+	// the current byte is encoded as a literal.
+	coder->longest_match_length = mf_find(mf,
+			&coder->matches_count, coder->matches);
+
+	if (coder->longest_match_length >= 2) {
+		const uint32_t new_dist = coder->matches[
+				coder->matches_count - 1].dist;
+
+		if ((coder->longest_match_length >= len_main
+					&& new_dist < back_main)
+				|| (coder->longest_match_length == len_main + 1
+					&& !change_pair(back_main, new_dist))
+				|| (coder->longest_match_length > len_main + 1)
+				|| (coder->longest_match_length + 1 >= len_main
+					&& len_main >= 3
+					&& change_pair(new_dist, back_main))) {
+			*back_res = UINT32_MAX;
+			*len_res = 1;
+			return;
+		}
+	}
+
+	// In contrast to LZMA SDK, dictionary could not have been moved
+	// between mf_find() calls, thus it is safe to just increment
+	// the old buf pointer instead of recalculating it with mf_ptr().
+	++buf;
+
+	const uint32_t limit = my_max(2, len_main - 1);
+
+	for (uint32_t i = 0; i < REPS; ++i) {
+		if (memcmp(buf, buf - coder->reps[i] - 1, limit) == 0) {
+			*back_res = UINT32_MAX;
+			*len_res = 1;
+			return;
+		}
+	}
+
+	*back_res = back_main + REPS;
+	*len_res = len_main;
+	mf_skip(mf, len_main - 2);
+	return;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_optimum_normal.c
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/lzma_encoder_optimum_normal.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_optimum_normal.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,868 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_encoder_optimum_normal.c
-//
-//  Author:     Igor Pavlov
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lzma_encoder_private.h"
-#include "fastpos.h"
-
-
-////////////
-// Prices //
-////////////
-
-static uint32_t
-get_literal_price(const lzma_coder *const coder, const uint32_t pos,
-		const uint32_t prev_byte, const bool match_mode,
-		uint32_t match_byte, uint32_t symbol)
-{
-	const probability *const subcoder = literal_subcoder(coder->literal,
-			coder->literal_context_bits, coder->literal_pos_mask,
-			pos, prev_byte);
-
-	uint32_t price = 0;
-
-	if (!match_mode) {
-		price = rc_bittree_price(subcoder, 8, symbol);
-	} else {
-		uint32_t offset = 0x100;
-		symbol += UINT32_C(1) << 8;
-
-		do {
-			match_byte <<= 1;
-
-			const uint32_t match_bit = match_byte & offset;
-			const uint32_t subcoder_index
-					= offset + match_bit + (symbol >> 8);
-			const uint32_t bit = (symbol >> 7) & 1;
-			price += rc_bit_price(subcoder[subcoder_index], bit);
-
-			symbol <<= 1;
-			offset &= ~(match_byte ^ symbol);
-
-		} while (symbol < (UINT32_C(1) << 16));
-	}
-
-	return price;
-}
-
-
-static inline uint32_t
-get_len_price(const lzma_length_encoder *const lencoder,
-		const uint32_t len, const uint32_t pos_state)
-{
-	// NOTE: Unlike the other price tables, length prices are updated
-	// in lzma_encoder.c
-	return lencoder->prices[pos_state][len - MATCH_LEN_MIN];
-}
-
-
-static inline uint32_t
-get_short_rep_price(const lzma_coder *const coder,
-		const lzma_lzma_state state, const uint32_t pos_state)
-{
-	return rc_bit_0_price(coder->is_rep0[state])
-		+ rc_bit_0_price(coder->is_rep0_long[state][pos_state]);
-}
-
-
-static inline uint32_t
-get_pure_rep_price(const lzma_coder *const coder, const uint32_t rep_index,
-		const lzma_lzma_state state, uint32_t pos_state)
-{
-	uint32_t price;
-
-	if (rep_index == 0) {
-		price = rc_bit_0_price(coder->is_rep0[state]);
-		price += rc_bit_1_price(coder->is_rep0_long[state][pos_state]);
-	} else {
-		price = rc_bit_1_price(coder->is_rep0[state]);
-
-		if (rep_index == 1) {
-			price += rc_bit_0_price(coder->is_rep1[state]);
-		} else {
-			price += rc_bit_1_price(coder->is_rep1[state]);
-			price += rc_bit_price(coder->is_rep2[state],
-					rep_index - 2);
-		}
-	}
-
-	return price;
-}
-
-
-static inline uint32_t
-get_rep_price(const lzma_coder *const coder, const uint32_t rep_index,
-		const uint32_t len, const lzma_lzma_state state,
-		const uint32_t pos_state)
-{
-	return get_len_price(&coder->rep_len_encoder, len, pos_state)
-		+ get_pure_rep_price(coder, rep_index, state, pos_state);
-}
-
-
-static inline uint32_t
-get_pos_len_price(const lzma_coder *const coder, const uint32_t pos,
-		const uint32_t len, const uint32_t pos_state)
-{
-	const uint32_t len_to_pos_state = get_len_to_pos_state(len);
-	uint32_t price;
-
-	if (pos < FULL_DISTANCES) {
-		price = coder->distances_prices[len_to_pos_state][pos];
-	} else {
-		const uint32_t pos_slot = get_pos_slot_2(pos);
-		price = coder->pos_slot_prices[len_to_pos_state][pos_slot]
-				+ coder->align_prices[pos & ALIGN_MASK];
-	}
-
-	price += get_len_price(&coder->match_len_encoder, len, pos_state);
-
-	return price;
-}
-
-
-static void
-fill_distances_prices(lzma_coder *coder)
-{
-	for (uint32_t len_to_pos_state = 0;
-			len_to_pos_state < LEN_TO_POS_STATES;
-			++len_to_pos_state) {
-
-		uint32_t *const pos_slot_prices
-				= coder->pos_slot_prices[len_to_pos_state];
-
-		// Price to encode the pos_slot.
-		for (uint32_t pos_slot = 0;
-				pos_slot < coder->dist_table_size; ++pos_slot)
-			pos_slot_prices[pos_slot] = rc_bittree_price(
-					coder->pos_slot[len_to_pos_state],
-					POS_SLOT_BITS, pos_slot);
-
-		// For matches with distance >= FULL_DISTANCES, add the price
-		// of the direct bits part of the match distance. (Align bits
-		// are handled by fill_align_prices()).
-		for (uint32_t pos_slot = END_POS_MODEL_INDEX;
-				pos_slot < coder->dist_table_size; ++pos_slot)
-			pos_slot_prices[pos_slot] += rc_direct_price(
-					((pos_slot >> 1) - 1) - ALIGN_BITS);
-
-		// Distances in the range [0, 3] are fully encoded with
-		// pos_slot, so they are used for coder->distances_prices
-		// as is.
-		for (uint32_t i = 0; i < START_POS_MODEL_INDEX; ++i)
-			coder->distances_prices[len_to_pos_state][i]
-					= pos_slot_prices[i];
-	}
-
-	// Distances in the range [4, 127] depend on pos_slot and pos_special.
-	// We do this in a loop separate from the above loop to avoid
-	// redundant calls to get_pos_slot().
-	for (uint32_t i = START_POS_MODEL_INDEX; i < FULL_DISTANCES; ++i) {
-		const uint32_t pos_slot = get_pos_slot(i);
-		const uint32_t footer_bits = ((pos_slot >> 1) - 1);
-		const uint32_t base = (2 | (pos_slot & 1)) << footer_bits;
-		const uint32_t price = rc_bittree_reverse_price(
-				coder->pos_special + base - pos_slot - 1,
-				footer_bits, i - base);
-
-		for (uint32_t len_to_pos_state = 0;
-				len_to_pos_state < LEN_TO_POS_STATES;
-				++len_to_pos_state)
-			coder->distances_prices[len_to_pos_state][i]
-					= price + coder->pos_slot_prices[
-						len_to_pos_state][pos_slot];
-	}
-
-	coder->match_price_count = 0;
-	return;
-}
-
-
-static void
-fill_align_prices(lzma_coder *coder)
-{
-	for (uint32_t i = 0; i < ALIGN_TABLE_SIZE; ++i)
-		coder->align_prices[i] = rc_bittree_reverse_price(
-				coder->pos_align, ALIGN_BITS, i);
-
-	coder->align_price_count = 0;
-	return;
-}
-
-
-/////////////
-// Optimal //
-/////////////
-
-static inline void
-make_literal(lzma_optimal *optimal)
-{
-	optimal->back_prev = UINT32_MAX;
-	optimal->prev_1_is_literal = false;
-}
-
-
-static inline void
-make_short_rep(lzma_optimal *optimal)
-{
-	optimal->back_prev = 0;
-	optimal->prev_1_is_literal = false;
-}
-
-
-#define is_short_rep(optimal) \
-	((optimal).back_prev == 0)
-
-
-static void
-backward(lzma_coder *restrict coder, uint32_t *restrict len_res,
-		uint32_t *restrict back_res, uint32_t cur)
-{
-	coder->opts_end_index = cur;
-
-	uint32_t pos_mem = coder->opts[cur].pos_prev;
-	uint32_t back_mem = coder->opts[cur].back_prev;
-
-	do {
-		if (coder->opts[cur].prev_1_is_literal) {
-			make_literal(&coder->opts[pos_mem]);
-			coder->opts[pos_mem].pos_prev = pos_mem - 1;
-
-			if (coder->opts[cur].prev_2) {
-				coder->opts[pos_mem - 1].prev_1_is_literal
-						= false;
-				coder->opts[pos_mem - 1].pos_prev
-						= coder->opts[cur].pos_prev_2;
-				coder->opts[pos_mem - 1].back_prev
-						= coder->opts[cur].back_prev_2;
-			}
-		}
-
-		const uint32_t pos_prev = pos_mem;
-		const uint32_t back_cur = back_mem;
-
-		back_mem = coder->opts[pos_prev].back_prev;
-		pos_mem = coder->opts[pos_prev].pos_prev;
-
-		coder->opts[pos_prev].back_prev = back_cur;
-		coder->opts[pos_prev].pos_prev = cur;
-		cur = pos_prev;
-
-	} while (cur != 0);
-
-	coder->opts_current_index = coder->opts[0].pos_prev;
-	*len_res = coder->opts[0].pos_prev;
-	*back_res = coder->opts[0].back_prev;
-
-	return;
-}
-
-
-//////////
-// Main //
-//////////
-
-static inline uint32_t
-helper1(lzma_coder *restrict coder, lzma_mf *restrict mf,
-		uint32_t *restrict back_res, uint32_t *restrict len_res,
-		uint32_t position)
-{
-	const uint32_t nice_len = mf->nice_len;
-
-	uint32_t len_main;
-	uint32_t matches_count;
-
-	if (mf->read_ahead == 0) {
-		len_main = mf_find(mf, &matches_count, coder->matches);
-	} else {
-		assert(mf->read_ahead == 1);
-		len_main = coder->longest_match_length;
-		matches_count = coder->matches_count;
-	}
-
-	const uint32_t buf_avail = my_min(mf_avail(mf) + 1, MATCH_LEN_MAX);
-	if (buf_avail < 2) {
-		*back_res = UINT32_MAX;
-		*len_res = 1;
-		return UINT32_MAX;
-	}
-
-	const uint8_t *const buf = mf_ptr(mf) - 1;
-
-	uint32_t rep_lens[REP_DISTANCES];
-	uint32_t rep_max_index = 0;
-
-	for (uint32_t i = 0; i < REP_DISTANCES; ++i) {
-		const uint8_t *const buf_back = buf - coder->reps[i] - 1;
-
-		if (not_equal_16(buf, buf_back)) {
-			rep_lens[i] = 0;
-			continue;
-		}
-
-		uint32_t len_test;
-		for (len_test = 2; len_test < buf_avail
-				&& buf[len_test] == buf_back[len_test];
-				++len_test) ;
-
-		rep_lens[i] = len_test;
-		if (len_test > rep_lens[rep_max_index])
-			rep_max_index = i;
-	}
-
-	if (rep_lens[rep_max_index] >= nice_len) {
-		*back_res = rep_max_index;
-		*len_res = rep_lens[rep_max_index];
-		mf_skip(mf, *len_res - 1);
-		return UINT32_MAX;
-	}
-
-
-	if (len_main >= nice_len) {
-		*back_res = coder->matches[matches_count - 1].dist
-				+ REP_DISTANCES;
-		*len_res = len_main;
-		mf_skip(mf, len_main - 1);
-		return UINT32_MAX;
-	}
-
-	const uint8_t current_byte = *buf;
-	const uint8_t match_byte = *(buf - coder->reps[0] - 1);
-
-	if (len_main < 2 && current_byte != match_byte
-			&& rep_lens[rep_max_index] < 2) {
-		*back_res = UINT32_MAX;
-		*len_res = 1;
-		return UINT32_MAX;
-	}
-
-	coder->opts[0].state = coder->state;
-
-	const uint32_t pos_state = position & coder->pos_mask;
-
-	coder->opts[1].price = rc_bit_0_price(
-				coder->is_match[coder->state][pos_state])
-			+ get_literal_price(coder, position, buf[-1],
-				!is_literal_state(coder->state),
-				match_byte, current_byte);
-
-	make_literal(&coder->opts[1]);
-
-	const uint32_t match_price = rc_bit_1_price(
-			coder->is_match[coder->state][pos_state]);
-	const uint32_t rep_match_price = match_price
-			+ rc_bit_1_price(coder->is_rep[coder->state]);
-
-	if (match_byte == current_byte) {
-		const uint32_t short_rep_price = rep_match_price
-				+ get_short_rep_price(
-					coder, coder->state, pos_state);
-
-		if (short_rep_price < coder->opts[1].price) {
-			coder->opts[1].price = short_rep_price;
-			make_short_rep(&coder->opts[1]);
-		}
-	}
-
-	const uint32_t len_end = my_max(len_main, rep_lens[rep_max_index]);
-
-	if (len_end < 2) {
-		*back_res = coder->opts[1].back_prev;
-		*len_res = 1;
-		return UINT32_MAX;
-	}
-
-	coder->opts[1].pos_prev = 0;
-
-	for (uint32_t i = 0; i < REP_DISTANCES; ++i)
-		coder->opts[0].backs[i] = coder->reps[i];
-
-	uint32_t len = len_end;
-	do {
-		coder->opts[len].price = RC_INFINITY_PRICE;
-	} while (--len >= 2);
-
-
-	for (uint32_t i = 0; i < REP_DISTANCES; ++i) {
-		uint32_t rep_len = rep_lens[i];
-		if (rep_len < 2)
-			continue;
-
-		const uint32_t price = rep_match_price + get_pure_rep_price(
-				coder, i, coder->state, pos_state);
-
-		do {
-			const uint32_t cur_and_len_price = price
-					+ get_len_price(
-						&coder->rep_len_encoder,
-						rep_len, pos_state);
-
-			if (cur_and_len_price < coder->opts[rep_len].price) {
-				coder->opts[rep_len].price = cur_and_len_price;
-				coder->opts[rep_len].pos_prev = 0;
-				coder->opts[rep_len].back_prev = i;
-				coder->opts[rep_len].prev_1_is_literal = false;
-			}
-		} while (--rep_len >= 2);
-	}
-
-
-	const uint32_t normal_match_price = match_price
-			+ rc_bit_0_price(coder->is_rep[coder->state]);
-
-	len = rep_lens[0] >= 2 ? rep_lens[0] + 1 : 2;
-	if (len <= len_main) {
-		uint32_t i = 0;
-		while (len > coder->matches[i].len)
-			++i;
-
-		for(; ; ++len) {
-			const uint32_t dist = coder->matches[i].dist;
-			const uint32_t cur_and_len_price = normal_match_price
-					+ get_pos_len_price(coder,
-						dist, len, pos_state);
-
-			if (cur_and_len_price < coder->opts[len].price) {
-				coder->opts[len].price = cur_and_len_price;
-				coder->opts[len].pos_prev = 0;
-				coder->opts[len].back_prev
-						= dist + REP_DISTANCES;
-				coder->opts[len].prev_1_is_literal = false;
-			}
-
-			if (len == coder->matches[i].len)
-				if (++i == matches_count)
-					break;
-		}
-	}
-
-	return len_end;
-}
-
-
-static inline uint32_t
-helper2(lzma_coder *coder, uint32_t *reps, const uint8_t *buf,
-		uint32_t len_end, uint32_t position, const uint32_t cur,
-		const uint32_t nice_len, const uint32_t buf_avail_full)
-{
-	uint32_t matches_count = coder->matches_count;
-	uint32_t new_len = coder->longest_match_length;
-	uint32_t pos_prev = coder->opts[cur].pos_prev;
-	lzma_lzma_state state;
-
-	if (coder->opts[cur].prev_1_is_literal) {
-		--pos_prev;
-
-		if (coder->opts[cur].prev_2) {
-			state = coder->opts[coder->opts[cur].pos_prev_2].state;
-
-			if (coder->opts[cur].back_prev_2 < REP_DISTANCES)
-				update_long_rep(state);
-			else
-				update_match(state);
-
-		} else {
-			state = coder->opts[pos_prev].state;
-		}
-
-		update_literal(state);
-
-	} else {
-		state = coder->opts[pos_prev].state;
-	}
-
-	if (pos_prev == cur - 1) {
-		if (is_short_rep(coder->opts[cur]))
-			update_short_rep(state);
-		else
-			update_literal(state);
-	} else {
-		uint32_t pos;
-		if (coder->opts[cur].prev_1_is_literal
-				&& coder->opts[cur].prev_2) {
-			pos_prev = coder->opts[cur].pos_prev_2;
-			pos = coder->opts[cur].back_prev_2;
-			update_long_rep(state);
-		} else {
-			pos = coder->opts[cur].back_prev;
-			if (pos < REP_DISTANCES)
-				update_long_rep(state);
-			else
-				update_match(state);
-		}
-
-		if (pos < REP_DISTANCES) {
-			reps[0] = coder->opts[pos_prev].backs[pos];
-
-			uint32_t i;
-			for (i = 1; i <= pos; ++i)
-				reps[i] = coder->opts[pos_prev].backs[i - 1];
-
-			for (; i < REP_DISTANCES; ++i)
-				reps[i] = coder->opts[pos_prev].backs[i];
-
-		} else {
-			reps[0] = pos - REP_DISTANCES;
-
-			for (uint32_t i = 1; i < REP_DISTANCES; ++i)
-				reps[i] = coder->opts[pos_prev].backs[i - 1];
-		}
-	}
-
-	coder->opts[cur].state = state;
-
-	for (uint32_t i = 0; i < REP_DISTANCES; ++i)
-		coder->opts[cur].backs[i] = reps[i];
-
-	const uint32_t cur_price = coder->opts[cur].price;
-
-	const uint8_t current_byte = *buf;
-	const uint8_t match_byte = *(buf - reps[0] - 1);
-
-	const uint32_t pos_state = position & coder->pos_mask;
-
-	const uint32_t cur_and_1_price = cur_price
-			+ rc_bit_0_price(coder->is_match[state][pos_state])
-			+ get_literal_price(coder, position, buf[-1],
-			!is_literal_state(state), match_byte, current_byte);
-
-	bool next_is_literal = false;
-
-	if (cur_and_1_price < coder->opts[cur + 1].price) {
-		coder->opts[cur + 1].price = cur_and_1_price;
-		coder->opts[cur + 1].pos_prev = cur;
-		make_literal(&coder->opts[cur + 1]);
-		next_is_literal = true;
-	}
-
-	const uint32_t match_price = cur_price
-			+ rc_bit_1_price(coder->is_match[state][pos_state]);
-	const uint32_t rep_match_price = match_price
-			+ rc_bit_1_price(coder->is_rep[state]);
-
-	if (match_byte == current_byte
-			&& !(coder->opts[cur + 1].pos_prev < cur
-				&& coder->opts[cur + 1].back_prev == 0)) {
-
-		const uint32_t short_rep_price = rep_match_price
-				+ get_short_rep_price(coder, state, pos_state);
-
-		if (short_rep_price <= coder->opts[cur + 1].price) {
-			coder->opts[cur + 1].price = short_rep_price;
-			coder->opts[cur + 1].pos_prev = cur;
-			make_short_rep(&coder->opts[cur + 1]);
-			next_is_literal = true;
-		}
-	}
-
-	if (buf_avail_full < 2)
-		return len_end;
-
-	const uint32_t buf_avail = my_min(buf_avail_full, nice_len);
-
-	if (!next_is_literal && match_byte != current_byte) { // speed optimization
-		// try literal + rep0
-		const uint8_t *const buf_back = buf - reps[0] - 1;
-		const uint32_t limit = my_min(buf_avail_full, nice_len + 1);
-
-		uint32_t len_test = 1;
-		while (len_test < limit && buf[len_test] == buf_back[len_test])
-			++len_test;
-
-		--len_test;
-
-		if (len_test >= 2) {
-			lzma_lzma_state state_2 = state;
-			update_literal(state_2);
-
-			const uint32_t pos_state_next = (position + 1) & coder->pos_mask;
-			const uint32_t next_rep_match_price = cur_and_1_price
-					+ rc_bit_1_price(coder->is_match[state_2][pos_state_next])
-					+ rc_bit_1_price(coder->is_rep[state_2]);
-
-			//for (; len_test >= 2; --len_test) {
-			const uint32_t offset = cur + 1 + len_test;
-
-			while (len_end < offset)
-				coder->opts[++len_end].price = RC_INFINITY_PRICE;
-
-			const uint32_t cur_and_len_price = next_rep_match_price
-					+ get_rep_price(coder, 0, len_test,
-						state_2, pos_state_next);
-
-			if (cur_and_len_price < coder->opts[offset].price) {
-				coder->opts[offset].price = cur_and_len_price;
-				coder->opts[offset].pos_prev = cur + 1;
-				coder->opts[offset].back_prev = 0;
-				coder->opts[offset].prev_1_is_literal = true;
-				coder->opts[offset].prev_2 = false;
-			}
-			//}
-		}
-	}
-
-
-	uint32_t start_len = 2; // speed optimization
-
-	for (uint32_t rep_index = 0; rep_index < REP_DISTANCES; ++rep_index) {
-		const uint8_t *const buf_back = buf - reps[rep_index] - 1;
-		if (not_equal_16(buf, buf_back))
-			continue;
-
-		uint32_t len_test;
-		for (len_test = 2; len_test < buf_avail
-				&& buf[len_test] == buf_back[len_test];
-				++len_test) ;
-
-		while (len_end < cur + len_test)
-			coder->opts[++len_end].price = RC_INFINITY_PRICE;
-
-		const uint32_t len_test_temp = len_test;
-		const uint32_t price = rep_match_price + get_pure_rep_price(
-				coder, rep_index, state, pos_state);
-
-		do {
-			const uint32_t cur_and_len_price = price
-					+ get_len_price(&coder->rep_len_encoder,
-							len_test, pos_state);
-
-			if (cur_and_len_price < coder->opts[cur + len_test].price) {
-				coder->opts[cur + len_test].price = cur_and_len_price;
-				coder->opts[cur + len_test].pos_prev = cur;
-				coder->opts[cur + len_test].back_prev = rep_index;
-				coder->opts[cur + len_test].prev_1_is_literal = false;
-			}
-		} while (--len_test >= 2);
-
-		len_test = len_test_temp;
-
-		if (rep_index == 0)
-			start_len = len_test + 1;
-
-
-		uint32_t len_test_2 = len_test + 1;
-		const uint32_t limit = my_min(buf_avail_full,
-				len_test_2 + nice_len);
-		for (; len_test_2 < limit
-				&& buf[len_test_2] == buf_back[len_test_2];
-				++len_test_2) ;
-
-		len_test_2 -= len_test + 1;
-
-		if (len_test_2 >= 2) {
-			lzma_lzma_state state_2 = state;
-			update_long_rep(state_2);
-
-			uint32_t pos_state_next = (position + len_test) & coder->pos_mask;
-
-			const uint32_t cur_and_len_literal_price = price
-					+ get_len_price(&coder->rep_len_encoder,
-						len_test, pos_state)
-					+ rc_bit_0_price(coder->is_match[state_2][pos_state_next])
-					+ get_literal_price(coder, position + len_test,
-						buf[len_test - 1], true,
-						buf_back[len_test], buf[len_test]);
-
-			update_literal(state_2);
-
-			pos_state_next = (position + len_test + 1) & coder->pos_mask;
-
-			const uint32_t next_rep_match_price = cur_and_len_literal_price
-					+ rc_bit_1_price(coder->is_match[state_2][pos_state_next])
-					+ rc_bit_1_price(coder->is_rep[state_2]);
-
-			//for(; len_test_2 >= 2; len_test_2--) {
-			const uint32_t offset = cur + len_test + 1 + len_test_2;
-
-			while (len_end < offset)
-				coder->opts[++len_end].price = RC_INFINITY_PRICE;
-
-			const uint32_t cur_and_len_price = next_rep_match_price
-					+ get_rep_price(coder, 0, len_test_2,
-						state_2, pos_state_next);
-
-			if (cur_and_len_price < coder->opts[offset].price) {
-				coder->opts[offset].price = cur_and_len_price;
-				coder->opts[offset].pos_prev = cur + len_test + 1;
-				coder->opts[offset].back_prev = 0;
-				coder->opts[offset].prev_1_is_literal = true;
-				coder->opts[offset].prev_2 = true;
-				coder->opts[offset].pos_prev_2 = cur;
-				coder->opts[offset].back_prev_2 = rep_index;
-			}
-			//}
-		}
-	}
-
-
-	//for (uint32_t len_test = 2; len_test <= new_len; ++len_test)
-	if (new_len > buf_avail) {
-		new_len = buf_avail;
-
-		matches_count = 0;
-		while (new_len > coder->matches[matches_count].len)
-			++matches_count;
-
-		coder->matches[matches_count++].len = new_len;
-	}
-
-
-	if (new_len >= start_len) {
-		const uint32_t normal_match_price = match_price
-				+ rc_bit_0_price(coder->is_rep[state]);
-
-		while (len_end < cur + new_len)
-			coder->opts[++len_end].price = RC_INFINITY_PRICE;
-
-		uint32_t i = 0;
-		while (start_len > coder->matches[i].len)
-			++i;
-
-		for (uint32_t len_test = start_len; ; ++len_test) {
-			const uint32_t cur_back = coder->matches[i].dist;
-			uint32_t cur_and_len_price = normal_match_price
-					+ get_pos_len_price(coder,
-						cur_back, len_test, pos_state);
-
-			if (cur_and_len_price < coder->opts[cur + len_test].price) {
-				coder->opts[cur + len_test].price = cur_and_len_price;
-				coder->opts[cur + len_test].pos_prev = cur;
-				coder->opts[cur + len_test].back_prev
-						= cur_back + REP_DISTANCES;
-				coder->opts[cur + len_test].prev_1_is_literal = false;
-			}
-
-			if (len_test == coder->matches[i].len) {
-				// Try Match + Literal + Rep0
-				const uint8_t *const buf_back = buf - cur_back - 1;
-				uint32_t len_test_2 = len_test + 1;
-				const uint32_t limit = my_min(buf_avail_full,
-						len_test_2 + nice_len);
-
-				for (; len_test_2 < limit &&
-						buf[len_test_2] == buf_back[len_test_2];
-						++len_test_2) ;
-
-				len_test_2 -= len_test + 1;
-
-				if (len_test_2 >= 2) {
-					lzma_lzma_state state_2 = state;
-					update_match(state_2);
-					uint32_t pos_state_next
-							= (position + len_test) & coder->pos_mask;
-
-					const uint32_t cur_and_len_literal_price = cur_and_len_price
-							+ rc_bit_0_price(
-								coder->is_match[state_2][pos_state_next])
-							+ get_literal_price(coder,
-								position + len_test,
-								buf[len_test - 1],
-								true,
-								buf_back[len_test],
-								buf[len_test]);
-
-					update_literal(state_2);
-					pos_state_next = (pos_state_next + 1) & coder->pos_mask;
-
-					const uint32_t next_rep_match_price
-							= cur_and_len_literal_price
-							+ rc_bit_1_price(
-								coder->is_match[state_2][pos_state_next])
-							+ rc_bit_1_price(coder->is_rep[state_2]);
-
-					// for(; len_test_2 >= 2; --len_test_2) {
-					const uint32_t offset = cur + len_test + 1 + len_test_2;
-
-					while (len_end < offset)
-						coder->opts[++len_end].price = RC_INFINITY_PRICE;
-
-					cur_and_len_price = next_rep_match_price
-							+ get_rep_price(coder, 0, len_test_2,
-								state_2, pos_state_next);
-
-					if (cur_and_len_price < coder->opts[offset].price) {
-						coder->opts[offset].price = cur_and_len_price;
-						coder->opts[offset].pos_prev = cur + len_test + 1;
-						coder->opts[offset].back_prev = 0;
-						coder->opts[offset].prev_1_is_literal = true;
-						coder->opts[offset].prev_2 = true;
-						coder->opts[offset].pos_prev_2 = cur;
-						coder->opts[offset].back_prev_2
-								= cur_back + REP_DISTANCES;
-					}
-					//}
-				}
-
-				if (++i == matches_count)
-					break;
-			}
-		}
-	}
-
-	return len_end;
-}
-
-
-extern void
-lzma_lzma_optimum_normal(lzma_coder *restrict coder, lzma_mf *restrict mf,
-		uint32_t *restrict back_res, uint32_t *restrict len_res,
-		uint32_t position)
-{
-	// If we have symbols pending, return the next pending symbol.
-	if (coder->opts_end_index != coder->opts_current_index) {
-		assert(mf->read_ahead > 0);
-		*len_res = coder->opts[coder->opts_current_index].pos_prev
-				- coder->opts_current_index;
-		*back_res = coder->opts[coder->opts_current_index].back_prev;
-		coder->opts_current_index = coder->opts[
-				coder->opts_current_index].pos_prev;
-		return;
-	}
-
-	// Update the price tables. In LZMA SDK <= 4.60 (and possibly later)
-	// this was done in both initialization function and in the main loop.
-	// In liblzma they were moved into this single place.
-	if (mf->read_ahead == 0) {
-		if (coder->match_price_count >= (1 << 7))
-			fill_distances_prices(coder);
-
-		if (coder->align_price_count >= ALIGN_TABLE_SIZE)
-			fill_align_prices(coder);
-	}
-
-	// TODO: This needs quite a bit of cleaning still. But splitting
-	// the original function into two pieces makes it at least a little
-	// more readable, since those two parts don't share many variables.
-
-	uint32_t len_end = helper1(coder, mf, back_res, len_res, position);
-	if (len_end == UINT32_MAX)
-		return;
-
-	uint32_t reps[REP_DISTANCES];
-	memcpy(reps, coder->reps, sizeof(reps));
-
-	uint32_t cur;
-	for (cur = 1; cur < len_end; ++cur) {
-		assert(cur < OPTS);
-
-		coder->longest_match_length = mf_find(
-				mf, &coder->matches_count, coder->matches);
-
-		if (coder->longest_match_length >= mf->nice_len)
-			break;
-
-		len_end = helper2(coder, reps, mf_ptr(mf) - 1, len_end,
-				position + cur, cur, mf->nice_len,
-				my_min(mf_avail(mf) + 1, OPTS - 1 - cur));
-	}
-
-	backward(coder, len_res, back_res, cur);
-	return;
-}

Copied: vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_optimum_normal.c (from rev 11013, vendor/xz/dist/src/liblzma/lzma/lzma_encoder_optimum_normal.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_optimum_normal.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_optimum_normal.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,855 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lzma_encoder_optimum_normal.c
+//
+//  Author:     Igor Pavlov
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lzma_encoder_private.h"
+#include "fastpos.h"
+#include "memcmplen.h"
+
+
+////////////
+// Prices //
+////////////
+
+static uint32_t
+get_literal_price(const lzma_lzma1_encoder *const coder, const uint32_t pos,
+		const uint32_t prev_byte, const bool match_mode,
+		uint32_t match_byte, uint32_t symbol)
+{
+	const probability *const subcoder = literal_subcoder(coder->literal,
+			coder->literal_context_bits, coder->literal_pos_mask,
+			pos, prev_byte);
+
+	uint32_t price = 0;
+
+	if (!match_mode) {
+		price = rc_bittree_price(subcoder, 8, symbol);
+	} else {
+		uint32_t offset = 0x100;
+		symbol += UINT32_C(1) << 8;
+
+		do {
+			match_byte <<= 1;
+
+			const uint32_t match_bit = match_byte & offset;
+			const uint32_t subcoder_index
+					= offset + match_bit + (symbol >> 8);
+			const uint32_t bit = (symbol >> 7) & 1;
+			price += rc_bit_price(subcoder[subcoder_index], bit);
+
+			symbol <<= 1;
+			offset &= ~(match_byte ^ symbol);
+
+		} while (symbol < (UINT32_C(1) << 16));
+	}
+
+	return price;
+}
+
+
+static inline uint32_t
+get_len_price(const lzma_length_encoder *const lencoder,
+		const uint32_t len, const uint32_t pos_state)
+{
+	// NOTE: Unlike the other price tables, length prices are updated
+	// in lzma_encoder.c
+	return lencoder->prices[pos_state][len - MATCH_LEN_MIN];
+}
+
+
+static inline uint32_t
+get_short_rep_price(const lzma_lzma1_encoder *const coder,
+		const lzma_lzma_state state, const uint32_t pos_state)
+{
+	return rc_bit_0_price(coder->is_rep0[state])
+		+ rc_bit_0_price(coder->is_rep0_long[state][pos_state]);
+}
+
+
+static inline uint32_t
+get_pure_rep_price(const lzma_lzma1_encoder *const coder, const uint32_t rep_index,
+		const lzma_lzma_state state, uint32_t pos_state)
+{
+	uint32_t price;
+
+	if (rep_index == 0) {
+		price = rc_bit_0_price(coder->is_rep0[state]);
+		price += rc_bit_1_price(coder->is_rep0_long[state][pos_state]);
+	} else {
+		price = rc_bit_1_price(coder->is_rep0[state]);
+
+		if (rep_index == 1) {
+			price += rc_bit_0_price(coder->is_rep1[state]);
+		} else {
+			price += rc_bit_1_price(coder->is_rep1[state]);
+			price += rc_bit_price(coder->is_rep2[state],
+					rep_index - 2);
+		}
+	}
+
+	return price;
+}
+
+
+static inline uint32_t
+get_rep_price(const lzma_lzma1_encoder *const coder, const uint32_t rep_index,
+		const uint32_t len, const lzma_lzma_state state,
+		const uint32_t pos_state)
+{
+	return get_len_price(&coder->rep_len_encoder, len, pos_state)
+		+ get_pure_rep_price(coder, rep_index, state, pos_state);
+}
+
+
+static inline uint32_t
+get_dist_len_price(const lzma_lzma1_encoder *const coder, const uint32_t dist,
+		const uint32_t len, const uint32_t pos_state)
+{
+	const uint32_t dist_state = get_dist_state(len);
+	uint32_t price;
+
+	if (dist < FULL_DISTANCES) {
+		price = coder->dist_prices[dist_state][dist];
+	} else {
+		const uint32_t dist_slot = get_dist_slot_2(dist);
+		price = coder->dist_slot_prices[dist_state][dist_slot]
+				+ coder->align_prices[dist & ALIGN_MASK];
+	}
+
+	price += get_len_price(&coder->match_len_encoder, len, pos_state);
+
+	return price;
+}
+
+
+static void
+fill_dist_prices(lzma_lzma1_encoder *coder)
+{
+	for (uint32_t dist_state = 0; dist_state < DIST_STATES; ++dist_state) {
+
+		uint32_t *const dist_slot_prices
+				= coder->dist_slot_prices[dist_state];
+
+		// Price to encode the dist_slot.
+		for (uint32_t dist_slot = 0;
+				dist_slot < coder->dist_table_size; ++dist_slot)
+			dist_slot_prices[dist_slot] = rc_bittree_price(
+					coder->dist_slot[dist_state],
+					DIST_SLOT_BITS, dist_slot);
+
+		// For matches with distance >= FULL_DISTANCES, add the price
+		// of the direct bits part of the match distance. (Align bits
+		// are handled by fill_align_prices()).
+		for (uint32_t dist_slot = DIST_MODEL_END;
+				dist_slot < coder->dist_table_size;
+				++dist_slot)
+			dist_slot_prices[dist_slot] += rc_direct_price(
+					((dist_slot >> 1) - 1) - ALIGN_BITS);
+
+		// Distances in the range [0, 3] are fully encoded with
+		// dist_slot, so they are used for coder->dist_prices
+		// as is.
+		for (uint32_t i = 0; i < DIST_MODEL_START; ++i)
+			coder->dist_prices[dist_state][i]
+					= dist_slot_prices[i];
+	}
+
+	// Distances in the range [4, 127] depend on dist_slot and
+	// dist_special. We do this in a loop separate from the above
+	// loop to avoid redundant calls to get_dist_slot().
+	for (uint32_t i = DIST_MODEL_START; i < FULL_DISTANCES; ++i) {
+		const uint32_t dist_slot = get_dist_slot(i);
+		const uint32_t footer_bits = ((dist_slot >> 1) - 1);
+		const uint32_t base = (2 | (dist_slot & 1)) << footer_bits;
+		const uint32_t price = rc_bittree_reverse_price(
+				coder->dist_special + base - dist_slot - 1,
+				footer_bits, i - base);
+
+		for (uint32_t dist_state = 0; dist_state < DIST_STATES;
+				++dist_state)
+			coder->dist_prices[dist_state][i]
+					= price + coder->dist_slot_prices[
+						dist_state][dist_slot];
+	}
+
+	coder->match_price_count = 0;
+	return;
+}
+
+
+static void
+fill_align_prices(lzma_lzma1_encoder *coder)
+{
+	for (uint32_t i = 0; i < ALIGN_SIZE; ++i)
+		coder->align_prices[i] = rc_bittree_reverse_price(
+				coder->dist_align, ALIGN_BITS, i);
+
+	coder->align_price_count = 0;
+	return;
+}
+
+
+/////////////
+// Optimal //
+/////////////
+
+static inline void
+make_literal(lzma_optimal *optimal)
+{
+	optimal->back_prev = UINT32_MAX;
+	optimal->prev_1_is_literal = false;
+}
+
+
+static inline void
+make_short_rep(lzma_optimal *optimal)
+{
+	optimal->back_prev = 0;
+	optimal->prev_1_is_literal = false;
+}
+
+
+#define is_short_rep(optimal) \
+	((optimal).back_prev == 0)
+
+
+static void
+backward(lzma_lzma1_encoder *restrict coder, uint32_t *restrict len_res,
+		uint32_t *restrict back_res, uint32_t cur)
+{
+	coder->opts_end_index = cur;
+
+	uint32_t pos_mem = coder->opts[cur].pos_prev;
+	uint32_t back_mem = coder->opts[cur].back_prev;
+
+	do {
+		if (coder->opts[cur].prev_1_is_literal) {
+			make_literal(&coder->opts[pos_mem]);
+			coder->opts[pos_mem].pos_prev = pos_mem - 1;
+
+			if (coder->opts[cur].prev_2) {
+				coder->opts[pos_mem - 1].prev_1_is_literal
+						= false;
+				coder->opts[pos_mem - 1].pos_prev
+						= coder->opts[cur].pos_prev_2;
+				coder->opts[pos_mem - 1].back_prev
+						= coder->opts[cur].back_prev_2;
+			}
+		}
+
+		const uint32_t pos_prev = pos_mem;
+		const uint32_t back_cur = back_mem;
+
+		back_mem = coder->opts[pos_prev].back_prev;
+		pos_mem = coder->opts[pos_prev].pos_prev;
+
+		coder->opts[pos_prev].back_prev = back_cur;
+		coder->opts[pos_prev].pos_prev = cur;
+		cur = pos_prev;
+
+	} while (cur != 0);
+
+	coder->opts_current_index = coder->opts[0].pos_prev;
+	*len_res = coder->opts[0].pos_prev;
+	*back_res = coder->opts[0].back_prev;
+
+	return;
+}
+
+
+//////////
+// Main //
+//////////
+
+static inline uint32_t
+helper1(lzma_lzma1_encoder *restrict coder, lzma_mf *restrict mf,
+		uint32_t *restrict back_res, uint32_t *restrict len_res,
+		uint32_t position)
+{
+	const uint32_t nice_len = mf->nice_len;
+
+	uint32_t len_main;
+	uint32_t matches_count;
+
+	if (mf->read_ahead == 0) {
+		len_main = mf_find(mf, &matches_count, coder->matches);
+	} else {
+		assert(mf->read_ahead == 1);
+		len_main = coder->longest_match_length;
+		matches_count = coder->matches_count;
+	}
+
+	const uint32_t buf_avail = my_min(mf_avail(mf) + 1, MATCH_LEN_MAX);
+	if (buf_avail < 2) {
+		*back_res = UINT32_MAX;
+		*len_res = 1;
+		return UINT32_MAX;
+	}
+
+	const uint8_t *const buf = mf_ptr(mf) - 1;
+
+	uint32_t rep_lens[REPS];
+	uint32_t rep_max_index = 0;
+
+	for (uint32_t i = 0; i < REPS; ++i) {
+		const uint8_t *const buf_back = buf - coder->reps[i] - 1;
+
+		if (not_equal_16(buf, buf_back)) {
+			rep_lens[i] = 0;
+			continue;
+		}
+
+		rep_lens[i] = lzma_memcmplen(buf, buf_back, 2, buf_avail);
+
+		if (rep_lens[i] > rep_lens[rep_max_index])
+			rep_max_index = i;
+	}
+
+	if (rep_lens[rep_max_index] >= nice_len) {
+		*back_res = rep_max_index;
+		*len_res = rep_lens[rep_max_index];
+		mf_skip(mf, *len_res - 1);
+		return UINT32_MAX;
+	}
+
+
+	if (len_main >= nice_len) {
+		*back_res = coder->matches[matches_count - 1].dist + REPS;
+		*len_res = len_main;
+		mf_skip(mf, len_main - 1);
+		return UINT32_MAX;
+	}
+
+	const uint8_t current_byte = *buf;
+	const uint8_t match_byte = *(buf - coder->reps[0] - 1);
+
+	if (len_main < 2 && current_byte != match_byte
+			&& rep_lens[rep_max_index] < 2) {
+		*back_res = UINT32_MAX;
+		*len_res = 1;
+		return UINT32_MAX;
+	}
+
+	coder->opts[0].state = coder->state;
+
+	const uint32_t pos_state = position & coder->pos_mask;
+
+	coder->opts[1].price = rc_bit_0_price(
+				coder->is_match[coder->state][pos_state])
+			+ get_literal_price(coder, position, buf[-1],
+				!is_literal_state(coder->state),
+				match_byte, current_byte);
+
+	make_literal(&coder->opts[1]);
+
+	const uint32_t match_price = rc_bit_1_price(
+			coder->is_match[coder->state][pos_state]);
+	const uint32_t rep_match_price = match_price
+			+ rc_bit_1_price(coder->is_rep[coder->state]);
+
+	if (match_byte == current_byte) {
+		const uint32_t short_rep_price = rep_match_price
+				+ get_short_rep_price(
+					coder, coder->state, pos_state);
+
+		if (short_rep_price < coder->opts[1].price) {
+			coder->opts[1].price = short_rep_price;
+			make_short_rep(&coder->opts[1]);
+		}
+	}
+
+	const uint32_t len_end = my_max(len_main, rep_lens[rep_max_index]);
+
+	if (len_end < 2) {
+		*back_res = coder->opts[1].back_prev;
+		*len_res = 1;
+		return UINT32_MAX;
+	}
+
+	coder->opts[1].pos_prev = 0;
+
+	for (uint32_t i = 0; i < REPS; ++i)
+		coder->opts[0].backs[i] = coder->reps[i];
+
+	uint32_t len = len_end;
+	do {
+		coder->opts[len].price = RC_INFINITY_PRICE;
+	} while (--len >= 2);
+
+
+	for (uint32_t i = 0; i < REPS; ++i) {
+		uint32_t rep_len = rep_lens[i];
+		if (rep_len < 2)
+			continue;
+
+		const uint32_t price = rep_match_price + get_pure_rep_price(
+				coder, i, coder->state, pos_state);
+
+		do {
+			const uint32_t cur_and_len_price = price
+					+ get_len_price(
+						&coder->rep_len_encoder,
+						rep_len, pos_state);
+
+			if (cur_and_len_price < coder->opts[rep_len].price) {
+				coder->opts[rep_len].price = cur_and_len_price;
+				coder->opts[rep_len].pos_prev = 0;
+				coder->opts[rep_len].back_prev = i;
+				coder->opts[rep_len].prev_1_is_literal = false;
+			}
+		} while (--rep_len >= 2);
+	}
+
+
+	const uint32_t normal_match_price = match_price
+			+ rc_bit_0_price(coder->is_rep[coder->state]);
+
+	len = rep_lens[0] >= 2 ? rep_lens[0] + 1 : 2;
+	if (len <= len_main) {
+		uint32_t i = 0;
+		while (len > coder->matches[i].len)
+			++i;
+
+		for(; ; ++len) {
+			const uint32_t dist = coder->matches[i].dist;
+			const uint32_t cur_and_len_price = normal_match_price
+					+ get_dist_len_price(coder,
+						dist, len, pos_state);
+
+			if (cur_and_len_price < coder->opts[len].price) {
+				coder->opts[len].price = cur_and_len_price;
+				coder->opts[len].pos_prev = 0;
+				coder->opts[len].back_prev = dist + REPS;
+				coder->opts[len].prev_1_is_literal = false;
+			}
+
+			if (len == coder->matches[i].len)
+				if (++i == matches_count)
+					break;
+		}
+	}
+
+	return len_end;
+}
+
+
+static inline uint32_t
+helper2(lzma_lzma1_encoder *coder, uint32_t *reps, const uint8_t *buf,
+		uint32_t len_end, uint32_t position, const uint32_t cur,
+		const uint32_t nice_len, const uint32_t buf_avail_full)
+{
+	uint32_t matches_count = coder->matches_count;
+	uint32_t new_len = coder->longest_match_length;
+	uint32_t pos_prev = coder->opts[cur].pos_prev;
+	lzma_lzma_state state;
+
+	if (coder->opts[cur].prev_1_is_literal) {
+		--pos_prev;
+
+		if (coder->opts[cur].prev_2) {
+			state = coder->opts[coder->opts[cur].pos_prev_2].state;
+
+			if (coder->opts[cur].back_prev_2 < REPS)
+				update_long_rep(state);
+			else
+				update_match(state);
+
+		} else {
+			state = coder->opts[pos_prev].state;
+		}
+
+		update_literal(state);
+
+	} else {
+		state = coder->opts[pos_prev].state;
+	}
+
+	if (pos_prev == cur - 1) {
+		if (is_short_rep(coder->opts[cur]))
+			update_short_rep(state);
+		else
+			update_literal(state);
+	} else {
+		uint32_t pos;
+		if (coder->opts[cur].prev_1_is_literal
+				&& coder->opts[cur].prev_2) {
+			pos_prev = coder->opts[cur].pos_prev_2;
+			pos = coder->opts[cur].back_prev_2;
+			update_long_rep(state);
+		} else {
+			pos = coder->opts[cur].back_prev;
+			if (pos < REPS)
+				update_long_rep(state);
+			else
+				update_match(state);
+		}
+
+		if (pos < REPS) {
+			reps[0] = coder->opts[pos_prev].backs[pos];
+
+			uint32_t i;
+			for (i = 1; i <= pos; ++i)
+				reps[i] = coder->opts[pos_prev].backs[i - 1];
+
+			for (; i < REPS; ++i)
+				reps[i] = coder->opts[pos_prev].backs[i];
+
+		} else {
+			reps[0] = pos - REPS;
+
+			for (uint32_t i = 1; i < REPS; ++i)
+				reps[i] = coder->opts[pos_prev].backs[i - 1];
+		}
+	}
+
+	coder->opts[cur].state = state;
+
+	for (uint32_t i = 0; i < REPS; ++i)
+		coder->opts[cur].backs[i] = reps[i];
+
+	const uint32_t cur_price = coder->opts[cur].price;
+
+	const uint8_t current_byte = *buf;
+	const uint8_t match_byte = *(buf - reps[0] - 1);
+
+	const uint32_t pos_state = position & coder->pos_mask;
+
+	const uint32_t cur_and_1_price = cur_price
+			+ rc_bit_0_price(coder->is_match[state][pos_state])
+			+ get_literal_price(coder, position, buf[-1],
+			!is_literal_state(state), match_byte, current_byte);
+
+	bool next_is_literal = false;
+
+	if (cur_and_1_price < coder->opts[cur + 1].price) {
+		coder->opts[cur + 1].price = cur_and_1_price;
+		coder->opts[cur + 1].pos_prev = cur;
+		make_literal(&coder->opts[cur + 1]);
+		next_is_literal = true;
+	}
+
+	const uint32_t match_price = cur_price
+			+ rc_bit_1_price(coder->is_match[state][pos_state]);
+	const uint32_t rep_match_price = match_price
+			+ rc_bit_1_price(coder->is_rep[state]);
+
+	if (match_byte == current_byte
+			&& !(coder->opts[cur + 1].pos_prev < cur
+				&& coder->opts[cur + 1].back_prev == 0)) {
+
+		const uint32_t short_rep_price = rep_match_price
+				+ get_short_rep_price(coder, state, pos_state);
+
+		if (short_rep_price <= coder->opts[cur + 1].price) {
+			coder->opts[cur + 1].price = short_rep_price;
+			coder->opts[cur + 1].pos_prev = cur;
+			make_short_rep(&coder->opts[cur + 1]);
+			next_is_literal = true;
+		}
+	}
+
+	if (buf_avail_full < 2)
+		return len_end;
+
+	const uint32_t buf_avail = my_min(buf_avail_full, nice_len);
+
+	if (!next_is_literal && match_byte != current_byte) { // speed optimization
+		// try literal + rep0
+		const uint8_t *const buf_back = buf - reps[0] - 1;
+		const uint32_t limit = my_min(buf_avail_full, nice_len + 1);
+
+		const uint32_t len_test = lzma_memcmplen(buf, buf_back, 1, limit) - 1;
+
+		if (len_test >= 2) {
+			lzma_lzma_state state_2 = state;
+			update_literal(state_2);
+
+			const uint32_t pos_state_next = (position + 1) & coder->pos_mask;
+			const uint32_t next_rep_match_price = cur_and_1_price
+					+ rc_bit_1_price(coder->is_match[state_2][pos_state_next])
+					+ rc_bit_1_price(coder->is_rep[state_2]);
+
+			//for (; len_test >= 2; --len_test) {
+			const uint32_t offset = cur + 1 + len_test;
+
+			while (len_end < offset)
+				coder->opts[++len_end].price = RC_INFINITY_PRICE;
+
+			const uint32_t cur_and_len_price = next_rep_match_price
+					+ get_rep_price(coder, 0, len_test,
+						state_2, pos_state_next);
+
+			if (cur_and_len_price < coder->opts[offset].price) {
+				coder->opts[offset].price = cur_and_len_price;
+				coder->opts[offset].pos_prev = cur + 1;
+				coder->opts[offset].back_prev = 0;
+				coder->opts[offset].prev_1_is_literal = true;
+				coder->opts[offset].prev_2 = false;
+			}
+			//}
+		}
+	}
+
+
+	uint32_t start_len = 2; // speed optimization
+
+	for (uint32_t rep_index = 0; rep_index < REPS; ++rep_index) {
+		const uint8_t *const buf_back = buf - reps[rep_index] - 1;
+		if (not_equal_16(buf, buf_back))
+			continue;
+
+		uint32_t len_test = lzma_memcmplen(buf, buf_back, 2, buf_avail);
+
+		while (len_end < cur + len_test)
+			coder->opts[++len_end].price = RC_INFINITY_PRICE;
+
+		const uint32_t len_test_temp = len_test;
+		const uint32_t price = rep_match_price + get_pure_rep_price(
+				coder, rep_index, state, pos_state);
+
+		do {
+			const uint32_t cur_and_len_price = price
+					+ get_len_price(&coder->rep_len_encoder,
+							len_test, pos_state);
+
+			if (cur_and_len_price < coder->opts[cur + len_test].price) {
+				coder->opts[cur + len_test].price = cur_and_len_price;
+				coder->opts[cur + len_test].pos_prev = cur;
+				coder->opts[cur + len_test].back_prev = rep_index;
+				coder->opts[cur + len_test].prev_1_is_literal = false;
+			}
+		} while (--len_test >= 2);
+
+		len_test = len_test_temp;
+
+		if (rep_index == 0)
+			start_len = len_test + 1;
+
+
+		uint32_t len_test_2 = len_test + 1;
+		const uint32_t limit = my_min(buf_avail_full,
+				len_test_2 + nice_len);
+		for (; len_test_2 < limit
+				&& buf[len_test_2] == buf_back[len_test_2];
+				++len_test_2) ;
+
+		len_test_2 -= len_test + 1;
+
+		if (len_test_2 >= 2) {
+			lzma_lzma_state state_2 = state;
+			update_long_rep(state_2);
+
+			uint32_t pos_state_next = (position + len_test) & coder->pos_mask;
+
+			const uint32_t cur_and_len_literal_price = price
+					+ get_len_price(&coder->rep_len_encoder,
+						len_test, pos_state)
+					+ rc_bit_0_price(coder->is_match[state_2][pos_state_next])
+					+ get_literal_price(coder, position + len_test,
+						buf[len_test - 1], true,
+						buf_back[len_test], buf[len_test]);
+
+			update_literal(state_2);
+
+			pos_state_next = (position + len_test + 1) & coder->pos_mask;
+
+			const uint32_t next_rep_match_price = cur_and_len_literal_price
+					+ rc_bit_1_price(coder->is_match[state_2][pos_state_next])
+					+ rc_bit_1_price(coder->is_rep[state_2]);
+
+			//for(; len_test_2 >= 2; len_test_2--) {
+			const uint32_t offset = cur + len_test + 1 + len_test_2;
+
+			while (len_end < offset)
+				coder->opts[++len_end].price = RC_INFINITY_PRICE;
+
+			const uint32_t cur_and_len_price = next_rep_match_price
+					+ get_rep_price(coder, 0, len_test_2,
+						state_2, pos_state_next);
+
+			if (cur_and_len_price < coder->opts[offset].price) {
+				coder->opts[offset].price = cur_and_len_price;
+				coder->opts[offset].pos_prev = cur + len_test + 1;
+				coder->opts[offset].back_prev = 0;
+				coder->opts[offset].prev_1_is_literal = true;
+				coder->opts[offset].prev_2 = true;
+				coder->opts[offset].pos_prev_2 = cur;
+				coder->opts[offset].back_prev_2 = rep_index;
+			}
+			//}
+		}
+	}
+
+
+	//for (uint32_t len_test = 2; len_test <= new_len; ++len_test)
+	if (new_len > buf_avail) {
+		new_len = buf_avail;
+
+		matches_count = 0;
+		while (new_len > coder->matches[matches_count].len)
+			++matches_count;
+
+		coder->matches[matches_count++].len = new_len;
+	}
+
+
+	if (new_len >= start_len) {
+		const uint32_t normal_match_price = match_price
+				+ rc_bit_0_price(coder->is_rep[state]);
+
+		while (len_end < cur + new_len)
+			coder->opts[++len_end].price = RC_INFINITY_PRICE;
+
+		uint32_t i = 0;
+		while (start_len > coder->matches[i].len)
+			++i;
+
+		for (uint32_t len_test = start_len; ; ++len_test) {
+			const uint32_t cur_back = coder->matches[i].dist;
+			uint32_t cur_and_len_price = normal_match_price
+					+ get_dist_len_price(coder,
+						cur_back, len_test, pos_state);
+
+			if (cur_and_len_price < coder->opts[cur + len_test].price) {
+				coder->opts[cur + len_test].price = cur_and_len_price;
+				coder->opts[cur + len_test].pos_prev = cur;
+				coder->opts[cur + len_test].back_prev
+						= cur_back + REPS;
+				coder->opts[cur + len_test].prev_1_is_literal = false;
+			}
+
+			if (len_test == coder->matches[i].len) {
+				// Try Match + Literal + Rep0
+				const uint8_t *const buf_back = buf - cur_back - 1;
+				uint32_t len_test_2 = len_test + 1;
+				const uint32_t limit = my_min(buf_avail_full,
+						len_test_2 + nice_len);
+
+				for (; len_test_2 < limit &&
+						buf[len_test_2] == buf_back[len_test_2];
+						++len_test_2) ;
+
+				len_test_2 -= len_test + 1;
+
+				if (len_test_2 >= 2) {
+					lzma_lzma_state state_2 = state;
+					update_match(state_2);
+					uint32_t pos_state_next
+							= (position + len_test) & coder->pos_mask;
+
+					const uint32_t cur_and_len_literal_price = cur_and_len_price
+							+ rc_bit_0_price(
+								coder->is_match[state_2][pos_state_next])
+							+ get_literal_price(coder,
+								position + len_test,
+								buf[len_test - 1],
+								true,
+								buf_back[len_test],
+								buf[len_test]);
+
+					update_literal(state_2);
+					pos_state_next = (pos_state_next + 1) & coder->pos_mask;
+
+					const uint32_t next_rep_match_price
+							= cur_and_len_literal_price
+							+ rc_bit_1_price(
+								coder->is_match[state_2][pos_state_next])
+							+ rc_bit_1_price(coder->is_rep[state_2]);
+
+					// for(; len_test_2 >= 2; --len_test_2) {
+					const uint32_t offset = cur + len_test + 1 + len_test_2;
+
+					while (len_end < offset)
+						coder->opts[++len_end].price = RC_INFINITY_PRICE;
+
+					cur_and_len_price = next_rep_match_price
+							+ get_rep_price(coder, 0, len_test_2,
+								state_2, pos_state_next);
+
+					if (cur_and_len_price < coder->opts[offset].price) {
+						coder->opts[offset].price = cur_and_len_price;
+						coder->opts[offset].pos_prev = cur + len_test + 1;
+						coder->opts[offset].back_prev = 0;
+						coder->opts[offset].prev_1_is_literal = true;
+						coder->opts[offset].prev_2 = true;
+						coder->opts[offset].pos_prev_2 = cur;
+						coder->opts[offset].back_prev_2
+								= cur_back + REPS;
+					}
+					//}
+				}
+
+				if (++i == matches_count)
+					break;
+			}
+		}
+	}
+
+	return len_end;
+}
+
+
+extern void
+lzma_lzma_optimum_normal(lzma_lzma1_encoder *restrict coder,
+		lzma_mf *restrict mf,
+		uint32_t *restrict back_res, uint32_t *restrict len_res,
+		uint32_t position)
+{
+	// If we have symbols pending, return the next pending symbol.
+	if (coder->opts_end_index != coder->opts_current_index) {
+		assert(mf->read_ahead > 0);
+		*len_res = coder->opts[coder->opts_current_index].pos_prev
+				- coder->opts_current_index;
+		*back_res = coder->opts[coder->opts_current_index].back_prev;
+		coder->opts_current_index = coder->opts[
+				coder->opts_current_index].pos_prev;
+		return;
+	}
+
+	// Update the price tables. In LZMA SDK <= 4.60 (and possibly later)
+	// this was done in both initialization function and in the main loop.
+	// In liblzma they were moved into this single place.
+	if (mf->read_ahead == 0) {
+		if (coder->match_price_count >= (1 << 7))
+			fill_dist_prices(coder);
+
+		if (coder->align_price_count >= ALIGN_SIZE)
+			fill_align_prices(coder);
+	}
+
+	// TODO: This needs quite a bit of cleaning still. But splitting
+	// the original function into two pieces makes it at least a little
+	// more readable, since those two parts don't share many variables.
+
+	uint32_t len_end = helper1(coder, mf, back_res, len_res, position);
+	if (len_end == UINT32_MAX)
+		return;
+
+	uint32_t reps[REPS];
+	memcpy(reps, coder->reps, sizeof(reps));
+
+	uint32_t cur;
+	for (cur = 1; cur < len_end; ++cur) {
+		assert(cur < OPTS);
+
+		coder->longest_match_length = mf_find(
+				mf, &coder->matches_count, coder->matches);
+
+		if (coder->longest_match_length >= mf->nice_len)
+			break;
+
+		len_end = helper2(coder, reps, mf_ptr(mf) - 1, len_end,
+				position + cur, cur, mf->nice_len,
+				my_min(mf_avail(mf) + 1, OPTS - 1 - cur));
+	}
+
+	backward(coder, len_res, back_res, cur);
+	return;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_presets.c
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/lzma_encoder_presets.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_presets.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,63 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_encoder_presets.c
-/// \brief      Encoder presets
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-
-
-extern LZMA_API(lzma_bool)
-lzma_lzma_preset(lzma_options_lzma *options, uint32_t preset)
-{
-	const uint32_t level = preset & LZMA_PRESET_LEVEL_MASK;
-	const uint32_t flags = preset & ~LZMA_PRESET_LEVEL_MASK;
-	const uint32_t supported_flags = LZMA_PRESET_EXTREME;
-
-	if (level > 9 || (flags & ~supported_flags))
-		return true;
-
-	options->preset_dict = NULL;
-	options->preset_dict_size = 0;
-
-	options->lc = LZMA_LC_DEFAULT;
-	options->lp = LZMA_LP_DEFAULT;
-	options->pb = LZMA_PB_DEFAULT;
-
-	static const uint8_t dict_pow2[]
-			= { 18, 20, 21, 22, 22, 23, 23, 24, 25, 26 };
-	options->dict_size = UINT32_C(1) << dict_pow2[level];
-
-	if (level <= 3) {
-		options->mode = LZMA_MODE_FAST;
-		options->mf = level == 0 ? LZMA_MF_HC3 : LZMA_MF_HC4;
-		options->nice_len = level <= 1 ? 128 : 273;
-		static const uint8_t depths[] = { 4, 8, 24, 48 };
-		options->depth = depths[level];
-	} else {
-		options->mode = LZMA_MODE_NORMAL;
-		options->mf = LZMA_MF_BT4;
-		options->nice_len = level == 4 ? 16 : level == 5 ? 32 : 64;
-		options->depth = 0;
-	}
-
-	if (flags & LZMA_PRESET_EXTREME) {
-		options->mode = LZMA_MODE_NORMAL;
-		options->mf = LZMA_MF_BT4;
-		if (level == 3 || level == 5) {
-			options->nice_len = 192;
-			options->depth = 0;
-		} else {
-			options->nice_len = 273;
-			options->depth = 512;
-		}
-	}
-
-	return false;
-}

Copied: vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_presets.c (from rev 11013, vendor/xz/dist/src/liblzma/lzma/lzma_encoder_presets.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_presets.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_presets.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,64 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lzma_encoder_presets.c
+/// \brief      Encoder presets
+/// \note       xz needs this even when only decoding is enabled.
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+
+extern LZMA_API(lzma_bool)
+lzma_lzma_preset(lzma_options_lzma *options, uint32_t preset)
+{
+	const uint32_t level = preset & LZMA_PRESET_LEVEL_MASK;
+	const uint32_t flags = preset & ~LZMA_PRESET_LEVEL_MASK;
+	const uint32_t supported_flags = LZMA_PRESET_EXTREME;
+
+	if (level > 9 || (flags & ~supported_flags))
+		return true;
+
+	options->preset_dict = NULL;
+	options->preset_dict_size = 0;
+
+	options->lc = LZMA_LC_DEFAULT;
+	options->lp = LZMA_LP_DEFAULT;
+	options->pb = LZMA_PB_DEFAULT;
+
+	static const uint8_t dict_pow2[]
+			= { 18, 20, 21, 22, 22, 23, 23, 24, 25, 26 };
+	options->dict_size = UINT32_C(1) << dict_pow2[level];
+
+	if (level <= 3) {
+		options->mode = LZMA_MODE_FAST;
+		options->mf = level == 0 ? LZMA_MF_HC3 : LZMA_MF_HC4;
+		options->nice_len = level <= 1 ? 128 : 273;
+		static const uint8_t depths[] = { 4, 8, 24, 48 };
+		options->depth = depths[level];
+	} else {
+		options->mode = LZMA_MODE_NORMAL;
+		options->mf = LZMA_MF_BT4;
+		options->nice_len = level == 4 ? 16 : level == 5 ? 32 : 64;
+		options->depth = 0;
+	}
+
+	if (flags & LZMA_PRESET_EXTREME) {
+		options->mode = LZMA_MODE_NORMAL;
+		options->mf = LZMA_MF_BT4;
+		if (level == 3 || level == 5) {
+			options->nice_len = 192;
+			options->depth = 0;
+		} else {
+			options->nice_len = 273;
+			options->depth = 512;
+		}
+	}
+
+	return false;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_private.h
===================================================================
--- vendor/xz/dist/src/liblzma/lzma/lzma_encoder_private.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_private.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,148 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_encoder_private.h
-/// \brief      Private definitions for LZMA encoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZMA_ENCODER_PRIVATE_H
-#define LZMA_LZMA_ENCODER_PRIVATE_H
-
-#include "lz_encoder.h"
-#include "range_encoder.h"
-#include "lzma_common.h"
-#include "lzma_encoder.h"
-
-
-// Macro to compare if the first two bytes in two buffers differ. This is
-// needed in lzma_lzma_optimum_*() to test if the match is at least
-// MATCH_LEN_MIN bytes. Unaligned access gives tiny gain so there's no
-// reason to not use it when it is supported.
-#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
-#	define not_equal_16(a, b) \
-		(*(const uint16_t *)(a) != *(const uint16_t *)(b))
-#else
-#	define not_equal_16(a, b) \
-		((a)[0] != (b)[0] || (a)[1] != (b)[1])
-#endif
-
-
-// Optimal - Number of entries in the optimum array.
-#define OPTS (1 << 12)
-
-
-typedef struct {
-	probability choice;
-	probability choice2;
-	probability low[POS_STATES_MAX][LEN_LOW_SYMBOLS];
-	probability mid[POS_STATES_MAX][LEN_MID_SYMBOLS];
-	probability high[LEN_HIGH_SYMBOLS];
-
-	uint32_t prices[POS_STATES_MAX][LEN_SYMBOLS];
-	uint32_t table_size;
-	uint32_t counters[POS_STATES_MAX];
-
-} lzma_length_encoder;
-
-
-typedef struct {
-	lzma_lzma_state state;
-
-	bool prev_1_is_literal;
-	bool prev_2;
-
-	uint32_t pos_prev_2;
-	uint32_t back_prev_2;
-
-	uint32_t price;
-	uint32_t pos_prev;  // pos_next;
-	uint32_t back_prev;
-
-	uint32_t backs[REP_DISTANCES];
-
-} lzma_optimal;
-
-
-struct lzma_coder_s {
-	/// Range encoder
-	lzma_range_encoder rc;
-
-	/// State
-	lzma_lzma_state state;
-
-	/// The four most recent match distances
-	uint32_t reps[REP_DISTANCES];
-
-	/// Array of match candidates
-	lzma_match matches[MATCH_LEN_MAX + 1];
-
-	/// Number of match candidates in matches[]
-	uint32_t matches_count;
-
-	/// Variable to hold the length of the longest match between calls
-	/// to lzma_lzma_optimum_*().
-	uint32_t longest_match_length;
-
-	/// True if using getoptimumfast
-	bool fast_mode;
-
-	/// True if the encoder has been initialized by encoding the first
-	/// byte as a literal.
-	bool is_initialized;
-
-	/// True if the range encoder has been flushed, but not all bytes
-	/// have been written to the output buffer yet.
-	bool is_flushed;
-
-	uint32_t pos_mask;         ///< (1 << pos_bits) - 1
-	uint32_t literal_context_bits;
-	uint32_t literal_pos_mask;
-
-	// These are the same as in lzma_decoder.c. See comments there.
-	probability literal[LITERAL_CODERS_MAX][LITERAL_CODER_SIZE];
-	probability is_match[STATES][POS_STATES_MAX];
-	probability is_rep[STATES];
-	probability is_rep0[STATES];
-	probability is_rep1[STATES];
-	probability is_rep2[STATES];
-	probability is_rep0_long[STATES][POS_STATES_MAX];
-	probability pos_slot[LEN_TO_POS_STATES][POS_SLOTS];
-	probability pos_special[FULL_DISTANCES - END_POS_MODEL_INDEX];
-	probability pos_align[ALIGN_TABLE_SIZE];
-
-	// These are the same as in lzma_decoder.c except that the encoders
-	// include also price tables.
-	lzma_length_encoder match_len_encoder;
-	lzma_length_encoder rep_len_encoder;
-
-	// Price tables
-	uint32_t pos_slot_prices[LEN_TO_POS_STATES][POS_SLOTS];
-	uint32_t distances_prices[LEN_TO_POS_STATES][FULL_DISTANCES];
-	uint32_t dist_table_size;
-	uint32_t match_price_count;
-
-	uint32_t align_prices[ALIGN_TABLE_SIZE];
-	uint32_t align_price_count;
-
-	// Optimal
-	uint32_t opts_end_index;
-	uint32_t opts_current_index;
-	lzma_optimal opts[OPTS];
-};
-
-
-extern void lzma_lzma_optimum_fast(
-		lzma_coder *restrict coder, lzma_mf *restrict mf,
-		uint32_t *restrict back_res, uint32_t *restrict len_res);
-
-extern void lzma_lzma_optimum_normal(lzma_coder *restrict coder,
-		lzma_mf *restrict mf, uint32_t *restrict back_res,
-		uint32_t *restrict len_res, uint32_t position);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_private.h (from rev 11013, vendor/xz/dist/src/liblzma/lzma/lzma_encoder_private.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_private.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/lzma/lzma_encoder_private.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,148 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       lzma_encoder_private.h
+/// \brief      Private definitions for LZMA encoder
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZMA_ENCODER_PRIVATE_H
+#define LZMA_LZMA_ENCODER_PRIVATE_H
+
+#include "lz_encoder.h"
+#include "range_encoder.h"
+#include "lzma_common.h"
+#include "lzma_encoder.h"
+
+
+// Macro to compare if the first two bytes in two buffers differ. This is
+// needed in lzma_lzma_optimum_*() to test if the match is at least
+// MATCH_LEN_MIN bytes. Unaligned access gives tiny gain so there's no
+// reason to not use it when it is supported.
+#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
+#	define not_equal_16(a, b) \
+		(*(const uint16_t *)(a) != *(const uint16_t *)(b))
+#else
+#	define not_equal_16(a, b) \
+		((a)[0] != (b)[0] || (a)[1] != (b)[1])
+#endif
+
+
+// Optimal - Number of entries in the optimum array.
+#define OPTS (1 << 12)
+
+
+typedef struct {
+	probability choice;
+	probability choice2;
+	probability low[POS_STATES_MAX][LEN_LOW_SYMBOLS];
+	probability mid[POS_STATES_MAX][LEN_MID_SYMBOLS];
+	probability high[LEN_HIGH_SYMBOLS];
+
+	uint32_t prices[POS_STATES_MAX][LEN_SYMBOLS];
+	uint32_t table_size;
+	uint32_t counters[POS_STATES_MAX];
+
+} lzma_length_encoder;
+
+
+typedef struct {
+	lzma_lzma_state state;
+
+	bool prev_1_is_literal;
+	bool prev_2;
+
+	uint32_t pos_prev_2;
+	uint32_t back_prev_2;
+
+	uint32_t price;
+	uint32_t pos_prev;  // pos_next;
+	uint32_t back_prev;
+
+	uint32_t backs[REPS];
+
+} lzma_optimal;
+
+
+struct lzma_lzma1_encoder_s {
+	/// Range encoder
+	lzma_range_encoder rc;
+
+	/// State
+	lzma_lzma_state state;
+
+	/// The four most recent match distances
+	uint32_t reps[REPS];
+
+	/// Array of match candidates
+	lzma_match matches[MATCH_LEN_MAX + 1];
+
+	/// Number of match candidates in matches[]
+	uint32_t matches_count;
+
+	/// Variable to hold the length of the longest match between calls
+	/// to lzma_lzma_optimum_*().
+	uint32_t longest_match_length;
+
+	/// True if using getoptimumfast
+	bool fast_mode;
+
+	/// True if the encoder has been initialized by encoding the first
+	/// byte as a literal.
+	bool is_initialized;
+
+	/// True if the range encoder has been flushed, but not all bytes
+	/// have been written to the output buffer yet.
+	bool is_flushed;
+
+	uint32_t pos_mask;         ///< (1 << pos_bits) - 1
+	uint32_t literal_context_bits;
+	uint32_t literal_pos_mask;
+
+	// These are the same as in lzma_decoder.c. See comments there.
+	probability literal[LITERAL_CODERS_MAX][LITERAL_CODER_SIZE];
+	probability is_match[STATES][POS_STATES_MAX];
+	probability is_rep[STATES];
+	probability is_rep0[STATES];
+	probability is_rep1[STATES];
+	probability is_rep2[STATES];
+	probability is_rep0_long[STATES][POS_STATES_MAX];
+	probability dist_slot[DIST_STATES][DIST_SLOTS];
+	probability dist_special[FULL_DISTANCES - DIST_MODEL_END];
+	probability dist_align[ALIGN_SIZE];
+
+	// These are the same as in lzma_decoder.c except that the encoders
+	// include also price tables.
+	lzma_length_encoder match_len_encoder;
+	lzma_length_encoder rep_len_encoder;
+
+	// Price tables
+	uint32_t dist_slot_prices[DIST_STATES][DIST_SLOTS];
+	uint32_t dist_prices[DIST_STATES][FULL_DISTANCES];
+	uint32_t dist_table_size;
+	uint32_t match_price_count;
+
+	uint32_t align_prices[ALIGN_SIZE];
+	uint32_t align_price_count;
+
+	// Optimal
+	uint32_t opts_end_index;
+	uint32_t opts_current_index;
+	lzma_optimal opts[OPTS];
+};
+
+
+extern void lzma_lzma_optimum_fast(
+		lzma_lzma1_encoder *restrict coder, lzma_mf *restrict mf,
+		uint32_t *restrict back_res, uint32_t *restrict len_res);
+
+extern void lzma_lzma_optimum_normal(lzma_lzma1_encoder *restrict coder,
+		lzma_mf *restrict mf, uint32_t *restrict back_res,
+		uint32_t *restrict len_res, uint32_t position);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/rangecoder/Makefile.inc
===================================================================
--- vendor/xz/dist/src/liblzma/rangecoder/Makefile.inc	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/rangecoder/Makefile.inc	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,21 +0,0 @@
-##
-## Author: Lasse Collin
-##
-## This file has been put into the public domain.
-## You can do whatever you want with this file.
-##
-
-EXTRA_DIST += rangecoder/price_tablegen.c
-
-liblzma_la_SOURCES += rangecoder/range_common.h
-
-if COND_ENCODER_LZMA1
-liblzma_la_SOURCES += \
-	rangecoder/range_encoder.h \
-	rangecoder/price.h \
-	rangecoder/price_table.c
-endif
-
-if COND_DECODER_LZMA1
-liblzma_la_SOURCES += rangecoder/range_decoder.h
-endif

Deleted: vendor/xz/5.2.3/src/liblzma/rangecoder/range_decoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/rangecoder/range_decoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/rangecoder/range_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,179 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       range_decoder.h
-/// \brief      Range Decoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_RANGE_DECODER_H
-#define LZMA_RANGE_DECODER_H
-
-#include "range_common.h"
-
-
-typedef struct {
-	uint32_t range;
-	uint32_t code;
-	uint32_t init_bytes_left;
-} lzma_range_decoder;
-
-
-/// Reads the first five bytes to initialize the range decoder.
-static inline bool
-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;
-
-		rc->code = (rc->code << 8) | in[*in_pos];
-		++*in_pos;
-		--rc->init_bytes_left;
-	}
-
-	return true;
-}
-
-
-/// Makes local copies of range decoder and *in_pos variables. Doing this
-/// improves speed significantly. The range decoder macros expect also
-/// variables `in' and `in_size' to be defined.
-#define rc_to_local(range_decoder, in_pos) \
-	lzma_range_decoder rc = range_decoder; \
-	size_t rc_in_pos = (in_pos); \
-	uint32_t rc_bound
-
-
-/// Stores the local copes back to the range decoder structure.
-#define rc_from_local(range_decoder, in_pos) \
-do { \
-	range_decoder = rc; \
-	in_pos = rc_in_pos; \
-} while (0)
-
-
-/// Resets the range decoder structure.
-#define rc_reset(range_decoder) \
-do { \
-	(range_decoder).range = UINT32_MAX; \
-	(range_decoder).code = 0; \
-	(range_decoder).init_bytes_left = 5; \
-} while (0)
-
-
-/// When decoding has been properly finished, rc.code is always zero unless
-/// the input stream is corrupt. So checking this can catch some corrupt
-/// files especially if they don't have any other integrity check.
-#define rc_is_finished(range_decoder) \
-	((range_decoder).code == 0)
-
-
-/// Read the next input byte if needed. If more input is needed but there is
-/// no more input available, "goto out" is used to jump out of the main
-/// decoder loop.
-#define rc_normalize(seq) \
-do { \
-	if (rc.range < RC_TOP_VALUE) { \
-		if (unlikely(rc_in_pos == in_size)) { \
-			coder->sequence = seq; \
-			goto out; \
-		} \
-		rc.range <<= RC_SHIFT_BITS; \
-		rc.code = (rc.code << RC_SHIFT_BITS) | in[rc_in_pos++]; \
-	} \
-} while (0)
-
-
-/// Start decoding a bit. This must be used together with rc_update_0()
-/// and rc_update_1():
-///
-///     rc_if_0(prob, seq) {
-///         rc_update_0(prob);
-///         // Do something
-///     } else {
-///         rc_update_1(prob);
-///         // Do something else
-///     }
-///
-#define rc_if_0(prob, seq) \
-	rc_normalize(seq); \
-	rc_bound = (rc.range >> RC_BIT_MODEL_TOTAL_BITS) * (prob); \
-	if (rc.code < rc_bound)
-
-
-/// Update the range decoder state and the used probability variable to
-/// match a decoded bit of 0.
-#define rc_update_0(prob) \
-do { \
-	rc.range = rc_bound; \
-	prob += (RC_BIT_MODEL_TOTAL - (prob)) >> RC_MOVE_BITS; \
-} while (0)
-
-
-/// Update the range decoder state and the used probability variable to
-/// match a decoded bit of 1.
-#define rc_update_1(prob) \
-do { \
-	rc.range -= rc_bound; \
-	rc.code -= rc_bound; \
-	prob -= (prob) >> RC_MOVE_BITS; \
-} while (0)
-
-
-/// Decodes one bit and runs action0 or action1 depending on the decoded bit.
-/// This macro is used as the last step in bittree reverse decoders since
-/// those don't use "symbol" for anything else than indexing the probability
-/// arrays.
-#define rc_bit_last(prob, action0, action1, seq) \
-do { \
-	rc_if_0(prob, seq) { \
-		rc_update_0(prob); \
-		action0; \
-	} else { \
-		rc_update_1(prob); \
-		action1; \
-	} \
-} while (0)
-
-
-/// Decodes one bit, updates "symbol", and runs action0 or action1 depending
-/// on the decoded bit.
-#define rc_bit(prob, action0, action1, seq) \
-	rc_bit_last(prob, \
-		symbol <<= 1; action0, \
-		symbol = (symbol << 1) + 1; action1, \
-		seq);
-
-
-/// Like rc_bit() but add "case seq:" as a prefix. This makes the unrolled
-/// loops more readable because the code isn't littered with "case"
-/// statements. On the other hand this also makes it less readable, since
-/// spotting the places where the decoder loop may be restarted is less
-/// obvious.
-#define rc_bit_case(prob, action0, action1, seq) \
-	case seq: rc_bit(prob, action0, action1, seq)
-
-
-/// Decode a bit without using a probability.
-#define rc_direct(dest, seq) \
-do { \
-	rc_normalize(seq); \
-	rc.range >>= 1; \
-	rc.code -= rc.range; \
-	rc_bound = UINT32_C(0) - (rc.code >> 31); \
-	rc.code += rc.range & rc_bound; \
-	dest = (dest << 1) + (rc_bound + 1); \
-} while (0)
-
-
-// NOTE: No macros are provided for bittree decoding. It seems to be simpler
-// to just write them open in the code.
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/rangecoder/range_decoder.h (from rev 9176, vendor/xz/dist/src/liblzma/rangecoder/range_decoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/rangecoder/range_decoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/rangecoder/range_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,185 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       range_decoder.h
+/// \brief      Range Decoder
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_RANGE_DECODER_H
+#define LZMA_RANGE_DECODER_H
+
+#include "range_common.h"
+
+
+typedef struct {
+	uint32_t range;
+	uint32_t code;
+	uint32_t init_bytes_left;
+} lzma_range_decoder;
+
+
+/// Reads the first five bytes to initialize the range decoder.
+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 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 LZMA_STREAM_END;
+}
+
+
+/// Makes local copies of range decoder and *in_pos variables. Doing this
+/// improves speed significantly. The range decoder macros expect also
+/// variables `in' and `in_size' to be defined.
+#define rc_to_local(range_decoder, in_pos) \
+	lzma_range_decoder rc = range_decoder; \
+	size_t rc_in_pos = (in_pos); \
+	uint32_t rc_bound
+
+
+/// Stores the local copes back to the range decoder structure.
+#define rc_from_local(range_decoder, in_pos) \
+do { \
+	range_decoder = rc; \
+	in_pos = rc_in_pos; \
+} while (0)
+
+
+/// Resets the range decoder structure.
+#define rc_reset(range_decoder) \
+do { \
+	(range_decoder).range = UINT32_MAX; \
+	(range_decoder).code = 0; \
+	(range_decoder).init_bytes_left = 5; \
+} while (0)
+
+
+/// When decoding has been properly finished, rc.code is always zero unless
+/// the input stream is corrupt. So checking this can catch some corrupt
+/// files especially if they don't have any other integrity check.
+#define rc_is_finished(range_decoder) \
+	((range_decoder).code == 0)
+
+
+/// Read the next input byte if needed. If more input is needed but there is
+/// no more input available, "goto out" is used to jump out of the main
+/// decoder loop.
+#define rc_normalize(seq) \
+do { \
+	if (rc.range < RC_TOP_VALUE) { \
+		if (unlikely(rc_in_pos == in_size)) { \
+			coder->sequence = seq; \
+			goto out; \
+		} \
+		rc.range <<= RC_SHIFT_BITS; \
+		rc.code = (rc.code << RC_SHIFT_BITS) | in[rc_in_pos++]; \
+	} \
+} while (0)
+
+
+/// Start decoding a bit. This must be used together with rc_update_0()
+/// and rc_update_1():
+///
+///     rc_if_0(prob, seq) {
+///         rc_update_0(prob);
+///         // Do something
+///     } else {
+///         rc_update_1(prob);
+///         // Do something else
+///     }
+///
+#define rc_if_0(prob, seq) \
+	rc_normalize(seq); \
+	rc_bound = (rc.range >> RC_BIT_MODEL_TOTAL_BITS) * (prob); \
+	if (rc.code < rc_bound)
+
+
+/// Update the range decoder state and the used probability variable to
+/// match a decoded bit of 0.
+#define rc_update_0(prob) \
+do { \
+	rc.range = rc_bound; \
+	prob += (RC_BIT_MODEL_TOTAL - (prob)) >> RC_MOVE_BITS; \
+} while (0)
+
+
+/// Update the range decoder state and the used probability variable to
+/// match a decoded bit of 1.
+#define rc_update_1(prob) \
+do { \
+	rc.range -= rc_bound; \
+	rc.code -= rc_bound; \
+	prob -= (prob) >> RC_MOVE_BITS; \
+} while (0)
+
+
+/// Decodes one bit and runs action0 or action1 depending on the decoded bit.
+/// This macro is used as the last step in bittree reverse decoders since
+/// those don't use "symbol" for anything else than indexing the probability
+/// arrays.
+#define rc_bit_last(prob, action0, action1, seq) \
+do { \
+	rc_if_0(prob, seq) { \
+		rc_update_0(prob); \
+		action0; \
+	} else { \
+		rc_update_1(prob); \
+		action1; \
+	} \
+} while (0)
+
+
+/// Decodes one bit, updates "symbol", and runs action0 or action1 depending
+/// on the decoded bit.
+#define rc_bit(prob, action0, action1, seq) \
+	rc_bit_last(prob, \
+		symbol <<= 1; action0, \
+		symbol = (symbol << 1) + 1; action1, \
+		seq);
+
+
+/// Like rc_bit() but add "case seq:" as a prefix. This makes the unrolled
+/// loops more readable because the code isn't littered with "case"
+/// statements. On the other hand this also makes it less readable, since
+/// spotting the places where the decoder loop may be restarted is less
+/// obvious.
+#define rc_bit_case(prob, action0, action1, seq) \
+	case seq: rc_bit(prob, action0, action1, seq)
+
+
+/// Decode a bit without using a probability.
+#define rc_direct(dest, seq) \
+do { \
+	rc_normalize(seq); \
+	rc.range >>= 1; \
+	rc.code -= rc.range; \
+	rc_bound = UINT32_C(0) - (rc.code >> 31); \
+	rc.code += rc.range & rc_bound; \
+	dest = (dest << 1) + (rc_bound + 1); \
+} while (0)
+
+
+// NOTE: No macros are provided for bittree decoding. It seems to be simpler
+// to just write them open in the code.
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/simple/Makefile.inc
===================================================================
--- vendor/xz/dist/src/liblzma/simple/Makefile.inc	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/simple/Makefile.inc	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,47 +0,0 @@
-##
-## Author: Lasse Collin
-##
-## This file has been put into the public domain.
-## You can do whatever you want with this file.
-##
-
-liblzma_la_SOURCES += \
-	simple/simple_coder.c \
-	simple/simple_coder.h \
-	simple/simple_private.h
-
-if COND_ENCODER_SIMPLE
-liblzma_la_SOURCES += \
-	simple/simple_encoder.c \
-	simple/simple_encoder.h
-endif
-
-if COND_DECODER_SIMPLE
-liblzma_la_SOURCES += \
-	simple/simple_decoder.c \
-	simple/simple_decoder.h
-endif
-
-if COND_FILTER_X86
-liblzma_la_SOURCES += simple/x86.c
-endif
-
-if COND_FILTER_POWERPC
-liblzma_la_SOURCES += simple/powerpc.c
-endif
-
-if COND_FILTER_IA64
-liblzma_la_SOURCES += simple/ia64.c
-endif
-
-if COND_FILTER_ARM
-liblzma_la_SOURCES += simple/arm.c
-endif
-
-if COND_FILTER_ARMTHUMB
-liblzma_la_SOURCES += simple/armthumb.c
-endif
-
-if COND_FILTER_SPARC
-liblzma_la_SOURCES += simple/sparc.c
-endif

Deleted: vendor/xz/5.2.3/src/liblzma/simple/arm.c
===================================================================
--- vendor/xz/dist/src/liblzma/simple/arm.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/simple/arm.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,69 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       arm.c
-/// \brief      Filter for ARM binaries
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_private.h"
-
-
-static size_t
-arm_code(lzma_simple *simple lzma_attribute((__unused__)),
-		uint32_t now_pos, bool is_encoder,
-		uint8_t *buffer, size_t size)
-{
-	size_t i;
-	for (i = 0; i + 4 <= size; i += 4) {
-		if (buffer[i + 3] == 0xEB) {
-			uint32_t src = (buffer[i + 2] << 16)
-					| (buffer[i + 1] << 8)
-					| (buffer[i + 0]);
-			src <<= 2;
-
-			uint32_t dest;
-			if (is_encoder)
-				dest = now_pos + (uint32_t)(i) + 8 + src;
-			else
-				dest = src - (now_pos + (uint32_t)(i) + 8);
-
-			dest >>= 2;
-			buffer[i + 2] = (dest >> 16);
-			buffer[i + 1] = (dest >> 8);
-			buffer[i + 0] = dest;
-		}
-	}
-
-	return i;
-}
-
-
-static lzma_ret
-arm_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters, bool is_encoder)
-{
-	return lzma_simple_coder_init(next, allocator, filters,
-			&arm_code, 0, 4, 4, is_encoder);
-}
-
-
-extern lzma_ret
-lzma_simple_arm_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	return arm_coder_init(next, allocator, filters, true);
-}
-
-
-extern lzma_ret
-lzma_simple_arm_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	return arm_coder_init(next, allocator, filters, false);
-}

Copied: vendor/xz/5.2.3/src/liblzma/simple/arm.c (from rev 11013, vendor/xz/dist/src/liblzma/simple/arm.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/simple/arm.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/simple/arm.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,71 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       arm.c
+/// \brief      Filter for ARM binaries
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+static size_t
+arm_code(void *simple lzma_attribute((__unused__)),
+		uint32_t now_pos, bool is_encoder,
+		uint8_t *buffer, size_t size)
+{
+	size_t i;
+	for (i = 0; i + 4 <= size; i += 4) {
+		if (buffer[i + 3] == 0xEB) {
+			uint32_t src = (buffer[i + 2] << 16)
+					| (buffer[i + 1] << 8)
+					| (buffer[i + 0]);
+			src <<= 2;
+
+			uint32_t dest;
+			if (is_encoder)
+				dest = now_pos + (uint32_t)(i) + 8 + src;
+			else
+				dest = src - (now_pos + (uint32_t)(i) + 8);
+
+			dest >>= 2;
+			buffer[i + 2] = (dest >> 16);
+			buffer[i + 1] = (dest >> 8);
+			buffer[i + 0] = dest;
+		}
+	}
+
+	return i;
+}
+
+
+static lzma_ret
+arm_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters, bool is_encoder)
+{
+	return lzma_simple_coder_init(next, allocator, filters,
+			&arm_code, 0, 4, 4, is_encoder);
+}
+
+
+extern lzma_ret
+lzma_simple_arm_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	return arm_coder_init(next, allocator, filters, true);
+}
+
+
+extern lzma_ret
+lzma_simple_arm_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	return arm_coder_init(next, allocator, filters, false);
+}

Deleted: vendor/xz/5.2.3/src/liblzma/simple/armthumb.c
===================================================================
--- vendor/xz/dist/src/liblzma/simple/armthumb.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/simple/armthumb.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,74 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       armthumb.c
-/// \brief      Filter for ARM-Thumb binaries
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_private.h"
-
-
-static size_t
-armthumb_code(lzma_simple *simple lzma_attribute((__unused__)),
-		uint32_t now_pos, bool is_encoder,
-		uint8_t *buffer, size_t size)
-{
-	size_t i;
-	for (i = 0; i + 4 <= size; i += 2) {
-		if ((buffer[i + 1] & 0xF8) == 0xF0
-				&& (buffer[i + 3] & 0xF8) == 0xF8) {
-			uint32_t src = ((buffer[i + 1] & 0x7) << 19)
-					| (buffer[i + 0] << 11)
-					| ((buffer[i + 3] & 0x7) << 8)
-					| (buffer[i + 2]);
-
-			src <<= 1;
-
-			uint32_t dest;
-			if (is_encoder)
-				dest = now_pos + (uint32_t)(i) + 4 + src;
-			else
-				dest = src - (now_pos + (uint32_t)(i) + 4);
-
-			dest >>= 1;
-			buffer[i + 1] = 0xF0 | ((dest >> 19) & 0x7);
-			buffer[i + 0] = (dest >> 11);
-			buffer[i + 3] = 0xF8 | ((dest >> 8) & 0x7);
-			buffer[i + 2] = (dest);
-			i += 2;
-		}
-	}
-
-	return i;
-}
-
-
-static lzma_ret
-armthumb_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters, bool is_encoder)
-{
-	return lzma_simple_coder_init(next, allocator, filters,
-			&armthumb_code, 0, 4, 2, is_encoder);
-}
-
-
-extern lzma_ret
-lzma_simple_armthumb_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return armthumb_coder_init(next, allocator, filters, true);
-}
-
-
-extern lzma_ret
-lzma_simple_armthumb_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return armthumb_coder_init(next, allocator, filters, false);
-}

Copied: vendor/xz/5.2.3/src/liblzma/simple/armthumb.c (from rev 11013, vendor/xz/dist/src/liblzma/simple/armthumb.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/simple/armthumb.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/simple/armthumb.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,76 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       armthumb.c
+/// \brief      Filter for ARM-Thumb binaries
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+static size_t
+armthumb_code(void *simple lzma_attribute((__unused__)),
+		uint32_t now_pos, bool is_encoder,
+		uint8_t *buffer, size_t size)
+{
+	size_t i;
+	for (i = 0; i + 4 <= size; i += 2) {
+		if ((buffer[i + 1] & 0xF8) == 0xF0
+				&& (buffer[i + 3] & 0xF8) == 0xF8) {
+			uint32_t src = ((buffer[i + 1] & 0x7) << 19)
+					| (buffer[i + 0] << 11)
+					| ((buffer[i + 3] & 0x7) << 8)
+					| (buffer[i + 2]);
+
+			src <<= 1;
+
+			uint32_t dest;
+			if (is_encoder)
+				dest = now_pos + (uint32_t)(i) + 4 + src;
+			else
+				dest = src - (now_pos + (uint32_t)(i) + 4);
+
+			dest >>= 1;
+			buffer[i + 1] = 0xF0 | ((dest >> 19) & 0x7);
+			buffer[i + 0] = (dest >> 11);
+			buffer[i + 3] = 0xF8 | ((dest >> 8) & 0x7);
+			buffer[i + 2] = (dest);
+			i += 2;
+		}
+	}
+
+	return i;
+}
+
+
+static lzma_ret
+armthumb_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters, bool is_encoder)
+{
+	return lzma_simple_coder_init(next, allocator, filters,
+			&armthumb_code, 0, 4, 2, is_encoder);
+}
+
+
+extern lzma_ret
+lzma_simple_armthumb_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	return armthumb_coder_init(next, allocator, filters, true);
+}
+
+
+extern lzma_ret
+lzma_simple_armthumb_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	return armthumb_coder_init(next, allocator, filters, false);
+}

Deleted: vendor/xz/5.2.3/src/liblzma/simple/ia64.c
===================================================================
--- vendor/xz/dist/src/liblzma/simple/ia64.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/simple/ia64.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,110 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       ia64.c
-/// \brief      Filter for IA64 (Itanium) binaries
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_private.h"
-
-
-static size_t
-ia64_code(lzma_simple *simple lzma_attribute((__unused__)),
-		uint32_t now_pos, bool is_encoder,
-		uint8_t *buffer, size_t size)
-{
-	static const uint32_t BRANCH_TABLE[32] = {
-		0, 0, 0, 0, 0, 0, 0, 0,
-		0, 0, 0, 0, 0, 0, 0, 0,
-		4, 4, 6, 6, 0, 0, 7, 7,
-		4, 4, 0, 0, 4, 4, 0, 0
-	};
-
-	size_t i;
-	for (i = 0; i + 16 <= size; i += 16) {
-		const uint32_t instr_template = buffer[i] & 0x1F;
-		const uint32_t mask = BRANCH_TABLE[instr_template];
-		uint32_t bit_pos = 5;
-
-		for (size_t slot = 0; slot < 3; ++slot, bit_pos += 41) {
-			if (((mask >> slot) & 1) == 0)
-				continue;
-
-			const size_t byte_pos = (bit_pos >> 3);
-			const uint32_t bit_res = bit_pos & 0x7;
-			uint64_t instruction = 0;
-
-			for (size_t j = 0; j < 6; ++j)
-				instruction += (uint64_t)(
-						buffer[i + j + byte_pos])
-						<< (8 * j);
-
-			uint64_t inst_norm = instruction >> bit_res;
-
-			if (((inst_norm >> 37) & 0xF) == 0x5
-					&& ((inst_norm >> 9) & 0x7) == 0
-					/* &&  (inst_norm & 0x3F)== 0 */
-					) {
-				uint32_t src = (uint32_t)(
-						(inst_norm >> 13) & 0xFFFFF);
-				src |= ((inst_norm >> 36) & 1) << 20;
-
-				src <<= 4;
-
-				uint32_t dest;
-				if (is_encoder)
-					dest = now_pos + (uint32_t)(i) + src;
-				else
-					dest = src - (now_pos + (uint32_t)(i));
-
-				dest >>= 4;
-
-				inst_norm &= ~((uint64_t)(0x8FFFFF) << 13);
-				inst_norm |= (uint64_t)(dest & 0xFFFFF) << 13;
-				inst_norm |= (uint64_t)(dest & 0x100000)
-						<< (36 - 20);
-
-				instruction &= (1 << bit_res) - 1;
-				instruction |= (inst_norm << bit_res);
-
-				for (size_t j = 0; j < 6; j++)
-					buffer[i + j + byte_pos] = (uint8_t)(
-							instruction
-							>> (8 * j));
-			}
-		}
-	}
-
-	return i;
-}
-
-
-static lzma_ret
-ia64_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters, bool is_encoder)
-{
-	return lzma_simple_coder_init(next, allocator, filters,
-			&ia64_code, 0, 16, 16, is_encoder);
-}
-
-
-extern lzma_ret
-lzma_simple_ia64_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return ia64_coder_init(next, allocator, filters, true);
-}
-
-
-extern lzma_ret
-lzma_simple_ia64_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return ia64_coder_init(next, allocator, filters, false);
-}

Copied: vendor/xz/5.2.3/src/liblzma/simple/ia64.c (from rev 11013, vendor/xz/dist/src/liblzma/simple/ia64.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/simple/ia64.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/simple/ia64.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,112 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       ia64.c
+/// \brief      Filter for IA64 (Itanium) binaries
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+static size_t
+ia64_code(void *simple lzma_attribute((__unused__)),
+		uint32_t now_pos, bool is_encoder,
+		uint8_t *buffer, size_t size)
+{
+	static const uint32_t BRANCH_TABLE[32] = {
+		0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0,
+		4, 4, 6, 6, 0, 0, 7, 7,
+		4, 4, 0, 0, 4, 4, 0, 0
+	};
+
+	size_t i;
+	for (i = 0; i + 16 <= size; i += 16) {
+		const uint32_t instr_template = buffer[i] & 0x1F;
+		const uint32_t mask = BRANCH_TABLE[instr_template];
+		uint32_t bit_pos = 5;
+
+		for (size_t slot = 0; slot < 3; ++slot, bit_pos += 41) {
+			if (((mask >> slot) & 1) == 0)
+				continue;
+
+			const size_t byte_pos = (bit_pos >> 3);
+			const uint32_t bit_res = bit_pos & 0x7;
+			uint64_t instruction = 0;
+
+			for (size_t j = 0; j < 6; ++j)
+				instruction += (uint64_t)(
+						buffer[i + j + byte_pos])
+						<< (8 * j);
+
+			uint64_t inst_norm = instruction >> bit_res;
+
+			if (((inst_norm >> 37) & 0xF) == 0x5
+					&& ((inst_norm >> 9) & 0x7) == 0
+					/* &&  (inst_norm & 0x3F)== 0 */
+					) {
+				uint32_t src = (uint32_t)(
+						(inst_norm >> 13) & 0xFFFFF);
+				src |= ((inst_norm >> 36) & 1) << 20;
+
+				src <<= 4;
+
+				uint32_t dest;
+				if (is_encoder)
+					dest = now_pos + (uint32_t)(i) + src;
+				else
+					dest = src - (now_pos + (uint32_t)(i));
+
+				dest >>= 4;
+
+				inst_norm &= ~((uint64_t)(0x8FFFFF) << 13);
+				inst_norm |= (uint64_t)(dest & 0xFFFFF) << 13;
+				inst_norm |= (uint64_t)(dest & 0x100000)
+						<< (36 - 20);
+
+				instruction &= (1 << bit_res) - 1;
+				instruction |= (inst_norm << bit_res);
+
+				for (size_t j = 0; j < 6; j++)
+					buffer[i + j + byte_pos] = (uint8_t)(
+							instruction
+							>> (8 * j));
+			}
+		}
+	}
+
+	return i;
+}
+
+
+static lzma_ret
+ia64_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters, bool is_encoder)
+{
+	return lzma_simple_coder_init(next, allocator, filters,
+			&ia64_code, 0, 16, 16, is_encoder);
+}
+
+
+extern lzma_ret
+lzma_simple_ia64_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	return ia64_coder_init(next, allocator, filters, true);
+}
+
+
+extern lzma_ret
+lzma_simple_ia64_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	return ia64_coder_init(next, allocator, filters, false);
+}

Deleted: vendor/xz/5.2.3/src/liblzma/simple/powerpc.c
===================================================================
--- vendor/xz/dist/src/liblzma/simple/powerpc.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/simple/powerpc.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,73 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       powerpc.c
-/// \brief      Filter for PowerPC (big endian) binaries
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_private.h"
-
-
-static size_t
-powerpc_code(lzma_simple *simple lzma_attribute((__unused__)),
-		uint32_t now_pos, bool is_encoder,
-		uint8_t *buffer, size_t size)
-{
-	size_t i;
-	for (i = 0; i + 4 <= size; i += 4) {
-		// PowerPC branch 6(48) 24(Offset) 1(Abs) 1(Link)
-		if ((buffer[i] >> 2) == 0x12
-				&& ((buffer[i + 3] & 3) == 1)) {
-
-			const uint32_t src = ((buffer[i + 0] & 3) << 24)
-					| (buffer[i + 1] << 16)
-					| (buffer[i + 2] << 8)
-					| (buffer[i + 3] & (~3));
-
-			uint32_t dest;
-			if (is_encoder)
-				dest = now_pos + (uint32_t)(i) + src;
-			else
-				dest = src - (now_pos + (uint32_t)(i));
-
-			buffer[i + 0] = 0x48 | ((dest >> 24) &  0x03);
-			buffer[i + 1] = (dest >> 16);
-			buffer[i + 2] = (dest >> 8);
-			buffer[i + 3] &= 0x03;
-			buffer[i + 3] |= dest;
-		}
-	}
-
-	return i;
-}
-
-
-static lzma_ret
-powerpc_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters, bool is_encoder)
-{
-	return lzma_simple_coder_init(next, allocator, filters,
-			&powerpc_code, 0, 4, 4, is_encoder);
-}
-
-
-extern lzma_ret
-lzma_simple_powerpc_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return powerpc_coder_init(next, allocator, filters, true);
-}
-
-
-extern lzma_ret
-lzma_simple_powerpc_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return powerpc_coder_init(next, allocator, filters, false);
-}

Copied: vendor/xz/5.2.3/src/liblzma/simple/powerpc.c (from rev 11013, vendor/xz/dist/src/liblzma/simple/powerpc.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/simple/powerpc.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/simple/powerpc.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,75 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       powerpc.c
+/// \brief      Filter for PowerPC (big endian) binaries
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+static size_t
+powerpc_code(void *simple lzma_attribute((__unused__)),
+		uint32_t now_pos, bool is_encoder,
+		uint8_t *buffer, size_t size)
+{
+	size_t i;
+	for (i = 0; i + 4 <= size; i += 4) {
+		// PowerPC branch 6(48) 24(Offset) 1(Abs) 1(Link)
+		if ((buffer[i] >> 2) == 0x12
+				&& ((buffer[i + 3] & 3) == 1)) {
+
+			const uint32_t src = ((buffer[i + 0] & 3) << 24)
+					| (buffer[i + 1] << 16)
+					| (buffer[i + 2] << 8)
+					| (buffer[i + 3] & (~3));
+
+			uint32_t dest;
+			if (is_encoder)
+				dest = now_pos + (uint32_t)(i) + src;
+			else
+				dest = src - (now_pos + (uint32_t)(i));
+
+			buffer[i + 0] = 0x48 | ((dest >> 24) &  0x03);
+			buffer[i + 1] = (dest >> 16);
+			buffer[i + 2] = (dest >> 8);
+			buffer[i + 3] &= 0x03;
+			buffer[i + 3] |= dest;
+		}
+	}
+
+	return i;
+}
+
+
+static lzma_ret
+powerpc_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters, bool is_encoder)
+{
+	return lzma_simple_coder_init(next, allocator, filters,
+			&powerpc_code, 0, 4, 4, is_encoder);
+}
+
+
+extern lzma_ret
+lzma_simple_powerpc_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	return powerpc_coder_init(next, allocator, filters, true);
+}
+
+
+extern lzma_ret
+lzma_simple_powerpc_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	return powerpc_coder_init(next, allocator, filters, false);
+}

Deleted: vendor/xz/5.2.3/src/liblzma/simple/simple_coder.c
===================================================================
--- vendor/xz/dist/src/liblzma/simple/simple_coder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/simple/simple_coder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,277 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       simple_coder.c
-/// \brief      Wrapper for simple filters
-///
-/// Simple filters don't change the size of the data i.e. number of bytes
-/// in equals the number of bytes out.
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_private.h"
-
-
-/// Copied or encodes/decodes more data to out[].
-static lzma_ret
-copy_or_code(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)
-{
-	assert(!coder->end_was_reached);
-
-	if (coder->next.code == NULL) {
-		lzma_bufcpy(in, in_pos, in_size, out, out_pos, out_size);
-
-		// Check if end of stream was reached.
-		if (coder->is_encoder && action == LZMA_FINISH
-				&& *in_pos == in_size)
-			coder->end_was_reached = true;
-
-	} else {
-		// Call the next coder in the chain to provide us some data.
-		const lzma_ret ret = coder->next.code(
-				coder->next.coder, allocator,
-				in, in_pos, in_size,
-				out, out_pos, out_size, action);
-
-		if (ret == LZMA_STREAM_END) {
-			assert(!coder->is_encoder
-					|| action == LZMA_FINISH);
-			coder->end_was_reached = true;
-
-		} else if (ret != LZMA_OK) {
-			return ret;
-		}
-	}
-
-	return LZMA_OK;
-}
-
-
-static size_t
-call_filter(lzma_coder *coder, uint8_t *buffer, size_t size)
-{
-	const size_t filtered = coder->filter(coder->simple,
-			coder->now_pos, coder->is_encoder,
-			buffer, size);
-	coder->now_pos += filtered;
-	return filtered;
-}
-
-
-static lzma_ret
-simple_code(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)
-{
-	// TODO: Add partial support for LZMA_SYNC_FLUSH. We can support it
-	// in cases when the filter is able to filter everything. With most
-	// simple filters it can be done at offset that is a multiple of 2,
-	// 4, or 16. With x86 filter, it needs good luck, and thus cannot
-	// be made to work predictably.
-	if (action == LZMA_SYNC_FLUSH)
-		return LZMA_OPTIONS_ERROR;
-
-	// Flush already filtered data from coder->buffer[] to out[].
-	if (coder->pos < coder->filtered) {
-		lzma_bufcpy(coder->buffer, &coder->pos, coder->filtered,
-				out, out_pos, out_size);
-
-		// If we couldn't flush all the filtered data, return to
-		// application immediately.
-		if (coder->pos < coder->filtered)
-			return LZMA_OK;
-
-		if (coder->end_was_reached) {
-			assert(coder->filtered == coder->size);
-			return LZMA_STREAM_END;
-		}
-	}
-
-	// If we get here, there is no filtered data left in the buffer.
-	coder->filtered = 0;
-
-	assert(!coder->end_was_reached);
-
-	// If there is more output space left than there is unfiltered data
-	// in coder->buffer[], flush coder->buffer[] to out[], and copy/code
-	// more data to out[] hopefully filling it completely. Then filter
-	// the data in out[]. This step is where most of the data gets
-	// filtered if the buffer sizes used by the application are reasonable.
-	const size_t out_avail = out_size - *out_pos;
-	const size_t buf_avail = coder->size - coder->pos;
-	if (out_avail > buf_avail || buf_avail == 0) {
-		// Store the old position so that we know from which byte
-		// to start filtering.
-		const size_t out_start = *out_pos;
-
-		// Flush data from coder->buffer[] to out[], but don't reset
-		// coder->pos and coder->size yet. This way the coder can be
-		// restarted if the next filter in the chain returns e.g.
-		// LZMA_MEM_ERROR.
-		memcpy(out + *out_pos, coder->buffer + coder->pos, buf_avail);
-		*out_pos += buf_avail;
-
-		// Copy/Encode/Decode more data to out[].
-		{
-			const lzma_ret ret = copy_or_code(coder, allocator,
-					in, in_pos, in_size,
-					out, out_pos, out_size, action);
-			assert(ret != LZMA_STREAM_END);
-			if (ret != LZMA_OK)
-				return ret;
-		}
-
-		// Filter out[].
-		const size_t size = *out_pos - out_start;
-		const size_t filtered = call_filter(
-				coder, out + out_start, size);
-
-		const size_t unfiltered = size - filtered;
-		assert(unfiltered <= coder->allocated / 2);
-
-		// Now we can update coder->pos and coder->size, because
-		// the next coder in the chain (if any) was successful.
-		coder->pos = 0;
-		coder->size = unfiltered;
-
-		if (coder->end_was_reached) {
-			// The last byte has been copied to out[] already.
-			// They are left as is.
-			coder->size = 0;
-
-		} else if (unfiltered > 0) {
-			// There is unfiltered data left in out[]. Copy it to
-			// coder->buffer[] and rewind *out_pos appropriately.
-			*out_pos -= unfiltered;
-			memcpy(coder->buffer, out + *out_pos, unfiltered);
-		}
-	} else if (coder->pos > 0) {
-		memmove(coder->buffer, coder->buffer + coder->pos, buf_avail);
-		coder->size -= coder->pos;
-		coder->pos = 0;
-	}
-
-	assert(coder->pos == 0);
-
-	// If coder->buffer[] isn't empty, try to fill it by copying/decoding
-	// more data. Then filter coder->buffer[] and copy the successfully
-	// filtered data to out[]. It is probable, that some filtered and
-	// unfiltered data will be left to coder->buffer[].
-	if (coder->size > 0) {
-		{
-			const lzma_ret ret = copy_or_code(coder, allocator,
-					in, in_pos, in_size,
-					coder->buffer, &coder->size,
-					coder->allocated, action);
-			assert(ret != LZMA_STREAM_END);
-			if (ret != LZMA_OK)
-				return ret;
-		}
-
-		coder->filtered = call_filter(
-				coder, coder->buffer, coder->size);
-
-		// Everything is considered to be filtered if coder->buffer[]
-		// contains the last bytes of the data.
-		if (coder->end_was_reached)
-			coder->filtered = coder->size;
-
-		// Flush as much as possible.
-		lzma_bufcpy(coder->buffer, &coder->pos, coder->filtered,
-				out, out_pos, out_size);
-	}
-
-	// Check if we got everything done.
-	if (coder->end_was_reached && coder->pos == coder->size)
-		return LZMA_STREAM_END;
-
-	return LZMA_OK;
-}
-
-
-static void
-simple_coder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder->simple, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_ret
-simple_coder_update(lzma_coder *coder, lzma_allocator *allocator,
-		const lzma_filter *filters_null lzma_attribute((__unused__)),
-		const lzma_filter *reversed_filters)
-{
-	// No update support, just call the next filter in the chain.
-	return lzma_next_filter_update(
-			&coder->next, allocator, reversed_filters + 1);
-}
-
-
-extern lzma_ret
-lzma_simple_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters,
-		size_t (*filter)(lzma_simple *simple, uint32_t now_pos,
-			bool is_encoder, uint8_t *buffer, size_t size),
-		size_t simple_size, size_t unfiltered_max,
-		uint32_t alignment, bool is_encoder)
-{
-	// Allocate memory for the lzma_coder structure if needed.
-	if (next->coder == NULL) {
-		// Here we allocate space also for the temporary buffer. We
-		// need twice the size of unfiltered_max, because then it
-		// is always possible to filter at least unfiltered_max bytes
-		// more data in coder->buffer[] if it can be filled completely.
-		next->coder = lzma_alloc(sizeof(lzma_coder)
-				+ 2 * unfiltered_max, allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &simple_code;
-		next->end = &simple_coder_end;
-		next->update = &simple_coder_update;
-
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-		next->coder->filter = filter;
-		next->coder->allocated = 2 * unfiltered_max;
-
-		// Allocate memory for filter-specific data structure.
-		if (simple_size > 0) {
-			next->coder->simple = lzma_alloc(
-					simple_size, allocator);
-			if (next->coder->simple == NULL)
-				return LZMA_MEM_ERROR;
-		} else {
-			next->coder->simple = NULL;
-		}
-	}
-
-	if (filters[0].options != NULL) {
-		const lzma_options_bcj *simple = filters[0].options;
-		next->coder->now_pos = simple->start_offset;
-		if (next->coder->now_pos & (alignment - 1))
-			return LZMA_OPTIONS_ERROR;
-	} else {
-		next->coder->now_pos = 0;
-	}
-
-	// Reset variables.
-	next->coder->is_encoder = is_encoder;
-	next->coder->end_was_reached = false;
-	next->coder->pos = 0;
-	next->coder->filtered = 0;
-	next->coder->size = 0;
-
-	return lzma_next_filter_init(
-			&next->coder->next, allocator, filters + 1);
-}

Copied: vendor/xz/5.2.3/src/liblzma/simple/simple_coder.c (from rev 11013, vendor/xz/dist/src/liblzma/simple/simple_coder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/simple/simple_coder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/simple/simple_coder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,282 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       simple_coder.c
+/// \brief      Wrapper for simple filters
+///
+/// Simple filters don't change the size of the data i.e. number of bytes
+/// in equals the number of bytes out.
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+/// Copied or encodes/decodes more data to out[].
+static lzma_ret
+copy_or_code(lzma_simple_coder *coder, const 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)
+{
+	assert(!coder->end_was_reached);
+
+	if (coder->next.code == NULL) {
+		lzma_bufcpy(in, in_pos, in_size, out, out_pos, out_size);
+
+		// Check if end of stream was reached.
+		if (coder->is_encoder && action == LZMA_FINISH
+				&& *in_pos == in_size)
+			coder->end_was_reached = true;
+
+	} else {
+		// Call the next coder in the chain to provide us some data.
+		const lzma_ret ret = coder->next.code(
+				coder->next.coder, allocator,
+				in, in_pos, in_size,
+				out, out_pos, out_size, action);
+
+		if (ret == LZMA_STREAM_END) {
+			assert(!coder->is_encoder
+					|| action == LZMA_FINISH);
+			coder->end_was_reached = true;
+
+		} else if (ret != LZMA_OK) {
+			return ret;
+		}
+	}
+
+	return LZMA_OK;
+}
+
+
+static size_t
+call_filter(lzma_simple_coder *coder, uint8_t *buffer, size_t size)
+{
+	const size_t filtered = coder->filter(coder->simple,
+			coder->now_pos, coder->is_encoder,
+			buffer, size);
+	coder->now_pos += filtered;
+	return filtered;
+}
+
+
+static lzma_ret
+simple_code(void *coder_ptr, const 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)
+{
+	lzma_simple_coder *coder = coder_ptr;
+
+	// TODO: Add partial support for LZMA_SYNC_FLUSH. We can support it
+	// in cases when the filter is able to filter everything. With most
+	// simple filters it can be done at offset that is a multiple of 2,
+	// 4, or 16. With x86 filter, it needs good luck, and thus cannot
+	// be made to work predictably.
+	if (action == LZMA_SYNC_FLUSH)
+		return LZMA_OPTIONS_ERROR;
+
+	// Flush already filtered data from coder->buffer[] to out[].
+	if (coder->pos < coder->filtered) {
+		lzma_bufcpy(coder->buffer, &coder->pos, coder->filtered,
+				out, out_pos, out_size);
+
+		// If we couldn't flush all the filtered data, return to
+		// application immediately.
+		if (coder->pos < coder->filtered)
+			return LZMA_OK;
+
+		if (coder->end_was_reached) {
+			assert(coder->filtered == coder->size);
+			return LZMA_STREAM_END;
+		}
+	}
+
+	// If we get here, there is no filtered data left in the buffer.
+	coder->filtered = 0;
+
+	assert(!coder->end_was_reached);
+
+	// If there is more output space left than there is unfiltered data
+	// in coder->buffer[], flush coder->buffer[] to out[], and copy/code
+	// more data to out[] hopefully filling it completely. Then filter
+	// the data in out[]. This step is where most of the data gets
+	// filtered if the buffer sizes used by the application are reasonable.
+	const size_t out_avail = out_size - *out_pos;
+	const size_t buf_avail = coder->size - coder->pos;
+	if (out_avail > buf_avail || buf_avail == 0) {
+		// Store the old position so that we know from which byte
+		// to start filtering.
+		const size_t out_start = *out_pos;
+
+		// Flush data from coder->buffer[] to out[], but don't reset
+		// coder->pos and coder->size yet. This way the coder can be
+		// restarted if the next filter in the chain returns e.g.
+		// LZMA_MEM_ERROR.
+		memcpy(out + *out_pos, coder->buffer + coder->pos, buf_avail);
+		*out_pos += buf_avail;
+
+		// Copy/Encode/Decode more data to out[].
+		{
+			const lzma_ret ret = copy_or_code(coder, allocator,
+					in, in_pos, in_size,
+					out, out_pos, out_size, action);
+			assert(ret != LZMA_STREAM_END);
+			if (ret != LZMA_OK)
+				return ret;
+		}
+
+		// Filter out[].
+		const size_t size = *out_pos - out_start;
+		const size_t filtered = call_filter(
+				coder, out + out_start, size);
+
+		const size_t unfiltered = size - filtered;
+		assert(unfiltered <= coder->allocated / 2);
+
+		// Now we can update coder->pos and coder->size, because
+		// the next coder in the chain (if any) was successful.
+		coder->pos = 0;
+		coder->size = unfiltered;
+
+		if (coder->end_was_reached) {
+			// The last byte has been copied to out[] already.
+			// They are left as is.
+			coder->size = 0;
+
+		} else if (unfiltered > 0) {
+			// There is unfiltered data left in out[]. Copy it to
+			// coder->buffer[] and rewind *out_pos appropriately.
+			*out_pos -= unfiltered;
+			memcpy(coder->buffer, out + *out_pos, unfiltered);
+		}
+	} else if (coder->pos > 0) {
+		memmove(coder->buffer, coder->buffer + coder->pos, buf_avail);
+		coder->size -= coder->pos;
+		coder->pos = 0;
+	}
+
+	assert(coder->pos == 0);
+
+	// If coder->buffer[] isn't empty, try to fill it by copying/decoding
+	// more data. Then filter coder->buffer[] and copy the successfully
+	// filtered data to out[]. It is probable, that some filtered and
+	// unfiltered data will be left to coder->buffer[].
+	if (coder->size > 0) {
+		{
+			const lzma_ret ret = copy_or_code(coder, allocator,
+					in, in_pos, in_size,
+					coder->buffer, &coder->size,
+					coder->allocated, action);
+			assert(ret != LZMA_STREAM_END);
+			if (ret != LZMA_OK)
+				return ret;
+		}
+
+		coder->filtered = call_filter(
+				coder, coder->buffer, coder->size);
+
+		// Everything is considered to be filtered if coder->buffer[]
+		// contains the last bytes of the data.
+		if (coder->end_was_reached)
+			coder->filtered = coder->size;
+
+		// Flush as much as possible.
+		lzma_bufcpy(coder->buffer, &coder->pos, coder->filtered,
+				out, out_pos, out_size);
+	}
+
+	// Check if we got everything done.
+	if (coder->end_was_reached && coder->pos == coder->size)
+		return LZMA_STREAM_END;
+
+	return LZMA_OK;
+}
+
+
+static void
+simple_coder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+	lzma_simple_coder *coder = coder_ptr;
+	lzma_next_end(&coder->next, allocator);
+	lzma_free(coder->simple, allocator);
+	lzma_free(coder, allocator);
+	return;
+}
+
+
+static lzma_ret
+simple_coder_update(void *coder_ptr, const lzma_allocator *allocator,
+		const lzma_filter *filters_null lzma_attribute((__unused__)),
+		const lzma_filter *reversed_filters)
+{
+	lzma_simple_coder *coder = coder_ptr;
+
+	// No update support, just call the next filter in the chain.
+	return lzma_next_filter_update(
+			&coder->next, allocator, reversed_filters + 1);
+}
+
+
+extern lzma_ret
+lzma_simple_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters,
+		size_t (*filter)(void *simple, uint32_t now_pos,
+			bool is_encoder, uint8_t *buffer, size_t size),
+		size_t simple_size, size_t unfiltered_max,
+		uint32_t alignment, bool is_encoder)
+{
+	// Allocate memory for the lzma_simple_coder structure if needed.
+	lzma_simple_coder *coder = next->coder;
+	if (coder == NULL) {
+		// Here we allocate space also for the temporary buffer. We
+		// need twice the size of unfiltered_max, because then it
+		// is always possible to filter at least unfiltered_max bytes
+		// more data in coder->buffer[] if it can be filled completely.
+		coder = lzma_alloc(sizeof(lzma_simple_coder)
+				+ 2 * unfiltered_max, allocator);
+		if (coder == NULL)
+			return LZMA_MEM_ERROR;
+
+		next->coder = coder;
+		next->code = &simple_code;
+		next->end = &simple_coder_end;
+		next->update = &simple_coder_update;
+
+		coder->next = LZMA_NEXT_CODER_INIT;
+		coder->filter = filter;
+		coder->allocated = 2 * unfiltered_max;
+
+		// Allocate memory for filter-specific data structure.
+		if (simple_size > 0) {
+			coder->simple = lzma_alloc(simple_size, allocator);
+			if (coder->simple == NULL)
+				return LZMA_MEM_ERROR;
+		} else {
+			coder->simple = NULL;
+		}
+	}
+
+	if (filters[0].options != NULL) {
+		const lzma_options_bcj *simple = filters[0].options;
+		coder->now_pos = simple->start_offset;
+		if (coder->now_pos & (alignment - 1))
+			return LZMA_OPTIONS_ERROR;
+	} else {
+		coder->now_pos = 0;
+	}
+
+	// Reset variables.
+	coder->is_encoder = is_encoder;
+	coder->end_was_reached = false;
+	coder->pos = 0;
+	coder->filtered = 0;
+	coder->size = 0;
+
+	return lzma_next_filter_init(&coder->next, allocator, filters + 1);
+}

Deleted: vendor/xz/5.2.3/src/liblzma/simple/simple_coder.h
===================================================================
--- vendor/xz/dist/src/liblzma/simple/simple_coder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/simple/simple_coder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,60 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       simple_coder.h
-/// \brief      Wrapper for simple filters
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_SIMPLE_CODER_H
-#define LZMA_SIMPLE_CODER_H
-
-#include "common.h"
-
-
-extern lzma_ret lzma_simple_x86_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_simple_x86_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-
-extern lzma_ret lzma_simple_powerpc_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_simple_powerpc_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-
-extern lzma_ret lzma_simple_ia64_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_simple_ia64_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-
-extern lzma_ret lzma_simple_arm_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_simple_arm_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-
-extern lzma_ret lzma_simple_armthumb_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_simple_armthumb_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-
-extern lzma_ret lzma_simple_sparc_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_simple_sparc_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/simple/simple_coder.h (from rev 9176, vendor/xz/dist/src/liblzma/simple/simple_coder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/simple/simple_coder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/simple/simple_coder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,72 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       simple_coder.h
+/// \brief      Wrapper for simple filters
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_SIMPLE_CODER_H
+#define LZMA_SIMPLE_CODER_H
+
+#include "common.h"
+
+
+extern lzma_ret lzma_simple_x86_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+extern lzma_ret lzma_simple_x86_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+
+extern lzma_ret lzma_simple_powerpc_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+extern lzma_ret lzma_simple_powerpc_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+
+extern lzma_ret lzma_simple_ia64_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+extern lzma_ret lzma_simple_ia64_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+
+extern lzma_ret lzma_simple_arm_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+extern lzma_ret lzma_simple_arm_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+
+extern lzma_ret lzma_simple_armthumb_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+extern lzma_ret lzma_simple_armthumb_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+
+extern lzma_ret lzma_simple_sparc_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+extern lzma_ret lzma_simple_sparc_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/simple/simple_decoder.c
===================================================================
--- vendor/xz/dist/src/liblzma/simple/simple_decoder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/simple/simple_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,40 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       simple_decoder.c
-/// \brief      Properties decoder for simple filters
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_decoder.h"
-
-
-extern lzma_ret
-lzma_simple_props_decode(void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size)
-{
-	if (props_size == 0)
-		return LZMA_OK;
-
-	if (props_size != 4)
-		return LZMA_OPTIONS_ERROR;
-
-	lzma_options_bcj *opt = lzma_alloc(
-			sizeof(lzma_options_bcj), allocator);
-	if (opt == NULL)
-		return LZMA_MEM_ERROR;
-
-	opt->start_offset = unaligned_read32le(props);
-
-	// Don't leave an options structure allocated if start_offset is zero.
-	if (opt->start_offset == 0)
-		lzma_free(opt, allocator);
-	else
-		*options = opt;
-
-	return LZMA_OK;
-}

Copied: vendor/xz/5.2.3/src/liblzma/simple/simple_decoder.c (from rev 9176, vendor/xz/dist/src/liblzma/simple/simple_decoder.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/simple/simple_decoder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/simple/simple_decoder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,40 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       simple_decoder.c
+/// \brief      Properties decoder for simple filters
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_decoder.h"
+
+
+extern lzma_ret
+lzma_simple_props_decode(void **options, const lzma_allocator *allocator,
+		const uint8_t *props, size_t props_size)
+{
+	if (props_size == 0)
+		return LZMA_OK;
+
+	if (props_size != 4)
+		return LZMA_OPTIONS_ERROR;
+
+	lzma_options_bcj *opt = lzma_alloc(
+			sizeof(lzma_options_bcj), allocator);
+	if (opt == NULL)
+		return LZMA_MEM_ERROR;
+
+	opt->start_offset = unaligned_read32le(props);
+
+	// Don't leave an options structure allocated if start_offset is zero.
+	if (opt->start_offset == 0)
+		lzma_free(opt, allocator);
+	else
+		*options = opt;
+
+	return LZMA_OK;
+}

Deleted: vendor/xz/5.2.3/src/liblzma/simple/simple_decoder.h
===================================================================
--- vendor/xz/dist/src/liblzma/simple/simple_decoder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/simple/simple_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,22 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       simple_decoder.h
-/// \brief      Properties decoder for simple filters
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_SIMPLE_DECODER_H
-#define LZMA_SIMPLE_DECODER_H
-
-#include "simple_coder.h"
-
-extern lzma_ret lzma_simple_props_decode(
-		void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/simple/simple_decoder.h (from rev 9176, vendor/xz/dist/src/liblzma/simple/simple_decoder.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/simple/simple_decoder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/simple/simple_decoder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       simple_decoder.h
+/// \brief      Properties decoder for simple filters
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_SIMPLE_DECODER_H
+#define LZMA_SIMPLE_DECODER_H
+
+#include "simple_coder.h"
+
+extern lzma_ret lzma_simple_props_decode(
+		void **options, const lzma_allocator *allocator,
+		const uint8_t *props, size_t props_size);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/simple/simple_private.h
===================================================================
--- vendor/xz/dist/src/liblzma/simple/simple_private.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/simple/simple_private.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,75 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       simple_private.h
-/// \brief      Private definitions for so called simple filters
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_SIMPLE_PRIVATE_H
-#define LZMA_SIMPLE_PRIVATE_H
-
-#include "simple_coder.h"
-
-
-typedef struct lzma_simple_s lzma_simple;
-
-struct lzma_coder_s {
-	/// Next filter in the chain
-	lzma_next_coder next;
-
-	/// True if the next coder in the chain has returned LZMA_STREAM_END.
-	bool end_was_reached;
-
-	/// True if filter() should encode the data; false to decode.
-	/// Currently all simple filters use the same function for encoding
-	/// and decoding, because the difference between encoders and decoders
-	/// is very small.
-	bool is_encoder;
-
-	/// Pointer to filter-specific function, which does
-	/// the actual filtering.
-	size_t (*filter)(lzma_simple *simple, uint32_t now_pos,
-			bool is_encoder, uint8_t *buffer, size_t size);
-
-	/// Pointer to filter-specific data, or NULL if filter doesn't need
-	/// any extra data.
-	lzma_simple *simple;
-
-	/// The lowest 32 bits of the current position in the data. Most
-	/// filters need this to do conversions between absolute and relative
-	/// addresses.
-	uint32_t now_pos;
-
-	/// Size of the memory allocated for the buffer.
-	size_t allocated;
-
-	/// Flushing position in the temporary buffer. buffer[pos] is the
-	/// next byte to be copied to out[].
-	size_t pos;
-
-	/// buffer[filtered] is the first unfiltered byte. When pos is smaller
-	/// than filtered, there is unflushed filtered data in the buffer.
-	size_t filtered;
-
-	/// Total number of bytes (both filtered and unfiltered) currently
-	/// in the temporary buffer.
-	size_t size;
-
-	/// Temporary buffer
-	uint8_t buffer[];
-};
-
-
-extern lzma_ret lzma_simple_coder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters,
-		size_t (*filter)(lzma_simple *simple, uint32_t now_pos,
-			bool is_encoder, uint8_t *buffer, size_t size),
-		size_t simple_size, size_t unfiltered_max,
-		uint32_t alignment, bool is_encoder);
-
-#endif

Copied: vendor/xz/5.2.3/src/liblzma/simple/simple_private.h (from rev 11013, vendor/xz/dist/src/liblzma/simple/simple_private.h)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/simple/simple_private.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/simple/simple_private.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,74 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       simple_private.h
+/// \brief      Private definitions for so called simple filters
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_SIMPLE_PRIVATE_H
+#define LZMA_SIMPLE_PRIVATE_H
+
+#include "simple_coder.h"
+
+
+typedef struct {
+	/// Next filter in the chain
+	lzma_next_coder next;
+
+	/// True if the next coder in the chain has returned LZMA_STREAM_END.
+	bool end_was_reached;
+
+	/// True if filter() should encode the data; false to decode.
+	/// Currently all simple filters use the same function for encoding
+	/// and decoding, because the difference between encoders and decoders
+	/// is very small.
+	bool is_encoder;
+
+	/// Pointer to filter-specific function, which does
+	/// the actual filtering.
+	size_t (*filter)(void *simple, uint32_t now_pos,
+			bool is_encoder, uint8_t *buffer, size_t size);
+
+	/// Pointer to filter-specific data, or NULL if filter doesn't need
+	/// any extra data.
+	void *simple;
+
+	/// The lowest 32 bits of the current position in the data. Most
+	/// filters need this to do conversions between absolute and relative
+	/// addresses.
+	uint32_t now_pos;
+
+	/// Size of the memory allocated for the buffer.
+	size_t allocated;
+
+	/// Flushing position in the temporary buffer. buffer[pos] is the
+	/// next byte to be copied to out[].
+	size_t pos;
+
+	/// buffer[filtered] is the first unfiltered byte. When pos is smaller
+	/// than filtered, there is unflushed filtered data in the buffer.
+	size_t filtered;
+
+	/// Total number of bytes (both filtered and unfiltered) currently
+	/// in the temporary buffer.
+	size_t size;
+
+	/// Temporary buffer
+	uint8_t buffer[];
+} lzma_simple_coder;
+
+
+extern lzma_ret lzma_simple_coder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters,
+		size_t (*filter)(void *simple, uint32_t now_pos,
+			bool is_encoder, uint8_t *buffer, size_t size),
+		size_t simple_size, size_t unfiltered_max,
+		uint32_t alignment, bool is_encoder);
+
+#endif

Deleted: vendor/xz/5.2.3/src/liblzma/simple/sparc.c
===================================================================
--- vendor/xz/dist/src/liblzma/simple/sparc.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/simple/sparc.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,81 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       sparc.c
-/// \brief      Filter for SPARC binaries
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_private.h"
-
-
-static size_t
-sparc_code(lzma_simple *simple lzma_attribute((__unused__)),
-		uint32_t now_pos, bool is_encoder,
-		uint8_t *buffer, size_t size)
-{
-	size_t i;
-	for (i = 0; i + 4 <= size; i += 4) {
-
-		if ((buffer[i] == 0x40 && (buffer[i + 1] & 0xC0) == 0x00)
-				|| (buffer[i] == 0x7F
-				&& (buffer[i + 1] & 0xC0) == 0xC0)) {
-
-			uint32_t src = ((uint32_t)buffer[i + 0] << 24)
-					| ((uint32_t)buffer[i + 1] << 16)
-					| ((uint32_t)buffer[i + 2] << 8)
-					| ((uint32_t)buffer[i + 3]);
-
-			src <<= 2;
-
-			uint32_t dest;
-			if (is_encoder)
-				dest = now_pos + (uint32_t)(i) + src;
-			else
-				dest = src - (now_pos + (uint32_t)(i));
-
-			dest >>= 2;
-
-			dest = (((0 - ((dest >> 22) & 1)) << 22) & 0x3FFFFFFF)
-					| (dest & 0x3FFFFF)
-					| 0x40000000;
-
-			buffer[i + 0] = (uint8_t)(dest >> 24);
-			buffer[i + 1] = (uint8_t)(dest >> 16);
-			buffer[i + 2] = (uint8_t)(dest >> 8);
-			buffer[i + 3] = (uint8_t)(dest);
-		}
-	}
-
-	return i;
-}
-
-
-static lzma_ret
-sparc_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters, bool is_encoder)
-{
-	return lzma_simple_coder_init(next, allocator, filters,
-			&sparc_code, 0, 4, 4, is_encoder);
-}
-
-
-extern lzma_ret
-lzma_simple_sparc_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return sparc_coder_init(next, allocator, filters, true);
-}
-
-
-extern lzma_ret
-lzma_simple_sparc_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return sparc_coder_init(next, allocator, filters, false);
-}

Copied: vendor/xz/5.2.3/src/liblzma/simple/sparc.c (from rev 11013, vendor/xz/dist/src/liblzma/simple/sparc.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/simple/sparc.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/simple/sparc.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,83 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       sparc.c
+/// \brief      Filter for SPARC binaries
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+static size_t
+sparc_code(void *simple lzma_attribute((__unused__)),
+		uint32_t now_pos, bool is_encoder,
+		uint8_t *buffer, size_t size)
+{
+	size_t i;
+	for (i = 0; i + 4 <= size; i += 4) {
+
+		if ((buffer[i] == 0x40 && (buffer[i + 1] & 0xC0) == 0x00)
+				|| (buffer[i] == 0x7F
+				&& (buffer[i + 1] & 0xC0) == 0xC0)) {
+
+			uint32_t src = ((uint32_t)buffer[i + 0] << 24)
+					| ((uint32_t)buffer[i + 1] << 16)
+					| ((uint32_t)buffer[i + 2] << 8)
+					| ((uint32_t)buffer[i + 3]);
+
+			src <<= 2;
+
+			uint32_t dest;
+			if (is_encoder)
+				dest = now_pos + (uint32_t)(i) + src;
+			else
+				dest = src - (now_pos + (uint32_t)(i));
+
+			dest >>= 2;
+
+			dest = (((0 - ((dest >> 22) & 1)) << 22) & 0x3FFFFFFF)
+					| (dest & 0x3FFFFF)
+					| 0x40000000;
+
+			buffer[i + 0] = (uint8_t)(dest >> 24);
+			buffer[i + 1] = (uint8_t)(dest >> 16);
+			buffer[i + 2] = (uint8_t)(dest >> 8);
+			buffer[i + 3] = (uint8_t)(dest);
+		}
+	}
+
+	return i;
+}
+
+
+static lzma_ret
+sparc_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters, bool is_encoder)
+{
+	return lzma_simple_coder_init(next, allocator, filters,
+			&sparc_code, 0, 4, 4, is_encoder);
+}
+
+
+extern lzma_ret
+lzma_simple_sparc_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	return sparc_coder_init(next, allocator, filters, true);
+}
+
+
+extern lzma_ret
+lzma_simple_sparc_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	return sparc_coder_init(next, allocator, filters, false);
+}

Deleted: vendor/xz/5.2.3/src/liblzma/simple/x86.c
===================================================================
--- vendor/xz/dist/src/liblzma/simple/x86.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/liblzma/simple/x86.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,154 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       x86.c
-/// \brief      Filter for x86 binaries (BCJ filter)
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_private.h"
-
-
-#define Test86MSByte(b) ((b) == 0 || (b) == 0xFF)
-
-
-struct lzma_simple_s {
-	uint32_t prev_mask;
-	uint32_t prev_pos;
-};
-
-
-static size_t
-x86_code(lzma_simple *simple, uint32_t now_pos, bool is_encoder,
-		uint8_t *buffer, size_t size)
-{
-	static const bool MASK_TO_ALLOWED_STATUS[8]
-		= { true, true, true, false, true, false, false, false };
-
-	static const uint32_t MASK_TO_BIT_NUMBER[8]
-			= { 0, 1, 2, 2, 3, 3, 3, 3 };
-
-	uint32_t prev_mask = simple->prev_mask;
-	uint32_t prev_pos = simple->prev_pos;
-
-	if (size < 5)
-		return 0;
-
-	if (now_pos - prev_pos > 5)
-		prev_pos = now_pos - 5;
-
-	const size_t limit = size - 5;
-	size_t buffer_pos = 0;
-
-	while (buffer_pos <= limit) {
-		uint8_t b = buffer[buffer_pos];
-		if (b != 0xE8 && b != 0xE9) {
-			++buffer_pos;
-			continue;
-		}
-
-		const uint32_t offset = now_pos + (uint32_t)(buffer_pos)
-				- prev_pos;
-		prev_pos = now_pos + (uint32_t)(buffer_pos);
-
-		if (offset > 5) {
-			prev_mask = 0;
-		} else {
-			for (uint32_t i = 0; i < offset; ++i) {
-				prev_mask &= 0x77;
-				prev_mask <<= 1;
-			}
-		}
-
-		b = buffer[buffer_pos + 4];
-
-		if (Test86MSByte(b)
-			&& MASK_TO_ALLOWED_STATUS[(prev_mask >> 1) & 0x7]
-				&& (prev_mask >> 1) < 0x10) {
-
-			uint32_t src = ((uint32_t)(b) << 24)
-				| ((uint32_t)(buffer[buffer_pos + 3]) << 16)
-				| ((uint32_t)(buffer[buffer_pos + 2]) << 8)
-				| (buffer[buffer_pos + 1]);
-
-			uint32_t dest;
-			while (true) {
-				if (is_encoder)
-					dest = src + (now_pos + (uint32_t)(
-							buffer_pos) + 5);
-				else
-					dest = src - (now_pos + (uint32_t)(
-							buffer_pos) + 5);
-
-				if (prev_mask == 0)
-					break;
-
-				const uint32_t i = MASK_TO_BIT_NUMBER[
-						prev_mask >> 1];
-
-				b = (uint8_t)(dest >> (24 - i * 8));
-
-				if (!Test86MSByte(b))
-					break;
-
-				src = dest ^ ((1 << (32 - i * 8)) - 1);
-			}
-
-			buffer[buffer_pos + 4]
-					= (uint8_t)(~(((dest >> 24) & 1) - 1));
-			buffer[buffer_pos + 3] = (uint8_t)(dest >> 16);
-			buffer[buffer_pos + 2] = (uint8_t)(dest >> 8);
-			buffer[buffer_pos + 1] = (uint8_t)(dest);
-			buffer_pos += 5;
-			prev_mask = 0;
-
-		} else {
-			++buffer_pos;
-			prev_mask |= 1;
-			if (Test86MSByte(b))
-				prev_mask |= 0x10;
-		}
-	}
-
-	simple->prev_mask = prev_mask;
-	simple->prev_pos = prev_pos;
-
-	return buffer_pos;
-}
-
-
-static lzma_ret
-x86_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters, bool is_encoder)
-{
-	const lzma_ret ret = lzma_simple_coder_init(next, allocator, filters,
-			&x86_code, sizeof(lzma_simple), 5, 1, is_encoder);
-
-	if (ret == LZMA_OK) {
-		next->coder->simple->prev_mask = 0;
-		next->coder->simple->prev_pos = (uint32_t)(-5);
-	}
-
-	return ret;
-}
-
-
-extern lzma_ret
-lzma_simple_x86_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	return x86_coder_init(next, allocator, filters, true);
-}
-
-
-extern lzma_ret
-lzma_simple_x86_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	return x86_coder_init(next, allocator, filters, false);
-}

Copied: vendor/xz/5.2.3/src/liblzma/simple/x86.c (from rev 11013, vendor/xz/dist/src/liblzma/simple/x86.c)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/simple/x86.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/simple/x86.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,159 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       x86.c
+/// \brief      Filter for x86 binaries (BCJ filter)
+///
+//  Authors:    Igor Pavlov
+//              Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+#define Test86MSByte(b) ((b) == 0 || (b) == 0xFF)
+
+
+typedef struct {
+	uint32_t prev_mask;
+	uint32_t prev_pos;
+} lzma_simple_x86;
+
+
+static size_t
+x86_code(void *simple_ptr, uint32_t now_pos, bool is_encoder,
+		uint8_t *buffer, size_t size)
+{
+	static const bool MASK_TO_ALLOWED_STATUS[8]
+		= { true, true, true, false, true, false, false, false };
+
+	static const uint32_t MASK_TO_BIT_NUMBER[8]
+			= { 0, 1, 2, 2, 3, 3, 3, 3 };
+
+	lzma_simple_x86 *simple = simple_ptr;
+	uint32_t prev_mask = simple->prev_mask;
+	uint32_t prev_pos = simple->prev_pos;
+
+	if (size < 5)
+		return 0;
+
+	if (now_pos - prev_pos > 5)
+		prev_pos = now_pos - 5;
+
+	const size_t limit = size - 5;
+	size_t buffer_pos = 0;
+
+	while (buffer_pos <= limit) {
+		uint8_t b = buffer[buffer_pos];
+		if (b != 0xE8 && b != 0xE9) {
+			++buffer_pos;
+			continue;
+		}
+
+		const uint32_t offset = now_pos + (uint32_t)(buffer_pos)
+				- prev_pos;
+		prev_pos = now_pos + (uint32_t)(buffer_pos);
+
+		if (offset > 5) {
+			prev_mask = 0;
+		} else {
+			for (uint32_t i = 0; i < offset; ++i) {
+				prev_mask &= 0x77;
+				prev_mask <<= 1;
+			}
+		}
+
+		b = buffer[buffer_pos + 4];
+
+		if (Test86MSByte(b)
+			&& MASK_TO_ALLOWED_STATUS[(prev_mask >> 1) & 0x7]
+				&& (prev_mask >> 1) < 0x10) {
+
+			uint32_t src = ((uint32_t)(b) << 24)
+				| ((uint32_t)(buffer[buffer_pos + 3]) << 16)
+				| ((uint32_t)(buffer[buffer_pos + 2]) << 8)
+				| (buffer[buffer_pos + 1]);
+
+			uint32_t dest;
+			while (true) {
+				if (is_encoder)
+					dest = src + (now_pos + (uint32_t)(
+							buffer_pos) + 5);
+				else
+					dest = src - (now_pos + (uint32_t)(
+							buffer_pos) + 5);
+
+				if (prev_mask == 0)
+					break;
+
+				const uint32_t i = MASK_TO_BIT_NUMBER[
+						prev_mask >> 1];
+
+				b = (uint8_t)(dest >> (24 - i * 8));
+
+				if (!Test86MSByte(b))
+					break;
+
+				src = dest ^ ((1 << (32 - i * 8)) - 1);
+			}
+
+			buffer[buffer_pos + 4]
+					= (uint8_t)(~(((dest >> 24) & 1) - 1));
+			buffer[buffer_pos + 3] = (uint8_t)(dest >> 16);
+			buffer[buffer_pos + 2] = (uint8_t)(dest >> 8);
+			buffer[buffer_pos + 1] = (uint8_t)(dest);
+			buffer_pos += 5;
+			prev_mask = 0;
+
+		} else {
+			++buffer_pos;
+			prev_mask |= 1;
+			if (Test86MSByte(b))
+				prev_mask |= 0x10;
+		}
+	}
+
+	simple->prev_mask = prev_mask;
+	simple->prev_pos = prev_pos;
+
+	return buffer_pos;
+}
+
+
+static lzma_ret
+x86_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+		const lzma_filter_info *filters, bool is_encoder)
+{
+	const lzma_ret ret = lzma_simple_coder_init(next, allocator, filters,
+			&x86_code, sizeof(lzma_simple_x86), 5, 1, is_encoder);
+
+	if (ret == LZMA_OK) {
+		lzma_simple_coder *coder = next->coder;
+		lzma_simple_x86 *simple = coder->simple;
+		simple->prev_mask = 0;
+		simple->prev_pos = (uint32_t)(-5);
+	}
+
+	return ret;
+}
+
+
+extern lzma_ret
+lzma_simple_x86_encoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	return x86_coder_init(next, allocator, filters, true);
+}
+
+
+extern lzma_ret
+lzma_simple_x86_decoder_init(lzma_next_coder *next,
+		const lzma_allocator *allocator,
+		const lzma_filter_info *filters)
+{
+	return x86_coder_init(next, allocator, filters, false);
+}

Copied: vendor/xz/5.2.3/src/liblzma/validate_map.sh (from rev 9176, vendor/xz/dist/src/liblzma/validate_map.sh)
===================================================================
--- vendor/xz/5.2.3/src/liblzma/validate_map.sh	                        (rev 0)
+++ vendor/xz/5.2.3/src/liblzma/validate_map.sh	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+###############################################################################
+#
+# Check liblzma.map for certain types of errors
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+###############################################################################
+
+LC_ALL=C
+export LC_ALL
+
+STATUS=0
+
+cd "$(dirname "$0")"
+
+# Get the list of symbols that aren't defined in liblzma.map.
+SYMS=$(sed -n 's/^extern LZMA_API([^)]*) \([a-z0-9_]*\)(.*$/\1;/p' \
+		api/lzma/*.h \
+	| sort \
+	| grep -Fve "$(sed '/[{}:*]/d;/^$/d;s/^	//' liblzma.map)")
+
+# Check that there are no old alpha or beta versions listed.
+VER=$(cd ../.. && sh build-aux/version.sh)
+NAMES=
+case $VER in
+	*alpha | *beta)
+		NAMES=$(sed -n 's/^.*XZ_\([^ ]*\)\(alpha\|beta\) .*$/\1\2/p' \
+			liblzma.map | grep -Fv "$VER")
+		;;
+esac
+
+# Check for duplicate lines. It can catch missing dependencies.
+DUPS=$(sort liblzma.map | sed '/^$/d;/^global:$/d' | uniq -d)
+
+# Print error messages if needed.
+if test -n "$SYMS$NAMES$DUPS"; then
+	echo
+	echo 'validate_map.sh found problems from liblzma.map:'
+	echo
+
+	if test -n "$SYMS"; then
+		echo 'liblzma.map lacks the following symbols:'
+		echo "$SYMS"
+		echo
+	fi
+
+	if test -n "$NAMES"; then
+		echo 'Obsolete alpha or beta version names:'
+		echo "$NAMES"
+		echo
+	fi
+
+	if test -n "$DUPS"; then
+		echo 'Duplicate lines:'
+		echo "$DUPS"
+		echo
+	fi
+
+	STATUS=1
+fi
+
+# Exit status is 1 if problems were found, 0 otherwise.
+exit "$STATUS"

Deleted: vendor/xz/5.2.3/src/lzmainfo/lzmainfo_w32res.rc
===================================================================
--- vendor/xz/dist/src/lzmainfo/lzmainfo_w32res.rc	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/lzmainfo/lzmainfo_w32res.rc	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,12 +0,0 @@
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#define MY_TYPE VFT_APP
-#define MY_NAME "lzmainfo"
-#define MY_SUFFIX ".exe"
-#define MY_DESC "lzmainfo shows information about .lzma files"
-#include "common_w32res.rc"

Deleted: vendor/xz/5.2.3/src/xz/args.c
===================================================================
--- vendor/xz/dist/src/xz/args.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/args.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,578 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       args.c
-/// \brief      Argument parsing
-///
-/// \note       Filter-specific options parsing is in options.c.
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "private.h"
-
-#include "getopt.h"
-#include <ctype.h>
-
-
-bool opt_stdout = false;
-bool opt_force = false;
-bool opt_keep_original = false;
-bool opt_robot = false;
-
-// We don't modify or free() this, but we need to assign it in some
-// non-const pointers.
-const char stdin_filename[] = "(stdin)";
-
-
-/// Parse and set the memory usage limit for compression and/or decompression.
-static void
-parse_memlimit(const char *name, const char *name_percentage, char *str,
-		bool set_compress, bool set_decompress)
-{
-	bool is_percentage = false;
-	uint64_t value;
-
-	const size_t len = strlen(str);
-	if (len > 0 && str[len - 1] == '%') {
-		str[len - 1] = '\0';
-		is_percentage = true;
-		value = str_to_uint64(name_percentage, str, 1, 100);
-	} else {
-		// On 32-bit systems, SIZE_MAX would make more sense than
-		// UINT64_MAX. But use UINT64_MAX still so that scripts
-		// that assume > 4 GiB values don't break.
-		value = str_to_uint64(name, str, 0, UINT64_MAX);
-	}
-
-	hardware_memlimit_set(
-			value, set_compress, set_decompress, is_percentage);
-	return;
-}
-
-
-static void
-parse_real(args_info *args, int argc, char **argv)
-{
-	enum {
-		OPT_X86 = INT_MIN,
-		OPT_POWERPC,
-		OPT_IA64,
-		OPT_ARM,
-		OPT_ARMTHUMB,
-		OPT_SPARC,
-		OPT_DELTA,
-		OPT_LZMA1,
-		OPT_LZMA2,
-
-		OPT_NO_SPARSE,
-		OPT_FILES,
-		OPT_FILES0,
-		OPT_MEM_COMPRESS,
-		OPT_MEM_DECOMPRESS,
-		OPT_NO_ADJUST,
-		OPT_INFO_MEMORY,
-		OPT_ROBOT,
-	};
-
-	static const char short_opts[]
-			= "cC:defF:hHlkM:qQrS:tT:vVz0123456789";
-
-	static const struct option long_opts[] = {
-		// Operation mode
-		{ "compress",     no_argument,       NULL,  'z' },
-		{ "decompress",   no_argument,       NULL,  'd' },
-		{ "uncompress",   no_argument,       NULL,  'd' },
-		{ "test",         no_argument,       NULL,  't' },
-		{ "list",         no_argument,       NULL,  'l' },
-
-		// Operation modifiers
-		{ "keep",         no_argument,       NULL,  'k' },
-		{ "force",        no_argument,       NULL,  'f' },
-		{ "stdout",       no_argument,       NULL,  'c' },
-		{ "to-stdout",    no_argument,       NULL,  'c' },
-		{ "no-sparse",    no_argument,       NULL,  OPT_NO_SPARSE },
-		{ "suffix",       required_argument, NULL,  'S' },
-		// { "recursive",      no_argument,       NULL,  'r' }, // TODO
-		{ "files",        optional_argument, NULL,  OPT_FILES },
-		{ "files0",       optional_argument, NULL,  OPT_FILES0 },
-
-		// Basic compression settings
-		{ "format",       required_argument, NULL,  'F' },
-		{ "check",        required_argument, NULL,  'C' },
-		{ "memlimit-compress",   required_argument, NULL, OPT_MEM_COMPRESS },
-		{ "memlimit-decompress", required_argument, NULL, OPT_MEM_DECOMPRESS },
-		{ "memlimit",     required_argument, NULL,  'M' },
-		{ "memory",       required_argument, NULL,  'M' }, // Old alias
-		{ "no-adjust",    no_argument,       NULL,  OPT_NO_ADJUST },
-		{ "threads",      required_argument, NULL,  'T' },
-
-		{ "extreme",      no_argument,       NULL,  'e' },
-		{ "fast",         no_argument,       NULL,  '0' },
-		{ "best",         no_argument,       NULL,  '9' },
-
-		// Filters
-		{ "lzma1",        optional_argument, NULL,  OPT_LZMA1 },
-		{ "lzma2",        optional_argument, NULL,  OPT_LZMA2 },
-		{ "x86",          optional_argument, NULL,  OPT_X86 },
-		{ "powerpc",      optional_argument, NULL,  OPT_POWERPC },
-		{ "ia64",         optional_argument, NULL,  OPT_IA64 },
-		{ "arm",          optional_argument, NULL,  OPT_ARM },
-		{ "armthumb",     optional_argument, NULL,  OPT_ARMTHUMB },
-		{ "sparc",        optional_argument, NULL,  OPT_SPARC },
-		{ "delta",        optional_argument, NULL,  OPT_DELTA },
-
-		// Other options
-		{ "quiet",        no_argument,       NULL,  'q' },
-		{ "verbose",      no_argument,       NULL,  'v' },
-		{ "no-warn",      no_argument,       NULL,  'Q' },
-		{ "robot",        no_argument,       NULL,  OPT_ROBOT },
-		{ "info-memory",  no_argument,       NULL,  OPT_INFO_MEMORY },
-		{ "help",         no_argument,       NULL,  'h' },
-		{ "long-help",    no_argument,       NULL,  'H' },
-		{ "version",      no_argument,       NULL,  'V' },
-
-		{ NULL,           0,                 NULL,   0 }
-	};
-
-	int c;
-
-	while ((c = getopt_long(argc, argv, short_opts, long_opts, NULL))
-			!= -1) {
-		switch (c) {
-		// Compression preset (also for decompression if --format=raw)
-		case '0': case '1': case '2': case '3': case '4':
-		case '5': case '6': case '7': case '8': case '9':
-			coder_set_preset(c - '0');
-			break;
-
-		// --memlimit-compress
-		case OPT_MEM_COMPRESS:
-			parse_memlimit("memlimit-compress",
-					"memlimit-compress%", optarg,
-					true, false);
-			break;
-
-		// --memlimit-decompress
-		case OPT_MEM_DECOMPRESS:
-			parse_memlimit("memlimit-decompress",
-					"memlimit-decompress%", optarg,
-					false, true);
-			break;
-
-		// --memlimit
-		case 'M':
-			parse_memlimit("memlimit", "memlimit%", optarg,
-					true, true);
-			break;
-
-		// --suffix
-		case 'S':
-			suffix_set(optarg);
-			break;
-
-		case 'T':
-			hardware_threadlimit_set(str_to_uint64(
-					"threads", optarg, 0, UINT32_MAX));
-			break;
-
-		// --version
-		case 'V':
-			// This doesn't return.
-			message_version();
-
-		// --stdout
-		case 'c':
-			opt_stdout = true;
-			break;
-
-		// --decompress
-		case 'd':
-			opt_mode = MODE_DECOMPRESS;
-			break;
-
-		// --extreme
-		case 'e':
-			coder_set_extreme();
-			break;
-
-		// --force
-		case 'f':
-			opt_force = true;
-			break;
-
-		// --info-memory
-		case OPT_INFO_MEMORY:
-			// This doesn't return.
-			hardware_memlimit_show();
-
-		// --help
-		case 'h':
-			// This doesn't return.
-			message_help(false);
-
-		// --long-help
-		case 'H':
-			// This doesn't return.
-			message_help(true);
-
-		// --list
-		case 'l':
-			opt_mode = MODE_LIST;
-			break;
-
-		// --keep
-		case 'k':
-			opt_keep_original = true;
-			break;
-
-		// --quiet
-		case 'q':
-			message_verbosity_decrease();
-			break;
-
-		case 'Q':
-			set_exit_no_warn();
-			break;
-
-		case 't':
-			opt_mode = MODE_TEST;
-			break;
-
-		// --verbose
-		case 'v':
-			message_verbosity_increase();
-			break;
-
-		// --robot
-		case OPT_ROBOT:
-			opt_robot = true;
-
-			// This is to make sure that floating point numbers
-			// always have a dot as decimal separator.
-			setlocale(LC_NUMERIC, "C");
-			break;
-
-		case 'z':
-			opt_mode = MODE_COMPRESS;
-			break;
-
-		// Filter setup
-
-		case OPT_X86:
-			coder_add_filter(LZMA_FILTER_X86,
-					options_bcj(optarg));
-			break;
-
-		case OPT_POWERPC:
-			coder_add_filter(LZMA_FILTER_POWERPC,
-					options_bcj(optarg));
-			break;
-
-		case OPT_IA64:
-			coder_add_filter(LZMA_FILTER_IA64,
-					options_bcj(optarg));
-			break;
-
-		case OPT_ARM:
-			coder_add_filter(LZMA_FILTER_ARM,
-					options_bcj(optarg));
-			break;
-
-		case OPT_ARMTHUMB:
-			coder_add_filter(LZMA_FILTER_ARMTHUMB,
-					options_bcj(optarg));
-			break;
-
-		case OPT_SPARC:
-			coder_add_filter(LZMA_FILTER_SPARC,
-					options_bcj(optarg));
-			break;
-
-		case OPT_DELTA:
-			coder_add_filter(LZMA_FILTER_DELTA,
-					options_delta(optarg));
-			break;
-
-		case OPT_LZMA1:
-			coder_add_filter(LZMA_FILTER_LZMA1,
-					options_lzma(optarg));
-			break;
-
-		case OPT_LZMA2:
-			coder_add_filter(LZMA_FILTER_LZMA2,
-					options_lzma(optarg));
-			break;
-
-		// Other
-
-		// --format
-		case 'F': {
-			// Just in case, support both "lzma" and "alone" since
-			// the latter was used for forward compatibility in
-			// LZMA Utils 4.32.x.
-			static const struct {
-				char str[8];
-				enum format_type format;
-			} types[] = {
-				{ "auto",   FORMAT_AUTO },
-				{ "xz",     FORMAT_XZ },
-				{ "lzma",   FORMAT_LZMA },
-				{ "alone",  FORMAT_LZMA },
-				// { "gzip",   FORMAT_GZIP },
-				// { "gz",     FORMAT_GZIP },
-				{ "raw",    FORMAT_RAW },
-			};
-
-			size_t i = 0;
-			while (strcmp(types[i].str, optarg) != 0)
-				if (++i == ARRAY_SIZE(types))
-					message_fatal(_("%s: Unknown file "
-							"format type"),
-							optarg);
-
-			opt_format = types[i].format;
-			break;
-		}
-
-		// --check
-		case 'C': {
-			static const struct {
-				char str[8];
-				lzma_check check;
-			} types[] = {
-				{ "none",   LZMA_CHECK_NONE },
-				{ "crc32",  LZMA_CHECK_CRC32 },
-				{ "crc64",  LZMA_CHECK_CRC64 },
-				{ "sha256", LZMA_CHECK_SHA256 },
-			};
-
-			size_t i = 0;
-			while (strcmp(types[i].str, optarg) != 0) {
-				if (++i == ARRAY_SIZE(types))
-					message_fatal(_("%s: Unsupported "
-							"integrity "
-							"check type"), optarg);
-			}
-
-			// Use a separate check in case we are using different
-			// liblzma than what was used to compile us.
-			if (!lzma_check_is_supported(types[i].check))
-				message_fatal(_("%s: Unsupported integrity "
-						"check type"), optarg);
-
-			coder_set_check(types[i].check);
-			break;
-		}
-
-		case OPT_NO_SPARSE:
-			io_no_sparse();
-			break;
-
-		case OPT_FILES:
-			args->files_delim = '\n';
-
-		// Fall through
-
-		case OPT_FILES0:
-			if (args->files_name != NULL)
-				message_fatal(_("Only one file can be "
-						"specified with `--files' "
-						"or `--files0'."));
-
-			if (optarg == NULL) {
-				args->files_name = (char *)stdin_filename;
-				args->files_file = stdin;
-			} else {
-				args->files_name = optarg;
-				args->files_file = fopen(optarg,
-						c == OPT_FILES ? "r" : "rb");
-				if (args->files_file == NULL)
-					message_fatal("%s: %s", optarg,
-							strerror(errno));
-			}
-
-			break;
-
-		case OPT_NO_ADJUST:
-			opt_auto_adjust = false;
-			break;
-
-		default:
-			message_try_help();
-			tuklib_exit(E_ERROR, E_ERROR, false);
-		}
-	}
-
-	return;
-}
-
-
-static void
-parse_environment(args_info *args, char *argv0, const char *varname)
-{
-	char *env = getenv(varname);
-	if (env == NULL)
-		return;
-
-	// We modify the string, so make a copy of it.
-	env = xstrdup(env);
-
-	// Calculate the number of arguments in env. argc stats at one
-	// to include space for the program name.
-	int argc = 1;
-	bool prev_was_space = true;
-	for (size_t i = 0; env[i] != '\0'; ++i) {
-		// NOTE: Cast to unsigned char is needed so that correct
-		// value gets passed to isspace(), which expects
-		// unsigned char cast to int. Casting to int is done
-		// automatically due to integer promotion, but we need to
-		// force char to unsigned char manually. Otherwise 8-bit
-		// characters would get promoted to wrong value if
-		// char is signed.
-		if (isspace((unsigned char)env[i])) {
-			prev_was_space = true;
-		} else if (prev_was_space) {
-			prev_was_space = false;
-
-			// Keep argc small enough to fit into a signed int
-			// and to keep it usable for memory allocation.
-			if (++argc == my_min(
-					INT_MAX, SIZE_MAX / sizeof(char *)))
-				message_fatal(_("The environment variable "
-						"%s contains too many "
-						"arguments"), varname);
-		}
-	}
-
-	// Allocate memory to hold pointers to the arguments. Add one to get
-	// space for the terminating NULL (if some systems happen to need it).
-	char **argv = xmalloc(((size_t)(argc) + 1) * sizeof(char *));
-	argv[0] = argv0;
-	argv[argc] = NULL;
-
-	// Go through the string again. Split the arguments using '\0'
-	// characters and add pointers to the resulting strings to argv.
-	argc = 1;
-	prev_was_space = true;
-	for (size_t i = 0; env[i] != '\0'; ++i) {
-		if (isspace((unsigned char)env[i])) {
-			prev_was_space = true;
-			env[i] = '\0';
-		} else if (prev_was_space) {
-			prev_was_space = false;
-			argv[argc++] = env + i;
-		}
-	}
-
-	// Parse the argument list we got from the environment. All non-option
-	// arguments i.e. filenames are ignored.
-	parse_real(args, argc, argv);
-
-	// Reset the state of the getopt_long() so that we can parse the
-	// command line options too. There are two incompatible ways to
-	// do it.
-#ifdef HAVE_OPTRESET
-	// BSD
-	optind = 1;
-	optreset = 1;
-#else
-	// GNU, Solaris
-	optind = 0;
-#endif
-
-	// We don't need the argument list from environment anymore.
-	free(argv);
-	free(env);
-
-	return;
-}
-
-
-extern void
-args_parse(args_info *args, int argc, char **argv)
-{
-	// Initialize those parts of *args that we need later.
-	args->files_name = NULL;
-	args->files_file = NULL;
-	args->files_delim = '\0';
-
-	// Check how we were called.
-	{
-		// Remove the leading path name, if any.
-		const char *name = strrchr(argv[0], '/');
-		if (name == NULL)
-			name = argv[0];
-		else
-			++name;
-
-		// NOTE: It's possible that name[0] is now '\0' if argv[0]
-		// is weird, but it doesn't matter here.
-
-		// Look for full command names instead of substrings like
-		// "un", "cat", and "lz" to reduce possibility of false
-		// positives when the programs have been renamed.
-		if (strstr(name, "xzcat") != NULL) {
-			opt_mode = MODE_DECOMPRESS;
-			opt_stdout = true;
-		} else if (strstr(name, "unxz") != NULL) {
-			opt_mode = MODE_DECOMPRESS;
-		} else if (strstr(name, "lzcat") != NULL) {
-			opt_format = FORMAT_LZMA;
-			opt_mode = MODE_DECOMPRESS;
-			opt_stdout = true;
-		} else if (strstr(name, "unlzma") != NULL) {
-			opt_format = FORMAT_LZMA;
-			opt_mode = MODE_DECOMPRESS;
-		} else if (strstr(name, "lzma") != NULL) {
-			opt_format = FORMAT_LZMA;
-		}
-	}
-
-	// First the flags from the environment
-	parse_environment(args, argv[0], "XZ_DEFAULTS");
-	parse_environment(args, argv[0], "XZ_OPT");
-
-	// Then from the command line
-	parse_real(args, argc, argv);
-
-	// Never remove the source file when the destination is not on disk.
-	// In test mode the data is written nowhere, but setting opt_stdout
-	// will make the rest of the code behave well.
-	if (opt_stdout || opt_mode == MODE_TEST) {
-		opt_keep_original = true;
-		opt_stdout = true;
-	}
-
-	// When compressing, if no --format flag was used, or it
-	// was --format=auto, we compress to the .xz format.
-	if (opt_mode == MODE_COMPRESS && opt_format == FORMAT_AUTO)
-		opt_format = FORMAT_XZ;
-
-	// Compression settings need to be validated (options themselves and
-	// their memory usage) when compressing to any file format. It has to
-	// be done also when uncompressing raw data, since for raw decoding
-	// the options given on the command line are used to know what kind
-	// of raw data we are supposed to decode.
-	if (opt_mode == MODE_COMPRESS || opt_format == FORMAT_RAW)
-		coder_set_compression_settings();
-
-	// If no filenames are given, use stdin.
-	if (argv[optind] == NULL && args->files_name == NULL) {
-		// We don't modify or free() the "-" constant. The caller
-		// modifies this so don't make the struct itself const.
-		static char *names_stdin[2] = { (char *)"-", NULL };
-		args->arg_names = names_stdin;
-		args->arg_count = 1;
-	} else {
-		// We got at least one filename from the command line, or
-		// --files or --files0 was specified.
-		args->arg_names = argv + optind;
-		args->arg_count = argc - optind;
-	}
-
-	return;
-}

Copied: vendor/xz/5.2.3/src/xz/args.c (from rev 11013, vendor/xz/dist/src/xz/args.c)
===================================================================
--- vendor/xz/5.2.3/src/xz/args.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/args.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,700 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       args.c
+/// \brief      Argument parsing
+///
+/// \note       Filter-specific options parsing is in options.c.
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+#include "getopt.h"
+#include <ctype.h>
+
+
+bool opt_stdout = false;
+bool opt_force = false;
+bool opt_keep_original = false;
+bool opt_robot = false;
+bool opt_ignore_check = false;
+
+// We don't modify or free() this, but we need to assign it in some
+// non-const pointers.
+const char stdin_filename[] = "(stdin)";
+
+
+/// Parse and set the memory usage limit for compression and/or decompression.
+static void
+parse_memlimit(const char *name, const char *name_percentage, char *str,
+		bool set_compress, bool set_decompress)
+{
+	bool is_percentage = false;
+	uint64_t value;
+
+	const size_t len = strlen(str);
+	if (len > 0 && str[len - 1] == '%') {
+		str[len - 1] = '\0';
+		is_percentage = true;
+		value = str_to_uint64(name_percentage, str, 1, 100);
+	} else {
+		// On 32-bit systems, SIZE_MAX would make more sense than
+		// UINT64_MAX. But use UINT64_MAX still so that scripts
+		// that assume > 4 GiB values don't break.
+		value = str_to_uint64(name, str, 0, UINT64_MAX);
+	}
+
+	hardware_memlimit_set(
+			value, set_compress, set_decompress, is_percentage);
+	return;
+}
+
+
+static void
+parse_block_list(char *str)
+{
+	// It must be non-empty and not begin with a comma.
+	if (str[0] == '\0' || str[0] == ',')
+		message_fatal(_("%s: Invalid argument to --block-list"), str);
+
+	// Count the number of comma-separated strings.
+	size_t count = 1;
+	for (size_t i = 0; str[i] != '\0'; ++i)
+		if (str[i] == ',')
+			++count;
+
+	// Prevent an unlikely integer overflow.
+	if (count > SIZE_MAX / sizeof(uint64_t) - 1)
+		message_fatal(_("%s: Too many arguments to --block-list"),
+				str);
+
+	// Allocate memory to hold all the sizes specified.
+	// If --block-list was specified already, its value is forgotten.
+	free(opt_block_list);
+	opt_block_list = xmalloc((count + 1) * sizeof(uint64_t));
+
+	for (size_t i = 0; i < count; ++i) {
+		// Locate the next comma and replace it with \0.
+		char *p = strchr(str, ',');
+		if (p != NULL)
+			*p = '\0';
+
+		if (str[0] == '\0') {
+			// There is no string, that is, a comma follows
+			// another comma. Use the previous value.
+			//
+			// NOTE: We checked earler that the first char
+			// of the whole list cannot be a comma.
+			assert(i > 0);
+			opt_block_list[i] = opt_block_list[i - 1];
+		} else {
+			opt_block_list[i] = str_to_uint64("block-list", str,
+					0, UINT64_MAX);
+
+			// Zero indicates no more new Blocks.
+			if (opt_block_list[i] == 0) {
+				if (i + 1 != count)
+					message_fatal(_("0 can only be used "
+							"as the last element "
+							"in --block-list"));
+
+				opt_block_list[i] = UINT64_MAX;
+			}
+		}
+
+		str = p + 1;
+	}
+
+	// Terminate the array.
+	opt_block_list[count] = 0;
+	return;
+}
+
+
+static void
+parse_real(args_info *args, int argc, char **argv)
+{
+	enum {
+		OPT_X86 = INT_MIN,
+		OPT_POWERPC,
+		OPT_IA64,
+		OPT_ARM,
+		OPT_ARMTHUMB,
+		OPT_SPARC,
+		OPT_DELTA,
+		OPT_LZMA1,
+		OPT_LZMA2,
+
+		OPT_SINGLE_STREAM,
+		OPT_NO_SPARSE,
+		OPT_FILES,
+		OPT_FILES0,
+		OPT_BLOCK_SIZE,
+		OPT_BLOCK_LIST,
+		OPT_MEM_COMPRESS,
+		OPT_MEM_DECOMPRESS,
+		OPT_NO_ADJUST,
+		OPT_INFO_MEMORY,
+		OPT_ROBOT,
+		OPT_FLUSH_TIMEOUT,
+		OPT_IGNORE_CHECK,
+	};
+
+	static const char short_opts[]
+			= "cC:defF:hHlkM:qQrS:tT:vVz0123456789";
+
+	static const struct option long_opts[] = {
+		// Operation mode
+		{ "compress",     no_argument,       NULL,  'z' },
+		{ "decompress",   no_argument,       NULL,  'd' },
+		{ "uncompress",   no_argument,       NULL,  'd' },
+		{ "test",         no_argument,       NULL,  't' },
+		{ "list",         no_argument,       NULL,  'l' },
+
+		// Operation modifiers
+		{ "keep",         no_argument,       NULL,  'k' },
+		{ "force",        no_argument,       NULL,  'f' },
+		{ "stdout",       no_argument,       NULL,  'c' },
+		{ "to-stdout",    no_argument,       NULL,  'c' },
+		{ "single-stream", no_argument,      NULL,  OPT_SINGLE_STREAM },
+		{ "no-sparse",    no_argument,       NULL,  OPT_NO_SPARSE },
+		{ "suffix",       required_argument, NULL,  'S' },
+		// { "recursive",      no_argument,       NULL,  'r' }, // TODO
+		{ "files",        optional_argument, NULL,  OPT_FILES },
+		{ "files0",       optional_argument, NULL,  OPT_FILES0 },
+
+		// Basic compression settings
+		{ "format",       required_argument, NULL,  'F' },
+		{ "check",        required_argument, NULL,  'C' },
+		{ "ignore-check", no_argument,       NULL,  OPT_IGNORE_CHECK },
+		{ "block-size",   required_argument, NULL,  OPT_BLOCK_SIZE },
+		{ "block-list",  required_argument, NULL,  OPT_BLOCK_LIST },
+		{ "memlimit-compress",   required_argument, NULL, OPT_MEM_COMPRESS },
+		{ "memlimit-decompress", required_argument, NULL, OPT_MEM_DECOMPRESS },
+		{ "memlimit",     required_argument, NULL,  'M' },
+		{ "memory",       required_argument, NULL,  'M' }, // Old alias
+		{ "no-adjust",    no_argument,       NULL,  OPT_NO_ADJUST },
+		{ "threads",      required_argument, NULL,  'T' },
+		{ "flush-timeout", required_argument, NULL, OPT_FLUSH_TIMEOUT },
+
+		{ "extreme",      no_argument,       NULL,  'e' },
+		{ "fast",         no_argument,       NULL,  '0' },
+		{ "best",         no_argument,       NULL,  '9' },
+
+		// Filters
+		{ "lzma1",        optional_argument, NULL,  OPT_LZMA1 },
+		{ "lzma2",        optional_argument, NULL,  OPT_LZMA2 },
+		{ "x86",          optional_argument, NULL,  OPT_X86 },
+		{ "powerpc",      optional_argument, NULL,  OPT_POWERPC },
+		{ "ia64",         optional_argument, NULL,  OPT_IA64 },
+		{ "arm",          optional_argument, NULL,  OPT_ARM },
+		{ "armthumb",     optional_argument, NULL,  OPT_ARMTHUMB },
+		{ "sparc",        optional_argument, NULL,  OPT_SPARC },
+		{ "delta",        optional_argument, NULL,  OPT_DELTA },
+
+		// Other options
+		{ "quiet",        no_argument,       NULL,  'q' },
+		{ "verbose",      no_argument,       NULL,  'v' },
+		{ "no-warn",      no_argument,       NULL,  'Q' },
+		{ "robot",        no_argument,       NULL,  OPT_ROBOT },
+		{ "info-memory",  no_argument,       NULL,  OPT_INFO_MEMORY },
+		{ "help",         no_argument,       NULL,  'h' },
+		{ "long-help",    no_argument,       NULL,  'H' },
+		{ "version",      no_argument,       NULL,  'V' },
+
+		{ NULL,           0,                 NULL,   0 }
+	};
+
+	int c;
+
+	while ((c = getopt_long(argc, argv, short_opts, long_opts, NULL))
+			!= -1) {
+		switch (c) {
+		// Compression preset (also for decompression if --format=raw)
+		case '0': case '1': case '2': case '3': case '4':
+		case '5': case '6': case '7': case '8': case '9':
+			coder_set_preset(c - '0');
+			break;
+
+		// --memlimit-compress
+		case OPT_MEM_COMPRESS:
+			parse_memlimit("memlimit-compress",
+					"memlimit-compress%", optarg,
+					true, false);
+			break;
+
+		// --memlimit-decompress
+		case OPT_MEM_DECOMPRESS:
+			parse_memlimit("memlimit-decompress",
+					"memlimit-decompress%", optarg,
+					false, true);
+			break;
+
+		// --memlimit
+		case 'M':
+			parse_memlimit("memlimit", "memlimit%", optarg,
+					true, true);
+			break;
+
+		// --suffix
+		case 'S':
+			suffix_set(optarg);
+			break;
+
+		case 'T':
+			// The max is from src/liblzma/common/common.h.
+			hardware_threads_set(str_to_uint64("threads",
+					optarg, 0, 16384));
+			break;
+
+		// --version
+		case 'V':
+			// This doesn't return.
+			message_version();
+
+		// --stdout
+		case 'c':
+			opt_stdout = true;
+			break;
+
+		// --decompress
+		case 'd':
+			opt_mode = MODE_DECOMPRESS;
+			break;
+
+		// --extreme
+		case 'e':
+			coder_set_extreme();
+			break;
+
+		// --force
+		case 'f':
+			opt_force = true;
+			break;
+
+		// --info-memory
+		case OPT_INFO_MEMORY:
+			// This doesn't return.
+			hardware_memlimit_show();
+
+		// --help
+		case 'h':
+			// This doesn't return.
+			message_help(false);
+
+		// --long-help
+		case 'H':
+			// This doesn't return.
+			message_help(true);
+
+		// --list
+		case 'l':
+			opt_mode = MODE_LIST;
+			break;
+
+		// --keep
+		case 'k':
+			opt_keep_original = true;
+			break;
+
+		// --quiet
+		case 'q':
+			message_verbosity_decrease();
+			break;
+
+		case 'Q':
+			set_exit_no_warn();
+			break;
+
+		case 't':
+			opt_mode = MODE_TEST;
+			break;
+
+		// --verbose
+		case 'v':
+			message_verbosity_increase();
+			break;
+
+		// --robot
+		case OPT_ROBOT:
+			opt_robot = true;
+
+			// This is to make sure that floating point numbers
+			// always have a dot as decimal separator.
+			setlocale(LC_NUMERIC, "C");
+			break;
+
+		case 'z':
+			opt_mode = MODE_COMPRESS;
+			break;
+
+		// Filter setup
+
+		case OPT_X86:
+			coder_add_filter(LZMA_FILTER_X86,
+					options_bcj(optarg));
+			break;
+
+		case OPT_POWERPC:
+			coder_add_filter(LZMA_FILTER_POWERPC,
+					options_bcj(optarg));
+			break;
+
+		case OPT_IA64:
+			coder_add_filter(LZMA_FILTER_IA64,
+					options_bcj(optarg));
+			break;
+
+		case OPT_ARM:
+			coder_add_filter(LZMA_FILTER_ARM,
+					options_bcj(optarg));
+			break;
+
+		case OPT_ARMTHUMB:
+			coder_add_filter(LZMA_FILTER_ARMTHUMB,
+					options_bcj(optarg));
+			break;
+
+		case OPT_SPARC:
+			coder_add_filter(LZMA_FILTER_SPARC,
+					options_bcj(optarg));
+			break;
+
+		case OPT_DELTA:
+			coder_add_filter(LZMA_FILTER_DELTA,
+					options_delta(optarg));
+			break;
+
+		case OPT_LZMA1:
+			coder_add_filter(LZMA_FILTER_LZMA1,
+					options_lzma(optarg));
+			break;
+
+		case OPT_LZMA2:
+			coder_add_filter(LZMA_FILTER_LZMA2,
+					options_lzma(optarg));
+			break;
+
+		// Other
+
+		// --format
+		case 'F': {
+			// Just in case, support both "lzma" and "alone" since
+			// the latter was used for forward compatibility in
+			// LZMA Utils 4.32.x.
+			static const struct {
+				char str[8];
+				enum format_type format;
+			} types[] = {
+				{ "auto",   FORMAT_AUTO },
+				{ "xz",     FORMAT_XZ },
+				{ "lzma",   FORMAT_LZMA },
+				{ "alone",  FORMAT_LZMA },
+				// { "gzip",   FORMAT_GZIP },
+				// { "gz",     FORMAT_GZIP },
+				{ "raw",    FORMAT_RAW },
+			};
+
+			size_t i = 0;
+			while (strcmp(types[i].str, optarg) != 0)
+				if (++i == ARRAY_SIZE(types))
+					message_fatal(_("%s: Unknown file "
+							"format type"),
+							optarg);
+
+			opt_format = types[i].format;
+			break;
+		}
+
+		// --check
+		case 'C': {
+			static const struct {
+				char str[8];
+				lzma_check check;
+			} types[] = {
+				{ "none",   LZMA_CHECK_NONE },
+				{ "crc32",  LZMA_CHECK_CRC32 },
+				{ "crc64",  LZMA_CHECK_CRC64 },
+				{ "sha256", LZMA_CHECK_SHA256 },
+			};
+
+			size_t i = 0;
+			while (strcmp(types[i].str, optarg) != 0) {
+				if (++i == ARRAY_SIZE(types))
+					message_fatal(_("%s: Unsupported "
+							"integrity "
+							"check type"), optarg);
+			}
+
+			// Use a separate check in case we are using different
+			// liblzma than what was used to compile us.
+			if (!lzma_check_is_supported(types[i].check))
+				message_fatal(_("%s: Unsupported integrity "
+						"check type"), optarg);
+
+			coder_set_check(types[i].check);
+			break;
+		}
+
+		case OPT_IGNORE_CHECK:
+			opt_ignore_check = true;
+			break;
+
+		case OPT_BLOCK_SIZE:
+			opt_block_size = str_to_uint64("block-size", optarg,
+					0, LZMA_VLI_MAX);
+			break;
+
+		case OPT_BLOCK_LIST: {
+			parse_block_list(optarg);
+			break;
+		}
+
+		case OPT_SINGLE_STREAM:
+			opt_single_stream = true;
+			break;
+
+		case OPT_NO_SPARSE:
+			io_no_sparse();
+			break;
+
+		case OPT_FILES:
+			args->files_delim = '\n';
+
+		// Fall through
+
+		case OPT_FILES0:
+			if (args->files_name != NULL)
+				message_fatal(_("Only one file can be "
+						"specified with `--files' "
+						"or `--files0'."));
+
+			if (optarg == NULL) {
+				args->files_name = (char *)stdin_filename;
+				args->files_file = stdin;
+			} else {
+				args->files_name = optarg;
+				args->files_file = fopen(optarg,
+						c == OPT_FILES ? "r" : "rb");
+				if (args->files_file == NULL)
+					message_fatal("%s: %s", optarg,
+							strerror(errno));
+			}
+
+			break;
+
+		case OPT_NO_ADJUST:
+			opt_auto_adjust = false;
+			break;
+
+		case OPT_FLUSH_TIMEOUT:
+			opt_flush_timeout = str_to_uint64("flush-timeout",
+					optarg, 0, UINT64_MAX);
+			break;
+
+		default:
+			message_try_help();
+			tuklib_exit(E_ERROR, E_ERROR, false);
+		}
+	}
+
+	return;
+}
+
+
+static void
+parse_environment(args_info *args, char *argv0, const char *varname)
+{
+	char *env = getenv(varname);
+	if (env == NULL)
+		return;
+
+	// We modify the string, so make a copy of it.
+	env = xstrdup(env);
+
+	// Calculate the number of arguments in env. argc stats at one
+	// to include space for the program name.
+	int argc = 1;
+	bool prev_was_space = true;
+	for (size_t i = 0; env[i] != '\0'; ++i) {
+		// NOTE: Cast to unsigned char is needed so that correct
+		// value gets passed to isspace(), which expects
+		// unsigned char cast to int. Casting to int is done
+		// automatically due to integer promotion, but we need to
+		// force char to unsigned char manually. Otherwise 8-bit
+		// characters would get promoted to wrong value if
+		// char is signed.
+		if (isspace((unsigned char)env[i])) {
+			prev_was_space = true;
+		} else if (prev_was_space) {
+			prev_was_space = false;
+
+			// Keep argc small enough to fit into a signed int
+			// and to keep it usable for memory allocation.
+			if (++argc == my_min(
+					INT_MAX, SIZE_MAX / sizeof(char *)))
+				message_fatal(_("The environment variable "
+						"%s contains too many "
+						"arguments"), varname);
+		}
+	}
+
+	// Allocate memory to hold pointers to the arguments. Add one to get
+	// space for the terminating NULL (if some systems happen to need it).
+	char **argv = xmalloc(((size_t)(argc) + 1) * sizeof(char *));
+	argv[0] = argv0;
+	argv[argc] = NULL;
+
+	// Go through the string again. Split the arguments using '\0'
+	// characters and add pointers to the resulting strings to argv.
+	argc = 1;
+	prev_was_space = true;
+	for (size_t i = 0; env[i] != '\0'; ++i) {
+		if (isspace((unsigned char)env[i])) {
+			prev_was_space = true;
+			env[i] = '\0';
+		} else if (prev_was_space) {
+			prev_was_space = false;
+			argv[argc++] = env + i;
+		}
+	}
+
+	// Parse the argument list we got from the environment. All non-option
+	// arguments i.e. filenames are ignored.
+	parse_real(args, argc, argv);
+
+	// Reset the state of the getopt_long() so that we can parse the
+	// command line options too. There are two incompatible ways to
+	// do it.
+#ifdef HAVE_OPTRESET
+	// BSD
+	optind = 1;
+	optreset = 1;
+#else
+	// GNU, Solaris
+	optind = 0;
+#endif
+
+	// We don't need the argument list from environment anymore.
+	free(argv);
+	free(env);
+
+	return;
+}
+
+
+extern void
+args_parse(args_info *args, int argc, char **argv)
+{
+	// Initialize those parts of *args that we need later.
+	args->files_name = NULL;
+	args->files_file = NULL;
+	args->files_delim = '\0';
+
+	// Check how we were called.
+	{
+		// Remove the leading path name, if any.
+		const char *name = strrchr(argv[0], '/');
+		if (name == NULL)
+			name = argv[0];
+		else
+			++name;
+
+		// NOTE: It's possible that name[0] is now '\0' if argv[0]
+		// is weird, but it doesn't matter here.
+
+		// Look for full command names instead of substrings like
+		// "un", "cat", and "lz" to reduce possibility of false
+		// positives when the programs have been renamed.
+		if (strstr(name, "xzcat") != NULL) {
+			opt_mode = MODE_DECOMPRESS;
+			opt_stdout = true;
+		} else if (strstr(name, "unxz") != NULL) {
+			opt_mode = MODE_DECOMPRESS;
+		} else if (strstr(name, "lzcat") != NULL) {
+			opt_format = FORMAT_LZMA;
+			opt_mode = MODE_DECOMPRESS;
+			opt_stdout = true;
+		} else if (strstr(name, "unlzma") != NULL) {
+			opt_format = FORMAT_LZMA;
+			opt_mode = MODE_DECOMPRESS;
+		} else if (strstr(name, "lzma") != NULL) {
+			opt_format = FORMAT_LZMA;
+		}
+	}
+
+	// First the flags from the environment
+	parse_environment(args, argv[0], "XZ_DEFAULTS");
+	parse_environment(args, argv[0], "XZ_OPT");
+
+	// Then from the command line
+	parse_real(args, argc, argv);
+
+	// If encoder or decoder support was omitted at build time,
+	// show an error now so that the rest of the code can rely on
+	// that whatever is in opt_mode is also supported.
+#ifndef HAVE_ENCODERS
+	if (opt_mode == MODE_COMPRESS)
+		message_fatal(_("Compression support was disabled "
+				"at build time"));
+#endif
+#ifndef HAVE_DECODERS
+	// Even MODE_LIST cannot work without decoder support so MODE_COMPRESS
+	// is the only valid choice.
+	if (opt_mode != MODE_COMPRESS)
+		message_fatal(_("Decompression support was disabled "
+				"at build time"));
+#endif
+
+	// Never remove the source file when the destination is not on disk.
+	// In test mode the data is written nowhere, but setting opt_stdout
+	// will make the rest of the code behave well.
+	if (opt_stdout || opt_mode == MODE_TEST) {
+		opt_keep_original = true;
+		opt_stdout = true;
+	}
+
+	// When compressing, if no --format flag was used, or it
+	// was --format=auto, we compress to the .xz format.
+	if (opt_mode == MODE_COMPRESS && opt_format == FORMAT_AUTO)
+		opt_format = FORMAT_XZ;
+
+	// Compression settings need to be validated (options themselves and
+	// their memory usage) when compressing to any file format. It has to
+	// be done also when uncompressing raw data, since for raw decoding
+	// the options given on the command line are used to know what kind
+	// of raw data we are supposed to decode.
+	if (opt_mode == MODE_COMPRESS || opt_format == FORMAT_RAW)
+		coder_set_compression_settings();
+
+	// If no filenames are given, use stdin.
+	if (argv[optind] == NULL && args->files_name == NULL) {
+		// We don't modify or free() the "-" constant. The caller
+		// modifies this so don't make the struct itself const.
+		static char *names_stdin[2] = { (char *)"-", NULL };
+		args->arg_names = names_stdin;
+		args->arg_count = 1;
+	} else {
+		// We got at least one filename from the command line, or
+		// --files or --files0 was specified.
+		args->arg_names = argv + optind;
+		args->arg_count = argc - optind;
+	}
+
+	return;
+}
+
+
+#ifndef NDEBUG
+extern void
+args_free(void)
+{
+	free(opt_block_list);
+	return;
+}
+#endif

Deleted: vendor/xz/5.2.3/src/xz/args.h
===================================================================
--- vendor/xz/dist/src/xz/args.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/args.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,42 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       args.h
-/// \brief      Argument parsing
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-typedef struct {
-	/// Filenames from command line
-	char **arg_names;
-
-	/// Number of filenames from command line
-	size_t arg_count;
-
-	/// Name of the file from which to read filenames. This is NULL
-	/// if --files or --files0 was not used.
-	char *files_name;
-
-	/// File opened for reading from which filenames are read. This is
-	/// non-NULL only if files_name is non-NULL.
-	FILE *files_file;
-
-	/// Delimiter for filenames read from files_file
-	char files_delim;
-
-} args_info;
-
-
-extern bool opt_stdout;
-extern bool opt_force;
-extern bool opt_keep_original;
-// extern bool opt_recursive;
-extern bool opt_robot;
-
-extern const char stdin_filename[];
-
-extern void args_parse(args_info *args, int argc, char **argv);

Copied: vendor/xz/5.2.3/src/xz/args.h (from rev 9176, vendor/xz/dist/src/xz/args.h)
===================================================================
--- vendor/xz/5.2.3/src/xz/args.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/args.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,44 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       args.h
+/// \brief      Argument parsing
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+typedef struct {
+	/// Filenames from command line
+	char **arg_names;
+
+	/// Number of filenames from command line
+	unsigned int arg_count;
+
+	/// Name of the file from which to read filenames. This is NULL
+	/// if --files or --files0 was not used.
+	char *files_name;
+
+	/// File opened for reading from which filenames are read. This is
+	/// non-NULL only if files_name is non-NULL.
+	FILE *files_file;
+
+	/// Delimiter for filenames read from files_file
+	char files_delim;
+
+} args_info;
+
+
+extern bool opt_stdout;
+extern bool opt_force;
+extern bool opt_keep_original;
+// extern bool opt_recursive;
+extern bool opt_robot;
+extern bool opt_ignore_check;
+
+extern const char stdin_filename[];
+
+extern void args_parse(args_info *args, int argc, char **argv);
+extern void args_free(void);

Deleted: vendor/xz/5.2.3/src/xz/coder.c
===================================================================
--- vendor/xz/dist/src/xz/coder.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/coder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,673 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       coder.c
-/// \brief      Compresses or uncompresses a file
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "private.h"
-
-
-/// Return value type for coder_init().
-enum coder_init_ret {
-	CODER_INIT_NORMAL,
-	CODER_INIT_PASSTHRU,
-	CODER_INIT_ERROR,
-};
-
-
-enum operation_mode opt_mode = MODE_COMPRESS;
-enum format_type opt_format = FORMAT_AUTO;
-bool opt_auto_adjust = true;
-
-
-/// Stream used to communicate with liblzma
-static lzma_stream strm = LZMA_STREAM_INIT;
-
-/// Filters needed for all encoding all formats, and also decoding in raw data
-static lzma_filter filters[LZMA_FILTERS_MAX + 1];
-
-/// Input and output buffers
-static io_buf in_buf;
-static io_buf out_buf;
-
-/// Number of filters. Zero indicates that we are using a preset.
-static uint32_t filters_count = 0;
-
-/// Number of the preset (0-9)
-static uint32_t preset_number = LZMA_PRESET_DEFAULT;
-
-/// Integrity check type
-static lzma_check check;
-
-/// This becomes false if the --check=CHECK option is used.
-static bool check_default = true;
-
-
-extern void
-coder_set_check(lzma_check new_check)
-{
-	check = new_check;
-	check_default = false;
-	return;
-}
-
-
-static void
-forget_filter_chain(void)
-{
-	// Setting a preset makes us forget a possibly defined custom
-	// filter chain.
-	while (filters_count > 0) {
-		--filters_count;
-		free(filters[filters_count].options);
-		filters[filters_count].options = NULL;
-	}
-
-	return;
-}
-
-
-extern void
-coder_set_preset(uint32_t new_preset)
-{
-	preset_number &= ~LZMA_PRESET_LEVEL_MASK;
-	preset_number |= new_preset;
-	forget_filter_chain();
-	return;
-}
-
-
-extern void
-coder_set_extreme(void)
-{
-	preset_number |= LZMA_PRESET_EXTREME;
-	forget_filter_chain();
-	return;
-}
-
-
-extern void
-coder_add_filter(lzma_vli id, void *options)
-{
-	if (filters_count == LZMA_FILTERS_MAX)
-		message_fatal(_("Maximum number of filters is four"));
-
-	filters[filters_count].id = id;
-	filters[filters_count].options = options;
-	++filters_count;
-
-	// Setting a custom filter chain makes us forget the preset options.
-	// This makes a difference if one specifies e.g. "xz -9 --lzma2 -e"
-	// where the custom filter chain resets the preset level back to
-	// the default 6, making the example equivalent to "xz -6e".
-	preset_number = LZMA_PRESET_DEFAULT;
-
-	return;
-}
-
-
-static void lzma_attribute((__noreturn__))
-memlimit_too_small(uint64_t memory_usage)
-{
-	message(V_ERROR, _("Memory usage limit is too low for the given "
-			"filter setup."));
-	message_mem_needed(V_ERROR, memory_usage);
-	tuklib_exit(E_ERROR, E_ERROR, false);
-}
-
-
-extern void
-coder_set_compression_settings(void)
-{
-	// Options for LZMA1 or LZMA2 in case we are using a preset.
-	static lzma_options_lzma opt_lzma;
-
-	if (filters_count == 0) {
-		// We are using a preset. This is not a good idea in raw mode
-		// except when playing around with things. Different versions
-		// of this software may use different options in presets, and
-		// thus make uncompressing the raw data difficult.
-		if (opt_format == FORMAT_RAW) {
-			// The message is shown only if warnings are allowed
-			// but the exit status isn't changed.
-			message(V_WARNING, _("Using a preset in raw mode "
-					"is discouraged."));
-			message(V_WARNING, _("The exact options of the "
-					"presets may vary between software "
-					"versions."));
-		}
-
-		// Get the preset for LZMA1 or LZMA2.
-		if (lzma_lzma_preset(&opt_lzma, preset_number))
-			message_bug();
-
-		// Use LZMA2 except with --format=lzma we use LZMA1.
-		filters[0].id = opt_format == FORMAT_LZMA
-				? LZMA_FILTER_LZMA1 : LZMA_FILTER_LZMA2;
-		filters[0].options = &opt_lzma;
-		filters_count = 1;
-	}
-
-	// Terminate the filter options array.
-	filters[filters_count].id = LZMA_VLI_UNKNOWN;
-
-	// If we are using the .lzma format, allow exactly one filter
-	// which has to be LZMA1.
-	if (opt_format == FORMAT_LZMA && (filters_count != 1
-			|| filters[0].id != LZMA_FILTER_LZMA1))
-		message_fatal(_("The .lzma format supports only "
-				"the LZMA1 filter"));
-
-	// If we are using the .xz format, make sure that there is no LZMA1
-	// filter to prevent LZMA_PROG_ERROR.
-	if (opt_format == FORMAT_XZ)
-		for (size_t i = 0; i < filters_count; ++i)
-			if (filters[i].id == LZMA_FILTER_LZMA1)
-				message_fatal(_("LZMA1 cannot be used "
-						"with the .xz format"));
-
-	// Print the selected filter chain.
-	message_filters_show(V_DEBUG, filters);
-
-	// 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)
-		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"));
-
-	// Print memory usage info before possible dictionary
-	// size auto-adjusting.
-	message_mem_needed(V_DEBUG, memory_usage);
-	if (opt_mode == MODE_COMPRESS) {
-		const uint64_t decmem = lzma_raw_decoder_memusage(filters);
-		if (decmem != UINT64_MAX)
-			message(V_DEBUG, _("Decompression will need "
-					"%s MiB of memory."), uint64_to_str(
-						round_up_to_mib(decmem), 0));
-	}
-
-	if (memory_usage > memory_limit) {
-		// If --no-adjust was used or we didn't find LZMA1 or
-		// LZMA2 as the last filter, give an error immediately.
-		// --format=raw implies --no-adjust.
-		if (!opt_auto_adjust || opt_format == FORMAT_RAW)
-			memlimit_too_small(memory_usage);
-
-		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;
-		}
-
-		// 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));
-	}
-
-/*
-	// 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;
-	}
-
-	return;
-}
-
-
-/// Return true if the data in in_buf seems to be in the .xz format.
-static bool
-is_format_xz(void)
-{
-	// Specify the magic as hex to be compatible with EBCDIC systems.
-	static const uint8_t magic[6] = { 0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00 };
-	return strm.avail_in >= sizeof(magic)
-			&& memcmp(in_buf.u8, magic, sizeof(magic)) == 0;
-}
-
-
-/// Return true if the data in in_buf seems to be in the .lzma format.
-static bool
-is_format_lzma(void)
-{
-	// The .lzma header is 13 bytes.
-	if (strm.avail_in < 13)
-		return false;
-
-	// Decode the LZMA1 properties.
-	lzma_filter filter = { .id = LZMA_FILTER_LZMA1 };
-	if (lzma_properties_decode(&filter, NULL, in_buf.u8, 5) != LZMA_OK)
-		return false;
-
-	// A hack to ditch tons of false positives: We allow only dictionary
-	// sizes that are 2^n or 2^n + 2^(n-1) or UINT32_MAX. LZMA_Alone
-	// created only files with 2^n, but accepts any dictionary size.
-	// If someone complains, this will be reconsidered.
-	lzma_options_lzma *opt = filter.options;
-	const uint32_t dict_size = opt->dict_size;
-	free(opt);
-
-	if (dict_size != UINT32_MAX) {
-		uint32_t d = dict_size - 1;
-		d |= d >> 2;
-		d |= d >> 3;
-		d |= d >> 4;
-		d |= d >> 8;
-		d |= d >> 16;
-		++d;
-		if (d != dict_size || dict_size == 0)
-			return false;
-	}
-
-	// Another hack to ditch false positives: Assume that if the
-	// uncompressed size is known, it must be less than 256 GiB.
-	// Again, if someone complains, this will be reconsidered.
-	uint64_t uncompressed_size = 0;
-	for (size_t i = 0; i < 8; ++i)
-		uncompressed_size |= (uint64_t)(in_buf.u8[5 + i]) << (i * 8);
-
-	if (uncompressed_size != UINT64_MAX
-			&& uncompressed_size > (UINT64_C(1) << 38))
-		return false;
-
-	return true;
-}
-
-
-/// Detect the input file type (for now, this done only when decompressing),
-/// and initialize an appropriate coder. Return value indicates if a normal
-/// liblzma-based coder was initialized (CODER_INIT_NORMAL), if passthru
-/// mode should be used (CODER_INIT_PASSTHRU), or if an error occurred
-/// (CODER_INIT_ERROR).
-static enum coder_init_ret
-coder_init(file_pair *pair)
-{
-	lzma_ret ret = LZMA_PROG_ERROR;
-
-	if (opt_mode == MODE_COMPRESS) {
-		switch (opt_format) {
-		case FORMAT_AUTO:
-			// args.c ensures this.
-			assert(0);
-			break;
-
-		case FORMAT_XZ:
-			ret = lzma_stream_encoder(&strm, filters, check);
-			break;
-
-		case FORMAT_LZMA:
-			ret = lzma_alone_encoder(&strm, filters[0].options);
-			break;
-
-		case FORMAT_RAW:
-			ret = lzma_raw_encoder(&strm, filters);
-			break;
-		}
-	} else {
-		const uint32_t flags = LZMA_TELL_UNSUPPORTED_CHECK
-				| LZMA_CONCATENATED;
-
-		// We abuse FORMAT_AUTO to indicate unknown file format,
-		// for which we may consider passthru mode.
-		enum format_type init_format = FORMAT_AUTO;
-
-		switch (opt_format) {
-		case FORMAT_AUTO:
-			if (is_format_xz())
-				init_format = FORMAT_XZ;
-			else if (is_format_lzma())
-				init_format = FORMAT_LZMA;
-			break;
-
-		case FORMAT_XZ:
-			if (is_format_xz())
-				init_format = FORMAT_XZ;
-			break;
-
-		case FORMAT_LZMA:
-			if (is_format_lzma())
-				init_format = FORMAT_LZMA;
-			break;
-
-		case FORMAT_RAW:
-			init_format = FORMAT_RAW;
-			break;
-		}
-
-		switch (init_format) {
-		case FORMAT_AUTO:
-			// Uknown file format. If --decompress --stdout
-			// --force have been given, then we copy the input
-			// as is to stdout. Checking for MODE_DECOMPRESS
-			// is needed, because we don't want to do use
-			// passthru mode with --test.
-			if (opt_mode == MODE_DECOMPRESS
-					&& opt_stdout && opt_force)
-				return CODER_INIT_PASSTHRU;
-
-			ret = LZMA_FORMAT_ERROR;
-			break;
-
-		case FORMAT_XZ:
-			ret = lzma_stream_decoder(&strm,
-					hardware_memlimit_get(
-						MODE_DECOMPRESS), flags);
-			break;
-
-		case FORMAT_LZMA:
-			ret = lzma_alone_decoder(&strm,
-					hardware_memlimit_get(
-						MODE_DECOMPRESS));
-			break;
-
-		case FORMAT_RAW:
-			// Memory usage has already been checked in
-			// coder_set_compression_settings().
-			ret = lzma_raw_decoder(&strm, filters);
-			break;
-		}
-
-		// Try to decode the headers. This will catch too low
-		// memory usage limit in case it happens in the first
-		// Block of the first Stream, which is where it very
-		// probably will happen if it is going to happen.
-		if (ret == LZMA_OK && init_format != FORMAT_RAW) {
-			strm.next_out = NULL;
-			strm.avail_out = 0;
-			ret = lzma_code(&strm, LZMA_RUN);
-		}
-	}
-
-	if (ret != LZMA_OK) {
-		message_error("%s: %s", pair->src_name, message_strm(ret));
-		if (ret == LZMA_MEMLIMIT_ERROR)
-			message_mem_needed(V_ERROR, lzma_memusage(&strm));
-
-		return CODER_INIT_ERROR;
-	}
-
-	return CODER_INIT_NORMAL;
-}
-
-
-/// Compress or decompress using liblzma.
-static bool
-coder_normal(file_pair *pair)
-{
-	// Encoder needs to know when we have given all the input to it.
-	// The decoders need to know it too when we are using
-	// LZMA_CONCATENATED. We need to check for src_eof here, because
-	// the first input chunk has been already read, and that may
-	// have been the only chunk we will read.
-	lzma_action action = pair->src_eof ? LZMA_FINISH : LZMA_RUN;
-
-	lzma_ret ret;
-
-	// Assume that something goes wrong.
-	bool success = false;
-
-	strm.next_out = out_buf.u8;
-	strm.avail_out = IO_BUFFER_SIZE;
-
-	while (!user_abort) {
-		// Fill the input buffer if it is empty and we haven't reached
-		// end of file yet.
-		if (strm.avail_in == 0 && !pair->src_eof) {
-			strm.next_in = in_buf.u8;
-			strm.avail_in = io_read(
-					pair, &in_buf, IO_BUFFER_SIZE);
-
-			if (strm.avail_in == SIZE_MAX)
-				break;
-
-			if (pair->src_eof)
-				action = LZMA_FINISH;
-		}
-
-		// Let liblzma do the actual work.
-		ret = lzma_code(&strm, action);
-
-		// Write out if the output buffer became full.
-		if (strm.avail_out == 0) {
-			if (opt_mode != MODE_TEST && io_write(pair, &out_buf,
-					IO_BUFFER_SIZE - strm.avail_out))
-				break;
-
-			strm.next_out = out_buf.u8;
-			strm.avail_out = IO_BUFFER_SIZE;
-		}
-
-		if (ret != LZMA_OK) {
-			// Determine if the return value indicates that we
-			// won't continue coding.
-			const bool stop = ret != LZMA_NO_CHECK
-					&& ret != LZMA_UNSUPPORTED_CHECK;
-
-			if (stop) {
-				// Write the remaining bytes even if something
-				// went wrong, because that way the user gets
-				// as much data as possible, which can be good
-				// when trying to get at least some useful
-				// data out of damaged files.
-				if (opt_mode != MODE_TEST && io_write(pair,
-						&out_buf, IO_BUFFER_SIZE
-							- strm.avail_out))
-					break;
-			}
-
-			if (ret == LZMA_STREAM_END) {
-				// Check that there is no trailing garbage.
-				// This is needed for LZMA_Alone and raw
-				// streams.
-				if (strm.avail_in == 0 && !pair->src_eof) {
-					// Try reading one more byte.
-					// Hopefully we don't get any more
-					// input, and thus pair->src_eof
-					// becomes true.
-					strm.avail_in = io_read(
-							pair, &in_buf, 1);
-					if (strm.avail_in == SIZE_MAX)
-						break;
-
-					assert(strm.avail_in == 0
-							|| strm.avail_in == 1);
-				}
-
-				if (strm.avail_in == 0) {
-					assert(pair->src_eof);
-					success = true;
-					break;
-				}
-
-				// We hadn't reached the end of the file.
-				ret = LZMA_DATA_ERROR;
-				assert(stop);
-			}
-
-			// If we get here and stop is true, something went
-			// wrong and we print an error. Otherwise it's just
-			// a warning and coding can continue.
-			if (stop) {
-				message_error("%s: %s", pair->src_name,
-						message_strm(ret));
-			} else {
-				message_warning("%s: %s", pair->src_name,
-						message_strm(ret));
-
-				// When compressing, all possible errors set
-				// stop to true.
-				assert(opt_mode != MODE_COMPRESS);
-			}
-
-			if (ret == LZMA_MEMLIMIT_ERROR) {
-				// Display how much memory it would have
-				// actually needed.
-				message_mem_needed(V_ERROR,
-						lzma_memusage(&strm));
-			}
-
-			if (stop)
-				break;
-		}
-
-		// Show progress information under certain conditions.
-		message_progress_update();
-	}
-
-	return success;
-}
-
-
-/// Copy from input file to output file without processing the data in any
-/// way. This is used only when trying to decompress unrecognized files
-/// with --decompress --stdout --force, so the output is always stdout.
-static bool
-coder_passthru(file_pair *pair)
-{
-	while (strm.avail_in != 0) {
-		if (user_abort)
-			return false;
-
-		if (io_write(pair, &in_buf, strm.avail_in))
-			return false;
-
-		strm.total_in += strm.avail_in;
-		strm.total_out = strm.total_in;
-		message_progress_update();
-
-		strm.avail_in = io_read(pair, &in_buf, IO_BUFFER_SIZE);
-		if (strm.avail_in == SIZE_MAX)
-			return false;
-	}
-
-	return true;
-}
-
-
-extern void
-coder_run(const char *filename)
-{
-	// Set and possibly print the filename for the progress message.
-	message_filename(filename);
-
-	// Try to open the input file.
-	file_pair *pair = io_open_src(filename);
-	if (pair == NULL)
-		return;
-
-	// Assume that something goes wrong.
-	bool success = false;
-
-	// Read the first chunk of input data. This is needed to detect
-	// the input file type (for now, only for decompression).
-	strm.next_in = in_buf.u8;
-	strm.avail_in = io_read(pair, &in_buf, IO_BUFFER_SIZE);
-
-	if (strm.avail_in != SIZE_MAX) {
-		// Initialize the coder. This will detect the file format
-		// and, in decompression or testing mode, check the memory
-		// usage of the first Block too. This way we don't try to
-		// open the destination file if we see that coding wouldn't
-		// work at all anyway. This also avoids deleting the old
-		// "target" file if --force was used.
-		const enum coder_init_ret init_ret = coder_init(pair);
-
-		if (init_ret != CODER_INIT_ERROR && !user_abort) {
-			// Don't open the destination file when --test
-			// is used.
-			if (opt_mode == MODE_TEST || !io_open_dest(pair)) {
-				// Initialize the progress indicator.
-				const uint64_t in_size
-						= pair->src_st.st_size <= 0
-						? 0 : pair->src_st.st_size;
-				message_progress_start(&strm, in_size);
-
-				// Do the actual coding or passthru.
-				if (init_ret == CODER_INIT_NORMAL)
-					success = coder_normal(pair);
-				else
-					success = coder_passthru(pair);
-
-				message_progress_end(success);
-			}
-		}
-	}
-
-	// Close the file pair. It needs to know if coding was successful to
-	// know if the source or target file should be unlinked.
-	io_close(pair, success);
-
-	return;
-}

Copied: vendor/xz/5.2.3/src/xz/coder.c (from rev 11013, vendor/xz/dist/src/xz/coder.c)
===================================================================
--- vendor/xz/5.2.3/src/xz/coder.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/coder.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,936 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       coder.c
+/// \brief      Compresses or uncompresses a file
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+
+/// Return value type for coder_init().
+enum coder_init_ret {
+	CODER_INIT_NORMAL,
+	CODER_INIT_PASSTHRU,
+	CODER_INIT_ERROR,
+};
+
+
+enum operation_mode opt_mode = MODE_COMPRESS;
+enum format_type opt_format = FORMAT_AUTO;
+bool opt_auto_adjust = true;
+bool opt_single_stream = false;
+uint64_t opt_block_size = 0;
+uint64_t *opt_block_list = NULL;
+
+
+/// Stream used to communicate with liblzma
+static lzma_stream strm = LZMA_STREAM_INIT;
+
+/// Filters needed for all encoding all formats, and also decoding in raw data
+static lzma_filter filters[LZMA_FILTERS_MAX + 1];
+
+/// Input and output buffers
+static io_buf in_buf;
+static io_buf out_buf;
+
+/// Number of filters. Zero indicates that we are using a preset.
+static uint32_t filters_count = 0;
+
+/// Number of the preset (0-9)
+static uint32_t preset_number = LZMA_PRESET_DEFAULT;
+
+/// Integrity check type
+static lzma_check check;
+
+/// This becomes false if the --check=CHECK option is used.
+static bool check_default = true;
+
+#if defined(HAVE_ENCODERS) && defined(MYTHREAD_ENABLED)
+static lzma_mt mt_options = {
+	.flags = 0,
+	.timeout = 300,
+	.filters = filters,
+};
+#endif
+
+
+extern void
+coder_set_check(lzma_check new_check)
+{
+	check = new_check;
+	check_default = false;
+	return;
+}
+
+
+static void
+forget_filter_chain(void)
+{
+	// Setting a preset makes us forget a possibly defined custom
+	// filter chain.
+	while (filters_count > 0) {
+		--filters_count;
+		free(filters[filters_count].options);
+		filters[filters_count].options = NULL;
+	}
+
+	return;
+}
+
+
+extern void
+coder_set_preset(uint32_t new_preset)
+{
+	preset_number &= ~LZMA_PRESET_LEVEL_MASK;
+	preset_number |= new_preset;
+	forget_filter_chain();
+	return;
+}
+
+
+extern void
+coder_set_extreme(void)
+{
+	preset_number |= LZMA_PRESET_EXTREME;
+	forget_filter_chain();
+	return;
+}
+
+
+extern void
+coder_add_filter(lzma_vli id, void *options)
+{
+	if (filters_count == LZMA_FILTERS_MAX)
+		message_fatal(_("Maximum number of filters is four"));
+
+	filters[filters_count].id = id;
+	filters[filters_count].options = options;
+	++filters_count;
+
+	// Setting a custom filter chain makes us forget the preset options.
+	// This makes a difference if one specifies e.g. "xz -9 --lzma2 -e"
+	// where the custom filter chain resets the preset level back to
+	// the default 6, making the example equivalent to "xz -6e".
+	preset_number = LZMA_PRESET_DEFAULT;
+
+	return;
+}
+
+
+static void lzma_attribute((__noreturn__))
+memlimit_too_small(uint64_t memory_usage)
+{
+	message(V_ERROR, _("Memory usage limit is too low for the given "
+			"filter setup."));
+	message_mem_needed(V_ERROR, memory_usage);
+	tuklib_exit(E_ERROR, E_ERROR, false);
+}
+
+
+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;
+
+	if (filters_count == 0) {
+		// We are using a preset. This is not a good idea in raw mode
+		// except when playing around with things. Different versions
+		// of this software may use different options in presets, and
+		// thus make uncompressing the raw data difficult.
+		if (opt_format == FORMAT_RAW) {
+			// The message is shown only if warnings are allowed
+			// but the exit status isn't changed.
+			message(V_WARNING, _("Using a preset in raw mode "
+					"is discouraged."));
+			message(V_WARNING, _("The exact options of the "
+					"presets may vary between software "
+					"versions."));
+		}
+
+		// Get the preset for LZMA1 or LZMA2.
+		if (lzma_lzma_preset(&opt_lzma, preset_number))
+			message_bug();
+
+		// Use LZMA2 except with --format=lzma we use LZMA1.
+		filters[0].id = opt_format == FORMAT_LZMA
+				? LZMA_FILTER_LZMA1 : LZMA_FILTER_LZMA2;
+		filters[0].options = &opt_lzma;
+		filters_count = 1;
+	}
+
+	// Terminate the filter options array.
+	filters[filters_count].id = LZMA_VLI_UNKNOWN;
+
+	// If we are using the .lzma format, allow exactly one filter
+	// which has to be LZMA1.
+	if (opt_format == FORMAT_LZMA && (filters_count != 1
+			|| filters[0].id != LZMA_FILTER_LZMA1))
+		message_fatal(_("The .lzma format supports only "
+				"the LZMA1 filter"));
+
+	// If we are using the .xz format, make sure that there is no LZMA1
+	// filter to prevent LZMA_PROG_ERROR.
+	if (opt_format == FORMAT_XZ)
+		for (size_t i = 0; i < filters_count; ++i)
+			if (filters[i].id == LZMA_FILTER_LZMA1)
+				message_fatal(_("LZMA1 cannot be used "
+						"with the .xz format"));
+
+	// Print the selected filter chain.
+	message_filters_show(V_DEBUG, filters);
+
+	// The --flush-timeout option requires LZMA_SYNC_FLUSH support
+	// from the filter chain. Currently threaded encoder doesn't support
+	// LZMA_SYNC_FLUSH so single-threaded mode must be used.
+	if (opt_mode == MODE_COMPRESS && opt_flush_timeout != 0) {
+		for (size_t i = 0; i < filters_count; ++i) {
+			switch (filters[i].id) {
+			case LZMA_FILTER_LZMA2:
+			case LZMA_FILTER_DELTA:
+				break;
+
+			default:
+				message_fatal(_("The filter chain is "
+					"incompatible with --flush-timeout"));
+			}
+		}
+
+		if (hardware_threads_get() > 1) {
+			message(V_WARNING, _("Switching to single-threaded "
+					"mode due to --flush-timeout"));
+			hardware_threads_set(1);
+		}
+	}
+
+	// Get the memory usage. Note that if --format=raw was used,
+	// we can be decompressing.
+	const uint64_t memory_limit = hardware_memlimit_get(opt_mode);
+	uint64_t memory_usage = UINT64_MAX;
+	if (opt_mode == MODE_COMPRESS) {
+#ifdef HAVE_ENCODERS
+#	ifdef MYTHREAD_ENABLED
+		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);
+		}
+#endif
+	} else {
+#ifdef HAVE_DECODERS
+		memory_usage = lzma_raw_decoder_memusage(filters);
+#endif
+	}
+
+	if (memory_usage == UINT64_MAX)
+		message_fatal(_("Unsupported filter chain or filter options"));
+
+	// Print memory usage info before possible dictionary
+	// size auto-adjusting.
+	//
+	// NOTE: If only encoder support was built, we cannot show the
+	// what the decoder memory usage will be.
+	message_mem_needed(V_DEBUG, memory_usage);
+#ifdef HAVE_DECODERS
+	if (opt_mode == MODE_COMPRESS) {
+		const uint64_t decmem = lzma_raw_decoder_memusage(filters);
+		if (decmem != UINT64_MAX)
+			message(V_DEBUG, _("Decompression will need "
+					"%s MiB of memory."), uint64_to_str(
+						round_up_to_mib(decmem), 0));
+	}
+#endif
+
+	if (memory_usage <= memory_limit)
+		return;
+
+	// If --no-adjust was used or we didn't find LZMA1 or
+	// LZMA2 as the last filter, give an error immediately.
+	// --format=raw implies --no-adjust.
+	if (!opt_auto_adjust || opt_format == FORMAT_RAW)
+		memlimit_too_small(memory_usage);
+
+	assert(opt_mode == MODE_COMPRESS);
+
+#ifdef HAVE_ENCODERS
+#	ifdef MYTHREAD_ENABLED
+	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)
+				memlimit_too_small(memory_usage);
+
+			memory_usage = lzma_stream_encoder_mt_memusage(
+					&mt_options);
+			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));
+	}
+#	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;
+	}
+
+	// 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));
+#endif
+
+	return;
+}
+
+
+#ifdef HAVE_DECODERS
+/// Return true if the data in in_buf seems to be in the .xz format.
+static bool
+is_format_xz(void)
+{
+	// Specify the magic as hex to be compatible with EBCDIC systems.
+	static const uint8_t magic[6] = { 0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00 };
+	return strm.avail_in >= sizeof(magic)
+			&& memcmp(in_buf.u8, magic, sizeof(magic)) == 0;
+}
+
+
+/// Return true if the data in in_buf seems to be in the .lzma format.
+static bool
+is_format_lzma(void)
+{
+	// The .lzma header is 13 bytes.
+	if (strm.avail_in < 13)
+		return false;
+
+	// Decode the LZMA1 properties.
+	lzma_filter filter = { .id = LZMA_FILTER_LZMA1 };
+	if (lzma_properties_decode(&filter, NULL, in_buf.u8, 5) != LZMA_OK)
+		return false;
+
+	// A hack to ditch tons of false positives: We allow only dictionary
+	// sizes that are 2^n or 2^n + 2^(n-1) or UINT32_MAX. LZMA_Alone
+	// created only files with 2^n, but accepts any dictionary size.
+	// If someone complains, this will be reconsidered.
+	lzma_options_lzma *opt = filter.options;
+	const uint32_t dict_size = opt->dict_size;
+	free(opt);
+
+	if (dict_size != UINT32_MAX) {
+		uint32_t d = dict_size - 1;
+		d |= d >> 2;
+		d |= d >> 3;
+		d |= d >> 4;
+		d |= d >> 8;
+		d |= d >> 16;
+		++d;
+		if (d != dict_size || dict_size == 0)
+			return false;
+	}
+
+	// Another hack to ditch false positives: Assume that if the
+	// uncompressed size is known, it must be less than 256 GiB.
+	// Again, if someone complains, this will be reconsidered.
+	uint64_t uncompressed_size = 0;
+	for (size_t i = 0; i < 8; ++i)
+		uncompressed_size |= (uint64_t)(in_buf.u8[5 + i]) << (i * 8);
+
+	if (uncompressed_size != UINT64_MAX
+			&& uncompressed_size > (UINT64_C(1) << 38))
+		return false;
+
+	return true;
+}
+#endif
+
+
+/// Detect the input file type (for now, this done only when decompressing),
+/// and initialize an appropriate coder. Return value indicates if a normal
+/// liblzma-based coder was initialized (CODER_INIT_NORMAL), if passthru
+/// mode should be used (CODER_INIT_PASSTHRU), or if an error occurred
+/// (CODER_INIT_ERROR).
+static enum coder_init_ret
+coder_init(file_pair *pair)
+{
+	lzma_ret ret = LZMA_PROG_ERROR;
+
+	if (opt_mode == MODE_COMPRESS) {
+#ifdef HAVE_ENCODERS
+		switch (opt_format) {
+		case FORMAT_AUTO:
+			// args.c ensures this.
+			assert(0);
+			break;
+
+		case FORMAT_XZ:
+#	ifdef MYTHREAD_ENABLED
+			if (hardware_threads_get() > 1)
+				ret = lzma_stream_encoder_mt(
+						&strm, &mt_options);
+			else
+#	endif
+				ret = lzma_stream_encoder(
+						&strm, filters, check);
+			break;
+
+		case FORMAT_LZMA:
+			ret = lzma_alone_encoder(&strm, filters[0].options);
+			break;
+
+		case FORMAT_RAW:
+			ret = lzma_raw_encoder(&strm, filters);
+			break;
+		}
+#endif
+	} else {
+#ifdef HAVE_DECODERS
+		uint32_t flags = 0;
+
+		// It seems silly to warn about unsupported check if the
+		// check won't be verified anyway due to --ignore-check.
+		if (opt_ignore_check)
+			flags |= LZMA_IGNORE_CHECK;
+		else
+			flags |= LZMA_TELL_UNSUPPORTED_CHECK;
+
+		if (!opt_single_stream)
+			flags |= LZMA_CONCATENATED;
+
+		// We abuse FORMAT_AUTO to indicate unknown file format,
+		// for which we may consider passthru mode.
+		enum format_type init_format = FORMAT_AUTO;
+
+		switch (opt_format) {
+		case FORMAT_AUTO:
+			if (is_format_xz())
+				init_format = FORMAT_XZ;
+			else if (is_format_lzma())
+				init_format = FORMAT_LZMA;
+			break;
+
+		case FORMAT_XZ:
+			if (is_format_xz())
+				init_format = FORMAT_XZ;
+			break;
+
+		case FORMAT_LZMA:
+			if (is_format_lzma())
+				init_format = FORMAT_LZMA;
+			break;
+
+		case FORMAT_RAW:
+			init_format = FORMAT_RAW;
+			break;
+		}
+
+		switch (init_format) {
+		case FORMAT_AUTO:
+			// Unknown file format. If --decompress --stdout
+			// --force have been given, then we copy the input
+			// as is to stdout. Checking for MODE_DECOMPRESS
+			// is needed, because we don't want to do use
+			// passthru mode with --test.
+			if (opt_mode == MODE_DECOMPRESS
+					&& opt_stdout && opt_force)
+				return CODER_INIT_PASSTHRU;
+
+			ret = LZMA_FORMAT_ERROR;
+			break;
+
+		case FORMAT_XZ:
+			ret = lzma_stream_decoder(&strm,
+					hardware_memlimit_get(
+						MODE_DECOMPRESS), flags);
+			break;
+
+		case FORMAT_LZMA:
+			ret = lzma_alone_decoder(&strm,
+					hardware_memlimit_get(
+						MODE_DECOMPRESS));
+			break;
+
+		case FORMAT_RAW:
+			// Memory usage has already been checked in
+			// coder_set_compression_settings().
+			ret = lzma_raw_decoder(&strm, filters);
+			break;
+		}
+
+		// Try to decode the headers. This will catch too low
+		// memory usage limit in case it happens in the first
+		// Block of the first Stream, which is where it very
+		// probably will happen if it is going to happen.
+		if (ret == LZMA_OK && init_format != FORMAT_RAW) {
+			strm.next_out = NULL;
+			strm.avail_out = 0;
+			ret = lzma_code(&strm, LZMA_RUN);
+		}
+#endif
+	}
+
+	if (ret != LZMA_OK) {
+		message_error("%s: %s", pair->src_name, message_strm(ret));
+		if (ret == LZMA_MEMLIMIT_ERROR)
+			message_mem_needed(V_ERROR, lzma_memusage(&strm));
+
+		return CODER_INIT_ERROR;
+	}
+
+	return CODER_INIT_NORMAL;
+}
+
+
+/// Resolve conflicts between opt_block_size and opt_block_list in single
+/// threaded mode. We want to default to opt_block_list, except when it is
+/// larger than opt_block_size. If this is the case for the current Block
+/// at *list_pos, then we break into smaller Blocks. Otherwise advance
+/// to the next Block in opt_block_list, and break apart if needed.
+static void
+split_block(uint64_t *block_remaining,
+	    uint64_t *next_block_remaining,
+	    size_t *list_pos)
+{
+	if (*next_block_remaining > 0) {
+		// The Block at *list_pos has previously been split up.
+		assert(hardware_threads_get() == 1);
+		assert(opt_block_size > 0);
+		assert(opt_block_list != NULL);
+
+		if (*next_block_remaining > opt_block_size) {
+			// We have to split the current Block at *list_pos
+			// into another opt_block_size length Block.
+			*block_remaining = opt_block_size;
+		} else {
+			// This is the last remaining split Block for the
+			// Block at *list_pos.
+			*block_remaining = *next_block_remaining;
+		}
+
+		*next_block_remaining -= *block_remaining;
+
+	} else {
+		// The Block at *list_pos has been finished. Go to the next
+		// entry in the list. If the end of the list has been reached,
+		// reuse the size of the last Block.
+		if (opt_block_list[*list_pos + 1] != 0)
+			++*list_pos;
+
+		*block_remaining = opt_block_list[*list_pos];
+
+		// If in single-threaded mode, split up the Block if needed.
+		// This is not needed in multi-threaded mode because liblzma
+		// will do this due to how threaded encoding works.
+		if (hardware_threads_get() == 1 && opt_block_size > 0
+				&& *block_remaining > opt_block_size) {
+			*next_block_remaining
+					= *block_remaining - opt_block_size;
+			*block_remaining = opt_block_size;
+		}
+	}
+}
+
+
+/// Compress or decompress using liblzma.
+static bool
+coder_normal(file_pair *pair)
+{
+	// Encoder needs to know when we have given all the input to it.
+	// The decoders need to know it too when we are using
+	// LZMA_CONCATENATED. We need to check for src_eof here, because
+	// the first input chunk has been already read if decompressing,
+	// and that may have been the only chunk we will read.
+	lzma_action action = pair->src_eof ? LZMA_FINISH : LZMA_RUN;
+
+	lzma_ret ret;
+
+	// Assume that something goes wrong.
+	bool success = false;
+
+	// block_remaining indicates how many input bytes to encode before
+	// finishing the current .xz Block. The Block size is set with
+	// --block-size=SIZE and --block-list. They have an effect only when
+	// compressing to the .xz format. If block_remaining == UINT64_MAX,
+	// only a single block is created.
+	uint64_t block_remaining = UINT64_MAX;
+
+	// next_block_remining for when we are in single-threaded mode and
+	// the Block in --block-list is larger than the --block-size=SIZE.
+	uint64_t next_block_remaining = 0;
+
+	// Position in opt_block_list. Unused if --block-list wasn't used.
+	size_t list_pos = 0;
+
+	// Handle --block-size for single-threaded mode and the first step
+	// of --block-list.
+	if (opt_mode == MODE_COMPRESS && opt_format == FORMAT_XZ) {
+		// --block-size doesn't do anything here in threaded mode,
+		// because the threaded encoder will take care of splitting
+		// to fixed-sized Blocks.
+		if (hardware_threads_get() == 1 && opt_block_size > 0)
+			block_remaining = opt_block_size;
+
+		// If --block-list was used, start with the first size.
+		//
+		// For threaded case, --block-size specifies how big Blocks
+		// the encoder needs to be prepared to create at maximum
+		// and --block-list will simultaneously cause new Blocks
+		// to be started at specified intervals. To keep things
+		// logical, the same is done in single-threaded mode. The
+		// output is still not identical because in single-threaded
+		// mode the size info isn't written into Block Headers.
+		if (opt_block_list != NULL) {
+			if (block_remaining < opt_block_list[list_pos]) {
+				assert(hardware_threads_get() == 1);
+				next_block_remaining = opt_block_list[list_pos]
+						- block_remaining;
+			} else {
+				block_remaining = opt_block_list[list_pos];
+			}
+		}
+	}
+
+	strm.next_out = out_buf.u8;
+	strm.avail_out = IO_BUFFER_SIZE;
+
+	while (!user_abort) {
+		// Fill the input buffer if it is empty and we aren't
+		// flushing or finishing.
+		if (strm.avail_in == 0 && action == LZMA_RUN) {
+			strm.next_in = in_buf.u8;
+			strm.avail_in = io_read(pair, &in_buf,
+					my_min(block_remaining,
+						IO_BUFFER_SIZE));
+
+			if (strm.avail_in == SIZE_MAX)
+				break;
+
+			if (pair->src_eof) {
+				action = LZMA_FINISH;
+
+			} else if (block_remaining != UINT64_MAX) {
+				// Start a new Block after every
+				// opt_block_size bytes of input.
+				block_remaining -= strm.avail_in;
+				if (block_remaining == 0)
+					action = LZMA_FULL_BARRIER;
+			}
+
+			if (action == LZMA_RUN && flush_needed)
+				action = LZMA_SYNC_FLUSH;
+		}
+
+		// Let liblzma do the actual work.
+		ret = lzma_code(&strm, action);
+
+		// Write out if the output buffer became full.
+		if (strm.avail_out == 0) {
+			if (opt_mode != MODE_TEST && io_write(pair, &out_buf,
+					IO_BUFFER_SIZE - strm.avail_out))
+				break;
+
+			strm.next_out = out_buf.u8;
+			strm.avail_out = IO_BUFFER_SIZE;
+		}
+
+		if (ret == LZMA_STREAM_END && (action == LZMA_SYNC_FLUSH
+				|| action == LZMA_FULL_BARRIER)) {
+			if (action == LZMA_SYNC_FLUSH) {
+				// Flushing completed. Write the pending data
+				// out immediatelly so that the reading side
+				// can decompress everything compressed so far.
+				if (io_write(pair, &out_buf, IO_BUFFER_SIZE
+						- strm.avail_out))
+					break;
+
+				strm.next_out = out_buf.u8;
+				strm.avail_out = IO_BUFFER_SIZE;
+
+				// Set the time of the most recent flushing.
+				mytime_set_flush_time();
+			} else {
+				// Start a new Block after LZMA_FULL_BARRIER.
+				if (opt_block_list == NULL) {
+					assert(hardware_threads_get() == 1);
+					assert(opt_block_size > 0);
+					block_remaining = opt_block_size;
+				} else {
+					split_block(&block_remaining,
+							&next_block_remaining,
+							&list_pos);
+				}
+			}
+
+			// Start a new Block after LZMA_FULL_FLUSH or continue
+			// the same block after LZMA_SYNC_FLUSH.
+			action = LZMA_RUN;
+
+		} else if (ret != LZMA_OK) {
+			// Determine if the return value indicates that we
+			// won't continue coding.
+			const bool stop = ret != LZMA_NO_CHECK
+					&& ret != LZMA_UNSUPPORTED_CHECK;
+
+			if (stop) {
+				// Write the remaining bytes even if something
+				// went wrong, because that way the user gets
+				// as much data as possible, which can be good
+				// when trying to get at least some useful
+				// data out of damaged files.
+				if (opt_mode != MODE_TEST && io_write(pair,
+						&out_buf, IO_BUFFER_SIZE
+							- strm.avail_out))
+					break;
+			}
+
+			if (ret == LZMA_STREAM_END) {
+				if (opt_single_stream) {
+					io_fix_src_pos(pair, strm.avail_in);
+					success = true;
+					break;
+				}
+
+				// Check that there is no trailing garbage.
+				// This is needed for LZMA_Alone and raw
+				// streams.
+				if (strm.avail_in == 0 && !pair->src_eof) {
+					// Try reading one more byte.
+					// Hopefully we don't get any more
+					// input, and thus pair->src_eof
+					// becomes true.
+					strm.avail_in = io_read(
+							pair, &in_buf, 1);
+					if (strm.avail_in == SIZE_MAX)
+						break;
+
+					assert(strm.avail_in == 0
+							|| strm.avail_in == 1);
+				}
+
+				if (strm.avail_in == 0) {
+					assert(pair->src_eof);
+					success = true;
+					break;
+				}
+
+				// We hadn't reached the end of the file.
+				ret = LZMA_DATA_ERROR;
+				assert(stop);
+			}
+
+			// If we get here and stop is true, something went
+			// wrong and we print an error. Otherwise it's just
+			// a warning and coding can continue.
+			if (stop) {
+				message_error("%s: %s", pair->src_name,
+						message_strm(ret));
+			} else {
+				message_warning("%s: %s", pair->src_name,
+						message_strm(ret));
+
+				// When compressing, all possible errors set
+				// stop to true.
+				assert(opt_mode != MODE_COMPRESS);
+			}
+
+			if (ret == LZMA_MEMLIMIT_ERROR) {
+				// Display how much memory it would have
+				// actually needed.
+				message_mem_needed(V_ERROR,
+						lzma_memusage(&strm));
+			}
+
+			if (stop)
+				break;
+		}
+
+		// Show progress information under certain conditions.
+		message_progress_update();
+	}
+
+	return success;
+}
+
+
+/// Copy from input file to output file without processing the data in any
+/// way. This is used only when trying to decompress unrecognized files
+/// with --decompress --stdout --force, so the output is always stdout.
+static bool
+coder_passthru(file_pair *pair)
+{
+	while (strm.avail_in != 0) {
+		if (user_abort)
+			return false;
+
+		if (io_write(pair, &in_buf, strm.avail_in))
+			return false;
+
+		strm.total_in += strm.avail_in;
+		strm.total_out = strm.total_in;
+		message_progress_update();
+
+		strm.avail_in = io_read(pair, &in_buf, IO_BUFFER_SIZE);
+		if (strm.avail_in == SIZE_MAX)
+			return false;
+	}
+
+	return true;
+}
+
+
+extern void
+coder_run(const char *filename)
+{
+	// Set and possibly print the filename for the progress message.
+	message_filename(filename);
+
+	// Try to open the input file.
+	file_pair *pair = io_open_src(filename);
+	if (pair == NULL)
+		return;
+
+	// Assume that something goes wrong.
+	bool success = false;
+
+	if (opt_mode == MODE_COMPRESS) {
+		strm.next_in = NULL;
+		strm.avail_in = 0;
+	} else {
+		// Read the first chunk of input data. This is needed
+		// to detect the input file type.
+		strm.next_in = in_buf.u8;
+		strm.avail_in = io_read(pair, &in_buf, IO_BUFFER_SIZE);
+	}
+
+	if (strm.avail_in != SIZE_MAX) {
+		// Initialize the coder. This will detect the file format
+		// and, in decompression or testing mode, check the memory
+		// usage of the first Block too. This way we don't try to
+		// open the destination file if we see that coding wouldn't
+		// work at all anyway. This also avoids deleting the old
+		// "target" file if --force was used.
+		const enum coder_init_ret init_ret = coder_init(pair);
+
+		if (init_ret != CODER_INIT_ERROR && !user_abort) {
+			// Don't open the destination file when --test
+			// is used.
+			if (opt_mode == MODE_TEST || !io_open_dest(pair)) {
+				// Remember the current time. It is needed
+				// for progress indicator and for timed
+				// flushing.
+				mytime_set_start_time();
+
+				// Initialize the progress indicator.
+				const uint64_t in_size
+						= pair->src_st.st_size <= 0
+						? 0 : pair->src_st.st_size;
+				message_progress_start(&strm, in_size);
+
+				// Do the actual coding or passthru.
+				if (init_ret == CODER_INIT_NORMAL)
+					success = coder_normal(pair);
+				else
+					success = coder_passthru(pair);
+
+				message_progress_end(success);
+			}
+		}
+	}
+
+	// Close the file pair. It needs to know if coding was successful to
+	// know if the source or target file should be unlinked.
+	io_close(pair, success);
+
+	return;
+}
+
+
+#ifndef NDEBUG
+extern void
+coder_free(void)
+{
+	lzma_end(&strm);
+	return;
+}
+#endif

Deleted: vendor/xz/5.2.3/src/xz/coder.h
===================================================================
--- vendor/xz/dist/src/xz/coder.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/coder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,61 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       coder.h
-/// \brief      Compresses or uncompresses a file
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-enum operation_mode {
-	MODE_COMPRESS,
-	MODE_DECOMPRESS,
-	MODE_TEST,
-	MODE_LIST,
-};
-
-
-// NOTE: The order of these is significant in suffix.c.
-enum format_type {
-	FORMAT_AUTO,
-	FORMAT_XZ,
-	FORMAT_LZMA,
-	// HEADER_GZIP,
-	FORMAT_RAW,
-};
-
-
-/// Operation mode of the command line tool. This is set in args.c and read
-/// in several files.
-extern enum operation_mode opt_mode;
-
-/// File format to use when encoding or what format(s) to accept when
-/// decoding. This is a global because it's needed also in suffix.c.
-/// This is set in args.c.
-extern enum format_type opt_format;
-
-/// If true, the compression settings are automatically adjusted down if
-/// they exceed the memory usage limit.
-extern bool opt_auto_adjust;
-
-
-/// Set the integrity check type used when compressing
-extern void coder_set_check(lzma_check check);
-
-/// Set preset number
-extern void coder_set_preset(uint32_t new_preset);
-
-/// Enable extreme mode
-extern void coder_set_extreme(void);
-
-/// Add a filter to the custom filter chain
-extern void coder_add_filter(lzma_vli id, void *options);
-
-///
-extern void coder_set_compression_settings(void);
-
-/// Compress or decompress the given file
-extern void coder_run(const char *filename);

Copied: vendor/xz/5.2.3/src/xz/coder.h (from rev 9176, vendor/xz/dist/src/xz/coder.h)
===================================================================
--- vendor/xz/5.2.3/src/xz/coder.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/coder.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,76 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       coder.h
+/// \brief      Compresses or uncompresses a file
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+enum operation_mode {
+	MODE_COMPRESS,
+	MODE_DECOMPRESS,
+	MODE_TEST,
+	MODE_LIST,
+};
+
+
+// NOTE: The order of these is significant in suffix.c.
+enum format_type {
+	FORMAT_AUTO,
+	FORMAT_XZ,
+	FORMAT_LZMA,
+	// HEADER_GZIP,
+	FORMAT_RAW,
+};
+
+
+/// Operation mode of the command line tool. This is set in args.c and read
+/// in several files.
+extern enum operation_mode opt_mode;
+
+/// File format to use when encoding or what format(s) to accept when
+/// decoding. This is a global because it's needed also in suffix.c.
+/// This is set in args.c.
+extern enum format_type opt_format;
+
+/// If true, the compression settings are automatically adjusted down if
+/// they exceed the memory usage limit.
+extern bool opt_auto_adjust;
+
+/// If true, stop after decoding the first stream.
+extern bool opt_single_stream;
+
+/// If non-zero, start a new .xz Block after every opt_block_size bytes
+/// of input. This has an effect only when compressing to the .xz format.
+extern uint64_t opt_block_size;
+
+/// This is non-NULL if --block-list was used. This contains the Block sizes
+/// as an array that is terminated with 0.
+extern uint64_t *opt_block_list;
+
+/// Set the integrity check type used when compressing
+extern void coder_set_check(lzma_check check);
+
+/// Set preset number
+extern void coder_set_preset(uint32_t new_preset);
+
+/// Enable extreme mode
+extern void coder_set_extreme(void);
+
+/// Add a filter to the custom filter chain
+extern void coder_add_filter(lzma_vli id, void *options);
+
+///
+extern void coder_set_compression_settings(void);
+
+/// Compress or decompress the given file
+extern void coder_run(const char *filename);
+
+#ifndef NDEBUG
+/// Free the memory allocated for the coder and kill the worker threads.
+extern void coder_free(void);
+#endif

Deleted: vendor/xz/5.2.3/src/xz/file_io.c
===================================================================
--- vendor/xz/dist/src/xz/file_io.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/file_io.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,955 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       file_io.c
-/// \brief      File opening, unlinking, and closing
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "private.h"
-
-#include <fcntl.h>
-
-#ifdef TUKLIB_DOSLIKE
-#	include <io.h>
-#else
-static bool warn_fchown;
-#endif
-
-#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMES)
-#	include <sys/time.h>
-#elif defined(HAVE_UTIME)
-#	include <utime.h>
-#endif
-
-#include "tuklib_open_stdxxx.h"
-
-#ifndef O_BINARY
-#	define O_BINARY 0
-#endif
-
-#ifndef O_NOCTTY
-#	define O_NOCTTY 0
-#endif
-
-
-/// If true, try to create sparse files when decompressing.
-static bool try_sparse = true;
-
-#ifndef TUKLIB_DOSLIKE
-/// Original file status flags of standard output. This is used by
-/// io_open_dest() and io_close_dest() to save and restore the flags.
-static int stdout_flags;
-static bool restore_stdout_flags = false;
-#endif
-
-
-static bool io_write_buf(file_pair *pair, const uint8_t *buf, size_t size);
-
-
-extern void
-io_init(void)
-{
-	// Make sure that stdin, stdout, and stderr are connected to
-	// a valid file descriptor. Exit immediately with exit code ERROR
-	// if we cannot make the file descriptors valid. Maybe we should
-	// print an error message, but our stderr could be screwed anyway.
-	tuklib_open_stdxxx(E_ERROR);
-
-#ifndef TUKLIB_DOSLIKE
-	// If fchown() fails setting the owner, we warn about it only if
-	// we are root.
-	warn_fchown = geteuid() == 0;
-#endif
-
-#ifdef __DJGPP__
-	// Avoid doing useless things when statting files.
-	// This isn't important but doesn't hurt.
-	_djstat_flags = _STAT_INODE | _STAT_EXEC_EXT
-			| _STAT_EXEC_MAGIC | _STAT_DIRSIZE;
-#endif
-
-	return;
-}
-
-
-extern void
-io_no_sparse(void)
-{
-	try_sparse = false;
-	return;
-}
-
-
-/// \brief      Unlink a file
-///
-/// This tries to verify that the file being unlinked really is the file that
-/// we want to unlink by verifying device and inode numbers. There's still
-/// a small unavoidable race, but this is much better than nothing (the file
-/// could have been moved/replaced even hours earlier).
-static void
-io_unlink(const char *name, const struct stat *known_st)
-{
-#if defined(TUKLIB_DOSLIKE)
-	// On DOS-like systems, st_ino is meaningless, so don't bother
-	// testing it. Just silence a compiler warning.
-	(void)known_st;
-#else
-	struct stat new_st;
-
-	// If --force was used, use stat() instead of lstat(). This way
-	// (de)compressing symlinks works correctly. However, it also means
-	// that xz cannot detect if a regular file foo is renamed to bar
-	// and then a symlink foo -> bar is created. Because of stat()
-	// instead of lstat(), xz will think that foo hasn't been replaced
-	// with another file. Thus, xz will remove foo even though it no
-	// longer is the same file that xz used when it started compressing.
-	// Probably it's not too bad though, so this doesn't need a more
-	// complex fix.
-	const int stat_ret = opt_force
-			? stat(name, &new_st) : lstat(name, &new_st);
-
-	if (stat_ret
-#	ifdef __VMS
-			// st_ino is an array, and we don't want to
-			// compare st_dev at all.
-			|| memcmp(&new_st.st_ino, &known_st->st_ino,
-				sizeof(new_st.st_ino)) != 0
-#	else
-			// Typical POSIX-like system
-			|| new_st.st_dev != known_st->st_dev
-			|| new_st.st_ino != known_st->st_ino
-#	endif
-			)
-		// TRANSLATORS: When compression or decompression finishes,
-		// and xz is going to remove the source file, xz first checks
-		// if the source file still exists, and if it does, does its
-		// device and inode numbers match what xz saw when it opened
-		// the source file. If these checks fail, this message is
-		// shown, %s being the filename, and the file is not deleted.
-		// The check for device and inode numbers is there, because
-		// it is possible that the user has put a new file in place
-		// of the original file, and in that case it obviously
-		// shouldn't be removed.
-		message_error(_("%s: File seems to have been moved, "
-				"not removing"), name);
-	else
-#endif
-		// There's a race condition between lstat() and unlink()
-		// but at least we have tried to avoid removing wrong file.
-		if (unlink(name))
-			message_error(_("%s: Cannot remove: %s"),
-					name, strerror(errno));
-
-	return;
-}
-
-
-/// \brief      Copies owner/group and permissions
-///
-/// \todo       ACL and EA support
-///
-static void
-io_copy_attrs(const file_pair *pair)
-{
-	// Skip chown and chmod on Windows.
-#ifndef TUKLIB_DOSLIKE
-	// This function is more tricky than you may think at first.
-	// Blindly copying permissions may permit users to access the
-	// destination file who didn't have permission to access the
-	// source file.
-
-	// Try changing the owner of the file. If we aren't root or the owner
-	// isn't already us, fchown() probably doesn't succeed. We warn
-	// about failing fchown() only if we are root.
-	if (fchown(pair->dest_fd, pair->src_st.st_uid, -1) && warn_fchown)
-		message_warning(_("%s: Cannot set the file owner: %s"),
-				pair->dest_name, strerror(errno));
-
-	mode_t mode;
-
-	if (fchown(pair->dest_fd, -1, pair->src_st.st_gid)) {
-		message_warning(_("%s: Cannot set the file group: %s"),
-				pair->dest_name, strerror(errno));
-		// We can still safely copy some additional permissions:
-		// `group' must be at least as strict as `other' and
-		// also vice versa.
-		//
-		// NOTE: After this, the owner of the source file may
-		// get additional permissions. This shouldn't be too bad,
-		// because the owner would have had permission to chmod
-		// the original file anyway.
-		mode = ((pair->src_st.st_mode & 0070) >> 3)
-				& (pair->src_st.st_mode & 0007);
-		mode = (pair->src_st.st_mode & 0700) | (mode << 3) | mode;
-	} else {
-		// Drop the setuid, setgid, and sticky bits.
-		mode = pair->src_st.st_mode & 0777;
-	}
-
-	if (fchmod(pair->dest_fd, mode))
-		message_warning(_("%s: Cannot set the file permissions: %s"),
-				pair->dest_name, strerror(errno));
-#endif
-
-	// Copy the timestamps. We have several possible ways to do this, of
-	// which some are better in both security and precision.
-	//
-	// First, get the nanosecond part of the timestamps. As of writing,
-	// it's not standardized by POSIX, and there are several names for
-	// the same thing in struct stat.
-	long atime_nsec;
-	long mtime_nsec;
-
-#	if defined(HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC)
-	// GNU and Solaris
-	atime_nsec = pair->src_st.st_atim.tv_nsec;
-	mtime_nsec = pair->src_st.st_mtim.tv_nsec;
-
-#	elif defined(HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC)
-	// BSD
-	atime_nsec = pair->src_st.st_atimespec.tv_nsec;
-	mtime_nsec = pair->src_st.st_mtimespec.tv_nsec;
-
-#	elif defined(HAVE_STRUCT_STAT_ST_ATIMENSEC)
-	// GNU and BSD without extensions
-	atime_nsec = pair->src_st.st_atimensec;
-	mtime_nsec = pair->src_st.st_mtimensec;
-
-#	elif defined(HAVE_STRUCT_STAT_ST_UATIME)
-	// Tru64
-	atime_nsec = pair->src_st.st_uatime * 1000;
-	mtime_nsec = pair->src_st.st_umtime * 1000;
-
-#	elif defined(HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC)
-	// UnixWare
-	atime_nsec = pair->src_st.st_atim.st__tim.tv_nsec;
-	mtime_nsec = pair->src_st.st_mtim.st__tim.tv_nsec;
-
-#	else
-	// Safe fallback
-	atime_nsec = 0;
-	mtime_nsec = 0;
-#	endif
-
-	// Construct a structure to hold the timestamps and call appropriate
-	// function to set the timestamps.
-#if defined(HAVE_FUTIMENS)
-	// Use nanosecond precision.
-	struct timespec tv[2];
-	tv[0].tv_sec = pair->src_st.st_atime;
-	tv[0].tv_nsec = atime_nsec;
-	tv[1].tv_sec = pair->src_st.st_mtime;
-	tv[1].tv_nsec = mtime_nsec;
-
-	(void)futimens(pair->dest_fd, tv);
-
-#elif defined(HAVE_FUTIMES) || defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMES)
-	// Use microsecond precision.
-	struct timeval tv[2];
-	tv[0].tv_sec = pair->src_st.st_atime;
-	tv[0].tv_usec = atime_nsec / 1000;
-	tv[1].tv_sec = pair->src_st.st_mtime;
-	tv[1].tv_usec = mtime_nsec / 1000;
-
-#	if defined(HAVE_FUTIMES)
-	(void)futimes(pair->dest_fd, tv);
-#	elif defined(HAVE_FUTIMESAT)
-	(void)futimesat(pair->dest_fd, NULL, tv);
-#	else
-	// Argh, no function to use a file descriptor to set the timestamp.
-	(void)utimes(pair->dest_name, tv);
-#	endif
-
-#elif defined(HAVE_UTIME)
-	// Use one-second precision. utime() doesn't support using file
-	// descriptor either. Some systems have broken utime() prototype
-	// so don't make this const.
-	struct utimbuf buf = {
-		.actime = pair->src_st.st_atime,
-		.modtime = pair->src_st.st_mtime,
-	};
-
-	// Avoid warnings.
-	(void)atime_nsec;
-	(void)mtime_nsec;
-
-	(void)utime(pair->dest_name, &buf);
-#endif
-
-	return;
-}
-
-
-/// Opens the source file. Returns false on success, true on error.
-static bool
-io_open_src_real(file_pair *pair)
-{
-	// There's nothing to open when reading from stdin.
-	if (pair->src_name == stdin_filename) {
-		pair->src_fd = STDIN_FILENO;
-#ifdef TUKLIB_DOSLIKE
-		setmode(STDIN_FILENO, O_BINARY);
-#endif
-		return false;
-	}
-
-	// Symlinks are not followed unless writing to stdout or --force
-	// was used.
-	const bool follow_symlinks = opt_stdout || opt_force;
-
-	// We accept only regular files if we are writing the output
-	// to disk too. bzip2 allows overriding this with --force but
-	// gzip and xz don't.
-	const bool reg_files_only = !opt_stdout;
-
-	// Flags for open()
-	int flags = O_RDONLY | O_BINARY | O_NOCTTY;
-
-#ifndef TUKLIB_DOSLIKE
-	// If we accept only regular files, we need to be careful to avoid
-	// problems with special files like devices and FIFOs. O_NONBLOCK
-	// prevents blocking when opening such files. When we want to accept
-	// special files, we must not use O_NONBLOCK, or otherwise we won't
-	// block waiting e.g. FIFOs to become readable.
-	if (reg_files_only)
-		flags |= O_NONBLOCK;
-#endif
-
-#if defined(O_NOFOLLOW)
-	if (!follow_symlinks)
-		flags |= O_NOFOLLOW;
-#elif !defined(TUKLIB_DOSLIKE)
-	// Some POSIX-like systems lack O_NOFOLLOW (it's not required
-	// by POSIX). Check for symlinks with a separate lstat() on
-	// these systems.
-	if (!follow_symlinks) {
-		struct stat st;
-		if (lstat(pair->src_name, &st)) {
-			message_error("%s: %s", pair->src_name,
-					strerror(errno));
-			return true;
-
-		} else if (S_ISLNK(st.st_mode)) {
-			message_warning(_("%s: Is a symbolic link, "
-					"skipping"), pair->src_name);
-			return true;
-		}
-	}
-#else
-	// Avoid warnings.
-	(void)follow_symlinks;
-#endif
-
-	// Try to open the file. If we are accepting non-regular files,
-	// unblock the caught signals so that open() can be interrupted
-	// if it blocks e.g. due to a FIFO file.
-	if (!reg_files_only)
-		signals_unblock();
-
-	// Maybe this wouldn't need a loop, since all the signal handlers for
-	// which we don't use SA_RESTART set user_abort to true. But it
-	// doesn't hurt to have it just in case.
-	do {
-		pair->src_fd = open(pair->src_name, flags);
-	} while (pair->src_fd == -1 && errno == EINTR && !user_abort);
-
-	if (!reg_files_only)
-		signals_block();
-
-	if (pair->src_fd == -1) {
-		// If we were interrupted, don't display any error message.
-		if (errno == EINTR) {
-			// All the signals that don't have SA_RESTART
-			// set user_abort.
-			assert(user_abort);
-			return true;
-		}
-
-#ifdef O_NOFOLLOW
-		// Give an understandable error message if the reason
-		// for failing was that the file was a symbolic link.
-		//
-		// Note that at least Linux, OpenBSD, Solaris, and Darwin
-		// use ELOOP to indicate that O_NOFOLLOW was the reason
-		// that open() failed. Because there may be
-		// directories in the pathname, ELOOP may occur also
-		// because of a symlink loop in the directory part.
-		// So ELOOP doesn't tell us what actually went wrong,
-		// and this stupidity went into POSIX-1.2008 too.
-		//
-		// FreeBSD associates EMLINK with O_NOFOLLOW and
-		// Tru64 uses ENOTSUP. We use these directly here
-		// and skip the lstat() call and the associated race.
-		// I want to hear if there are other kernels that
-		// fail with something else than ELOOP with O_NOFOLLOW.
-		bool was_symlink = false;
-
-#	if defined(__FreeBSD__) || defined(__DragonFly__)
-		if (errno == EMLINK)
-			was_symlink = true;
-
-#	elif defined(__digital__) && defined(__unix__)
-		if (errno == ENOTSUP)
-			was_symlink = true;
-
-#	elif defined(__NetBSD__)
-		if (errno == EFTYPE)
-			was_symlink = true;
-
-#	else
-		if (errno == ELOOP && !follow_symlinks) {
-			const int saved_errno = errno;
-			struct stat st;
-			if (lstat(pair->src_name, &st) == 0
-					&& S_ISLNK(st.st_mode))
-				was_symlink = true;
-
-			errno = saved_errno;
-		}
-#	endif
-
-		if (was_symlink)
-			message_warning(_("%s: Is a symbolic link, "
-					"skipping"), pair->src_name);
-		else
-#endif
-			// Something else than O_NOFOLLOW failing
-			// (assuming that the race conditions didn't
-			// confuse us).
-			message_error("%s: %s", pair->src_name,
-					strerror(errno));
-
-		return true;
-	}
-
-#ifndef TUKLIB_DOSLIKE
-	// Drop O_NONBLOCK, which is used only when we are accepting only
-	// regular files. After the open() call, we want things to block
-	// instead of giving EAGAIN.
-	if (reg_files_only) {
-		flags = fcntl(pair->src_fd, F_GETFL);
-		if (flags == -1)
-			goto error_msg;
-
-		flags &= ~O_NONBLOCK;
-
-		if (fcntl(pair->src_fd, F_SETFL, flags) == -1)
-			goto error_msg;
-	}
-#endif
-
-	// Stat the source file. We need the result also when we copy
-	// the permissions, and when unlinking.
-	if (fstat(pair->src_fd, &pair->src_st))
-		goto error_msg;
-
-	if (S_ISDIR(pair->src_st.st_mode)) {
-		message_warning(_("%s: Is a directory, skipping"),
-				pair->src_name);
-		goto error;
-	}
-
-	if (reg_files_only && !S_ISREG(pair->src_st.st_mode)) {
-		message_warning(_("%s: Not a regular file, skipping"),
-				pair->src_name);
-		goto error;
-	}
-
-#ifndef TUKLIB_DOSLIKE
-	if (reg_files_only && !opt_force) {
-		if (pair->src_st.st_mode & (S_ISUID | S_ISGID)) {
-			// gzip rejects setuid and setgid files even
-			// when --force was used. bzip2 doesn't check
-			// for them, but calls fchown() after fchmod(),
-			// and many systems automatically drop setuid
-			// and setgid bits there.
-			//
-			// We accept setuid and setgid files if
-			// --force was used. We drop these bits
-			// explicitly in io_copy_attr().
-			message_warning(_("%s: File has setuid or "
-					"setgid bit set, skipping"),
-					pair->src_name);
-			goto error;
-		}
-
-		if (pair->src_st.st_mode & S_ISVTX) {
-			message_warning(_("%s: File has sticky bit "
-					"set, skipping"),
-					pair->src_name);
-			goto error;
-		}
-
-		if (pair->src_st.st_nlink > 1) {
-			message_warning(_("%s: Input file has more "
-					"than one hard link, "
-					"skipping"), pair->src_name);
-			goto error;
-		}
-	}
-#endif
-
-	return false;
-
-error_msg:
-	message_error("%s: %s", pair->src_name, strerror(errno));
-error:
-	(void)close(pair->src_fd);
-	return true;
-}
-
-
-extern file_pair *
-io_open_src(const char *src_name)
-{
-	if (is_empty_filename(src_name))
-		return NULL;
-
-	// Since we have only one file open at a time, we can use
-	// a statically allocated structure.
-	static file_pair pair;
-
-	pair = (file_pair){
-		.src_name = src_name,
-		.dest_name = NULL,
-		.src_fd = -1,
-		.dest_fd = -1,
-		.src_eof = false,
-		.dest_try_sparse = false,
-		.dest_pending_sparse = 0,
-	};
-
-	// Block the signals, for which we have a custom signal handler, so
-	// that we don't need to worry about EINTR.
-	signals_block();
-	const bool error = io_open_src_real(&pair);
-	signals_unblock();
-
-	return error ? NULL : &pair;
-}
-
-
-/// \brief      Closes source file of the file_pair structure
-///
-/// \param      pair    File whose src_fd should be closed
-/// \param      success If true, the file will be removed from the disk if
-///                     closing succeeds and --keep hasn't been used.
-static void
-io_close_src(file_pair *pair, bool success)
-{
-	if (pair->src_fd != STDIN_FILENO && pair->src_fd != -1) {
-#ifdef TUKLIB_DOSLIKE
-		(void)close(pair->src_fd);
-#endif
-
-		// If we are going to unlink(), do it before closing the file.
-		// This way there's no risk that someone replaces the file and
-		// happens to get same inode number, which would make us
-		// unlink() wrong file.
-		//
-		// NOTE: DOS-like systems are an exception to this, because
-		// they don't allow unlinking files that are open. *sigh*
-		if (success && !opt_keep_original)
-			io_unlink(pair->src_name, &pair->src_st);
-
-#ifndef TUKLIB_DOSLIKE
-		(void)close(pair->src_fd);
-#endif
-	}
-
-	return;
-}
-
-
-static bool
-io_open_dest_real(file_pair *pair)
-{
-	if (opt_stdout || pair->src_fd == STDIN_FILENO) {
-		// We don't modify or free() this.
-		pair->dest_name = (char *)"(stdout)";
-		pair->dest_fd = STDOUT_FILENO;
-#ifdef TUKLIB_DOSLIKE
-		setmode(STDOUT_FILENO, O_BINARY);
-#endif
-	} else {
-		pair->dest_name = suffix_get_dest_name(pair->src_name);
-		if (pair->dest_name == NULL)
-			return true;
-
-		// If --force was used, unlink the target file first.
-		if (opt_force && unlink(pair->dest_name) && errno != ENOENT) {
-			message_error(_("%s: Cannot remove: %s"),
-					pair->dest_name, strerror(errno));
-			free(pair->dest_name);
-			return true;
-		}
-
-		// Open the file.
-		const int flags = O_WRONLY | O_BINARY | O_NOCTTY
-				| O_CREAT | O_EXCL;
-		const mode_t mode = S_IRUSR | S_IWUSR;
-		pair->dest_fd = open(pair->dest_name, flags, mode);
-
-		if (pair->dest_fd == -1) {
-			message_error("%s: %s", pair->dest_name,
-					strerror(errno));
-			free(pair->dest_name);
-			return true;
-		}
-	}
-
-	// If this really fails... well, we have a safe fallback.
-	if (fstat(pair->dest_fd, &pair->dest_st)) {
-#if defined(__VMS)
-		pair->dest_st.st_ino[0] = 0;
-		pair->dest_st.st_ino[1] = 0;
-		pair->dest_st.st_ino[2] = 0;
-#elif !defined(TUKLIB_DOSLIKE)
-		pair->dest_st.st_dev = 0;
-		pair->dest_st.st_ino = 0;
-#endif
-#ifndef TUKLIB_DOSLIKE
-	} else if (try_sparse && opt_mode == MODE_DECOMPRESS) {
-		// When writing to standard output, we need to be extra
-		// careful:
-		//  - It may be connected to something else than
-		//    a regular file.
-		//  - We aren't necessarily writing to a new empty file
-		//    or to the end of an existing file.
-		//  - O_APPEND may be active.
-		//
-		// TODO: I'm keeping this disabled for DOS-like systems
-		// for now. FAT doesn't support sparse files, but NTFS
-		// does, so maybe this should be enabled on Windows after
-		// some testing.
-		if (pair->dest_fd == STDOUT_FILENO) {
-			if (!S_ISREG(pair->dest_st.st_mode))
-				return false;
-
-			stdout_flags = fcntl(STDOUT_FILENO, F_GETFL);
-			if (stdout_flags == -1)
-				return false;
-
-			if (stdout_flags & O_APPEND) {
-				// Creating a sparse file is not possible
-				// when O_APPEND is active (it's used by
-				// shell's >> redirection). As I understand
-				// it, it is safe to temporarily disable
-				// O_APPEND in xz, because if someone
-				// happened to write to the same file at the
-				// same time, results would be bad anyway
-				// (users shouldn't assume that xz uses any
-				// specific block size when writing data).
-				//
-				// The write position may be something else
-				// than the end of the file, so we must fix
-				// it to start writing at the end of the file
-				// to imitate O_APPEND.
-				if (lseek(STDOUT_FILENO, 0, SEEK_END) == -1)
-					return false;
-
-				if (fcntl(STDOUT_FILENO, F_SETFL,
-						stdout_flags & ~O_APPEND)
-						== -1)
-					return false;
-
-				// Disabling O_APPEND succeeded. Mark
-				// that the flags should be restored
-				// in io_close_dest().
-				restore_stdout_flags = true;
-
-			} else if (lseek(STDOUT_FILENO, 0, SEEK_CUR)
-					!= pair->dest_st.st_size) {
-				// Writing won't start exactly at the end
-				// of the file. We cannot use sparse output,
-				// because it would probably corrupt the file.
-				return false;
-			}
-		}
-
-		pair->dest_try_sparse = true;
-#endif
-	}
-
-	return false;
-}
-
-
-extern bool
-io_open_dest(file_pair *pair)
-{
-	signals_block();
-	const bool ret = io_open_dest_real(pair);
-	signals_unblock();
-	return ret;
-}
-
-
-/// \brief      Closes destination file of the file_pair structure
-///
-/// \param      pair    File whose dest_fd should be closed
-/// \param      success If false, the file will be removed from the disk.
-///
-/// \return     Zero if closing succeeds. On error, -1 is returned and
-///             error message printed.
-static bool
-io_close_dest(file_pair *pair, bool success)
-{
-#ifndef TUKLIB_DOSLIKE
-	// If io_open_dest() has disabled O_APPEND, restore it here.
-	if (restore_stdout_flags) {
-		assert(pair->dest_fd == STDOUT_FILENO);
-
-		restore_stdout_flags = false;
-
-		if (fcntl(STDOUT_FILENO, F_SETFL, stdout_flags) == -1) {
-			message_error(_("Error restoring the O_APPEND flag "
-					"to standard output: %s"),
-					strerror(errno));
-			return true;
-		}
-	}
-#endif
-
-	if (pair->dest_fd == -1 || pair->dest_fd == STDOUT_FILENO)
-		return false;
-
-	if (close(pair->dest_fd)) {
-		message_error(_("%s: Closing the file failed: %s"),
-				pair->dest_name, strerror(errno));
-
-		// Closing destination file failed, so we cannot trust its
-		// contents. Get rid of junk:
-		io_unlink(pair->dest_name, &pair->dest_st);
-		free(pair->dest_name);
-		return true;
-	}
-
-	// If the operation using this file wasn't successful, we git rid
-	// of the junk file.
-	if (!success)
-		io_unlink(pair->dest_name, &pair->dest_st);
-
-	free(pair->dest_name);
-
-	return false;
-}
-
-
-extern void
-io_close(file_pair *pair, bool success)
-{
-	// Take care of sparseness at the end of the output file.
-	if (success && pair->dest_try_sparse
-			&& pair->dest_pending_sparse > 0) {
-		// Seek forward one byte less than the size of the pending
-		// hole, then write one zero-byte. This way the file grows
-		// to its correct size. An alternative would be to use
-		// ftruncate() but that isn't portable enough (e.g. it
-		// doesn't work with FAT on Linux; FAT isn't that important
-		// since it doesn't support sparse files anyway, but we don't
-		// want to create corrupt files on it).
-		if (lseek(pair->dest_fd, pair->dest_pending_sparse - 1,
-				SEEK_CUR) == -1) {
-			message_error(_("%s: Seeking failed when trying "
-					"to create a sparse file: %s"),
-					pair->dest_name, strerror(errno));
-			success = false;
-		} else {
-			const uint8_t zero[1] = { '\0' };
-			if (io_write_buf(pair, zero, 1))
-				success = false;
-		}
-	}
-
-	signals_block();
-
-	// Copy the file attributes. We need to skip this if destination
-	// file isn't open or it is standard output.
-	if (success && pair->dest_fd != -1 && pair->dest_fd != STDOUT_FILENO)
-		io_copy_attrs(pair);
-
-	// Close the destination first. If it fails, we must not remove
-	// the source file!
-	if (io_close_dest(pair, success))
-		success = false;
-
-	// Close the source file, and unlink it if the operation using this
-	// file pair was successful and we haven't requested to keep the
-	// source file.
-	io_close_src(pair, success);
-
-	signals_unblock();
-
-	return;
-}
-
-
-extern size_t
-io_read(file_pair *pair, io_buf *buf_union, size_t size)
-{
-	// We use small buffers here.
-	assert(size < SSIZE_MAX);
-
-	uint8_t *buf = buf_union->u8;
-	size_t left = size;
-
-	while (left > 0) {
-		const ssize_t amount = read(pair->src_fd, buf, left);
-
-		if (amount == 0) {
-			pair->src_eof = true;
-			break;
-		}
-
-		if (amount == -1) {
-			if (errno == EINTR) {
-				if (user_abort)
-					return SIZE_MAX;
-
-				continue;
-			}
-
-			message_error(_("%s: Read error: %s"),
-					pair->src_name, strerror(errno));
-
-			// FIXME Is this needed?
-			pair->src_eof = true;
-
-			return SIZE_MAX;
-		}
-
-		buf += (size_t)(amount);
-		left -= (size_t)(amount);
-	}
-
-	return size - left;
-}
-
-
-extern bool
-io_pread(file_pair *pair, io_buf *buf, size_t size, off_t pos)
-{
-	// Using lseek() and read() is more portable than pread() and
-	// for us it is as good as real pread().
-	if (lseek(pair->src_fd, pos, SEEK_SET) != pos) {
-		message_error(_("%s: Error seeking the file: %s"),
-				pair->src_name, strerror(errno));
-		return true;
-	}
-
-	const size_t amount = io_read(pair, buf, size);
-	if (amount == SIZE_MAX)
-		return true;
-
-	if (amount != size) {
-		message_error(_("%s: Unexpected end of file"),
-				pair->src_name);
-		return true;
-	}
-
-	return false;
-}
-
-
-static bool
-is_sparse(const io_buf *buf)
-{
-	assert(IO_BUFFER_SIZE % sizeof(uint64_t) == 0);
-
-	for (size_t i = 0; i < ARRAY_SIZE(buf->u64); ++i)
-		if (buf->u64[i] != 0)
-			return false;
-
-	return true;
-}
-
-
-static bool
-io_write_buf(file_pair *pair, const uint8_t *buf, size_t size)
-{
-	assert(size < SSIZE_MAX);
-
-	while (size > 0) {
-		const ssize_t amount = write(pair->dest_fd, buf, size);
-		if (amount == -1) {
-			if (errno == EINTR) {
-				if (user_abort)
-					return true;
-
-				continue;
-			}
-
-			// Handle broken pipe specially. gzip and bzip2
-			// don't print anything on SIGPIPE. In addition,
-			// gzip --quiet uses exit status 2 (warning) on
-			// broken pipe instead of whatever raise(SIGPIPE)
-			// would make it return. It is there to hide "Broken
-			// pipe" message on some old shells (probably old
-			// GNU bash).
-			//
-			// We don't do anything special with --quiet, which
-			// is what bzip2 does too. If we get SIGPIPE, we
-			// will handle it like other signals by setting
-			// user_abort, and get EPIPE here.
-			if (errno != EPIPE)
-				message_error(_("%s: Write error: %s"),
-					pair->dest_name, strerror(errno));
-
-			return true;
-		}
-
-		buf += (size_t)(amount);
-		size -= (size_t)(amount);
-	}
-
-	return false;
-}
-
-
-extern bool
-io_write(file_pair *pair, const io_buf *buf, size_t size)
-{
-	assert(size <= IO_BUFFER_SIZE);
-
-	if (pair->dest_try_sparse) {
-		// Check if the block is sparse (contains only zeros). If it
-		// sparse, we just store the amount and return. We will take
-		// care of actually skipping over the hole when we hit the
-		// next data block or close the file.
-		//
-		// Since io_close() requires that dest_pending_sparse > 0
-		// if the file ends with sparse block, we must also return
-		// if size == 0 to avoid doing the lseek().
-		if (size == IO_BUFFER_SIZE) {
-			if (is_sparse(buf)) {
-				pair->dest_pending_sparse += size;
-				return false;
-			}
-		} else if (size == 0) {
-			return false;
-		}
-
-		// This is not a sparse block. If we have a pending hole,
-		// skip it now.
-		if (pair->dest_pending_sparse > 0) {
-			if (lseek(pair->dest_fd, pair->dest_pending_sparse,
-					SEEK_CUR) == -1) {
-				message_error(_("%s: Seeking failed when "
-						"trying to create a sparse "
-						"file: %s"), pair->dest_name,
-						strerror(errno));
-				return true;
-			}
-
-			pair->dest_pending_sparse = 0;
-		}
-	}
-
-	return io_write_buf(pair, buf->u8, size);
-}

Copied: vendor/xz/5.2.3/src/xz/file_io.c (from rev 11013, vendor/xz/dist/src/xz/file_io.c)
===================================================================
--- vendor/xz/5.2.3/src/xz/file_io.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/file_io.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,1294 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       file_io.c
+/// \brief      File opening, unlinking, and closing
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+#include <fcntl.h>
+
+#ifdef TUKLIB_DOSLIKE
+#	include <io.h>
+#else
+#	include <poll.h>
+static bool warn_fchown;
+#endif
+
+#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMES)
+#	include <sys/time.h>
+#elif defined(HAVE__FUTIME)
+#	include <sys/utime.h>
+#elif defined(HAVE_UTIME)
+#	include <utime.h>
+#endif
+
+#ifdef HAVE_CAPSICUM
+#	ifdef HAVE_SYS_CAPSICUM_H
+#		include <sys/capsicum.h>
+#	else
+#		include <sys/capability.h>
+#	endif
+#endif
+
+#include "tuklib_open_stdxxx.h"
+
+#ifndef O_BINARY
+#	define O_BINARY 0
+#endif
+
+#ifndef O_NOCTTY
+#	define O_NOCTTY 0
+#endif
+
+// Using this macro to silence a warning from gcc -Wlogical-op.
+#if EAGAIN == EWOULDBLOCK
+#	define IS_EAGAIN_OR_EWOULDBLOCK(e) ((e) == EAGAIN)
+#else
+#	define IS_EAGAIN_OR_EWOULDBLOCK(e) \
+		((e) == EAGAIN || (e) == EWOULDBLOCK)
+#endif
+
+
+typedef enum {
+	IO_WAIT_MORE,    // Reading or writing is possible.
+	IO_WAIT_ERROR,   // Error or user_abort
+	IO_WAIT_TIMEOUT, // poll() timed out
+} io_wait_ret;
+
+
+/// If true, try to create sparse files when decompressing.
+static bool try_sparse = true;
+
+#ifdef ENABLE_SANDBOX
+/// True if the conditions for sandboxing (described in main()) have been met.
+static bool sandbox_allowed = false;
+#endif
+
+#ifndef TUKLIB_DOSLIKE
+/// File status flags of standard input. This is used by io_open_src()
+/// and io_close_src().
+static int stdin_flags;
+static bool restore_stdin_flags = false;
+
+/// Original file status flags of standard output. This is used by
+/// io_open_dest() and io_close_dest() to save and restore the flags.
+static int stdout_flags;
+static bool restore_stdout_flags = false;
+
+/// Self-pipe used together with the user_abort variable to avoid
+/// race conditions with signal handling.
+static int user_abort_pipe[2];
+#endif
+
+
+static bool io_write_buf(file_pair *pair, const uint8_t *buf, size_t size);
+
+
+extern void
+io_init(void)
+{
+	// Make sure that stdin, stdout, and stderr are connected to
+	// a valid file descriptor. Exit immediately with exit code ERROR
+	// if we cannot make the file descriptors valid. Maybe we should
+	// print an error message, but our stderr could be screwed anyway.
+	tuklib_open_stdxxx(E_ERROR);
+
+#ifndef TUKLIB_DOSLIKE
+	// If fchown() fails setting the owner, we warn about it only if
+	// we are root.
+	warn_fchown = geteuid() == 0;
+
+	// Create a pipe for the self-pipe trick.
+	if (pipe(user_abort_pipe))
+		message_fatal(_("Error creating a pipe: %s"),
+				strerror(errno));
+
+	// Make both ends of the pipe non-blocking.
+	for (unsigned i = 0; i < 2; ++i) {
+		int flags = fcntl(user_abort_pipe[i], F_GETFL);
+		if (flags == -1 || fcntl(user_abort_pipe[i], F_SETFL,
+				flags | O_NONBLOCK) == -1)
+			message_fatal(_("Error creating a pipe: %s"),
+					strerror(errno));
+	}
+#endif
+
+#ifdef __DJGPP__
+	// Avoid doing useless things when statting files.
+	// This isn't important but doesn't hurt.
+	_djstat_flags = _STAT_EXEC_EXT | _STAT_EXEC_MAGIC | _STAT_DIRSIZE;
+#endif
+
+	return;
+}
+
+
+#ifndef TUKLIB_DOSLIKE
+extern void
+io_write_to_user_abort_pipe(void)
+{
+	// If the write() fails, it's probably due to the pipe being full.
+	// Failing in that case is fine. If the reason is something else,
+	// there's not much we can do since this is called in a signal
+	// handler. So ignore the errors and try to avoid warnings with
+	// GCC and glibc when _FORTIFY_SOURCE=2 is used.
+	uint8_t b = '\0';
+	const int ret = write(user_abort_pipe[1], &b, 1);
+	(void)ret;
+	return;
+}
+#endif
+
+
+extern void
+io_no_sparse(void)
+{
+	try_sparse = false;
+	return;
+}
+
+
+#ifdef ENABLE_SANDBOX
+extern void
+io_allow_sandbox(void)
+{
+	sandbox_allowed = true;
+	return;
+}
+
+
+/// Enables operating-system-specific sandbox if it is possible.
+/// src_fd is the file descriptor of the input file.
+static void
+io_sandbox_enter(int src_fd)
+{
+	if (!sandbox_allowed) {
+		message(V_DEBUG, _("Sandbox is disabled due "
+				"to incompatible command line arguments"));
+		return;
+	}
+
+	const char dummy_str[] = "x";
+
+	// Try to ensure that both libc and xz locale files have been
+	// loaded when NLS is enabled.
+	snprintf(NULL, 0, "%s%s", _(dummy_str), strerror(EINVAL));
+
+	// Try to ensure that iconv data files needed for handling multibyte
+	// characters have been loaded. This is needed at least with glibc.
+	tuklib_mbstr_width(dummy_str, NULL);
+
+#ifdef HAVE_CAPSICUM
+	// Capsicum needs FreeBSD 10.0 or later.
+	cap_rights_t rights;
+
+	if (cap_rights_limit(src_fd, cap_rights_init(&rights,
+			CAP_EVENT, CAP_FCNTL, CAP_LOOKUP, CAP_READ, CAP_SEEK)))
+		goto error;
+
+	if (cap_rights_limit(STDOUT_FILENO, cap_rights_init(&rights,
+			CAP_EVENT, CAP_FCNTL, CAP_FSTAT, CAP_LOOKUP,
+			CAP_WRITE, CAP_SEEK)))
+		goto error;
+
+	if (cap_rights_limit(user_abort_pipe[0], cap_rights_init(&rights,
+			CAP_EVENT)))
+		goto error;
+
+	if (cap_rights_limit(user_abort_pipe[1], cap_rights_init(&rights,
+			CAP_WRITE)))
+		goto error;
+
+	if (cap_enter())
+		goto error;
+
+#else
+#	error ENABLE_SANDBOX is defined but no sandboxing method was found.
+#endif
+
+	message(V_DEBUG, _("Sandbox was successfully enabled"));
+	return;
+
+error:
+	message(V_DEBUG, _("Failed to enable the sandbox"));
+}
+#endif // ENABLE_SANDBOX
+
+
+#ifndef TUKLIB_DOSLIKE
+/// \brief      Waits for input or output to become available or for a signal
+///
+/// This uses the self-pipe trick to avoid a race condition that can occur
+/// if a signal is caught after user_abort has been checked but before e.g.
+/// read() has been called. In that situation read() could block unless
+/// non-blocking I/O is used. With non-blocking I/O something like select()
+/// or poll() is needed to avoid a busy-wait loop, and the same race condition
+/// pops up again. There are pselect() (POSIX-1.2001) and ppoll() (not in
+/// POSIX) but neither is portable enough in 2013. The self-pipe trick is
+/// old and very portable.
+static io_wait_ret
+io_wait(file_pair *pair, int timeout, bool is_reading)
+{
+	struct pollfd pfd[2];
+
+	if (is_reading) {
+		pfd[0].fd = pair->src_fd;
+		pfd[0].events = POLLIN;
+	} else {
+		pfd[0].fd = pair->dest_fd;
+		pfd[0].events = POLLOUT;
+	}
+
+	pfd[1].fd = user_abort_pipe[0];
+	pfd[1].events = POLLIN;
+
+	while (true) {
+		const int ret = poll(pfd, 2, timeout);
+
+		if (user_abort)
+			return IO_WAIT_ERROR;
+
+		if (ret == -1) {
+			if (errno == EINTR || errno == EAGAIN)
+				continue;
+
+			message_error(_("%s: poll() failed: %s"),
+					is_reading ? pair->src_name
+						: pair->dest_name,
+					strerror(errno));
+			return IO_WAIT_ERROR;
+		}
+
+		if (ret == 0) {
+			assert(opt_flush_timeout != 0);
+			flush_needed = true;
+			return IO_WAIT_TIMEOUT;
+		}
+
+		if (pfd[0].revents != 0)
+			return IO_WAIT_MORE;
+	}
+}
+#endif
+
+
+/// \brief      Unlink a file
+///
+/// This tries to verify that the file being unlinked really is the file that
+/// we want to unlink by verifying device and inode numbers. There's still
+/// a small unavoidable race, but this is much better than nothing (the file
+/// could have been moved/replaced even hours earlier).
+static void
+io_unlink(const char *name, const struct stat *known_st)
+{
+#if defined(TUKLIB_DOSLIKE)
+	// On DOS-like systems, st_ino is meaningless, so don't bother
+	// testing it. Just silence a compiler warning.
+	(void)known_st;
+#else
+	struct stat new_st;
+
+	// If --force was used, use stat() instead of lstat(). This way
+	// (de)compressing symlinks works correctly. However, it also means
+	// that xz cannot detect if a regular file foo is renamed to bar
+	// and then a symlink foo -> bar is created. Because of stat()
+	// instead of lstat(), xz will think that foo hasn't been replaced
+	// with another file. Thus, xz will remove foo even though it no
+	// longer is the same file that xz used when it started compressing.
+	// Probably it's not too bad though, so this doesn't need a more
+	// complex fix.
+	const int stat_ret = opt_force
+			? stat(name, &new_st) : lstat(name, &new_st);
+
+	if (stat_ret
+#	ifdef __VMS
+			// st_ino is an array, and we don't want to
+			// compare st_dev at all.
+			|| memcmp(&new_st.st_ino, &known_st->st_ino,
+				sizeof(new_st.st_ino)) != 0
+#	else
+			// Typical POSIX-like system
+			|| new_st.st_dev != known_st->st_dev
+			|| new_st.st_ino != known_st->st_ino
+#	endif
+			)
+		// TRANSLATORS: When compression or decompression finishes,
+		// and xz is going to remove the source file, xz first checks
+		// if the source file still exists, and if it does, does its
+		// device and inode numbers match what xz saw when it opened
+		// the source file. If these checks fail, this message is
+		// shown, %s being the filename, and the file is not deleted.
+		// The check for device and inode numbers is there, because
+		// it is possible that the user has put a new file in place
+		// of the original file, and in that case it obviously
+		// shouldn't be removed.
+		message_error(_("%s: File seems to have been moved, "
+				"not removing"), name);
+	else
+#endif
+		// There's a race condition between lstat() and unlink()
+		// but at least we have tried to avoid removing wrong file.
+		if (unlink(name))
+			message_error(_("%s: Cannot remove: %s"),
+					name, strerror(errno));
+
+	return;
+}
+
+
+/// \brief      Copies owner/group and permissions
+///
+/// \todo       ACL and EA support
+///
+static void
+io_copy_attrs(const file_pair *pair)
+{
+	// Skip chown and chmod on Windows.
+#ifndef TUKLIB_DOSLIKE
+	// This function is more tricky than you may think at first.
+	// Blindly copying permissions may permit users to access the
+	// destination file who didn't have permission to access the
+	// source file.
+
+	// Try changing the owner of the file. If we aren't root or the owner
+	// isn't already us, fchown() probably doesn't succeed. We warn
+	// about failing fchown() only if we are root.
+	if (fchown(pair->dest_fd, pair->src_st.st_uid, -1) && warn_fchown)
+		message_warning(_("%s: Cannot set the file owner: %s"),
+				pair->dest_name, strerror(errno));
+
+	mode_t mode;
+
+	if (fchown(pair->dest_fd, -1, pair->src_st.st_gid)) {
+		message_warning(_("%s: Cannot set the file group: %s"),
+				pair->dest_name, strerror(errno));
+		// We can still safely copy some additional permissions:
+		// `group' must be at least as strict as `other' and
+		// also vice versa.
+		//
+		// NOTE: After this, the owner of the source file may
+		// get additional permissions. This shouldn't be too bad,
+		// because the owner would have had permission to chmod
+		// the original file anyway.
+		mode = ((pair->src_st.st_mode & 0070) >> 3)
+				& (pair->src_st.st_mode & 0007);
+		mode = (pair->src_st.st_mode & 0700) | (mode << 3) | mode;
+	} else {
+		// Drop the setuid, setgid, and sticky bits.
+		mode = pair->src_st.st_mode & 0777;
+	}
+
+	if (fchmod(pair->dest_fd, mode))
+		message_warning(_("%s: Cannot set the file permissions: %s"),
+				pair->dest_name, strerror(errno));
+#endif
+
+	// Copy the timestamps. We have several possible ways to do this, of
+	// which some are better in both security and precision.
+	//
+	// First, get the nanosecond part of the timestamps. As of writing,
+	// it's not standardized by POSIX, and there are several names for
+	// the same thing in struct stat.
+	long atime_nsec;
+	long mtime_nsec;
+
+#	if defined(HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC)
+	// GNU and Solaris
+	atime_nsec = pair->src_st.st_atim.tv_nsec;
+	mtime_nsec = pair->src_st.st_mtim.tv_nsec;
+
+#	elif defined(HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC)
+	// BSD
+	atime_nsec = pair->src_st.st_atimespec.tv_nsec;
+	mtime_nsec = pair->src_st.st_mtimespec.tv_nsec;
+
+#	elif defined(HAVE_STRUCT_STAT_ST_ATIMENSEC)
+	// GNU and BSD without extensions
+	atime_nsec = pair->src_st.st_atimensec;
+	mtime_nsec = pair->src_st.st_mtimensec;
+
+#	elif defined(HAVE_STRUCT_STAT_ST_UATIME)
+	// Tru64
+	atime_nsec = pair->src_st.st_uatime * 1000;
+	mtime_nsec = pair->src_st.st_umtime * 1000;
+
+#	elif defined(HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC)
+	// UnixWare
+	atime_nsec = pair->src_st.st_atim.st__tim.tv_nsec;
+	mtime_nsec = pair->src_st.st_mtim.st__tim.tv_nsec;
+
+#	else
+	// Safe fallback
+	atime_nsec = 0;
+	mtime_nsec = 0;
+#	endif
+
+	// Construct a structure to hold the timestamps and call appropriate
+	// function to set the timestamps.
+#if defined(HAVE_FUTIMENS)
+	// Use nanosecond precision.
+	struct timespec tv[2];
+	tv[0].tv_sec = pair->src_st.st_atime;
+	tv[0].tv_nsec = atime_nsec;
+	tv[1].tv_sec = pair->src_st.st_mtime;
+	tv[1].tv_nsec = mtime_nsec;
+
+	(void)futimens(pair->dest_fd, tv);
+
+#elif defined(HAVE_FUTIMES) || defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMES)
+	// Use microsecond precision.
+	struct timeval tv[2];
+	tv[0].tv_sec = pair->src_st.st_atime;
+	tv[0].tv_usec = atime_nsec / 1000;
+	tv[1].tv_sec = pair->src_st.st_mtime;
+	tv[1].tv_usec = mtime_nsec / 1000;
+
+#	if defined(HAVE_FUTIMES)
+	(void)futimes(pair->dest_fd, tv);
+#	elif defined(HAVE_FUTIMESAT)
+	(void)futimesat(pair->dest_fd, NULL, tv);
+#	else
+	// Argh, no function to use a file descriptor to set the timestamp.
+	(void)utimes(pair->dest_name, tv);
+#	endif
+
+#elif defined(HAVE__FUTIME)
+	// Use one-second precision with Windows-specific _futime().
+	// We could use utime() too except that for some reason the
+	// timestamp will get reset at close(). With _futime() it works.
+	// This struct cannot be const as _futime() takes a non-const pointer.
+	struct _utimbuf buf = {
+		.actime = pair->src_st.st_atime,
+		.modtime = pair->src_st.st_mtime,
+	};
+
+	// Avoid warnings.
+	(void)atime_nsec;
+	(void)mtime_nsec;
+
+	(void)_futime(pair->dest_fd, &buf);
+
+#elif defined(HAVE_UTIME)
+	// Use one-second precision. utime() doesn't support using file
+	// descriptor either. Some systems have broken utime() prototype
+	// so don't make this const.
+	struct utimbuf buf = {
+		.actime = pair->src_st.st_atime,
+		.modtime = pair->src_st.st_mtime,
+	};
+
+	// Avoid warnings.
+	(void)atime_nsec;
+	(void)mtime_nsec;
+
+	(void)utime(pair->dest_name, &buf);
+#endif
+
+	return;
+}
+
+
+/// Opens the source file. Returns false on success, true on error.
+static bool
+io_open_src_real(file_pair *pair)
+{
+	// There's nothing to open when reading from stdin.
+	if (pair->src_name == stdin_filename) {
+		pair->src_fd = STDIN_FILENO;
+#ifdef TUKLIB_DOSLIKE
+		setmode(STDIN_FILENO, O_BINARY);
+#else
+		// Try to set stdin to non-blocking mode. It won't work
+		// e.g. on OpenBSD if stdout is e.g. /dev/null. In such
+		// case we proceed as if stdin were non-blocking anyway
+		// (in case of /dev/null it will be in practice). The
+		// same applies to stdout in io_open_dest_real().
+		stdin_flags = fcntl(STDIN_FILENO, F_GETFL);
+		if (stdin_flags == -1) {
+			message_error(_("Error getting the file status flags "
+					"from standard input: %s"),
+					strerror(errno));
+			return true;
+		}
+
+		if ((stdin_flags & O_NONBLOCK) == 0
+				&& fcntl(STDIN_FILENO, F_SETFL,
+					stdin_flags | O_NONBLOCK) != -1)
+			restore_stdin_flags = true;
+#endif
+#ifdef HAVE_POSIX_FADVISE
+		// It will fail if stdin is a pipe and that's fine.
+		(void)posix_fadvise(STDIN_FILENO, 0, 0, POSIX_FADV_SEQUENTIAL);
+#endif
+		return false;
+	}
+
+	// Symlinks are not followed unless writing to stdout or --force
+	// was used.
+	const bool follow_symlinks = opt_stdout || opt_force;
+
+	// We accept only regular files if we are writing the output
+	// to disk too. bzip2 allows overriding this with --force but
+	// gzip and xz don't.
+	const bool reg_files_only = !opt_stdout;
+
+	// Flags for open()
+	int flags = O_RDONLY | O_BINARY | O_NOCTTY;
+
+#ifndef TUKLIB_DOSLIKE
+	// Use non-blocking I/O:
+	//   - It prevents blocking when opening FIFOs and some other
+	//     special files, which is good if we want to accept only
+	//     regular files.
+	//   - It can help avoiding some race conditions with signal handling.
+	flags |= O_NONBLOCK;
+#endif
+
+#if defined(O_NOFOLLOW)
+	if (!follow_symlinks)
+		flags |= O_NOFOLLOW;
+#elif !defined(TUKLIB_DOSLIKE)
+	// Some POSIX-like systems lack O_NOFOLLOW (it's not required
+	// by POSIX). Check for symlinks with a separate lstat() on
+	// these systems.
+	if (!follow_symlinks) {
+		struct stat st;
+		if (lstat(pair->src_name, &st)) {
+			message_error("%s: %s", pair->src_name,
+					strerror(errno));
+			return true;
+
+		} else if (S_ISLNK(st.st_mode)) {
+			message_warning(_("%s: Is a symbolic link, "
+					"skipping"), pair->src_name);
+			return true;
+		}
+	}
+#else
+	// Avoid warnings.
+	(void)follow_symlinks;
+#endif
+
+	// Try to open the file. Signals have been blocked so EINTR shouldn't
+	// be possible.
+	pair->src_fd = open(pair->src_name, flags);
+
+	if (pair->src_fd == -1) {
+		// Signals (that have a signal handler) have been blocked.
+		assert(errno != EINTR);
+
+#ifdef O_NOFOLLOW
+		// Give an understandable error message if the reason
+		// for failing was that the file was a symbolic link.
+		//
+		// Note that at least Linux, OpenBSD, Solaris, and Darwin
+		// use ELOOP to indicate that O_NOFOLLOW was the reason
+		// that open() failed. Because there may be
+		// directories in the pathname, ELOOP may occur also
+		// because of a symlink loop in the directory part.
+		// So ELOOP doesn't tell us what actually went wrong,
+		// and this stupidity went into POSIX-1.2008 too.
+		//
+		// FreeBSD associates EMLINK with O_NOFOLLOW and
+		// Tru64 uses ENOTSUP. We use these directly here
+		// and skip the lstat() call and the associated race.
+		// I want to hear if there are other kernels that
+		// fail with something else than ELOOP with O_NOFOLLOW.
+		bool was_symlink = false;
+
+#	if defined(__FreeBSD__) || defined(__DragonFly__)
+		if (errno == EMLINK)
+			was_symlink = true;
+
+#	elif defined(__digital__) && defined(__unix__)
+		if (errno == ENOTSUP)
+			was_symlink = true;
+
+#	elif defined(__NetBSD__)
+		if (errno == EFTYPE)
+			was_symlink = true;
+
+#	else
+		if (errno == ELOOP && !follow_symlinks) {
+			const int saved_errno = errno;
+			struct stat st;
+			if (lstat(pair->src_name, &st) == 0
+					&& S_ISLNK(st.st_mode))
+				was_symlink = true;
+
+			errno = saved_errno;
+		}
+#	endif
+
+		if (was_symlink)
+			message_warning(_("%s: Is a symbolic link, "
+					"skipping"), pair->src_name);
+		else
+#endif
+			// Something else than O_NOFOLLOW failing
+			// (assuming that the race conditions didn't
+			// confuse us).
+			message_error("%s: %s", pair->src_name,
+					strerror(errno));
+
+		return true;
+	}
+
+	// Stat the source file. We need the result also when we copy
+	// the permissions, and when unlinking.
+	//
+	// NOTE: Use stat() instead of fstat() with DJGPP, because
+	// then we have a better chance to get st_ino value that can
+	// be used in io_open_dest_real() to prevent overwriting the
+	// source file.
+#ifdef __DJGPP__
+	if (stat(pair->src_name, &pair->src_st))
+		goto error_msg;
+#else
+	if (fstat(pair->src_fd, &pair->src_st))
+		goto error_msg;
+#endif
+
+	if (S_ISDIR(pair->src_st.st_mode)) {
+		message_warning(_("%s: Is a directory, skipping"),
+				pair->src_name);
+		goto error;
+	}
+
+	if (reg_files_only && !S_ISREG(pair->src_st.st_mode)) {
+		message_warning(_("%s: Not a regular file, skipping"),
+				pair->src_name);
+		goto error;
+	}
+
+#ifndef TUKLIB_DOSLIKE
+	if (reg_files_only && !opt_force) {
+		if (pair->src_st.st_mode & (S_ISUID | S_ISGID)) {
+			// gzip rejects setuid and setgid files even
+			// when --force was used. bzip2 doesn't check
+			// for them, but calls fchown() after fchmod(),
+			// and many systems automatically drop setuid
+			// and setgid bits there.
+			//
+			// We accept setuid and setgid files if
+			// --force was used. We drop these bits
+			// explicitly in io_copy_attr().
+			message_warning(_("%s: File has setuid or "
+					"setgid bit set, skipping"),
+					pair->src_name);
+			goto error;
+		}
+
+		if (pair->src_st.st_mode & S_ISVTX) {
+			message_warning(_("%s: File has sticky bit "
+					"set, skipping"),
+					pair->src_name);
+			goto error;
+		}
+
+		if (pair->src_st.st_nlink > 1) {
+			message_warning(_("%s: Input file has more "
+					"than one hard link, "
+					"skipping"), pair->src_name);
+			goto error;
+		}
+	}
+
+	// If it is something else than a regular file, wait until
+	// there is input available. This way reading from FIFOs
+	// will work when open() is used with O_NONBLOCK.
+	if (!S_ISREG(pair->src_st.st_mode)) {
+		signals_unblock();
+		const io_wait_ret ret = io_wait(pair, -1, true);
+		signals_block();
+
+		if (ret != IO_WAIT_MORE)
+			goto error;
+	}
+#endif
+
+#ifdef HAVE_POSIX_FADVISE
+	// It will fail with some special files like FIFOs but that is fine.
+	(void)posix_fadvise(pair->src_fd, 0, 0, POSIX_FADV_SEQUENTIAL);
+#endif
+
+	return false;
+
+error_msg:
+	message_error("%s: %s", pair->src_name, strerror(errno));
+error:
+	(void)close(pair->src_fd);
+	return true;
+}
+
+
+extern file_pair *
+io_open_src(const char *src_name)
+{
+	if (is_empty_filename(src_name))
+		return NULL;
+
+	// Since we have only one file open at a time, we can use
+	// a statically allocated structure.
+	static file_pair pair;
+
+	pair = (file_pair){
+		.src_name = src_name,
+		.dest_name = NULL,
+		.src_fd = -1,
+		.dest_fd = -1,
+		.src_eof = false,
+		.dest_try_sparse = false,
+		.dest_pending_sparse = 0,
+	};
+
+	// Block the signals, for which we have a custom signal handler, so
+	// that we don't need to worry about EINTR.
+	signals_block();
+	const bool error = io_open_src_real(&pair);
+	signals_unblock();
+
+#ifdef ENABLE_SANDBOX
+	if (!error)
+		io_sandbox_enter(pair.src_fd);
+#endif
+
+	return error ? NULL : &pair;
+}
+
+
+/// \brief      Closes source file of the file_pair structure
+///
+/// \param      pair    File whose src_fd should be closed
+/// \param      success If true, the file will be removed from the disk if
+///                     closing succeeds and --keep hasn't been used.
+static void
+io_close_src(file_pair *pair, bool success)
+{
+#ifndef TUKLIB_DOSLIKE
+	if (restore_stdin_flags) {
+		assert(pair->src_fd == STDIN_FILENO);
+
+		restore_stdin_flags = false;
+
+		if (fcntl(STDIN_FILENO, F_SETFL, stdin_flags) == -1)
+			message_error(_("Error restoring the status flags "
+					"to standard input: %s"),
+					strerror(errno));
+	}
+#endif
+
+	if (pair->src_fd != STDIN_FILENO && pair->src_fd != -1) {
+		// Close the file before possibly unlinking it. On DOS-like
+		// systems this is always required since unlinking will fail
+		// if the file is open. On POSIX systems it usually works
+		// to unlink open files, but in some cases it doesn't and
+		// one gets EBUSY in errno.
+		//
+		// xz 5.2.2 and older unlinked the file before closing it
+		// (except on DOS-like systems). The old code didn't handle
+		// EBUSY and could fail e.g. on some CIFS shares. The
+		// advantage of unlinking before closing is negligible
+		// (avoids a race between close() and stat()/lstat() and
+		// unlink()), so let's keep this simple.
+		(void)close(pair->src_fd);
+
+		if (success && !opt_keep_original)
+			io_unlink(pair->src_name, &pair->src_st);
+	}
+
+	return;
+}
+
+
+static bool
+io_open_dest_real(file_pair *pair)
+{
+	if (opt_stdout || pair->src_fd == STDIN_FILENO) {
+		// We don't modify or free() this.
+		pair->dest_name = (char *)"(stdout)";
+		pair->dest_fd = STDOUT_FILENO;
+#ifdef TUKLIB_DOSLIKE
+		setmode(STDOUT_FILENO, O_BINARY);
+#else
+		// Try to set O_NONBLOCK if it isn't already set.
+		// If it fails, we assume that stdout is non-blocking
+		// in practice. See the comments in io_open_src_real()
+		// for similar situation with stdin.
+		//
+		// NOTE: O_APPEND may be unset later in this function
+		// and it relies on stdout_flags being set here.
+		stdout_flags = fcntl(STDOUT_FILENO, F_GETFL);
+		if (stdout_flags == -1) {
+			message_error(_("Error getting the file status flags "
+					"from standard output: %s"),
+					strerror(errno));
+			return true;
+		}
+
+		if ((stdout_flags & O_NONBLOCK) == 0
+				&& fcntl(STDOUT_FILENO, F_SETFL,
+					stdout_flags | O_NONBLOCK) != -1)
+				restore_stdout_flags = true;
+#endif
+	} else {
+		pair->dest_name = suffix_get_dest_name(pair->src_name);
+		if (pair->dest_name == NULL)
+			return true;
+
+#ifdef __DJGPP__
+		struct stat st;
+		if (stat(pair->dest_name, &st) == 0) {
+			// Check that it isn't a special file like "prn".
+			if (st.st_dev == -1) {
+				message_error("%s: Refusing to write to "
+						"a DOS special file",
+						pair->dest_name);
+				free(pair->dest_name);
+				return true;
+			}
+
+			// Check that we aren't overwriting the source file.
+			if (st.st_dev == pair->src_st.st_dev
+					&& st.st_ino == pair->src_st.st_ino) {
+				message_error("%s: Output file is the same "
+						"as the input file",
+						pair->dest_name);
+				free(pair->dest_name);
+				return true;
+			}
+		}
+#endif
+
+		// If --force was used, unlink the target file first.
+		if (opt_force && unlink(pair->dest_name) && errno != ENOENT) {
+			message_error(_("%s: Cannot remove: %s"),
+					pair->dest_name, strerror(errno));
+			free(pair->dest_name);
+			return true;
+		}
+
+		// Open the file.
+		int flags = O_WRONLY | O_BINARY | O_NOCTTY
+				| O_CREAT | O_EXCL;
+#ifndef TUKLIB_DOSLIKE
+		flags |= O_NONBLOCK;
+#endif
+		const mode_t mode = S_IRUSR | S_IWUSR;
+		pair->dest_fd = open(pair->dest_name, flags, mode);
+
+		if (pair->dest_fd == -1) {
+			message_error("%s: %s", pair->dest_name,
+					strerror(errno));
+			free(pair->dest_name);
+			return true;
+		}
+	}
+
+#ifndef TUKLIB_DOSLIKE
+	// dest_st isn't used on DOS-like systems except as a dummy
+	// argument to io_unlink(), so don't fstat() on such systems.
+	if (fstat(pair->dest_fd, &pair->dest_st)) {
+		// If fstat() really fails, we have a safe fallback here.
+#	if defined(__VMS)
+		pair->dest_st.st_ino[0] = 0;
+		pair->dest_st.st_ino[1] = 0;
+		pair->dest_st.st_ino[2] = 0;
+#	else
+		pair->dest_st.st_dev = 0;
+		pair->dest_st.st_ino = 0;
+#	endif
+	} else if (try_sparse && opt_mode == MODE_DECOMPRESS) {
+		// When writing to standard output, we need to be extra
+		// careful:
+		//  - It may be connected to something else than
+		//    a regular file.
+		//  - We aren't necessarily writing to a new empty file
+		//    or to the end of an existing file.
+		//  - O_APPEND may be active.
+		//
+		// TODO: I'm keeping this disabled for DOS-like systems
+		// for now. FAT doesn't support sparse files, but NTFS
+		// does, so maybe this should be enabled on Windows after
+		// some testing.
+		if (pair->dest_fd == STDOUT_FILENO) {
+			if (!S_ISREG(pair->dest_st.st_mode))
+				return false;
+
+			if (stdout_flags & O_APPEND) {
+				// Creating a sparse file is not possible
+				// when O_APPEND is active (it's used by
+				// shell's >> redirection). As I understand
+				// it, it is safe to temporarily disable
+				// O_APPEND in xz, because if someone
+				// happened to write to the same file at the
+				// same time, results would be bad anyway
+				// (users shouldn't assume that xz uses any
+				// specific block size when writing data).
+				//
+				// The write position may be something else
+				// than the end of the file, so we must fix
+				// it to start writing at the end of the file
+				// to imitate O_APPEND.
+				if (lseek(STDOUT_FILENO, 0, SEEK_END) == -1)
+					return false;
+
+				// Construct the new file status flags.
+				// If O_NONBLOCK was set earlier in this
+				// function, it must be kept here too.
+				int flags = stdout_flags & ~O_APPEND;
+				if (restore_stdout_flags)
+					flags |= O_NONBLOCK;
+
+				// If this fcntl() fails, we continue but won't
+				// try to create sparse output. The original
+				// flags will still be restored if needed (to
+				// unset O_NONBLOCK) when the file is finished.
+				if (fcntl(STDOUT_FILENO, F_SETFL, flags) == -1)
+					return false;
+
+				// Disabling O_APPEND succeeded. Mark
+				// that the flags should be restored
+				// in io_close_dest(). (This may have already
+				// been set when enabling O_NONBLOCK.)
+				restore_stdout_flags = true;
+
+			} else if (lseek(STDOUT_FILENO, 0, SEEK_CUR)
+					!= pair->dest_st.st_size) {
+				// Writing won't start exactly at the end
+				// of the file. We cannot use sparse output,
+				// because it would probably corrupt the file.
+				return false;
+			}
+		}
+
+		pair->dest_try_sparse = true;
+	}
+#endif
+
+	return false;
+}
+
+
+extern bool
+io_open_dest(file_pair *pair)
+{
+	signals_block();
+	const bool ret = io_open_dest_real(pair);
+	signals_unblock();
+	return ret;
+}
+
+
+/// \brief      Closes destination file of the file_pair structure
+///
+/// \param      pair    File whose dest_fd should be closed
+/// \param      success If false, the file will be removed from the disk.
+///
+/// \return     Zero if closing succeeds. On error, -1 is returned and
+///             error message printed.
+static bool
+io_close_dest(file_pair *pair, bool success)
+{
+#ifndef TUKLIB_DOSLIKE
+	// If io_open_dest() has disabled O_APPEND, restore it here.
+	if (restore_stdout_flags) {
+		assert(pair->dest_fd == STDOUT_FILENO);
+
+		restore_stdout_flags = false;
+
+		if (fcntl(STDOUT_FILENO, F_SETFL, stdout_flags) == -1) {
+			message_error(_("Error restoring the O_APPEND flag "
+					"to standard output: %s"),
+					strerror(errno));
+			return true;
+		}
+	}
+#endif
+
+	if (pair->dest_fd == -1 || pair->dest_fd == STDOUT_FILENO)
+		return false;
+
+	if (close(pair->dest_fd)) {
+		message_error(_("%s: Closing the file failed: %s"),
+				pair->dest_name, strerror(errno));
+
+		// Closing destination file failed, so we cannot trust its
+		// contents. Get rid of junk:
+		io_unlink(pair->dest_name, &pair->dest_st);
+		free(pair->dest_name);
+		return true;
+	}
+
+	// If the operation using this file wasn't successful, we git rid
+	// of the junk file.
+	if (!success)
+		io_unlink(pair->dest_name, &pair->dest_st);
+
+	free(pair->dest_name);
+
+	return false;
+}
+
+
+extern void
+io_close(file_pair *pair, bool success)
+{
+	// Take care of sparseness at the end of the output file.
+	if (success && pair->dest_try_sparse
+			&& pair->dest_pending_sparse > 0) {
+		// Seek forward one byte less than the size of the pending
+		// hole, then write one zero-byte. This way the file grows
+		// to its correct size. An alternative would be to use
+		// ftruncate() but that isn't portable enough (e.g. it
+		// doesn't work with FAT on Linux; FAT isn't that important
+		// since it doesn't support sparse files anyway, but we don't
+		// want to create corrupt files on it).
+		if (lseek(pair->dest_fd, pair->dest_pending_sparse - 1,
+				SEEK_CUR) == -1) {
+			message_error(_("%s: Seeking failed when trying "
+					"to create a sparse file: %s"),
+					pair->dest_name, strerror(errno));
+			success = false;
+		} else {
+			const uint8_t zero[1] = { '\0' };
+			if (io_write_buf(pair, zero, 1))
+				success = false;
+		}
+	}
+
+	signals_block();
+
+	// Copy the file attributes. We need to skip this if destination
+	// file isn't open or it is standard output.
+	if (success && pair->dest_fd != -1 && pair->dest_fd != STDOUT_FILENO)
+		io_copy_attrs(pair);
+
+	// Close the destination first. If it fails, we must not remove
+	// the source file!
+	if (io_close_dest(pair, success))
+		success = false;
+
+	// Close the source file, and unlink it if the operation using this
+	// file pair was successful and we haven't requested to keep the
+	// source file.
+	io_close_src(pair, success);
+
+	signals_unblock();
+
+	return;
+}
+
+
+extern void
+io_fix_src_pos(file_pair *pair, size_t rewind_size)
+{
+	assert(rewind_size <= IO_BUFFER_SIZE);
+
+	if (rewind_size > 0) {
+		// This doesn't need to work on unseekable file descriptors,
+		// so just ignore possible errors.
+		(void)lseek(pair->src_fd, -(off_t)(rewind_size), SEEK_CUR);
+	}
+
+	return;
+}
+
+
+extern size_t
+io_read(file_pair *pair, io_buf *buf_union, size_t size)
+{
+	// We use small buffers here.
+	assert(size < SSIZE_MAX);
+
+	uint8_t *buf = buf_union->u8;
+	size_t left = size;
+
+	while (left > 0) {
+		const ssize_t amount = read(pair->src_fd, buf, left);
+
+		if (amount == 0) {
+			pair->src_eof = true;
+			break;
+		}
+
+		if (amount == -1) {
+			if (errno == EINTR) {
+				if (user_abort)
+					return SIZE_MAX;
+
+				continue;
+			}
+
+#ifndef TUKLIB_DOSLIKE
+			if (IS_EAGAIN_OR_EWOULDBLOCK(errno)) {
+				const io_wait_ret ret = io_wait(pair,
+						mytime_get_flush_timeout(),
+						true);
+				switch (ret) {
+				case IO_WAIT_MORE:
+					continue;
+
+				case IO_WAIT_ERROR:
+					return SIZE_MAX;
+
+				case IO_WAIT_TIMEOUT:
+					return size - left;
+
+				default:
+					message_bug();
+				}
+			}
+#endif
+
+			message_error(_("%s: Read error: %s"),
+					pair->src_name, strerror(errno));
+
+			return SIZE_MAX;
+		}
+
+		buf += (size_t)(amount);
+		left -= (size_t)(amount);
+	}
+
+	return size - left;
+}
+
+
+extern bool
+io_pread(file_pair *pair, io_buf *buf, size_t size, off_t pos)
+{
+	// Using lseek() and read() is more portable than pread() and
+	// for us it is as good as real pread().
+	if (lseek(pair->src_fd, pos, SEEK_SET) != pos) {
+		message_error(_("%s: Error seeking the file: %s"),
+				pair->src_name, strerror(errno));
+		return true;
+	}
+
+	const size_t amount = io_read(pair, buf, size);
+	if (amount == SIZE_MAX)
+		return true;
+
+	if (amount != size) {
+		message_error(_("%s: Unexpected end of file"),
+				pair->src_name);
+		return true;
+	}
+
+	return false;
+}
+
+
+static bool
+is_sparse(const io_buf *buf)
+{
+	assert(IO_BUFFER_SIZE % sizeof(uint64_t) == 0);
+
+	for (size_t i = 0; i < ARRAY_SIZE(buf->u64); ++i)
+		if (buf->u64[i] != 0)
+			return false;
+
+	return true;
+}
+
+
+static bool
+io_write_buf(file_pair *pair, const uint8_t *buf, size_t size)
+{
+	assert(size < SSIZE_MAX);
+
+	while (size > 0) {
+		const ssize_t amount = write(pair->dest_fd, buf, size);
+		if (amount == -1) {
+			if (errno == EINTR) {
+				if (user_abort)
+					return true;
+
+				continue;
+			}
+
+#ifndef TUKLIB_DOSLIKE
+			if (IS_EAGAIN_OR_EWOULDBLOCK(errno)) {
+				if (io_wait(pair, -1, false) == IO_WAIT_MORE)
+					continue;
+
+				return true;
+			}
+#endif
+
+			// Handle broken pipe specially. gzip and bzip2
+			// don't print anything on SIGPIPE. In addition,
+			// gzip --quiet uses exit status 2 (warning) on
+			// broken pipe instead of whatever raise(SIGPIPE)
+			// would make it return. It is there to hide "Broken
+			// pipe" message on some old shells (probably old
+			// GNU bash).
+			//
+			// We don't do anything special with --quiet, which
+			// is what bzip2 does too. If we get SIGPIPE, we
+			// will handle it like other signals by setting
+			// user_abort, and get EPIPE here.
+			if (errno != EPIPE)
+				message_error(_("%s: Write error: %s"),
+					pair->dest_name, strerror(errno));
+
+			return true;
+		}
+
+		buf += (size_t)(amount);
+		size -= (size_t)(amount);
+	}
+
+	return false;
+}
+
+
+extern bool
+io_write(file_pair *pair, const io_buf *buf, size_t size)
+{
+	assert(size <= IO_BUFFER_SIZE);
+
+	if (pair->dest_try_sparse) {
+		// Check if the block is sparse (contains only zeros). If it
+		// sparse, we just store the amount and return. We will take
+		// care of actually skipping over the hole when we hit the
+		// next data block or close the file.
+		//
+		// Since io_close() requires that dest_pending_sparse > 0
+		// if the file ends with sparse block, we must also return
+		// if size == 0 to avoid doing the lseek().
+		if (size == IO_BUFFER_SIZE) {
+			if (is_sparse(buf)) {
+				pair->dest_pending_sparse += size;
+				return false;
+			}
+		} else if (size == 0) {
+			return false;
+		}
+
+		// This is not a sparse block. If we have a pending hole,
+		// skip it now.
+		if (pair->dest_pending_sparse > 0) {
+			if (lseek(pair->dest_fd, pair->dest_pending_sparse,
+					SEEK_CUR) == -1) {
+				message_error(_("%s: Seeking failed when "
+						"trying to create a sparse "
+						"file: %s"), pair->dest_name,
+						strerror(errno));
+				return true;
+			}
+
+			pair->dest_pending_sparse = 0;
+		}
+	}
+
+	return io_write_buf(pair, buf->u8, size);
+}

Deleted: vendor/xz/5.2.3/src/xz/file_io.h
===================================================================
--- vendor/xz/dist/src/xz/file_io.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/file_io.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,129 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       file_io.h
-/// \brief      I/O types and functions
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-// Some systems have suboptimal BUFSIZ. Use a bit bigger value on them.
-// We also need that IO_BUFFER_SIZE is a multiple of 8 (sizeof(uint64_t))
-#if BUFSIZ <= 1024
-#	define IO_BUFFER_SIZE 8192
-#else
-#	define IO_BUFFER_SIZE (BUFSIZ & ~7U)
-#endif
-
-
-/// is_sparse() accesses the buffer as uint64_t for maximum speed.
-/// Use an union to make sure that the buffer is properly aligned.
-typedef union {
-	uint8_t u8[IO_BUFFER_SIZE];
-	uint32_t u32[IO_BUFFER_SIZE / sizeof(uint32_t)];
-	uint64_t u64[IO_BUFFER_SIZE / sizeof(uint64_t)];
-} io_buf;
-
-
-typedef struct {
-	/// Name of the source filename (as given on the command line) or
-	/// pointer to static "(stdin)" when reading from standard input.
-	const char *src_name;
-
-	/// Destination filename converted from src_name or pointer to static
-	/// "(stdout)" when writing to standard output.
-	char *dest_name;
-
-	/// File descriptor of the source file
-	int src_fd;
-
-	/// File descriptor of the target file
-	int dest_fd;
-
-	/// True once end of the source file has been detected.
-	bool src_eof;
-
-	/// If true, we look for long chunks of zeros and try to create
-	/// a sparse file.
-	bool dest_try_sparse;
-
-	/// This is used only if dest_try_sparse is true. This holds the
-	/// number of zero bytes we haven't written out, because we plan
-	/// to make that byte range a sparse chunk.
-	off_t dest_pending_sparse;
-
-	/// Stat of the source file.
-	struct stat src_st;
-
-	/// Stat of the destination file.
-	struct stat dest_st;
-
-} file_pair;
-
-
-/// \brief      Initialize the I/O module
-extern void io_init(void);
-
-
-/// \brief      Disable creation of sparse files when decompressing
-extern void io_no_sparse(void);
-
-
-/// \brief      Open the source file
-extern file_pair *io_open_src(const char *src_name);
-
-
-/// \brief      Open the destination file
-extern bool io_open_dest(file_pair *pair);
-
-
-/// \brief      Closes the file descriptors and frees possible allocated memory
-///
-/// The success argument determines if source or destination file gets
-/// unlinked:
-///  - false: The destination file is unlinked.
-///  - true: The source file is unlinked unless writing to stdout or --keep
-///    was used.
-extern void io_close(file_pair *pair, bool success);
-
-
-/// \brief      Reads from the source file to a buffer
-///
-/// \param      pair    File pair having the source file open for reading
-/// \param      buf     Destination buffer to hold the read data
-/// \param      size    Size of the buffer; assumed be smaller than SSIZE_MAX
-///
-/// \return     On success, number of bytes read is returned. On end of
-///             file zero is returned and pair->src_eof set to true.
-///             On error, SIZE_MAX is returned and error message printed.
-extern size_t io_read(file_pair *pair, io_buf *buf, size_t size);
-
-
-/// \brief      Read from source file from given offset to a buffer
-///
-/// This is remotely similar to standard pread(). This uses lseek() though,
-/// so the read offset is changed on each call.
-///
-/// \param      pair    Seekable source file
-/// \param      buf     Destination buffer
-/// \param      size    Amount of data to read
-/// \param      pos     Offset relative to the beginning of the file,
-///                     from which the data should be read.
-///
-/// \return     On success, false is returned. On error, error message
-///             is printed and true is returned.
-extern bool io_pread(file_pair *pair, io_buf *buf, size_t size, off_t pos);
-
-
-/// \brief      Writes a buffer to the destination file
-///
-/// \param      pair    File pair having the destination file open for writing
-/// \param      buf     Buffer containing the data to be written
-/// \param      size    Size of the buffer; assumed be smaller than SSIZE_MAX
-///
-/// \return     On success, zero is returned. On error, -1 is returned
-///             and error message printed.
-extern bool io_write(file_pair *pair, const io_buf *buf, size_t size);

Copied: vendor/xz/5.2.3/src/xz/file_io.h (from rev 11013, vendor/xz/dist/src/xz/file_io.h)
===================================================================
--- vendor/xz/5.2.3/src/xz/file_io.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/file_io.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,156 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       file_io.h
+/// \brief      I/O types and functions
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Some systems have suboptimal BUFSIZ. Use a bit bigger value on them.
+// We also need that IO_BUFFER_SIZE is a multiple of 8 (sizeof(uint64_t))
+#if BUFSIZ <= 1024
+#	define IO_BUFFER_SIZE 8192
+#else
+#	define IO_BUFFER_SIZE (BUFSIZ & ~7U)
+#endif
+
+
+/// is_sparse() accesses the buffer as uint64_t for maximum speed.
+/// Use an union to make sure that the buffer is properly aligned.
+typedef union {
+	uint8_t u8[IO_BUFFER_SIZE];
+	uint32_t u32[IO_BUFFER_SIZE / sizeof(uint32_t)];
+	uint64_t u64[IO_BUFFER_SIZE / sizeof(uint64_t)];
+} io_buf;
+
+
+typedef struct {
+	/// Name of the source filename (as given on the command line) or
+	/// pointer to static "(stdin)" when reading from standard input.
+	const char *src_name;
+
+	/// Destination filename converted from src_name or pointer to static
+	/// "(stdout)" when writing to standard output.
+	char *dest_name;
+
+	/// File descriptor of the source file
+	int src_fd;
+
+	/// File descriptor of the target file
+	int dest_fd;
+
+	/// True once end of the source file has been detected.
+	bool src_eof;
+
+	/// If true, we look for long chunks of zeros and try to create
+	/// a sparse file.
+	bool dest_try_sparse;
+
+	/// This is used only if dest_try_sparse is true. This holds the
+	/// number of zero bytes we haven't written out, because we plan
+	/// to make that byte range a sparse chunk.
+	off_t dest_pending_sparse;
+
+	/// Stat of the source file.
+	struct stat src_st;
+
+	/// Stat of the destination file.
+	struct stat dest_st;
+
+} file_pair;
+
+
+/// \brief      Initialize the I/O module
+extern void io_init(void);
+
+
+#ifndef TUKLIB_DOSLIKE
+/// \brief      Write a byte to user_abort_pipe[1]
+///
+/// This is called from a signal handler.
+extern void io_write_to_user_abort_pipe(void);
+#endif
+
+
+/// \brief      Disable creation of sparse files when decompressing
+extern void io_no_sparse(void);
+
+
+#ifdef ENABLE_SANDBOX
+/// \brief      main() calls this if conditions for sandboxing have been met.
+extern void io_allow_sandbox(void);
+#endif
+
+
+/// \brief      Open the source file
+extern file_pair *io_open_src(const char *src_name);
+
+
+/// \brief      Open the destination file
+extern bool io_open_dest(file_pair *pair);
+
+
+/// \brief      Closes the file descriptors and frees possible allocated memory
+///
+/// The success argument determines if source or destination file gets
+/// unlinked:
+///  - false: The destination file is unlinked.
+///  - true: The source file is unlinked unless writing to stdout or --keep
+///    was used.
+extern void io_close(file_pair *pair, bool success);
+
+
+/// \brief      Reads from the source file to a buffer
+///
+/// \param      pair    File pair having the source file open for reading
+/// \param      buf     Destination buffer to hold the read data
+/// \param      size    Size of the buffer; assumed be smaller than SSIZE_MAX
+///
+/// \return     On success, number of bytes read is returned. On end of
+///             file zero is returned and pair->src_eof set to true.
+///             On error, SIZE_MAX is returned and error message printed.
+extern size_t io_read(file_pair *pair, io_buf *buf, size_t size);
+
+
+/// \brief      Fix the position in src_fd
+///
+/// This is used when --single-thream has been specified and decompression
+/// is successful. If the input file descriptor supports seeking, this
+/// function fixes the input position to point to the next byte after the
+/// decompressed stream.
+///
+/// \param      pair        File pair having the source file open for reading
+/// \param      rewind_size How many bytes of extra have been read i.e.
+///                         how much to seek backwards.
+extern void io_fix_src_pos(file_pair *pair, size_t rewind_size);
+
+
+/// \brief      Read from source file from given offset to a buffer
+///
+/// This is remotely similar to standard pread(). This uses lseek() though,
+/// so the read offset is changed on each call.
+///
+/// \param      pair    Seekable source file
+/// \param      buf     Destination buffer
+/// \param      size    Amount of data to read
+/// \param      pos     Offset relative to the beginning of the file,
+///                     from which the data should be read.
+///
+/// \return     On success, false is returned. On error, error message
+///             is printed and true is returned.
+extern bool io_pread(file_pair *pair, io_buf *buf, size_t size, off_t pos);
+
+
+/// \brief      Writes a buffer to the destination file
+///
+/// \param      pair    File pair having the destination file open for writing
+/// \param      buf     Buffer containing the data to be written
+/// \param      size    Size of the buffer; assumed be smaller than SSIZE_MAX
+///
+/// \return     On success, zero is returned. On error, -1 is returned
+///             and error message printed.
+extern bool io_write(file_pair *pair, const io_buf *buf, size_t size);

Deleted: vendor/xz/5.2.3/src/xz/hardware.c
===================================================================
--- vendor/xz/dist/src/xz/hardware.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/hardware.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,144 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       hardware.c
-/// \brief      Detection of available hardware resources
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "private.h"
-#include "tuklib_cpucores.h"
-
-
-/// Maximum number of free *coder* threads. This can be set with
-/// the --threads=NUM command line option.
-static uint32_t threadlimit;
-
-/// Memory usage limit for compression
-static uint64_t memlimit_compress;
-
-/// Memory usage limit for decompression
-static uint64_t memlimit_decompress;
-
-/// Total amount of physical RAM
-static uint64_t total_ram;
-
-
-extern void
-hardware_threadlimit_set(uint32_t new_threadlimit)
-{
-	if (new_threadlimit == 0) {
-		// The default is the number of available CPU cores.
-		threadlimit = tuklib_cpucores();
-		if (threadlimit == 0)
-			threadlimit = 1;
-	} else {
-		threadlimit = new_threadlimit;
-	}
-
-	return;
-}
-
-
-extern uint32_t
-hardware_threadlimit_get(void)
-{
-	return threadlimit;
-}
-
-
-extern void
-hardware_memlimit_set(uint64_t new_memlimit,
-		bool set_compress, bool set_decompress, bool is_percentage)
-{
-	if (is_percentage) {
-		assert(new_memlimit > 0);
-		assert(new_memlimit <= 100);
-		new_memlimit = (uint32_t)new_memlimit * total_ram / 100;
-	}
-
-	if (set_compress)
-		memlimit_compress = new_memlimit;
-
-	if (set_decompress)
-		memlimit_decompress = new_memlimit;
-
-	return;
-}
-
-
-extern uint64_t
-hardware_memlimit_get(enum operation_mode mode)
-{
-	// Zero is a special value that indicates the default. Currently
-	// the default simply disables the limit. Once there is threading
-	// support, this might be a little more complex, because there will
-	// probably be a special case where a user asks for "optimal" number
-	// of threads instead of a specific number (this might even become
-	// the default mode). Each thread may use a significant amount of
-	// memory. When there are no memory usage limits set, we need some
-	// default soft limit for calculating the "optimal" number of
-	// threads.
-	const uint64_t memlimit = mode == MODE_COMPRESS
-			? memlimit_compress : memlimit_decompress;
-	return memlimit != 0 ? memlimit : UINT64_MAX;
-}
-
-
-/// Helper for hardware_memlimit_show() to print one human-readable info line.
-static void
-memlimit_show(const char *str, uint64_t value)
-{
-	// The memory usage limit is considered to be disabled if value
-	// is 0 or UINT64_MAX. This might get a bit more complex once there
-	// is threading support. See the comment in hardware_memlimit_get().
-	if (value == 0 || value == UINT64_MAX)
-		printf("%s %s\n", str, _("Disabled"));
-	else
-		printf("%s %s MiB (%s B)\n", str,
-				uint64_to_str(round_up_to_mib(value), 0),
-				uint64_to_str(value, 1));
-
-	return;
-}
-
-
-extern void
-hardware_memlimit_show(void)
-{
-	if (opt_robot) {
-		printf("%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\n", total_ram,
-				memlimit_compress, memlimit_decompress);
-	} else {
-		// TRANSLATORS: Test with "xz --info-memory" to see if
-		// the alignment looks nice.
-		memlimit_show(_("Total amount of physical memory (RAM): "),
-				total_ram);
-		memlimit_show(_("Memory usage limit for compression:    "),
-				memlimit_compress);
-		memlimit_show(_("Memory usage limit for decompression:  "),
-				memlimit_decompress);
-	}
-
-	tuklib_exit(E_SUCCESS, E_ERROR, message_verbosity_get() != V_SILENT);
-}
-
-
-extern void
-hardware_init(void)
-{
-	// Get the amount of RAM. If we cannot determine it,
-	// use the assumption defined by the configure script.
-	total_ram = lzma_physmem();
-	if (total_ram == 0)
-		total_ram = (uint64_t)(ASSUME_RAM) * 1024 * 1024;
-
-	// Set the defaults.
-	hardware_memlimit_set(0, true, true, false);
-	hardware_threadlimit_set(0);
-	return;
-}

Copied: vendor/xz/5.2.3/src/xz/hardware.c (from rev 9176, vendor/xz/dist/src/xz/hardware.c)
===================================================================
--- vendor/xz/5.2.3/src/xz/hardware.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/hardware.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,150 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       hardware.c
+/// \brief      Detection of available hardware resources
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+
+/// Maximum number of worker threads. This can be set with
+/// the --threads=NUM command line option.
+static uint32_t threads_max = 1;
+
+/// Memory usage limit for compression
+static uint64_t memlimit_compress;
+
+/// Memory usage limit for decompression
+static uint64_t memlimit_decompress;
+
+/// Total amount of physical RAM
+static uint64_t total_ram;
+
+
+extern void
+hardware_threads_set(uint32_t n)
+{
+	if (n == 0) {
+		// Automatic number of threads was requested.
+		// If threading support was enabled at build time,
+		// use the number of available CPU cores. Otherwise
+		// use one thread since disabling threading support
+		// omits lzma_cputhreads() from liblzma.
+#ifdef MYTHREAD_ENABLED
+		threads_max = lzma_cputhreads();
+		if (threads_max == 0)
+			threads_max = 1;
+#else
+		threads_max = 1;
+#endif
+	} else {
+		threads_max = n;
+	}
+
+	return;
+}
+
+
+extern uint32_t
+hardware_threads_get(void)
+{
+	return threads_max;
+}
+
+
+extern void
+hardware_memlimit_set(uint64_t new_memlimit,
+		bool set_compress, bool set_decompress, bool is_percentage)
+{
+	if (is_percentage) {
+		assert(new_memlimit > 0);
+		assert(new_memlimit <= 100);
+		new_memlimit = (uint32_t)new_memlimit * total_ram / 100;
+	}
+
+	if (set_compress)
+		memlimit_compress = new_memlimit;
+
+	if (set_decompress)
+		memlimit_decompress = new_memlimit;
+
+	return;
+}
+
+
+extern uint64_t
+hardware_memlimit_get(enum operation_mode mode)
+{
+	// Zero is a special value that indicates the default. Currently
+	// the default simply disables the limit. Once there is threading
+	// support, this might be a little more complex, because there will
+	// probably be a special case where a user asks for "optimal" number
+	// of threads instead of a specific number (this might even become
+	// the default mode). Each thread may use a significant amount of
+	// memory. When there are no memory usage limits set, we need some
+	// default soft limit for calculating the "optimal" number of
+	// threads.
+	const uint64_t memlimit = mode == MODE_COMPRESS
+			? memlimit_compress : memlimit_decompress;
+	return memlimit != 0 ? memlimit : UINT64_MAX;
+}
+
+
+/// Helper for hardware_memlimit_show() to print one human-readable info line.
+static void
+memlimit_show(const char *str, uint64_t value)
+{
+	// The memory usage limit is considered to be disabled if value
+	// is 0 or UINT64_MAX. This might get a bit more complex once there
+	// is threading support. See the comment in hardware_memlimit_get().
+	if (value == 0 || value == UINT64_MAX)
+		printf("%s %s\n", str, _("Disabled"));
+	else
+		printf("%s %s MiB (%s B)\n", str,
+				uint64_to_str(round_up_to_mib(value), 0),
+				uint64_to_str(value, 1));
+
+	return;
+}
+
+
+extern void
+hardware_memlimit_show(void)
+{
+	if (opt_robot) {
+		printf("%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\n", total_ram,
+				memlimit_compress, memlimit_decompress);
+	} else {
+		// TRANSLATORS: Test with "xz --info-memory" to see if
+		// the alignment looks nice.
+		memlimit_show(_("Total amount of physical memory (RAM): "),
+				total_ram);
+		memlimit_show(_("Memory usage limit for compression:    "),
+				memlimit_compress);
+		memlimit_show(_("Memory usage limit for decompression:  "),
+				memlimit_decompress);
+	}
+
+	tuklib_exit(E_SUCCESS, E_ERROR, message_verbosity_get() != V_SILENT);
+}
+
+
+extern void
+hardware_init(void)
+{
+	// Get the amount of RAM. If we cannot determine it,
+	// use the assumption defined by the configure script.
+	total_ram = lzma_physmem();
+	if (total_ram == 0)
+		total_ram = (uint64_t)(ASSUME_RAM) * 1024 * 1024;
+
+	// Set the defaults.
+	hardware_memlimit_set(0, true, true, false);
+	return;
+}

Deleted: vendor/xz/5.2.3/src/xz/hardware.h
===================================================================
--- vendor/xz/dist/src/xz/hardware.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/hardware.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,38 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       hardware.h
-/// \brief      Detection of available hardware resources
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-/// Initialize some hardware-specific variables, which are needed by other
-/// hardware_* functions.
-extern void hardware_init(void);
-
-
-/// Set custom value for maximum number of coder threads.
-extern void hardware_threadlimit_set(uint32_t threadlimit);
-
-/// 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
-/// and decompression (the latter includes also --list), one or both can
-/// be set with a single call to this function. Zero indicates resetting
-/// the limit back to the defaults. The limit can also be set as a percentage
-/// of installed RAM; the percentage must be in the range [1, 100].
-extern void hardware_memlimit_set(uint64_t new_memlimit,
-		bool set_compress, bool set_decompress, bool is_percentage);
-
-/// Get the current memory usage limit for compression or decompression.
-extern uint64_t hardware_memlimit_get(enum operation_mode mode);
-
-/// Display the amount of RAM and memory usage limits and exit.
-extern void hardware_memlimit_show(void) lzma_attribute((__noreturn__));

Copied: vendor/xz/5.2.3/src/xz/hardware.h (from rev 9176, vendor/xz/dist/src/xz/hardware.h)
===================================================================
--- vendor/xz/5.2.3/src/xz/hardware.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/hardware.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,37 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       hardware.h
+/// \brief      Detection of available hardware resources
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+/// Initialize some hardware-specific variables, which are needed by other
+/// hardware_* functions.
+extern void hardware_init(void);
+
+
+/// Set the maximum number of worker threads.
+extern void hardware_threads_set(uint32_t threadlimit);
+
+/// Get the maximum number of worker threads.
+extern uint32_t hardware_threads_get(void);
+
+
+/// Set the memory usage limit. There are separate limits for compression
+/// and decompression (the latter includes also --list), one or both can
+/// be set with a single call to this function. Zero indicates resetting
+/// the limit back to the defaults. The limit can also be set as a percentage
+/// of installed RAM; the percentage must be in the range [1, 100].
+extern void hardware_memlimit_set(uint64_t new_memlimit,
+		bool set_compress, bool set_decompress, bool is_percentage);
+
+/// Get the current memory usage limit for compression or decompression.
+extern uint64_t hardware_memlimit_get(enum operation_mode mode);
+
+/// Display the amount of RAM and memory usage limits and exit.
+extern void hardware_memlimit_show(void) lzma_attribute((__noreturn__));

Deleted: vendor/xz/5.2.3/src/xz/list.c
===================================================================
--- vendor/xz/dist/src/xz/list.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/list.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,1135 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       list.c
-/// \brief      Listing information about .xz files
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "private.h"
-#include "tuklib_integer.h"
-
-
-/// Information about a .xz file
-typedef struct {
-	/// Combined Index of all Streams in the file
-	lzma_index *idx;
-
-	/// Total amount of Stream Padding
-	uint64_t stream_padding;
-
-	/// Highest memory usage so far
-	uint64_t memusage_max;
-
-	/// True if all Blocks so far have Compressed Size and
-	/// Uncompressed Size fields
-	bool all_have_sizes;
-
-} xz_file_info;
-
-#define XZ_FILE_INFO_INIT { NULL, 0, 0, true }
-
-
-/// Information about a .xz Block
-typedef struct {
-	/// Size of the Block Header
-	uint32_t header_size;
-
-	/// A few of the Block Flags as a string
-	char flags[3];
-
-	/// Size of the Compressed Data field in the Block
-	lzma_vli compressed_size;
-
-	/// Decoder memory usage for this Block
-	uint64_t memusage;
-
-	/// The filter chain of this Block in human-readable form
-	char filter_chain[FILTERS_STR_SIZE];
-
-} block_header_info;
-
-
-/// Check ID to string mapping
-static const char check_names[LZMA_CHECK_ID_MAX + 1][12] = {
-	// TRANSLATORS: Indicates that there is no integrity check.
-	// This string is used in tables, so the width must not
-	// exceed ten columns with a fixed-width font.
-	N_("None"),
-	"CRC32",
-	// TRANSLATORS: Indicates that integrity check name is not known,
-	// but the Check ID is known (here 2). This and other "Unknown-N"
-	// strings are used in tables, so the width must not exceed ten
-	// columns with a fixed-width font. It's OK to omit the dash if
-	// you need space for one extra letter, but don't use spaces.
-	N_("Unknown-2"),
-	N_("Unknown-3"),
-	"CRC64",
-	N_("Unknown-5"),
-	N_("Unknown-6"),
-	N_("Unknown-7"),
-	N_("Unknown-8"),
-	N_("Unknown-9"),
-	"SHA-256",
-	N_("Unknown-11"),
-	N_("Unknown-12"),
-	N_("Unknown-13"),
-	N_("Unknown-14"),
-	N_("Unknown-15"),
-};
-
-/// Buffer size for get_check_names(). This may be a bit ridiculous,
-/// but at least it's enough if some language needs many multibyte chars.
-#define CHECKS_STR_SIZE 1024
-
-
-/// Value of the Check field as hexadecimal string.
-/// This is set by parse_check_value().
-static char check_value[2 * LZMA_CHECK_SIZE_MAX + 1];
-
-
-/// Totals that are displayed if there was more than one file.
-/// The "files" counter is also used in print_info_adv() to show
-/// the file number.
-static struct {
-	uint64_t files;
-	uint64_t streams;
-	uint64_t blocks;
-	uint64_t compressed_size;
-	uint64_t uncompressed_size;
-	uint64_t stream_padding;
-	uint64_t memusage_max;
-	uint32_t checks;
-	bool all_have_sizes;
-} totals = { 0, 0, 0, 0, 0, 0, 0, 0, true };
-
-
-/// \brief      Parse the Index(es) from the given .xz file
-///
-/// \param      xfi     Pointer to structure where the decoded information
-///                     is stored.
-/// \param      pair    Input file
-///
-/// \return     On success, false is returned. On error, true is returned.
-///
-// TODO: This function is pretty big. liblzma should have a function that
-// takes a callback function to parse the Index(es) from a .xz file to make
-// it easy for applications.
-static bool
-parse_indexes(xz_file_info *xfi, file_pair *pair)
-{
-	if (pair->src_st.st_size <= 0) {
-		message_error(_("%s: File is empty"), pair->src_name);
-		return true;
-	}
-
-	if (pair->src_st.st_size < 2 * LZMA_STREAM_HEADER_SIZE) {
-		message_error(_("%s: Too small to be a valid .xz file"),
-				pair->src_name);
-		return true;
-	}
-
-	io_buf buf;
-	lzma_stream_flags header_flags;
-	lzma_stream_flags footer_flags;
-	lzma_ret ret;
-
-	// lzma_stream for the Index decoder
-	lzma_stream strm = LZMA_STREAM_INIT;
-
-	// All Indexes decoded so far
-	lzma_index *combined_index = NULL;
-
-	// The Index currently being decoded
-	lzma_index *this_index = NULL;
-
-	// Current position in the file. We parse the file backwards so
-	// initialize it to point to the end of the file.
-	off_t pos = pair->src_st.st_size;
-
-	// Each loop iteration decodes one Index.
-	do {
-		// Check that there is enough data left to contain at least
-		// the Stream Header and Stream Footer. This check cannot
-		// fail in the first pass of this loop.
-		if (pos < 2 * LZMA_STREAM_HEADER_SIZE) {
-			message_error("%s: %s", pair->src_name,
-					message_strm(LZMA_DATA_ERROR));
-			goto error;
-		}
-
-		pos -= LZMA_STREAM_HEADER_SIZE;
-		lzma_vli stream_padding = 0;
-
-		// Locate the Stream Footer. There may be Stream Padding which
-		// we must skip when reading backwards.
-		while (true) {
-			if (pos < LZMA_STREAM_HEADER_SIZE) {
-				message_error("%s: %s", pair->src_name,
-						message_strm(
-							LZMA_DATA_ERROR));
-				goto error;
-			}
-
-			if (io_pread(pair, &buf,
-					LZMA_STREAM_HEADER_SIZE, pos))
-				goto error;
-
-			// Stream Padding is always a multiple of four bytes.
-			int i = 2;
-			if (buf.u32[i] != 0)
-				break;
-
-			// To avoid calling io_pread() for every four bytes
-			// of Stream Padding, take advantage that we read
-			// 12 bytes (LZMA_STREAM_HEADER_SIZE) already and
-			// check them too before calling io_pread() again.
-			do {
-				stream_padding += 4;
-				pos -= 4;
-				--i;
-			} while (i >= 0 && buf.u32[i] == 0);
-		}
-
-		// Decode the Stream Footer.
-		ret = lzma_stream_footer_decode(&footer_flags, buf.u8);
-		if (ret != LZMA_OK) {
-			message_error("%s: %s", pair->src_name,
-					message_strm(ret));
-			goto error;
-		}
-
-		// Check that the Stream Footer doesn't specify something
-		// that we don't support. This can only happen if the xz
-		// version is older than liblzma and liblzma supports
-		// something new.
-		//
-		// It is enough to check Stream Footer. Stream Header must
-		// match when it is compared against Stream Footer with
-		// lzma_stream_flags_compare().
-		if (footer_flags.version != 0) {
-			message_error("%s: %s", pair->src_name,
-					message_strm(LZMA_OPTIONS_ERROR));
-			goto error;
-		}
-
-		// Check that the size of the Index field looks sane.
-		lzma_vli index_size = footer_flags.backward_size;
-		if ((lzma_vli)(pos) < index_size + LZMA_STREAM_HEADER_SIZE) {
-			message_error("%s: %s", pair->src_name,
-					message_strm(LZMA_DATA_ERROR));
-			goto error;
-		}
-
-		// Set pos to the beginning of the Index.
-		pos -= index_size;
-
-		// See how much memory we can use for decoding this Index.
-		uint64_t memlimit = hardware_memlimit_get(MODE_LIST);
-		uint64_t memused = 0;
-		if (combined_index != NULL) {
-			memused = lzma_index_memused(combined_index);
-			if (memused > memlimit)
-				message_bug();
-
-			memlimit -= memused;
-		}
-
-		// Decode the Index.
-		ret = lzma_index_decoder(&strm, &this_index, memlimit);
-		if (ret != LZMA_OK) {
-			message_error("%s: %s", pair->src_name,
-					message_strm(ret));
-			goto error;
-		}
-
-		do {
-			// Don't give the decoder more input than the
-			// Index size.
-			strm.avail_in = my_min(IO_BUFFER_SIZE, index_size);
-			if (io_pread(pair, &buf, strm.avail_in, pos))
-				goto error;
-
-			pos += strm.avail_in;
-			index_size -= strm.avail_in;
-
-			strm.next_in = buf.u8;
-			ret = lzma_code(&strm, LZMA_RUN);
-
-		} while (ret == LZMA_OK);
-
-		// If the decoding seems to be successful, check also that
-		// the Index decoder consumed as much input as indicated
-		// by the Backward Size field.
-		if (ret == LZMA_STREAM_END)
-			if (index_size != 0 || strm.avail_in != 0)
-				ret = LZMA_DATA_ERROR;
-
-		if (ret != LZMA_STREAM_END) {
-			// LZMA_BUFFER_ERROR means that the Index decoder
-			// would have liked more input than what the Index
-			// size should be according to Stream Footer.
-			// The message for LZMA_DATA_ERROR makes more
-			// sense in that case.
-			if (ret == LZMA_BUF_ERROR)
-				ret = LZMA_DATA_ERROR;
-
-			message_error("%s: %s", pair->src_name,
-					message_strm(ret));
-
-			// If the error was too low memory usage limit,
-			// show also how much memory would have been needed.
-			if (ret == LZMA_MEMLIMIT_ERROR) {
-				uint64_t needed = lzma_memusage(&strm);
-				if (UINT64_MAX - needed < memused)
-					needed = UINT64_MAX;
-				else
-					needed += memused;
-
-				message_mem_needed(V_ERROR, needed);
-			}
-
-			goto error;
-		}
-
-		// Decode the Stream Header and check that its Stream Flags
-		// match the Stream Footer.
-		pos -= footer_flags.backward_size + LZMA_STREAM_HEADER_SIZE;
-		if ((lzma_vli)(pos) < lzma_index_total_size(this_index)) {
-			message_error("%s: %s", pair->src_name,
-					message_strm(LZMA_DATA_ERROR));
-			goto error;
-		}
-
-		pos -= lzma_index_total_size(this_index);
-		if (io_pread(pair, &buf, LZMA_STREAM_HEADER_SIZE, pos))
-			goto error;
-
-		ret = lzma_stream_header_decode(&header_flags, buf.u8);
-		if (ret != LZMA_OK) {
-			message_error("%s: %s", pair->src_name,
-					message_strm(ret));
-			goto error;
-		}
-
-		ret = lzma_stream_flags_compare(&header_flags, &footer_flags);
-		if (ret != LZMA_OK) {
-			message_error("%s: %s", pair->src_name,
-					message_strm(ret));
-			goto error;
-		}
-
-		// Store the decoded Stream Flags into this_index. This is
-		// needed so that we can print which Check is used in each
-		// Stream.
-		ret = lzma_index_stream_flags(this_index, &footer_flags);
-		if (ret != LZMA_OK)
-			message_bug();
-
-		// Store also the size of the Stream Padding field. It is
-		// needed to show the offsets of the Streams correctly.
-		ret = lzma_index_stream_padding(this_index, stream_padding);
-		if (ret != LZMA_OK)
-			message_bug();
-
-		if (combined_index != NULL) {
-			// Append the earlier decoded Indexes
-			// after this_index.
-			ret = lzma_index_cat(
-					this_index, combined_index, NULL);
-			if (ret != LZMA_OK) {
-				message_error("%s: %s", pair->src_name,
-						message_strm(ret));
-				goto error;
-			}
-		}
-
-		combined_index = this_index;
-		this_index = NULL;
-
-		xfi->stream_padding += stream_padding;
-
-	} while (pos > 0);
-
-	lzma_end(&strm);
-
-	// All OK. Make combined_index available to the caller.
-	xfi->idx = combined_index;
-	return false;
-
-error:
-	// Something went wrong, free the allocated memory.
-	lzma_end(&strm);
-	lzma_index_end(combined_index, NULL);
-	lzma_index_end(this_index, NULL);
-	return true;
-}
-
-
-/// \brief      Parse the Block Header
-///
-/// The result is stored into *bhi. The caller takes care of initializing it.
-///
-/// \return     False on success, true on error.
-static bool
-parse_block_header(file_pair *pair, const lzma_index_iter *iter,
-		block_header_info *bhi, xz_file_info *xfi)
-{
-#if IO_BUFFER_SIZE < LZMA_BLOCK_HEADER_SIZE_MAX
-#	error IO_BUFFER_SIZE < LZMA_BLOCK_HEADER_SIZE_MAX
-#endif
-
-	// Get the whole Block Header with one read, but don't read past
-	// the end of the Block (or even its Check field).
-	const uint32_t size = my_min(iter->block.total_size
-				- lzma_check_size(iter->stream.flags->check),
-			LZMA_BLOCK_HEADER_SIZE_MAX);
-	io_buf buf;
-	if (io_pread(pair, &buf, size, iter->block.compressed_file_offset))
-		return true;
-
-	// Zero would mean Index Indicator and thus not a valid Block.
-	if (buf.u8[0] == 0)
-		goto data_error;
-
-	// Initialize the block structure and decode Block Header Size.
-	lzma_filter filters[LZMA_FILTERS_MAX + 1];
-	lzma_block block;
-	block.version = 0;
-	block.check = iter->stream.flags->check;
-	block.filters = filters;
-
-	block.header_size = lzma_block_header_size_decode(buf.u8[0]);
-	if (block.header_size > size)
-		goto data_error;
-
-	// Decode the Block Header.
-	switch (lzma_block_header_decode(&block, NULL, buf.u8)) {
-	case LZMA_OK:
-		break;
-
-	case LZMA_OPTIONS_ERROR:
-		message_error("%s: %s", pair->src_name,
-				message_strm(LZMA_OPTIONS_ERROR));
-		return true;
-
-	case LZMA_DATA_ERROR:
-		goto data_error;
-
-	default:
-		message_bug();
-	}
-
-	// Check the Block Flags. These must be done before calling
-	// lzma_block_compressed_size(), because it overwrites
-	// block.compressed_size.
-	bhi->flags[0] = block.compressed_size != LZMA_VLI_UNKNOWN
-			? 'c' : '-';
-	bhi->flags[1] = block.uncompressed_size != LZMA_VLI_UNKNOWN
-			? 'u' : '-';
-	bhi->flags[2] = '\0';
-
-	// Collect information if all Blocks have both Compressed Size
-	// and Uncompressed Size fields. They can be useful e.g. for
-	// multi-threaded decompression so it can be useful to know it.
-	xfi->all_have_sizes &= block.compressed_size != LZMA_VLI_UNKNOWN
-			&& block.uncompressed_size != LZMA_VLI_UNKNOWN;
-
-	// Validate or set block.compressed_size.
-	switch (lzma_block_compressed_size(&block,
-			iter->block.unpadded_size)) {
-	case LZMA_OK:
-		// Validate also block.uncompressed_size if it is present.
-		// If it isn't present, there's no need to set it since
-		// we aren't going to actually decompress the Block; if
-		// we were decompressing, then we should set it so that
-		// the Block decoder could validate the Uncompressed Size
-		// that was stored in the Index.
-		if (block.uncompressed_size == LZMA_VLI_UNKNOWN
-				|| block.uncompressed_size
-					== iter->block.uncompressed_size)
-			break;
-
-		// If the above fails, the file is corrupt so
-		// LZMA_DATA_ERROR is a good error code.
-
-	case LZMA_DATA_ERROR:
-		// Free the memory allocated by lzma_block_header_decode().
-		for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i)
-			free(filters[i].options);
-
-		goto data_error;
-
-	default:
-		message_bug();
-	}
-
-	// Copy the known sizes.
-	bhi->header_size = block.header_size;
-	bhi->compressed_size = block.compressed_size;
-
-	// Calculate the decoder memory usage and update the maximum
-	// memory usage of this Block.
-	bhi->memusage = lzma_raw_decoder_memusage(filters);
-	if (xfi->memusage_max < bhi->memusage)
-		xfi->memusage_max = bhi->memusage;
-
-	// Convert the filter chain to human readable form.
-	message_filters_to_str(bhi->filter_chain, filters, false);
-
-	// Free the memory allocated by lzma_block_header_decode().
-	for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i)
-		free(filters[i].options);
-
-	return false;
-
-data_error:
-	// Show the error message.
-	message_error("%s: %s", pair->src_name,
-			message_strm(LZMA_DATA_ERROR));
-	return true;
-}
-
-
-/// \brief      Parse the Check field and put it into check_value[]
-///
-/// \return     False on success, true on error.
-static bool
-parse_check_value(file_pair *pair, const lzma_index_iter *iter)
-{
-	// Don't read anything from the file if there is no integrity Check.
-	if (iter->stream.flags->check == LZMA_CHECK_NONE) {
-		snprintf(check_value, sizeof(check_value), "---");
-		return false;
-	}
-
-	// Locate and read the Check field.
-	const uint32_t size = lzma_check_size(iter->stream.flags->check);
-	const off_t offset = iter->block.compressed_file_offset
-			+ iter->block.total_size - size;
-	io_buf buf;
-	if (io_pread(pair, &buf, size, offset))
-		return true;
-
-	// CRC32 and CRC64 are in little endian. Guess that all the future
-	// 32-bit and 64-bit Check values are little endian too. It shouldn't
-	// be a too big problem if this guess is wrong.
-	if (size == 4)
-		snprintf(check_value, sizeof(check_value),
-				"%08" PRIx32, conv32le(buf.u32[0]));
-	else if (size == 8)
-		snprintf(check_value, sizeof(check_value),
-				"%016" PRIx64, conv64le(buf.u64[0]));
-	else
-		for (size_t i = 0; i < size; ++i)
-			snprintf(check_value + i * 2, 3, "%02x", buf.u8[i]);
-
-	return false;
-}
-
-
-/// \brief      Parse detailed information about a Block
-///
-/// Since this requires seek(s), listing information about all Blocks can
-/// be slow.
-///
-/// \param      pair    Input file
-/// \param      iter    Location of the Block whose Check value should
-///                     be printed.
-/// \param      bhi     Pointer to structure where to store the information
-///                     about the Block Header field.
-///
-/// \return     False on success, true on error. If an error occurs,
-///             the error message is printed too so the caller doesn't
-///             need to worry about that.
-static bool
-parse_details(file_pair *pair, const lzma_index_iter *iter,
-		block_header_info *bhi, xz_file_info *xfi)
-{
-	if (parse_block_header(pair, iter, bhi, xfi))
-		return true;
-
-	if (parse_check_value(pair, iter))
-		return true;
-
-	return false;
-}
-
-
-/// \brief      Get the compression ratio
-///
-/// This has slightly different format than that is used in message.c.
-static const char *
-get_ratio(uint64_t compressed_size, uint64_t uncompressed_size)
-{
-	if (uncompressed_size == 0)
-		return "---";
-
-	const double ratio = (double)(compressed_size)
-			/ (double)(uncompressed_size);
-	if (ratio > 9.999)
-		return "---";
-
-	static char buf[16];
-	snprintf(buf, sizeof(buf), "%.3f", ratio);
-	return buf;
-}
-
-
-/// \brief      Get a comma-separated list of Check names
-///
-/// The check names are translated with gettext except when in robot mode.
-///
-/// \param      buf     Buffer to hold the resulting string
-/// \param      checks  Bit mask of Checks to print
-/// \param      space_after_comma
-///                     It's better to not use spaces in table-like listings,
-///                     but in more verbose formats a space after a comma
-///                     is good for readability.
-static void
-get_check_names(char buf[CHECKS_STR_SIZE],
-		uint32_t checks, bool space_after_comma)
-{
-	assert(checks != 0);
-
-	char *pos = buf;
-	size_t left = CHECKS_STR_SIZE;
-
-	const char *sep = space_after_comma ? ", " : ",";
-	bool comma = false;
-
-	for (size_t i = 0; i <= LZMA_CHECK_ID_MAX; ++i) {
-		if (checks & (UINT32_C(1) << i)) {
-			my_snprintf(&pos, &left, "%s%s",
-					comma ? sep : "",
-					opt_robot ? check_names[i]
-						: _(check_names[i]));
-			comma = true;
-		}
-	}
-
-	return;
-}
-
-
-static bool
-print_info_basic(const xz_file_info *xfi, file_pair *pair)
-{
-	static bool headings_displayed = false;
-	if (!headings_displayed) {
-		headings_displayed = true;
-		// TRANSLATORS: These are column headings. From Strms (Streams)
-		// to Ratio, the columns are right aligned. Check and Filename
-		// are left aligned. If you need longer words, it's OK to
-		// use two lines here. Test with "xz -l foo.xz".
-		puts(_("Strms  Blocks   Compressed Uncompressed  Ratio  "
-				"Check   Filename"));
-	}
-
-	char checks[CHECKS_STR_SIZE];
-	get_check_names(checks, lzma_index_checks(xfi->idx), false);
-
-	const char *cols[7] = {
-		uint64_to_str(lzma_index_stream_count(xfi->idx), 0),
-		uint64_to_str(lzma_index_block_count(xfi->idx), 1),
-		uint64_to_nicestr(lzma_index_file_size(xfi->idx),
-			NICESTR_B, NICESTR_TIB, false, 2),
-		uint64_to_nicestr(lzma_index_uncompressed_size(xfi->idx),
-			NICESTR_B, NICESTR_TIB, false, 3),
-		get_ratio(lzma_index_file_size(xfi->idx),
-			lzma_index_uncompressed_size(xfi->idx)),
-		checks,
-		pair->src_name,
-	};
-	printf("%*s %*s  %*s  %*s  %*s  %-*s %s\n",
-			tuklib_mbstr_fw(cols[0], 5), cols[0],
-			tuklib_mbstr_fw(cols[1], 7), cols[1],
-			tuklib_mbstr_fw(cols[2], 11), cols[2],
-			tuklib_mbstr_fw(cols[3], 11), cols[3],
-			tuklib_mbstr_fw(cols[4], 5), cols[4],
-			tuklib_mbstr_fw(cols[5], 7), cols[5],
-			cols[6]);
-
-	return false;
-}
-
-
-static void
-print_adv_helper(uint64_t stream_count, uint64_t block_count,
-		uint64_t compressed_size, uint64_t uncompressed_size,
-		uint32_t checks, uint64_t stream_padding)
-{
-	char checks_str[CHECKS_STR_SIZE];
-	get_check_names(checks_str, checks, true);
-
-	printf(_("  Streams:            %s\n"),
-			uint64_to_str(stream_count, 0));
-	printf(_("  Blocks:             %s\n"),
-			uint64_to_str(block_count, 0));
-	printf(_("  Compressed size:    %s\n"),
-			uint64_to_nicestr(compressed_size,
-				NICESTR_B, NICESTR_TIB, true, 0));
-	printf(_("  Uncompressed size:  %s\n"),
-			uint64_to_nicestr(uncompressed_size,
-				NICESTR_B, NICESTR_TIB, true, 0));
-	printf(_("  Ratio:              %s\n"),
-			get_ratio(compressed_size, uncompressed_size));
-	printf(_("  Check:              %s\n"), checks_str);
-	printf(_("  Stream padding:     %s\n"),
-			uint64_to_nicestr(stream_padding,
-				NICESTR_B, NICESTR_TIB, true, 0));
-	return;
-}
-
-
-static bool
-print_info_adv(xz_file_info *xfi, file_pair *pair)
-{
-	// Print the overall information.
-	print_adv_helper(lzma_index_stream_count(xfi->idx),
-			lzma_index_block_count(xfi->idx),
-			lzma_index_file_size(xfi->idx),
-			lzma_index_uncompressed_size(xfi->idx),
-			lzma_index_checks(xfi->idx),
-			xfi->stream_padding);
-
-	// Size of the biggest Check. This is used to calculate the width
-	// of the CheckVal field. The table would get insanely wide if
-	// we always reserved space for 64-byte Check (128 chars as hex).
-	uint32_t check_max = 0;
-
-	// Print information about the Streams.
-	//
-	// TRANSLATORS: The second line is column headings. All except
-	// Check are right aligned; Check is left aligned. Test with
-	// "xz -lv foo.xz".
-	puts(_("  Streams:\n    Stream    Blocks"
-			"      CompOffset    UncompOffset"
-			"        CompSize      UncompSize  Ratio"
-			"  Check      Padding"));
-
-	lzma_index_iter iter;
-	lzma_index_iter_init(&iter, xfi->idx);
-
-	while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM)) {
-		const char *cols1[4] = {
-			uint64_to_str(iter.stream.number, 0),
-			uint64_to_str(iter.stream.block_count, 1),
-			uint64_to_str(iter.stream.compressed_offset, 2),
-			uint64_to_str(iter.stream.uncompressed_offset, 3),
-		};
-		printf("    %*s %*s %*s %*s ",
-				tuklib_mbstr_fw(cols1[0], 6), cols1[0],
-				tuklib_mbstr_fw(cols1[1], 9), cols1[1],
-				tuklib_mbstr_fw(cols1[2], 15), cols1[2],
-				tuklib_mbstr_fw(cols1[3], 15), cols1[3]);
-
-		const char *cols2[5] = {
-			uint64_to_str(iter.stream.compressed_size, 0),
-			uint64_to_str(iter.stream.uncompressed_size, 1),
-			get_ratio(iter.stream.compressed_size,
-				iter.stream.uncompressed_size),
-			_(check_names[iter.stream.flags->check]),
-			uint64_to_str(iter.stream.padding, 2),
-		};
-		printf("%*s %*s  %*s  %-*s %*s\n",
-				tuklib_mbstr_fw(cols2[0], 15), cols2[0],
-				tuklib_mbstr_fw(cols2[1], 15), cols2[1],
-				tuklib_mbstr_fw(cols2[2], 5), cols2[2],
-				tuklib_mbstr_fw(cols2[3], 10), cols2[3],
-				tuklib_mbstr_fw(cols2[4], 7), cols2[4]);
-
-		// Update the maximum Check size.
-		if (lzma_check_size(iter.stream.flags->check) > check_max)
-			check_max = lzma_check_size(iter.stream.flags->check);
-	}
-
-	// Cache the verbosity level to a local variable.
-	const bool detailed = message_verbosity_get() >= V_DEBUG;
-
-	// Information collected from Block Headers
-	block_header_info bhi;
-
-	// Print information about the Blocks but only if there is
-	// at least one Block.
-	if (lzma_index_block_count(xfi->idx) > 0) {
-		// Calculate the width of the CheckVal field.
-		const int checkval_width = my_max(8, 2 * check_max);
-
-		// TRANSLATORS: The second line is column headings. All
-		// except Check are right aligned; Check is left aligned.
-		printf(_("  Blocks:\n    Stream     Block"
-			"      CompOffset    UncompOffset"
-			"       TotalSize      UncompSize  Ratio  Check"));
-
-		if (detailed) {
-			// TRANSLATORS: These are additional column headings
-			// for the most verbose listing mode. CheckVal
-			// (Check value), Flags, and Filters are left aligned.
-			// Header (Block Header Size), CompSize, and MemUsage
-			// are right aligned. %*s is replaced with 0-120
-			// spaces to make the CheckVal column wide enough.
-			// Test with "xz -lvv foo.xz".
-			printf(_("      CheckVal %*s Header  Flags        "
-					"CompSize    MemUsage  Filters"),
-					checkval_width - 8, "");
-		}
-
-		putchar('\n');
-
-		lzma_index_iter_init(&iter, xfi->idx);
-
-		// Iterate over the Blocks.
-		while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)) {
-			if (detailed && parse_details(pair, &iter, &bhi, xfi))
-					return true;
-
-			const char *cols1[4] = {
-				uint64_to_str(iter.stream.number, 0),
-				uint64_to_str(
-					iter.block.number_in_stream, 1),
-				uint64_to_str(
-					iter.block.compressed_file_offset, 2),
-				uint64_to_str(
-					iter.block.uncompressed_file_offset, 3)
-			};
-			printf("    %*s %*s %*s %*s ",
-				tuklib_mbstr_fw(cols1[0], 6), cols1[0],
-				tuklib_mbstr_fw(cols1[1], 9), cols1[1],
-				tuklib_mbstr_fw(cols1[2], 15), cols1[2],
-				tuklib_mbstr_fw(cols1[3], 15), cols1[3]);
-
-			const char *cols2[4] = {
-				uint64_to_str(iter.block.total_size, 0),
-				uint64_to_str(iter.block.uncompressed_size,
-						1),
-				get_ratio(iter.block.total_size,
-					iter.block.uncompressed_size),
-				_(check_names[iter.stream.flags->check])
-			};
-			printf("%*s %*s  %*s  %-*s",
-				tuklib_mbstr_fw(cols2[0], 15), cols2[0],
-				tuklib_mbstr_fw(cols2[1], 15), cols2[1],
-				tuklib_mbstr_fw(cols2[2], 5), cols2[2],
-				tuklib_mbstr_fw(cols2[3], detailed ? 11 : 1),
-					cols2[3]);
-
-			if (detailed) {
-				const lzma_vli compressed_size
-						= iter.block.unpadded_size
-						- bhi.header_size
-						- lzma_check_size(
-						iter.stream.flags->check);
-
-				const char *cols3[6] = {
-					check_value,
-					uint64_to_str(bhi.header_size, 0),
-					bhi.flags,
-					uint64_to_str(compressed_size, 1),
-					uint64_to_str(
-						round_up_to_mib(bhi.memusage),
-						2),
-					bhi.filter_chain
-				};
-				// Show MiB for memory usage, because it
-				// is the only size which is not in bytes.
-				printf("%-*s  %*s  %-5s %*s %*s MiB  %s",
-					checkval_width, cols3[0],
-					tuklib_mbstr_fw(cols3[1], 6), cols3[1],
-					cols3[2],
-					tuklib_mbstr_fw(cols3[3], 15),
-						cols3[3],
-					tuklib_mbstr_fw(cols3[4], 7), cols3[4],
-					cols3[5]);
-			}
-
-			putchar('\n');
-		}
-	}
-
-	if (detailed) {
-		printf(_("  Memory needed:      %s MiB\n"), uint64_to_str(
-				round_up_to_mib(xfi->memusage_max), 0));
-		printf(_("  Sizes in headers:   %s\n"),
-				xfi->all_have_sizes ? _("Yes") : _("No"));
-	}
-
-	return false;
-}
-
-
-static bool
-print_info_robot(xz_file_info *xfi, file_pair *pair)
-{
-	char checks[CHECKS_STR_SIZE];
-	get_check_names(checks, lzma_index_checks(xfi->idx), false);
-
-	printf("name\t%s\n", pair->src_name);
-
-	printf("file\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
-			"\t%s\t%s\t%" PRIu64 "\n",
-			lzma_index_stream_count(xfi->idx),
-			lzma_index_block_count(xfi->idx),
-			lzma_index_file_size(xfi->idx),
-			lzma_index_uncompressed_size(xfi->idx),
-			get_ratio(lzma_index_file_size(xfi->idx),
-				lzma_index_uncompressed_size(xfi->idx)),
-			checks,
-			xfi->stream_padding);
-
-	if (message_verbosity_get() >= V_VERBOSE) {
-		lzma_index_iter iter;
-		lzma_index_iter_init(&iter, xfi->idx);
-
-		while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM))
-			printf("stream\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
-				"\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
-				"\t%s\t%s\t%" PRIu64 "\n",
-				iter.stream.number,
-				iter.stream.block_count,
-				iter.stream.compressed_offset,
-				iter.stream.uncompressed_offset,
-				iter.stream.compressed_size,
-				iter.stream.uncompressed_size,
-				get_ratio(iter.stream.compressed_size,
-					iter.stream.uncompressed_size),
-				check_names[iter.stream.flags->check],
-				iter.stream.padding);
-
-		lzma_index_iter_rewind(&iter);
-		block_header_info bhi;
-
-		while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)) {
-			if (message_verbosity_get() >= V_DEBUG
-					&& parse_details(
-						pair, &iter, &bhi, xfi))
-				return true;
-
-			printf("block\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
-					"\t%" PRIu64 "\t%" PRIu64
-					"\t%" PRIu64 "\t%" PRIu64 "\t%s\t%s",
-					iter.stream.number,
-					iter.block.number_in_stream,
-					iter.block.number_in_file,
-					iter.block.compressed_file_offset,
-					iter.block.uncompressed_file_offset,
-					iter.block.total_size,
-					iter.block.uncompressed_size,
-					get_ratio(iter.block.total_size,
-						iter.block.uncompressed_size),
-					check_names[iter.stream.flags->check]);
-
-			if (message_verbosity_get() >= V_DEBUG)
-				printf("\t%s\t%" PRIu32 "\t%s\t%" PRIu64
-						"\t%" PRIu64 "\t%s",
-						check_value,
-						bhi.header_size,
-						bhi.flags,
-						bhi.compressed_size,
-						bhi.memusage,
-						bhi.filter_chain);
-
-			putchar('\n');
-		}
-	}
-
-	if (message_verbosity_get() >= V_DEBUG)
-		printf("summary\t%" PRIu64 "\t%s\n",
-				xfi->memusage_max,
-				xfi->all_have_sizes ? "yes" : "no");
-
-	return false;
-}
-
-
-static void
-update_totals(const xz_file_info *xfi)
-{
-	// TODO: Integer overflow checks
-	++totals.files;
-	totals.streams += lzma_index_stream_count(xfi->idx);
-	totals.blocks += lzma_index_block_count(xfi->idx);
-	totals.compressed_size += lzma_index_file_size(xfi->idx);
-	totals.uncompressed_size += lzma_index_uncompressed_size(xfi->idx);
-	totals.stream_padding += xfi->stream_padding;
-	totals.checks |= lzma_index_checks(xfi->idx);
-
-	if (totals.memusage_max < xfi->memusage_max)
-		totals.memusage_max = xfi->memusage_max;
-
-	totals.all_have_sizes &= xfi->all_have_sizes;
-
-	return;
-}
-
-
-static void
-print_totals_basic(void)
-{
-	// Print a separator line.
-	char line[80];
-	memset(line, '-', sizeof(line));
-	line[sizeof(line) - 1] = '\0';
-	puts(line);
-
-	// Get the check names.
-	char checks[CHECKS_STR_SIZE];
-	get_check_names(checks, totals.checks, false);
-
-	// Print the totals except the file count, which needs
-	// special handling.
-	printf("%5s %7s  %11s  %11s  %5s  %-7s ",
-			uint64_to_str(totals.streams, 0),
-			uint64_to_str(totals.blocks, 1),
-			uint64_to_nicestr(totals.compressed_size,
-				NICESTR_B, NICESTR_TIB, false, 2),
-			uint64_to_nicestr(totals.uncompressed_size,
-				NICESTR_B, NICESTR_TIB, false, 3),
-			get_ratio(totals.compressed_size,
-				totals.uncompressed_size),
-			checks);
-
-	// Since we print totals only when there are at least two files,
-	// the English message will always use "%s files". But some other
-	// languages need different forms for different plurals so we
-	// have to translate this with ngettext().
-	//
-	// TRANSLATORS: %s is an integer. Only the plural form of this
-	// message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
-	printf(ngettext("%s file\n", "%s files\n",
-			totals.files <= ULONG_MAX ? totals.files
-				: (totals.files % 1000000) + 1000000),
-			uint64_to_str(totals.files, 0));
-
-	return;
-}
-
-
-static void
-print_totals_adv(void)
-{
-	putchar('\n');
-	puts(_("Totals:"));
-	printf(_("  Number of files:    %s\n"),
-			uint64_to_str(totals.files, 0));
-	print_adv_helper(totals.streams, totals.blocks,
-			totals.compressed_size, totals.uncompressed_size,
-			totals.checks, totals.stream_padding);
-
-	if (message_verbosity_get() >= V_DEBUG) {
-		printf(_("  Memory needed:      %s MiB\n"), uint64_to_str(
-				round_up_to_mib(totals.memusage_max), 0));
-		printf(_("  Sizes in headers:   %s\n"),
-				totals.all_have_sizes ? _("Yes") : _("No"));
-	}
-
-	return;
-}
-
-
-static void
-print_totals_robot(void)
-{
-	char checks[CHECKS_STR_SIZE];
-	get_check_names(checks, totals.checks, false);
-
-	printf("totals\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
-			"\t%s\t%s\t%" PRIu64 "\t%" PRIu64,
-			totals.streams,
-			totals.blocks,
-			totals.compressed_size,
-			totals.uncompressed_size,
-			get_ratio(totals.compressed_size,
-				totals.uncompressed_size),
-			checks,
-			totals.stream_padding,
-			totals.files);
-
-	if (message_verbosity_get() >= V_DEBUG)
-		printf("\t%" PRIu64 "\t%s",
-				totals.memusage_max,
-				totals.all_have_sizes ? "yes" : "no");
-
-	putchar('\n');
-
-	return;
-}
-
-
-extern void
-list_totals(void)
-{
-	if (opt_robot) {
-		// Always print totals in --robot mode. It can be convenient
-		// in some cases and doesn't complicate usage of the
-		// single-file case much.
-		print_totals_robot();
-
-	} else if (totals.files > 1) {
-		// For non-robot mode, totals are printed only if there
-		// is more than one file.
-		if (message_verbosity_get() <= V_WARNING)
-			print_totals_basic();
-		else
-			print_totals_adv();
-	}
-
-	return;
-}
-
-
-extern void
-list_file(const char *filename)
-{
-	if (opt_format != FORMAT_XZ && opt_format != FORMAT_AUTO)
-		message_fatal(_("--list works only on .xz files "
-				"(--format=xz or --format=auto)"));
-
-	message_filename(filename);
-
-	if (filename == stdin_filename) {
-		message_error(_("--list does not support reading from "
-				"standard input"));
-		return;
-	}
-
-	// Unset opt_stdout so that io_open_src() won't accept special files.
-	// Set opt_force so that io_open_src() will follow symlinks.
-	opt_stdout = false;
-	opt_force = true;
-	file_pair *pair = io_open_src(filename);
-	if (pair == NULL)
-		return;
-
-	xz_file_info xfi = XZ_FILE_INFO_INIT;
-	if (!parse_indexes(&xfi, pair)) {
-		bool fail;
-
-		// We have three main modes:
-		//  - --robot, which has submodes if --verbose is specified
-		//    once or twice
-		//  - Normal --list without --verbose
-		//  - --list with one or two --verbose
-		if (opt_robot)
-			fail = print_info_robot(&xfi, pair);
-		else if (message_verbosity_get() <= V_WARNING)
-			fail = print_info_basic(&xfi, pair);
-		else
-			fail = print_info_adv(&xfi, pair);
-
-		// Update the totals that are displayed after all
-		// the individual files have been listed. Don't count
-		// broken files.
-		if (!fail)
-			update_totals(&xfi);
-
-		lzma_index_end(xfi.idx, NULL);
-	}
-
-	io_close(pair, false);
-	return;
-}

Copied: vendor/xz/5.2.3/src/xz/list.c (from rev 9176, vendor/xz/dist/src/xz/list.c)
===================================================================
--- vendor/xz/5.2.3/src/xz/list.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/list.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,1186 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       list.c
+/// \brief      Listing information about .xz files
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+#include "tuklib_integer.h"
+
+
+/// Information about a .xz file
+typedef struct {
+	/// Combined Index of all Streams in the file
+	lzma_index *idx;
+
+	/// Total amount of Stream Padding
+	uint64_t stream_padding;
+
+	/// Highest memory usage so far
+	uint64_t memusage_max;
+
+	/// True if all Blocks so far have Compressed Size and
+	/// Uncompressed Size fields
+	bool all_have_sizes;
+
+	/// Oldest XZ Utils version that will decompress the file
+	uint32_t min_version;
+
+} xz_file_info;
+
+#define XZ_FILE_INFO_INIT { NULL, 0, 0, true, 50000002 }
+
+
+/// Information about a .xz Block
+typedef struct {
+	/// Size of the Block Header
+	uint32_t header_size;
+
+	/// A few of the Block Flags as a string
+	char flags[3];
+
+	/// Size of the Compressed Data field in the Block
+	lzma_vli compressed_size;
+
+	/// Decoder memory usage for this Block
+	uint64_t memusage;
+
+	/// The filter chain of this Block in human-readable form
+	char filter_chain[FILTERS_STR_SIZE];
+
+} block_header_info;
+
+
+/// Check ID to string mapping
+static const char check_names[LZMA_CHECK_ID_MAX + 1][12] = {
+	// TRANSLATORS: Indicates that there is no integrity check.
+	// This string is used in tables, so the width must not
+	// exceed ten columns with a fixed-width font.
+	N_("None"),
+	"CRC32",
+	// TRANSLATORS: Indicates that integrity check name is not known,
+	// but the Check ID is known (here 2). This and other "Unknown-N"
+	// strings are used in tables, so the width must not exceed ten
+	// columns with a fixed-width font. It's OK to omit the dash if
+	// you need space for one extra letter, but don't use spaces.
+	N_("Unknown-2"),
+	N_("Unknown-3"),
+	"CRC64",
+	N_("Unknown-5"),
+	N_("Unknown-6"),
+	N_("Unknown-7"),
+	N_("Unknown-8"),
+	N_("Unknown-9"),
+	"SHA-256",
+	N_("Unknown-11"),
+	N_("Unknown-12"),
+	N_("Unknown-13"),
+	N_("Unknown-14"),
+	N_("Unknown-15"),
+};
+
+/// Buffer size for get_check_names(). This may be a bit ridiculous,
+/// but at least it's enough if some language needs many multibyte chars.
+#define CHECKS_STR_SIZE 1024
+
+
+/// Value of the Check field as hexadecimal string.
+/// This is set by parse_check_value().
+static char check_value[2 * LZMA_CHECK_SIZE_MAX + 1];
+
+
+/// Totals that are displayed if there was more than one file.
+/// The "files" counter is also used in print_info_adv() to show
+/// the file number.
+static struct {
+	uint64_t files;
+	uint64_t streams;
+	uint64_t blocks;
+	uint64_t compressed_size;
+	uint64_t uncompressed_size;
+	uint64_t stream_padding;
+	uint64_t memusage_max;
+	uint32_t checks;
+	uint32_t min_version;
+	bool all_have_sizes;
+} totals = { 0, 0, 0, 0, 0, 0, 0, 0, 0, true };
+
+
+/// Convert XZ Utils version number to a string.
+static const char *
+xz_ver_to_str(uint32_t ver)
+{
+	static char buf[32];
+
+	unsigned int major = ver / 10000000U;
+	ver -= major * 10000000U;
+
+	unsigned int minor = ver / 10000U;
+	ver -= minor * 10000U;
+
+	unsigned int patch = ver / 10U;
+	ver -= patch * 10U;
+
+	const char *stability = ver == 0 ? "alpha" : ver == 1 ? "beta" : "";
+
+	snprintf(buf, sizeof(buf), "%u.%u.%u%s",
+			major, minor, patch, stability);
+	return buf;
+}
+
+
+/// \brief      Parse the Index(es) from the given .xz file
+///
+/// \param      xfi     Pointer to structure where the decoded information
+///                     is stored.
+/// \param      pair    Input file
+///
+/// \return     On success, false is returned. On error, true is returned.
+///
+// TODO: This function is pretty big. liblzma should have a function that
+// takes a callback function to parse the Index(es) from a .xz file to make
+// it easy for applications.
+static bool
+parse_indexes(xz_file_info *xfi, file_pair *pair)
+{
+	if (pair->src_st.st_size <= 0) {
+		message_error(_("%s: File is empty"), pair->src_name);
+		return true;
+	}
+
+	if (pair->src_st.st_size < 2 * LZMA_STREAM_HEADER_SIZE) {
+		message_error(_("%s: Too small to be a valid .xz file"),
+				pair->src_name);
+		return true;
+	}
+
+	io_buf buf;
+	lzma_stream_flags header_flags;
+	lzma_stream_flags footer_flags;
+	lzma_ret ret;
+
+	// lzma_stream for the Index decoder
+	lzma_stream strm = LZMA_STREAM_INIT;
+
+	// All Indexes decoded so far
+	lzma_index *combined_index = NULL;
+
+	// The Index currently being decoded
+	lzma_index *this_index = NULL;
+
+	// Current position in the file. We parse the file backwards so
+	// initialize it to point to the end of the file.
+	off_t pos = pair->src_st.st_size;
+
+	// Each loop iteration decodes one Index.
+	do {
+		// Check that there is enough data left to contain at least
+		// the Stream Header and Stream Footer. This check cannot
+		// fail in the first pass of this loop.
+		if (pos < 2 * LZMA_STREAM_HEADER_SIZE) {
+			message_error("%s: %s", pair->src_name,
+					message_strm(LZMA_DATA_ERROR));
+			goto error;
+		}
+
+		pos -= LZMA_STREAM_HEADER_SIZE;
+		lzma_vli stream_padding = 0;
+
+		// Locate the Stream Footer. There may be Stream Padding which
+		// we must skip when reading backwards.
+		while (true) {
+			if (pos < LZMA_STREAM_HEADER_SIZE) {
+				message_error("%s: %s", pair->src_name,
+						message_strm(
+							LZMA_DATA_ERROR));
+				goto error;
+			}
+
+			if (io_pread(pair, &buf,
+					LZMA_STREAM_HEADER_SIZE, pos))
+				goto error;
+
+			// Stream Padding is always a multiple of four bytes.
+			int i = 2;
+			if (buf.u32[i] != 0)
+				break;
+
+			// To avoid calling io_pread() for every four bytes
+			// of Stream Padding, take advantage that we read
+			// 12 bytes (LZMA_STREAM_HEADER_SIZE) already and
+			// check them too before calling io_pread() again.
+			do {
+				stream_padding += 4;
+				pos -= 4;
+				--i;
+			} while (i >= 0 && buf.u32[i] == 0);
+		}
+
+		// Decode the Stream Footer.
+		ret = lzma_stream_footer_decode(&footer_flags, buf.u8);
+		if (ret != LZMA_OK) {
+			message_error("%s: %s", pair->src_name,
+					message_strm(ret));
+			goto error;
+		}
+
+		// Check that the Stream Footer doesn't specify something
+		// that we don't support. This can only happen if the xz
+		// version is older than liblzma and liblzma supports
+		// something new.
+		//
+		// It is enough to check Stream Footer. Stream Header must
+		// match when it is compared against Stream Footer with
+		// lzma_stream_flags_compare().
+		if (footer_flags.version != 0) {
+			message_error("%s: %s", pair->src_name,
+					message_strm(LZMA_OPTIONS_ERROR));
+			goto error;
+		}
+
+		// Check that the size of the Index field looks sane.
+		lzma_vli index_size = footer_flags.backward_size;
+		if ((lzma_vli)(pos) < index_size + LZMA_STREAM_HEADER_SIZE) {
+			message_error("%s: %s", pair->src_name,
+					message_strm(LZMA_DATA_ERROR));
+			goto error;
+		}
+
+		// Set pos to the beginning of the Index.
+		pos -= index_size;
+
+		// See how much memory we can use for decoding this Index.
+		uint64_t memlimit = hardware_memlimit_get(MODE_LIST);
+		uint64_t memused = 0;
+		if (combined_index != NULL) {
+			memused = lzma_index_memused(combined_index);
+			if (memused > memlimit)
+				message_bug();
+
+			memlimit -= memused;
+		}
+
+		// Decode the Index.
+		ret = lzma_index_decoder(&strm, &this_index, memlimit);
+		if (ret != LZMA_OK) {
+			message_error("%s: %s", pair->src_name,
+					message_strm(ret));
+			goto error;
+		}
+
+		do {
+			// Don't give the decoder more input than the
+			// Index size.
+			strm.avail_in = my_min(IO_BUFFER_SIZE, index_size);
+			if (io_pread(pair, &buf, strm.avail_in, pos))
+				goto error;
+
+			pos += strm.avail_in;
+			index_size -= strm.avail_in;
+
+			strm.next_in = buf.u8;
+			ret = lzma_code(&strm, LZMA_RUN);
+
+		} while (ret == LZMA_OK);
+
+		// If the decoding seems to be successful, check also that
+		// the Index decoder consumed as much input as indicated
+		// by the Backward Size field.
+		if (ret == LZMA_STREAM_END)
+			if (index_size != 0 || strm.avail_in != 0)
+				ret = LZMA_DATA_ERROR;
+
+		if (ret != LZMA_STREAM_END) {
+			// LZMA_BUFFER_ERROR means that the Index decoder
+			// would have liked more input than what the Index
+			// size should be according to Stream Footer.
+			// The message for LZMA_DATA_ERROR makes more
+			// sense in that case.
+			if (ret == LZMA_BUF_ERROR)
+				ret = LZMA_DATA_ERROR;
+
+			message_error("%s: %s", pair->src_name,
+					message_strm(ret));
+
+			// If the error was too low memory usage limit,
+			// show also how much memory would have been needed.
+			if (ret == LZMA_MEMLIMIT_ERROR) {
+				uint64_t needed = lzma_memusage(&strm);
+				if (UINT64_MAX - needed < memused)
+					needed = UINT64_MAX;
+				else
+					needed += memused;
+
+				message_mem_needed(V_ERROR, needed);
+			}
+
+			goto error;
+		}
+
+		// Decode the Stream Header and check that its Stream Flags
+		// match the Stream Footer.
+		pos -= footer_flags.backward_size + LZMA_STREAM_HEADER_SIZE;
+		if ((lzma_vli)(pos) < lzma_index_total_size(this_index)) {
+			message_error("%s: %s", pair->src_name,
+					message_strm(LZMA_DATA_ERROR));
+			goto error;
+		}
+
+		pos -= lzma_index_total_size(this_index);
+		if (io_pread(pair, &buf, LZMA_STREAM_HEADER_SIZE, pos))
+			goto error;
+
+		ret = lzma_stream_header_decode(&header_flags, buf.u8);
+		if (ret != LZMA_OK) {
+			message_error("%s: %s", pair->src_name,
+					message_strm(ret));
+			goto error;
+		}
+
+		ret = lzma_stream_flags_compare(&header_flags, &footer_flags);
+		if (ret != LZMA_OK) {
+			message_error("%s: %s", pair->src_name,
+					message_strm(ret));
+			goto error;
+		}
+
+		// Store the decoded Stream Flags into this_index. This is
+		// needed so that we can print which Check is used in each
+		// Stream.
+		ret = lzma_index_stream_flags(this_index, &footer_flags);
+		if (ret != LZMA_OK)
+			message_bug();
+
+		// Store also the size of the Stream Padding field. It is
+		// needed to show the offsets of the Streams correctly.
+		ret = lzma_index_stream_padding(this_index, stream_padding);
+		if (ret != LZMA_OK)
+			message_bug();
+
+		if (combined_index != NULL) {
+			// Append the earlier decoded Indexes
+			// after this_index.
+			ret = lzma_index_cat(
+					this_index, combined_index, NULL);
+			if (ret != LZMA_OK) {
+				message_error("%s: %s", pair->src_name,
+						message_strm(ret));
+				goto error;
+			}
+		}
+
+		combined_index = this_index;
+		this_index = NULL;
+
+		xfi->stream_padding += stream_padding;
+
+	} while (pos > 0);
+
+	lzma_end(&strm);
+
+	// All OK. Make combined_index available to the caller.
+	xfi->idx = combined_index;
+	return false;
+
+error:
+	// Something went wrong, free the allocated memory.
+	lzma_end(&strm);
+	lzma_index_end(combined_index, NULL);
+	lzma_index_end(this_index, NULL);
+	return true;
+}
+
+
+/// \brief      Parse the Block Header
+///
+/// The result is stored into *bhi. The caller takes care of initializing it.
+///
+/// \return     False on success, true on error.
+static bool
+parse_block_header(file_pair *pair, const lzma_index_iter *iter,
+		block_header_info *bhi, xz_file_info *xfi)
+{
+#if IO_BUFFER_SIZE < LZMA_BLOCK_HEADER_SIZE_MAX
+#	error IO_BUFFER_SIZE < LZMA_BLOCK_HEADER_SIZE_MAX
+#endif
+
+	// Get the whole Block Header with one read, but don't read past
+	// the end of the Block (or even its Check field).
+	const uint32_t size = my_min(iter->block.total_size
+				- lzma_check_size(iter->stream.flags->check),
+			LZMA_BLOCK_HEADER_SIZE_MAX);
+	io_buf buf;
+	if (io_pread(pair, &buf, size, iter->block.compressed_file_offset))
+		return true;
+
+	// Zero would mean Index Indicator and thus not a valid Block.
+	if (buf.u8[0] == 0)
+		goto data_error;
+
+	// Initialize the block structure and decode Block Header Size.
+	lzma_filter filters[LZMA_FILTERS_MAX + 1];
+	lzma_block block;
+	block.version = 0;
+	block.check = iter->stream.flags->check;
+	block.filters = filters;
+
+	block.header_size = lzma_block_header_size_decode(buf.u8[0]);
+	if (block.header_size > size)
+		goto data_error;
+
+	// Decode the Block Header.
+	switch (lzma_block_header_decode(&block, NULL, buf.u8)) {
+	case LZMA_OK:
+		break;
+
+	case LZMA_OPTIONS_ERROR:
+		message_error("%s: %s", pair->src_name,
+				message_strm(LZMA_OPTIONS_ERROR));
+		return true;
+
+	case LZMA_DATA_ERROR:
+		goto data_error;
+
+	default:
+		message_bug();
+	}
+
+	// Check the Block Flags. These must be done before calling
+	// lzma_block_compressed_size(), because it overwrites
+	// block.compressed_size.
+	bhi->flags[0] = block.compressed_size != LZMA_VLI_UNKNOWN
+			? 'c' : '-';
+	bhi->flags[1] = block.uncompressed_size != LZMA_VLI_UNKNOWN
+			? 'u' : '-';
+	bhi->flags[2] = '\0';
+
+	// Collect information if all Blocks have both Compressed Size
+	// and Uncompressed Size fields. They can be useful e.g. for
+	// multi-threaded decompression so it can be useful to know it.
+	xfi->all_have_sizes &= block.compressed_size != LZMA_VLI_UNKNOWN
+			&& block.uncompressed_size != LZMA_VLI_UNKNOWN;
+
+	// Validate or set block.compressed_size.
+	switch (lzma_block_compressed_size(&block,
+			iter->block.unpadded_size)) {
+	case LZMA_OK:
+		// Validate also block.uncompressed_size if it is present.
+		// If it isn't present, there's no need to set it since
+		// we aren't going to actually decompress the Block; if
+		// we were decompressing, then we should set it so that
+		// the Block decoder could validate the Uncompressed Size
+		// that was stored in the Index.
+		if (block.uncompressed_size == LZMA_VLI_UNKNOWN
+				|| block.uncompressed_size
+					== iter->block.uncompressed_size)
+			break;
+
+		// If the above fails, the file is corrupt so
+		// LZMA_DATA_ERROR is a good error code.
+
+	case LZMA_DATA_ERROR:
+		// Free the memory allocated by lzma_block_header_decode().
+		for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i)
+			free(filters[i].options);
+
+		goto data_error;
+
+	default:
+		message_bug();
+	}
+
+	// Copy the known sizes.
+	bhi->header_size = block.header_size;
+	bhi->compressed_size = block.compressed_size;
+
+	// Calculate the decoder memory usage and update the maximum
+	// memory usage of this Block.
+	bhi->memusage = lzma_raw_decoder_memusage(filters);
+	if (xfi->memusage_max < bhi->memusage)
+		xfi->memusage_max = bhi->memusage;
+
+	// 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 decoder bug was fixed in 5.0.2.
+	{
+		size_t i = 0;
+		while (filters[i + 1].id != LZMA_VLI_UNKNOWN)
+			++i;
+
+		if (filters[i].id == LZMA_FILTER_LZMA2
+				&& iter->block.uncompressed_size == 0
+				&& xfi->min_version < 50000022U)
+			xfi->min_version = 50000022U;
+	}
+
+	// Convert the filter chain to human readable form.
+	message_filters_to_str(bhi->filter_chain, filters, false);
+
+	// Free the memory allocated by lzma_block_header_decode().
+	for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i)
+		free(filters[i].options);
+
+	return false;
+
+data_error:
+	// Show the error message.
+	message_error("%s: %s", pair->src_name,
+			message_strm(LZMA_DATA_ERROR));
+	return true;
+}
+
+
+/// \brief      Parse the Check field and put it into check_value[]
+///
+/// \return     False on success, true on error.
+static bool
+parse_check_value(file_pair *pair, const lzma_index_iter *iter)
+{
+	// Don't read anything from the file if there is no integrity Check.
+	if (iter->stream.flags->check == LZMA_CHECK_NONE) {
+		snprintf(check_value, sizeof(check_value), "---");
+		return false;
+	}
+
+	// Locate and read the Check field.
+	const uint32_t size = lzma_check_size(iter->stream.flags->check);
+	const off_t offset = iter->block.compressed_file_offset
+			+ iter->block.total_size - size;
+	io_buf buf;
+	if (io_pread(pair, &buf, size, offset))
+		return true;
+
+	// CRC32 and CRC64 are in little endian. Guess that all the future
+	// 32-bit and 64-bit Check values are little endian too. It shouldn't
+	// be a too big problem if this guess is wrong.
+	if (size == 4)
+		snprintf(check_value, sizeof(check_value),
+				"%08" PRIx32, conv32le(buf.u32[0]));
+	else if (size == 8)
+		snprintf(check_value, sizeof(check_value),
+				"%016" PRIx64, conv64le(buf.u64[0]));
+	else
+		for (size_t i = 0; i < size; ++i)
+			snprintf(check_value + i * 2, 3, "%02x", buf.u8[i]);
+
+	return false;
+}
+
+
+/// \brief      Parse detailed information about a Block
+///
+/// Since this requires seek(s), listing information about all Blocks can
+/// be slow.
+///
+/// \param      pair    Input file
+/// \param      iter    Location of the Block whose Check value should
+///                     be printed.
+/// \param      bhi     Pointer to structure where to store the information
+///                     about the Block Header field.
+///
+/// \return     False on success, true on error. If an error occurs,
+///             the error message is printed too so the caller doesn't
+///             need to worry about that.
+static bool
+parse_details(file_pair *pair, const lzma_index_iter *iter,
+		block_header_info *bhi, xz_file_info *xfi)
+{
+	if (parse_block_header(pair, iter, bhi, xfi))
+		return true;
+
+	if (parse_check_value(pair, iter))
+		return true;
+
+	return false;
+}
+
+
+/// \brief      Get the compression ratio
+///
+/// This has slightly different format than that is used in message.c.
+static const char *
+get_ratio(uint64_t compressed_size, uint64_t uncompressed_size)
+{
+	if (uncompressed_size == 0)
+		return "---";
+
+	const double ratio = (double)(compressed_size)
+			/ (double)(uncompressed_size);
+	if (ratio > 9.999)
+		return "---";
+
+	static char buf[16];
+	snprintf(buf, sizeof(buf), "%.3f", ratio);
+	return buf;
+}
+
+
+/// \brief      Get a comma-separated list of Check names
+///
+/// The check names are translated with gettext except when in robot mode.
+///
+/// \param      buf     Buffer to hold the resulting string
+/// \param      checks  Bit mask of Checks to print
+/// \param      space_after_comma
+///                     It's better to not use spaces in table-like listings,
+///                     but in more verbose formats a space after a comma
+///                     is good for readability.
+static void
+get_check_names(char buf[CHECKS_STR_SIZE],
+		uint32_t checks, bool space_after_comma)
+{
+	assert(checks != 0);
+
+	char *pos = buf;
+	size_t left = CHECKS_STR_SIZE;
+
+	const char *sep = space_after_comma ? ", " : ",";
+	bool comma = false;
+
+	for (size_t i = 0; i <= LZMA_CHECK_ID_MAX; ++i) {
+		if (checks & (UINT32_C(1) << i)) {
+			my_snprintf(&pos, &left, "%s%s",
+					comma ? sep : "",
+					opt_robot ? check_names[i]
+						: _(check_names[i]));
+			comma = true;
+		}
+	}
+
+	return;
+}
+
+
+static bool
+print_info_basic(const xz_file_info *xfi, file_pair *pair)
+{
+	static bool headings_displayed = false;
+	if (!headings_displayed) {
+		headings_displayed = true;
+		// TRANSLATORS: These are column headings. From Strms (Streams)
+		// to Ratio, the columns are right aligned. Check and Filename
+		// are left aligned. If you need longer words, it's OK to
+		// use two lines here. Test with "xz -l foo.xz".
+		puts(_("Strms  Blocks   Compressed Uncompressed  Ratio  "
+				"Check   Filename"));
+	}
+
+	char checks[CHECKS_STR_SIZE];
+	get_check_names(checks, lzma_index_checks(xfi->idx), false);
+
+	const char *cols[7] = {
+		uint64_to_str(lzma_index_stream_count(xfi->idx), 0),
+		uint64_to_str(lzma_index_block_count(xfi->idx), 1),
+		uint64_to_nicestr(lzma_index_file_size(xfi->idx),
+			NICESTR_B, NICESTR_TIB, false, 2),
+		uint64_to_nicestr(lzma_index_uncompressed_size(xfi->idx),
+			NICESTR_B, NICESTR_TIB, false, 3),
+		get_ratio(lzma_index_file_size(xfi->idx),
+			lzma_index_uncompressed_size(xfi->idx)),
+		checks,
+		pair->src_name,
+	};
+	printf("%*s %*s  %*s  %*s  %*s  %-*s %s\n",
+			tuklib_mbstr_fw(cols[0], 5), cols[0],
+			tuklib_mbstr_fw(cols[1], 7), cols[1],
+			tuklib_mbstr_fw(cols[2], 11), cols[2],
+			tuklib_mbstr_fw(cols[3], 11), cols[3],
+			tuklib_mbstr_fw(cols[4], 5), cols[4],
+			tuklib_mbstr_fw(cols[5], 7), cols[5],
+			cols[6]);
+
+	return false;
+}
+
+
+static void
+print_adv_helper(uint64_t stream_count, uint64_t block_count,
+		uint64_t compressed_size, uint64_t uncompressed_size,
+		uint32_t checks, uint64_t stream_padding)
+{
+	char checks_str[CHECKS_STR_SIZE];
+	get_check_names(checks_str, checks, true);
+
+	printf(_("  Streams:            %s\n"),
+			uint64_to_str(stream_count, 0));
+	printf(_("  Blocks:             %s\n"),
+			uint64_to_str(block_count, 0));
+	printf(_("  Compressed size:    %s\n"),
+			uint64_to_nicestr(compressed_size,
+				NICESTR_B, NICESTR_TIB, true, 0));
+	printf(_("  Uncompressed size:  %s\n"),
+			uint64_to_nicestr(uncompressed_size,
+				NICESTR_B, NICESTR_TIB, true, 0));
+	printf(_("  Ratio:              %s\n"),
+			get_ratio(compressed_size, uncompressed_size));
+	printf(_("  Check:              %s\n"), checks_str);
+	printf(_("  Stream padding:     %s\n"),
+			uint64_to_nicestr(stream_padding,
+				NICESTR_B, NICESTR_TIB, true, 0));
+	return;
+}
+
+
+static bool
+print_info_adv(xz_file_info *xfi, file_pair *pair)
+{
+	// Print the overall information.
+	print_adv_helper(lzma_index_stream_count(xfi->idx),
+			lzma_index_block_count(xfi->idx),
+			lzma_index_file_size(xfi->idx),
+			lzma_index_uncompressed_size(xfi->idx),
+			lzma_index_checks(xfi->idx),
+			xfi->stream_padding);
+
+	// Size of the biggest Check. This is used to calculate the width
+	// of the CheckVal field. The table would get insanely wide if
+	// we always reserved space for 64-byte Check (128 chars as hex).
+	uint32_t check_max = 0;
+
+	// Print information about the Streams.
+	//
+	// TRANSLATORS: The second line is column headings. All except
+	// Check are right aligned; Check is left aligned. Test with
+	// "xz -lv foo.xz".
+	puts(_("  Streams:\n    Stream    Blocks"
+			"      CompOffset    UncompOffset"
+			"        CompSize      UncompSize  Ratio"
+			"  Check      Padding"));
+
+	lzma_index_iter iter;
+	lzma_index_iter_init(&iter, xfi->idx);
+
+	while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM)) {
+		const char *cols1[4] = {
+			uint64_to_str(iter.stream.number, 0),
+			uint64_to_str(iter.stream.block_count, 1),
+			uint64_to_str(iter.stream.compressed_offset, 2),
+			uint64_to_str(iter.stream.uncompressed_offset, 3),
+		};
+		printf("    %*s %*s %*s %*s ",
+				tuklib_mbstr_fw(cols1[0], 6), cols1[0],
+				tuklib_mbstr_fw(cols1[1], 9), cols1[1],
+				tuklib_mbstr_fw(cols1[2], 15), cols1[2],
+				tuklib_mbstr_fw(cols1[3], 15), cols1[3]);
+
+		const char *cols2[5] = {
+			uint64_to_str(iter.stream.compressed_size, 0),
+			uint64_to_str(iter.stream.uncompressed_size, 1),
+			get_ratio(iter.stream.compressed_size,
+				iter.stream.uncompressed_size),
+			_(check_names[iter.stream.flags->check]),
+			uint64_to_str(iter.stream.padding, 2),
+		};
+		printf("%*s %*s  %*s  %-*s %*s\n",
+				tuklib_mbstr_fw(cols2[0], 15), cols2[0],
+				tuklib_mbstr_fw(cols2[1], 15), cols2[1],
+				tuklib_mbstr_fw(cols2[2], 5), cols2[2],
+				tuklib_mbstr_fw(cols2[3], 10), cols2[3],
+				tuklib_mbstr_fw(cols2[4], 7), cols2[4]);
+
+		// Update the maximum Check size.
+		if (lzma_check_size(iter.stream.flags->check) > check_max)
+			check_max = lzma_check_size(iter.stream.flags->check);
+	}
+
+	// Cache the verbosity level to a local variable.
+	const bool detailed = message_verbosity_get() >= V_DEBUG;
+
+	// Information collected from Block Headers
+	block_header_info bhi;
+
+	// Print information about the Blocks but only if there is
+	// at least one Block.
+	if (lzma_index_block_count(xfi->idx) > 0) {
+		// Calculate the width of the CheckVal field.
+		const int checkval_width = my_max(8, 2 * check_max);
+
+		// TRANSLATORS: The second line is column headings. All
+		// except Check are right aligned; Check is left aligned.
+		printf(_("  Blocks:\n    Stream     Block"
+			"      CompOffset    UncompOffset"
+			"       TotalSize      UncompSize  Ratio  Check"));
+
+		if (detailed) {
+			// TRANSLATORS: These are additional column headings
+			// for the most verbose listing mode. CheckVal
+			// (Check value), Flags, and Filters are left aligned.
+			// Header (Block Header Size), CompSize, and MemUsage
+			// are right aligned. %*s is replaced with 0-120
+			// spaces to make the CheckVal column wide enough.
+			// Test with "xz -lvv foo.xz".
+			printf(_("      CheckVal %*s Header  Flags        "
+					"CompSize    MemUsage  Filters"),
+					checkval_width - 8, "");
+		}
+
+		putchar('\n');
+
+		lzma_index_iter_init(&iter, xfi->idx);
+
+		// Iterate over the Blocks.
+		while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)) {
+			if (detailed && parse_details(pair, &iter, &bhi, xfi))
+					return true;
+
+			const char *cols1[4] = {
+				uint64_to_str(iter.stream.number, 0),
+				uint64_to_str(
+					iter.block.number_in_stream, 1),
+				uint64_to_str(
+					iter.block.compressed_file_offset, 2),
+				uint64_to_str(
+					iter.block.uncompressed_file_offset, 3)
+			};
+			printf("    %*s %*s %*s %*s ",
+				tuklib_mbstr_fw(cols1[0], 6), cols1[0],
+				tuklib_mbstr_fw(cols1[1], 9), cols1[1],
+				tuklib_mbstr_fw(cols1[2], 15), cols1[2],
+				tuklib_mbstr_fw(cols1[3], 15), cols1[3]);
+
+			const char *cols2[4] = {
+				uint64_to_str(iter.block.total_size, 0),
+				uint64_to_str(iter.block.uncompressed_size,
+						1),
+				get_ratio(iter.block.total_size,
+					iter.block.uncompressed_size),
+				_(check_names[iter.stream.flags->check])
+			};
+			printf("%*s %*s  %*s  %-*s",
+				tuklib_mbstr_fw(cols2[0], 15), cols2[0],
+				tuklib_mbstr_fw(cols2[1], 15), cols2[1],
+				tuklib_mbstr_fw(cols2[2], 5), cols2[2],
+				tuklib_mbstr_fw(cols2[3], detailed ? 11 : 1),
+					cols2[3]);
+
+			if (detailed) {
+				const lzma_vli compressed_size
+						= iter.block.unpadded_size
+						- bhi.header_size
+						- lzma_check_size(
+						iter.stream.flags->check);
+
+				const char *cols3[6] = {
+					check_value,
+					uint64_to_str(bhi.header_size, 0),
+					bhi.flags,
+					uint64_to_str(compressed_size, 1),
+					uint64_to_str(
+						round_up_to_mib(bhi.memusage),
+						2),
+					bhi.filter_chain
+				};
+				// Show MiB for memory usage, because it
+				// is the only size which is not in bytes.
+				printf("%-*s  %*s  %-5s %*s %*s MiB  %s",
+					checkval_width, cols3[0],
+					tuklib_mbstr_fw(cols3[1], 6), cols3[1],
+					cols3[2],
+					tuklib_mbstr_fw(cols3[3], 15),
+						cols3[3],
+					tuklib_mbstr_fw(cols3[4], 7), cols3[4],
+					cols3[5]);
+			}
+
+			putchar('\n');
+		}
+	}
+
+	if (detailed) {
+		printf(_("  Memory needed:      %s MiB\n"), uint64_to_str(
+				round_up_to_mib(xfi->memusage_max), 0));
+		printf(_("  Sizes in headers:   %s\n"),
+				xfi->all_have_sizes ? _("Yes") : _("No"));
+		printf(_("  Minimum XZ Utils version: %s\n"),
+				xz_ver_to_str(xfi->min_version));
+	}
+
+	return false;
+}
+
+
+static bool
+print_info_robot(xz_file_info *xfi, file_pair *pair)
+{
+	char checks[CHECKS_STR_SIZE];
+	get_check_names(checks, lzma_index_checks(xfi->idx), false);
+
+	printf("name\t%s\n", pair->src_name);
+
+	printf("file\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+			"\t%s\t%s\t%" PRIu64 "\n",
+			lzma_index_stream_count(xfi->idx),
+			lzma_index_block_count(xfi->idx),
+			lzma_index_file_size(xfi->idx),
+			lzma_index_uncompressed_size(xfi->idx),
+			get_ratio(lzma_index_file_size(xfi->idx),
+				lzma_index_uncompressed_size(xfi->idx)),
+			checks,
+			xfi->stream_padding);
+
+	if (message_verbosity_get() >= V_VERBOSE) {
+		lzma_index_iter iter;
+		lzma_index_iter_init(&iter, xfi->idx);
+
+		while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM))
+			printf("stream\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+				"\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+				"\t%s\t%s\t%" PRIu64 "\n",
+				iter.stream.number,
+				iter.stream.block_count,
+				iter.stream.compressed_offset,
+				iter.stream.uncompressed_offset,
+				iter.stream.compressed_size,
+				iter.stream.uncompressed_size,
+				get_ratio(iter.stream.compressed_size,
+					iter.stream.uncompressed_size),
+				check_names[iter.stream.flags->check],
+				iter.stream.padding);
+
+		lzma_index_iter_rewind(&iter);
+		block_header_info bhi;
+
+		while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)) {
+			if (message_verbosity_get() >= V_DEBUG
+					&& parse_details(
+						pair, &iter, &bhi, xfi))
+				return true;
+
+			printf("block\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+					"\t%" PRIu64 "\t%" PRIu64
+					"\t%" PRIu64 "\t%" PRIu64 "\t%s\t%s",
+					iter.stream.number,
+					iter.block.number_in_stream,
+					iter.block.number_in_file,
+					iter.block.compressed_file_offset,
+					iter.block.uncompressed_file_offset,
+					iter.block.total_size,
+					iter.block.uncompressed_size,
+					get_ratio(iter.block.total_size,
+						iter.block.uncompressed_size),
+					check_names[iter.stream.flags->check]);
+
+			if (message_verbosity_get() >= V_DEBUG)
+				printf("\t%s\t%" PRIu32 "\t%s\t%" PRIu64
+						"\t%" PRIu64 "\t%s",
+						check_value,
+						bhi.header_size,
+						bhi.flags,
+						bhi.compressed_size,
+						bhi.memusage,
+						bhi.filter_chain);
+
+			putchar('\n');
+		}
+	}
+
+	if (message_verbosity_get() >= V_DEBUG)
+		printf("summary\t%" PRIu64 "\t%s\t%" PRIu32 "\n",
+				xfi->memusage_max,
+				xfi->all_have_sizes ? "yes" : "no",
+				xfi->min_version);
+
+	return false;
+}
+
+
+static void
+update_totals(const xz_file_info *xfi)
+{
+	// TODO: Integer overflow checks
+	++totals.files;
+	totals.streams += lzma_index_stream_count(xfi->idx);
+	totals.blocks += lzma_index_block_count(xfi->idx);
+	totals.compressed_size += lzma_index_file_size(xfi->idx);
+	totals.uncompressed_size += lzma_index_uncompressed_size(xfi->idx);
+	totals.stream_padding += xfi->stream_padding;
+	totals.checks |= lzma_index_checks(xfi->idx);
+
+	if (totals.memusage_max < xfi->memusage_max)
+		totals.memusage_max = xfi->memusage_max;
+
+	if (totals.min_version < xfi->min_version)
+		totals.min_version = xfi->min_version;
+
+	totals.all_have_sizes &= xfi->all_have_sizes;
+
+	return;
+}
+
+
+static void
+print_totals_basic(void)
+{
+	// Print a separator line.
+	char line[80];
+	memset(line, '-', sizeof(line));
+	line[sizeof(line) - 1] = '\0';
+	puts(line);
+
+	// Get the check names.
+	char checks[CHECKS_STR_SIZE];
+	get_check_names(checks, totals.checks, false);
+
+	// Print the totals except the file count, which needs
+	// special handling.
+	printf("%5s %7s  %11s  %11s  %5s  %-7s ",
+			uint64_to_str(totals.streams, 0),
+			uint64_to_str(totals.blocks, 1),
+			uint64_to_nicestr(totals.compressed_size,
+				NICESTR_B, NICESTR_TIB, false, 2),
+			uint64_to_nicestr(totals.uncompressed_size,
+				NICESTR_B, NICESTR_TIB, false, 3),
+			get_ratio(totals.compressed_size,
+				totals.uncompressed_size),
+			checks);
+
+	// Since we print totals only when there are at least two files,
+	// the English message will always use "%s files". But some other
+	// languages need different forms for different plurals so we
+	// have to translate this with ngettext().
+	//
+	// TRANSLATORS: %s is an integer. Only the plural form of this
+	// message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
+	printf(ngettext("%s file\n", "%s files\n",
+			totals.files <= ULONG_MAX ? totals.files
+				: (totals.files % 1000000) + 1000000),
+			uint64_to_str(totals.files, 0));
+
+	return;
+}
+
+
+static void
+print_totals_adv(void)
+{
+	putchar('\n');
+	puts(_("Totals:"));
+	printf(_("  Number of files:    %s\n"),
+			uint64_to_str(totals.files, 0));
+	print_adv_helper(totals.streams, totals.blocks,
+			totals.compressed_size, totals.uncompressed_size,
+			totals.checks, totals.stream_padding);
+
+	if (message_verbosity_get() >= V_DEBUG) {
+		printf(_("  Memory needed:      %s MiB\n"), uint64_to_str(
+				round_up_to_mib(totals.memusage_max), 0));
+		printf(_("  Sizes in headers:   %s\n"),
+				totals.all_have_sizes ? _("Yes") : _("No"));
+		printf(_("  Minimum XZ Utils version: %s\n"),
+				xz_ver_to_str(totals.min_version));
+	}
+
+	return;
+}
+
+
+static void
+print_totals_robot(void)
+{
+	char checks[CHECKS_STR_SIZE];
+	get_check_names(checks, totals.checks, false);
+
+	printf("totals\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+			"\t%s\t%s\t%" PRIu64 "\t%" PRIu64,
+			totals.streams,
+			totals.blocks,
+			totals.compressed_size,
+			totals.uncompressed_size,
+			get_ratio(totals.compressed_size,
+				totals.uncompressed_size),
+			checks,
+			totals.stream_padding,
+			totals.files);
+
+	if (message_verbosity_get() >= V_DEBUG)
+		printf("\t%" PRIu64 "\t%s\t%" PRIu32,
+				totals.memusage_max,
+				totals.all_have_sizes ? "yes" : "no",
+				totals.min_version);
+
+	putchar('\n');
+
+	return;
+}
+
+
+extern void
+list_totals(void)
+{
+	if (opt_robot) {
+		// Always print totals in --robot mode. It can be convenient
+		// in some cases and doesn't complicate usage of the
+		// single-file case much.
+		print_totals_robot();
+
+	} else if (totals.files > 1) {
+		// For non-robot mode, totals are printed only if there
+		// is more than one file.
+		if (message_verbosity_get() <= V_WARNING)
+			print_totals_basic();
+		else
+			print_totals_adv();
+	}
+
+	return;
+}
+
+
+extern void
+list_file(const char *filename)
+{
+	if (opt_format != FORMAT_XZ && opt_format != FORMAT_AUTO)
+		message_fatal(_("--list works only on .xz files "
+				"(--format=xz or --format=auto)"));
+
+	message_filename(filename);
+
+	if (filename == stdin_filename) {
+		message_error(_("--list does not support reading from "
+				"standard input"));
+		return;
+	}
+
+	// Unset opt_stdout so that io_open_src() won't accept special files.
+	// Set opt_force so that io_open_src() will follow symlinks.
+	opt_stdout = false;
+	opt_force = true;
+	file_pair *pair = io_open_src(filename);
+	if (pair == NULL)
+		return;
+
+	xz_file_info xfi = XZ_FILE_INFO_INIT;
+	if (!parse_indexes(&xfi, pair)) {
+		bool fail;
+
+		// We have three main modes:
+		//  - --robot, which has submodes if --verbose is specified
+		//    once or twice
+		//  - Normal --list without --verbose
+		//  - --list with one or two --verbose
+		if (opt_robot)
+			fail = print_info_robot(&xfi, pair);
+		else if (message_verbosity_get() <= V_WARNING)
+			fail = print_info_basic(&xfi, pair);
+		else
+			fail = print_info_adv(&xfi, pair);
+
+		// Update the totals that are displayed after all
+		// the individual files have been listed. Don't count
+		// broken files.
+		if (!fail)
+			update_totals(&xfi);
+
+		lzma_index_end(xfi.idx, NULL);
+	}
+
+	io_close(pair, false);
+	return;
+}

Deleted: vendor/xz/5.2.3/src/xz/main.c
===================================================================
--- vendor/xz/dist/src/xz/main.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/main.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,302 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       main.c
-/// \brief      main()
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "private.h"
-#include <ctype.h>
-
-/// Exit status to use. This can be changed with set_exit_status().
-static enum exit_status_type exit_status = E_SUCCESS;
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
-/// exit_status has to be protected with a critical section due to
-/// how "signal handling" is done on Windows. See signals.c for details.
-static CRITICAL_SECTION exit_status_cs;
-#endif
-
-/// True if --no-warn is specified. When this is true, we don't set
-/// the exit status to E_WARNING when something worth a warning happens.
-static bool no_warn = false;
-
-
-extern void
-set_exit_status(enum exit_status_type new_status)
-{
-	assert(new_status == E_WARNING || new_status == E_ERROR);
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
-	EnterCriticalSection(&exit_status_cs);
-#endif
-
-	if (exit_status != E_ERROR)
-		exit_status = new_status;
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
-	LeaveCriticalSection(&exit_status_cs);
-#endif
-
-	return;
-}
-
-
-extern void
-set_exit_no_warn(void)
-{
-	no_warn = true;
-	return;
-}
-
-
-static const char *
-read_name(const args_info *args)
-{
-	// FIXME: Maybe we should have some kind of memory usage limit here
-	// like the tool has for the actual compression and decompression.
-	// Giving some huge text file with --files0 makes us to read the
-	// whole file in RAM.
-	static char *name = NULL;
-	static size_t size = 256;
-
-	// Allocate the initial buffer. This is never freed, since after it
-	// is no longer needed, the program exits very soon. It is safe to
-	// use xmalloc() and xrealloc() in this function, because while
-	// executing this function, no files are open for writing, and thus
-	// there's no need to cleanup anything before exiting.
-	if (name == NULL)
-		name = xmalloc(size);
-
-	// Write position in name
-	size_t pos = 0;
-
-	// Read one character at a time into name.
-	while (!user_abort) {
-		const int c = fgetc(args->files_file);
-
-		if (ferror(args->files_file)) {
-			// Take care of EINTR since we have established
-			// the signal handlers already.
-			if (errno == EINTR)
-				continue;
-
-			message_error(_("%s: Error reading filenames: %s"),
-					args->files_name, strerror(errno));
-			return NULL;
-		}
-
-		if (feof(args->files_file)) {
-			if (pos != 0)
-				message_error(_("%s: Unexpected end of input "
-						"when reading filenames"),
-						args->files_name);
-
-			return NULL;
-		}
-
-		if (c == args->files_delim) {
-			// We allow consecutive newline (--files) or '\0'
-			// characters (--files0), and ignore such empty
-			// filenames.
-			if (pos == 0)
-				continue;
-
-			// A non-empty name was read. Terminate it with '\0'
-			// and return it.
-			name[pos] = '\0';
-			return name;
-		}
-
-		if (c == '\0') {
-			// A null character was found when using --files,
-			// which expects plain text input separated with
-			// newlines.
-			message_error(_("%s: Null character found when "
-					"reading filenames; maybe you meant "
-					"to use `--files0' instead "
-					"of `--files'?"), args->files_name);
-			return NULL;
-		}
-
-		name[pos++] = c;
-
-		// Allocate more memory if needed. There must always be space
-		// at least for one character to allow terminating the string
-		// with '\0'.
-		if (pos == size) {
-			size *= 2;
-			name = xrealloc(name, size);
-		}
-	}
-
-	return NULL;
-}
-
-
-int
-main(int argc, char **argv)
-{
-#if defined(_WIN32) && !defined(__CYGWIN__)
-	InitializeCriticalSection(&exit_status_cs);
-#endif
-
-	// Set up the progname variable.
-	tuklib_progname_init(argv);
-
-	// Initialize the file I/O. This makes sure that
-	// stdin, stdout, and stderr are something valid.
-	io_init();
-
-	// Set up the locale and message translations.
-	tuklib_gettext_init(PACKAGE, LOCALEDIR);
-
-	// Initialize handling of error/warning/other messages.
-	message_init();
-
-	// Set hardware-dependent default values. These can be overriden
-	// on the command line, thus this must be done before args_parse().
-	hardware_init();
-
-	// Parse the command line arguments and get an array of filenames.
-	// This doesn't return if something is wrong with the command line
-	// arguments. If there are no arguments, one filename ("-") is still
-	// returned to indicate stdin.
-	args_info args;
-	args_parse(&args, argc, argv);
-
-	if (opt_mode != MODE_LIST && opt_robot)
-		message_fatal(_("Compression and decompression with --robot "
-			"are not supported yet."));
-
-	// Tell the message handling code how many input files there are if
-	// we know it. This way the progress indicator can show it.
-	if (args.files_name != NULL)
-		message_set_files(0);
-	else
-		message_set_files(args.arg_count);
-
-	// Refuse to write compressed data to standard output if it is
-	// a terminal.
-	if (opt_mode == MODE_COMPRESS) {
-		if (opt_stdout || (args.arg_count == 1
-				&& strcmp(args.arg_names[0], "-") == 0)) {
-			if (is_tty_stdout()) {
-				message_try_help();
-				tuklib_exit(E_ERROR, E_ERROR, false);
-			}
-		}
-	}
-
-	// Set up the signal handlers. We don't need these before we
-	// start the actual action and not in --list mode, so this is
-	// done after parsing the command line arguments.
-	//
-	// It's good to keep signal handlers in normal compression and
-	// decompression modes even when only writing to stdout, because
-	// we might need to restore O_APPEND flag on stdout before exiting.
-	// In --test mode, signal handlers aren't really needed, but let's
-	// keep them there for consistency with normal decompression.
-	if (opt_mode != MODE_LIST)
-		signals_init();
-
-	// coder_run() handles compression, decompression, and testing.
-	// list_file() is for --list.
-	void (*run)(const char *filename) = opt_mode == MODE_LIST
-			 ? &list_file : &coder_run;
-
-	// Process the files given on the command line. Note that if no names
-	// were given, args_parse() gave us a fake "-" filename.
-	for (size_t i = 0; i < args.arg_count && !user_abort; ++i) {
-		if (strcmp("-", args.arg_names[i]) == 0) {
-			// Processing from stdin to stdout. Check that we
-			// aren't writing compressed data to a terminal or
-			// reading it from a terminal.
-			if (opt_mode == MODE_COMPRESS) {
-				if (is_tty_stdout())
-					continue;
-			} else if (is_tty_stdin()) {
-				continue;
-			}
-
-			// It doesn't make sense to compress data from stdin
-			// if we are supposed to read filenames from stdin
-			// too (enabled with --files or --files0).
-			if (args.files_name == stdin_filename) {
-				message_error(_("Cannot read data from "
-						"standard input when "
-						"reading filenames "
-						"from standard input"));
-				continue;
-			}
-
-			// Replace the "-" with a special pointer, which is
-			// recognized by coder_run() and other things.
-			// This way error messages get a proper filename
-			// string and the code still knows that it is
-			// handling the special case of stdin.
-			args.arg_names[i] = (char *)stdin_filename;
-		}
-
-		// Do the actual compression or decompression.
-		run(args.arg_names[i]);
-	}
-
-	// If --files or --files0 was used, process the filenames from the
-	// given file or stdin. Note that here we don't consider "-" to
-	// indicate stdin like we do with the command line arguments.
-	if (args.files_name != NULL) {
-		// read_name() checks for user_abort so we don't need to
-		// check it as loop termination condition.
-		while (true) {
-			const char *name = read_name(&args);
-			if (name == NULL)
-				break;
-
-			// read_name() doesn't return empty names.
-			assert(name[0] != '\0');
-			run(name);
-		}
-
-		if (args.files_name != stdin_filename)
-			(void)fclose(args.files_file);
-	}
-
-	// All files have now been handled. If in --list mode, display
-	// the totals before exiting. We don't have signal handlers
-	// enabled in --list mode, so we don't need to check user_abort.
-	if (opt_mode == MODE_LIST) {
-		assert(!user_abort);
-		list_totals();
-	}
-
-	// If we have got a signal, raise it to kill the program instead
-	// of calling tuklib_exit().
-	signals_exit();
-
-	// Make a local copy of exit_status to keep the Windows code
-	// thread safe. At this point it is fine if we miss the user
-	// pressing C-c and don't set the exit_status to E_ERROR on
-	// Windows.
-#if defined(_WIN32) && !defined(__CYGWIN__)
-	EnterCriticalSection(&exit_status_cs);
-#endif
-
-	enum exit_status_type es = exit_status;
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
-	LeaveCriticalSection(&exit_status_cs);
-#endif
-
-	// Suppress the exit status indicating a warning if --no-warn
-	// was specified.
-	if (es == E_WARNING && no_warn)
-		es = E_SUCCESS;
-
-	tuklib_exit(es, E_ERROR, message_verbosity_get() != V_SILENT);
-}

Copied: vendor/xz/5.2.3/src/xz/main.c (from rev 11013, vendor/xz/dist/src/xz/main.c)
===================================================================
--- vendor/xz/5.2.3/src/xz/main.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/main.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,330 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       main.c
+/// \brief      main()
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+#include <ctype.h>
+
+/// Exit status to use. This can be changed with set_exit_status().
+static enum exit_status_type exit_status = E_SUCCESS;
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+/// exit_status has to be protected with a critical section due to
+/// how "signal handling" is done on Windows. See signals.c for details.
+static CRITICAL_SECTION exit_status_cs;
+#endif
+
+/// True if --no-warn is specified. When this is true, we don't set
+/// the exit status to E_WARNING when something worth a warning happens.
+static bool no_warn = false;
+
+
+extern void
+set_exit_status(enum exit_status_type new_status)
+{
+	assert(new_status == E_WARNING || new_status == E_ERROR);
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+	EnterCriticalSection(&exit_status_cs);
+#endif
+
+	if (exit_status != E_ERROR)
+		exit_status = new_status;
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+	LeaveCriticalSection(&exit_status_cs);
+#endif
+
+	return;
+}
+
+
+extern void
+set_exit_no_warn(void)
+{
+	no_warn = true;
+	return;
+}
+
+
+static const char *
+read_name(const args_info *args)
+{
+	// FIXME: Maybe we should have some kind of memory usage limit here
+	// like the tool has for the actual compression and decompression.
+	// Giving some huge text file with --files0 makes us to read the
+	// whole file in RAM.
+	static char *name = NULL;
+	static size_t size = 256;
+
+	// Allocate the initial buffer. This is never freed, since after it
+	// is no longer needed, the program exits very soon. It is safe to
+	// use xmalloc() and xrealloc() in this function, because while
+	// executing this function, no files are open for writing, and thus
+	// there's no need to cleanup anything before exiting.
+	if (name == NULL)
+		name = xmalloc(size);
+
+	// Write position in name
+	size_t pos = 0;
+
+	// Read one character at a time into name.
+	while (!user_abort) {
+		const int c = fgetc(args->files_file);
+
+		if (ferror(args->files_file)) {
+			// Take care of EINTR since we have established
+			// the signal handlers already.
+			if (errno == EINTR)
+				continue;
+
+			message_error(_("%s: Error reading filenames: %s"),
+					args->files_name, strerror(errno));
+			return NULL;
+		}
+
+		if (feof(args->files_file)) {
+			if (pos != 0)
+				message_error(_("%s: Unexpected end of input "
+						"when reading filenames"),
+						args->files_name);
+
+			return NULL;
+		}
+
+		if (c == args->files_delim) {
+			// We allow consecutive newline (--files) or '\0'
+			// characters (--files0), and ignore such empty
+			// filenames.
+			if (pos == 0)
+				continue;
+
+			// A non-empty name was read. Terminate it with '\0'
+			// and return it.
+			name[pos] = '\0';
+			return name;
+		}
+
+		if (c == '\0') {
+			// A null character was found when using --files,
+			// which expects plain text input separated with
+			// newlines.
+			message_error(_("%s: Null character found when "
+					"reading filenames; maybe you meant "
+					"to use `--files0' instead "
+					"of `--files'?"), args->files_name);
+			return NULL;
+		}
+
+		name[pos++] = c;
+
+		// Allocate more memory if needed. There must always be space
+		// at least for one character to allow terminating the string
+		// with '\0'.
+		if (pos == size) {
+			size *= 2;
+			name = xrealloc(name, size);
+		}
+	}
+
+	return NULL;
+}
+
+
+int
+main(int argc, char **argv)
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+	InitializeCriticalSection(&exit_status_cs);
+#endif
+
+	// Set up the progname variable.
+	tuklib_progname_init(argv);
+
+	// Initialize the file I/O. This makes sure that
+	// stdin, stdout, and stderr are something valid.
+	io_init();
+
+	// Set up the locale and message translations.
+	tuklib_gettext_init(PACKAGE, LOCALEDIR);
+
+	// Initialize handling of error/warning/other messages.
+	message_init();
+
+	// Set hardware-dependent default values. These can be overriden
+	// on the command line, thus this must be done before args_parse().
+	hardware_init();
+
+	// Parse the command line arguments and get an array of filenames.
+	// This doesn't return if something is wrong with the command line
+	// arguments. If there are no arguments, one filename ("-") is still
+	// returned to indicate stdin.
+	args_info args;
+	args_parse(&args, argc, argv);
+
+	if (opt_mode != MODE_LIST && opt_robot)
+		message_fatal(_("Compression and decompression with --robot "
+			"are not supported yet."));
+
+	// Tell the message handling code how many input files there are if
+	// we know it. This way the progress indicator can show it.
+	if (args.files_name != NULL)
+		message_set_files(0);
+	else
+		message_set_files(args.arg_count);
+
+	// Refuse to write compressed data to standard output if it is
+	// a terminal.
+	if (opt_mode == MODE_COMPRESS) {
+		if (opt_stdout || (args.arg_count == 1
+				&& strcmp(args.arg_names[0], "-") == 0)) {
+			if (is_tty_stdout()) {
+				message_try_help();
+				tuklib_exit(E_ERROR, E_ERROR, false);
+			}
+		}
+	}
+
+	// Set up the signal handlers. We don't need these before we
+	// start the actual action and not in --list mode, so this is
+	// done after parsing the command line arguments.
+	//
+	// It's good to keep signal handlers in normal compression and
+	// decompression modes even when only writing to stdout, because
+	// we might need to restore O_APPEND flag on stdout before exiting.
+	// In --test mode, signal handlers aren't really needed, but let's
+	// keep them there for consistency with normal decompression.
+	if (opt_mode != MODE_LIST)
+		signals_init();
+
+#ifdef ENABLE_SANDBOX
+	// Set a flag that sandboxing is allowed if all these are true:
+	//   - --files or --files0 wasn't used.
+	//   - There is exactly one input file or we are reading from stdin.
+	//   - We won't create any files: output goes to stdout or --test
+	//     or --list was used. Note that --test implies opt_stdout = true
+	//     but --list doesn't.
+	//
+	// This is obviously not ideal but it was easy to implement and
+	// it covers the most common use cases.
+	//
+	// TODO: Make sandboxing work for other situations too.
+	if (args.files_name == NULL && args.arg_count == 1
+			&& (opt_stdout || strcmp("-", args.arg_names[0]) == 0
+				|| opt_mode == MODE_LIST))
+		io_allow_sandbox();
+#endif
+
+	// coder_run() handles compression, decompression, and testing.
+	// list_file() is for --list.
+	void (*run)(const char *filename) = &coder_run;
+#ifdef HAVE_DECODERS
+	if (opt_mode == MODE_LIST)
+		run = &list_file;
+#endif
+
+	// Process the files given on the command line. Note that if no names
+	// were given, args_parse() gave us a fake "-" filename.
+	for (unsigned i = 0; i < args.arg_count && !user_abort; ++i) {
+		if (strcmp("-", args.arg_names[i]) == 0) {
+			// Processing from stdin to stdout. Check that we
+			// aren't writing compressed data to a terminal or
+			// reading it from a terminal.
+			if (opt_mode == MODE_COMPRESS) {
+				if (is_tty_stdout())
+					continue;
+			} else if (is_tty_stdin()) {
+				continue;
+			}
+
+			// It doesn't make sense to compress data from stdin
+			// if we are supposed to read filenames from stdin
+			// too (enabled with --files or --files0).
+			if (args.files_name == stdin_filename) {
+				message_error(_("Cannot read data from "
+						"standard input when "
+						"reading filenames "
+						"from standard input"));
+				continue;
+			}
+
+			// Replace the "-" with a special pointer, which is
+			// recognized by coder_run() and other things.
+			// This way error messages get a proper filename
+			// string and the code still knows that it is
+			// handling the special case of stdin.
+			args.arg_names[i] = (char *)stdin_filename;
+		}
+
+		// Do the actual compression or decompression.
+		run(args.arg_names[i]);
+	}
+
+	// If --files or --files0 was used, process the filenames from the
+	// given file or stdin. Note that here we don't consider "-" to
+	// indicate stdin like we do with the command line arguments.
+	if (args.files_name != NULL) {
+		// read_name() checks for user_abort so we don't need to
+		// check it as loop termination condition.
+		while (true) {
+			const char *name = read_name(&args);
+			if (name == NULL)
+				break;
+
+			// read_name() doesn't return empty names.
+			assert(name[0] != '\0');
+			run(name);
+		}
+
+		if (args.files_name != stdin_filename)
+			(void)fclose(args.files_file);
+	}
+
+#ifdef HAVE_DECODERS
+	// All files have now been handled. If in --list mode, display
+	// the totals before exiting. We don't have signal handlers
+	// enabled in --list mode, so we don't need to check user_abort.
+	if (opt_mode == MODE_LIST) {
+		assert(!user_abort);
+		list_totals();
+	}
+#endif
+
+#ifndef NDEBUG
+	coder_free();
+	args_free();
+#endif
+
+	// If we have got a signal, raise it to kill the program instead
+	// of calling tuklib_exit().
+	signals_exit();
+
+	// Make a local copy of exit_status to keep the Windows code
+	// thread safe. At this point it is fine if we miss the user
+	// pressing C-c and don't set the exit_status to E_ERROR on
+	// Windows.
+#if defined(_WIN32) && !defined(__CYGWIN__)
+	EnterCriticalSection(&exit_status_cs);
+#endif
+
+	enum exit_status_type es = exit_status;
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+	LeaveCriticalSection(&exit_status_cs);
+#endif
+
+	// Suppress the exit status indicating a warning if --no-warn
+	// was specified.
+	if (es == E_WARNING && no_warn)
+		es = E_SUCCESS;
+
+	tuklib_exit(es, E_ERROR, message_verbosity_get() != V_SILENT);
+}

Deleted: vendor/xz/5.2.3/src/xz/message.c
===================================================================
--- vendor/xz/dist/src/xz/message.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/message.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,1248 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       message.c
-/// \brief      Printing messages
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "private.h"
-
-#ifdef HAVE_SYS_TIME_H
-#	include <sys/time.h>
-#endif
-
-#include <stdarg.h>
-
-
-/// Number of the current file
-static unsigned int files_pos = 0;
-
-/// Total number of input files; zero if unknown.
-static unsigned int files_total;
-
-/// Verbosity level
-static enum message_verbosity verbosity = V_WARNING;
-
-/// Filename which we will print with the verbose messages
-static const char *filename;
-
-/// True once the a filename has been printed to stderr as part of progress
-/// message. If automatic progress updating isn't enabled, this becomes true
-/// after the first progress message has been printed due to user sending
-/// SIGINFO, SIGUSR1, or SIGALRM. Once this variable is true, we will print
-/// an empty line before the next filename to make the output more readable.
-static bool first_filename_printed = false;
-
-/// This is set to true when we have printed the current filename to stderr
-/// as part of a progress message. This variable is useful only if not
-/// updating progress automatically: if user sends many SIGINFO, SIGUSR1, or
-/// SIGALRM signals, we won't print the name of the same file multiple times.
-static bool current_filename_printed = false;
-
-/// True if we should print progress indicator and update it automatically
-/// if also verbose >= V_VERBOSE.
-static bool progress_automatic;
-
-/// True if message_progress_start() has been called but
-/// message_progress_end() hasn't been called yet.
-static bool progress_started = false;
-
-/// This is true when a progress message was printed and the cursor is still
-/// on the same line with the progress message. In that case, a newline has
-/// to be printed before any error messages.
-static bool progress_active = false;
-
-/// Pointer to lzma_stream used to do the encoding or decoding.
-static lzma_stream *progress_strm;
-
-/// Expected size of the input stream is needed to show completion percentage
-/// and estimate remaining time.
-static uint64_t expected_in_size;
-
-/// Time when we started processing the file
-static uint64_t start_time;
-
-
-// Use alarm() and SIGALRM when they are supported. This has two minor
-// advantages over the alternative of polling gettimeofday():
-//  - It is possible for the user to send SIGINFO, SIGUSR1, or SIGALRM to
-//    get intermediate progress information even when --verbose wasn't used
-//    or stderr is not a terminal.
-//  - alarm() + SIGALRM seems to have slightly less overhead than polling
-//    gettimeofday().
-#ifdef SIGALRM
-
-const int message_progress_sigs[] = {
-	SIGALRM,
-#ifdef SIGINFO
-	SIGINFO,
-#endif
-#ifdef SIGUSR1
-	SIGUSR1,
-#endif
-	0
-};
-
-/// The signal handler for SIGALRM sets this to true. It is set back to false
-/// once the progress message has been updated.
-static volatile sig_atomic_t progress_needs_updating = false;
-
-/// Signal handler for SIGALRM
-static void
-progress_signal_handler(int sig lzma_attribute((__unused__)))
-{
-	progress_needs_updating = true;
-	return;
-}
-
-#else
-
-/// This is true when progress message printing is wanted. Using the same
-/// variable name as above to avoid some ifdefs.
-static bool progress_needs_updating = false;
-
-/// Elapsed time when the next progress message update should be done.
-static uint64_t progress_next_update;
-
-#endif
-
-
-/// Get the current time as microseconds since epoch
-static uint64_t
-my_time(void)
-{
-	struct timeval tv;
-	gettimeofday(&tv, NULL);
-	return (uint64_t)(tv.tv_sec) * UINT64_C(1000000) + tv.tv_usec;
-}
-
-
-extern void
-message_init(void)
-{
-	// If --verbose is used, we use a progress indicator if and only
-	// if stderr is a terminal. If stderr is not a terminal, we print
-	// verbose information only after finishing the file. As a special
-	// exception, even if --verbose was not used, user can send SIGALRM
-	// to make us print progress information once without automatic
-	// updating.
-	progress_automatic = isatty(STDERR_FILENO);
-
-	// Commented out because COLUMNS is rarely exported to environment.
-	// Most users have at least 80 columns anyway, let's think something
-	// fancy here if enough people complain.
-/*
-	if (progress_automatic) {
-		// stderr is a terminal. Check the COLUMNS environment
-		// variable to see if the terminal is wide enough. If COLUMNS
-		// doesn't exist or it has some unparsable value, we assume
-		// that the terminal is wide enough.
-		const char *columns_str = getenv("COLUMNS");
-		if (columns_str != NULL) {
-			char *endptr;
-			const long columns = strtol(columns_str, &endptr, 10);
-			if (*endptr != '\0' || columns < 80)
-				progress_automatic = false;
-		}
-	}
-*/
-
-#ifdef SIGALRM
-	// Establish the signal handlers which set a flag to tell us that
-	// progress info should be updated.
-	struct sigaction sa;
-	sigemptyset(&sa.sa_mask);
-	sa.sa_flags = 0;
-	sa.sa_handler = &progress_signal_handler;
-
-	for (size_t i = 0; message_progress_sigs[i] != 0; ++i)
-		if (sigaction(message_progress_sigs[i], &sa, NULL))
-			message_signal_handler();
-#endif
-
-	return;
-}
-
-
-extern void
-message_verbosity_increase(void)
-{
-	if (verbosity < V_DEBUG)
-		++verbosity;
-
-	return;
-}
-
-
-extern void
-message_verbosity_decrease(void)
-{
-	if (verbosity > V_SILENT)
-		--verbosity;
-
-	return;
-}
-
-
-extern enum message_verbosity
-message_verbosity_get(void)
-{
-	return verbosity;
-}
-
-
-extern void
-message_set_files(unsigned int files)
-{
-	files_total = files;
-	return;
-}
-
-
-/// Prints the name of the current file if it hasn't been printed already,
-/// except if we are processing exactly one stream from stdin to stdout.
-/// I think it looks nicer to not print "(stdin)" when --verbose is used
-/// in a pipe and no other files are processed.
-static void
-print_filename(void)
-{
-	if (!opt_robot && (files_total != 1 || filename != stdin_filename)) {
-		signals_block();
-
-		FILE *file = opt_mode == MODE_LIST ? stdout : stderr;
-
-		// If a file was already processed, put an empty line
-		// before the next filename to improve readability.
-		if (first_filename_printed)
-			fputc('\n', file);
-
-		first_filename_printed = true;
-		current_filename_printed = true;
-
-		// If we don't know how many files there will be due
-		// to usage of --files or --files0.
-		if (files_total == 0)
-			fprintf(file, "%s (%u)\n", filename,
-					files_pos);
-		else
-			fprintf(file, "%s (%u/%u)\n", filename,
-					files_pos, files_total);
-
-		signals_unblock();
-	}
-
-	return;
-}
-
-
-extern void
-message_filename(const char *src_name)
-{
-	// Start numbering the files starting from one.
-	++files_pos;
-	filename = src_name;
-
-	if (verbosity >= V_VERBOSE
-			&& (progress_automatic || opt_mode == MODE_LIST))
-		print_filename();
-	else
-		current_filename_printed = false;
-
-	return;
-}
-
-
-extern void
-message_progress_start(lzma_stream *strm, uint64_t in_size)
-{
-	// Store the pointer to the lzma_stream used to do the coding.
-	// It is needed to find out the position in the stream.
-	progress_strm = strm;
-
-	// Store the processing start time of the file and its expected size.
-	// If we aren't printing any statistics, then these are unused. But
-	// since it is possible that the user sends us a signal to show
-	// statistics, we need to have these available anyway.
-	start_time = my_time();
-	expected_in_size = in_size;
-
-	// Indicate that progress info may need to be printed before
-	// printing error messages.
-	progress_started = true;
-
-	// If progress indicator is wanted, print the filename and possibly
-	// the file count now.
-	if (verbosity >= V_VERBOSE && progress_automatic) {
-		// Start the timer to display the first progress message
-		// after one second. An alternative would be to show the
-		// first message almost immediately, but delaying by one
-		// second looks better to me, since extremely early
-		// progress info is pretty much useless.
-#ifdef SIGALRM
-		// First disable a possibly existing alarm.
-		alarm(0);
-		progress_needs_updating = false;
-		alarm(1);
-#else
-		progress_needs_updating = true;
-		progress_next_update = 1000000;
-#endif
-	}
-
-	return;
-}
-
-
-/// Make the string indicating completion percentage.
-static const char *
-progress_percentage(uint64_t in_pos)
-{
-	// If the size of the input file is unknown or the size told us is
-	// clearly wrong since we have processed more data than the alleged
-	// size of the file, show a static string indicating that we have
-	// no idea of the completion percentage.
-	if (expected_in_size == 0 || in_pos > expected_in_size)
-		return "--- %";
-
-	// Never show 100.0 % before we actually are finished.
-	double percentage = (double)(in_pos) / (double)(expected_in_size)
-			* 99.9;
-
-	// Use big enough buffer to hold e.g. a multibyte decimal point.
-	static char buf[16];
-	snprintf(buf, sizeof(buf), "%.1f %%", percentage);
-
-	return buf;
-}
-
-
-/// Make the string containing the amount of input processed, amount of
-/// output produced, and the compression ratio.
-static const char *
-progress_sizes(uint64_t compressed_pos, uint64_t uncompressed_pos, bool final)
-{
-	// Use big enough buffer to hold e.g. a multibyte thousand separators.
-	static char buf[128];
-	char *pos = buf;
-	size_t left = sizeof(buf);
-
-	// Print the sizes. If this the final message, use more reasonable
-	// units than MiB if the file was small.
-	const enum nicestr_unit unit_min = final ? NICESTR_B : NICESTR_MIB;
-	my_snprintf(&pos, &left, "%s / %s",
-			uint64_to_nicestr(compressed_pos,
-				unit_min, NICESTR_TIB, false, 0),
-			uint64_to_nicestr(uncompressed_pos,
-				unit_min, NICESTR_TIB, false, 1));
-
-	// Avoid division by zero. If we cannot calculate the ratio, set
-	// it to some nice number greater than 10.0 so that it gets caught
-	// in the next if-clause.
-	const double ratio = uncompressed_pos > 0
-			? (double)(compressed_pos) / (double)(uncompressed_pos)
-			: 16.0;
-
-	// If the ratio is very bad, just indicate that it is greater than
-	// 9.999. This way the length of the ratio field stays fixed.
-	if (ratio > 9.999)
-		snprintf(pos, left, " > %.3f", 9.999);
-	else
-		snprintf(pos, left, " = %.3f", ratio);
-
-	return buf;
-}
-
-
-/// Make the string containing the processing speed of uncompressed data.
-static const char *
-progress_speed(uint64_t uncompressed_pos, uint64_t elapsed)
-{
-	// Don't print the speed immediately, since the early values look
-	// somewhat random.
-	if (elapsed < 3000000)
-		return "";
-
-	static const char unit[][8] = {
-		"KiB/s",
-		"MiB/s",
-		"GiB/s",
-	};
-
-	size_t unit_index = 0;
-
-	// Calculate the speed as KiB/s.
-	double speed = (double)(uncompressed_pos)
-			/ ((double)(elapsed) * (1024.0 / 1e6));
-
-	// Adjust the unit of the speed if needed.
-	while (speed > 999.0) {
-		speed /= 1024.0;
-		if (++unit_index == ARRAY_SIZE(unit))
-			return ""; // Way too fast ;-)
-	}
-
-	// Use decimal point only if the number is small. Examples:
-	//  - 0.1 KiB/s
-	//  - 9.9 KiB/s
-	//  - 99 KiB/s
-	//  - 999 KiB/s
-	// Use big enough buffer to hold e.g. a multibyte decimal point.
-	static char buf[16];
-	snprintf(buf, sizeof(buf), "%.*f %s",
-			speed > 9.9 ? 0 : 1, speed, unit[unit_index]);
-	return buf;
-}
-
-
-/// Make a string indicating elapsed or remaining time. The format is either
-/// M:SS or H:MM:SS depending on if the time is an hour or more.
-static const char *
-progress_time(uint64_t useconds)
-{
-	// 9999 hours = 416 days
-	static char buf[sizeof("9999:59:59")];
-
-	uint32_t seconds = useconds / 1000000;
-
-	// Don't show anything if the time is zero or ridiculously big.
-	if (seconds == 0 || seconds > ((9999 * 60) + 59) * 60 + 59)
-		return "";
-
-	uint32_t minutes = seconds / 60;
-	seconds %= 60;
-
-	if (minutes >= 60) {
-		const uint32_t hours = minutes / 60;
-		minutes %= 60;
-		snprintf(buf, sizeof(buf),
-				"%" PRIu32 ":%02" PRIu32 ":%02" PRIu32,
-				hours, minutes, seconds);
-	} else {
-		snprintf(buf, sizeof(buf), "%" PRIu32 ":%02" PRIu32,
-				minutes, seconds);
-	}
-
-	return buf;
-}
-
-
-/// Return a string containing estimated remaining time when
-/// reasonably possible.
-static const char *
-progress_remaining(uint64_t in_pos, uint64_t elapsed)
-{
-	// Don't show the estimated remaining time when it wouldn't
-	// make sense:
-	//  - Input size is unknown.
-	//  - Input has grown bigger since we started (de)compressing.
-	//  - We haven't processed much data yet, so estimate would be
-	//    too inaccurate.
-	//  - Only a few seconds has passed since we started (de)compressing,
-	//    so estimate would be too inaccurate.
-	if (expected_in_size == 0 || in_pos > expected_in_size
-			|| in_pos < (UINT64_C(1) << 19) || elapsed < 8000000)
-		return "";
-
-	// Calculate the estimate. Don't give an estimate of zero seconds,
-	// since it is possible that all the input has been already passed
-	// to the library, but there is still quite a bit of output pending.
-	uint32_t remaining = (double)(expected_in_size - in_pos)
-			* ((double)(elapsed) / 1e6) / (double)(in_pos);
-	if (remaining < 1)
-		remaining = 1;
-
-	static char buf[sizeof("9 h 55 min")];
-
-	// Select appropriate precision for the estimated remaining time.
-	if (remaining <= 10) {
-		// A maximum of 10 seconds remaining.
-		// Show the number of seconds as is.
-		snprintf(buf, sizeof(buf), "%" PRIu32 " s", remaining);
-
-	} else if (remaining <= 50) {
-		// A maximum of 50 seconds remaining.
-		// Round up to the next multiple of five seconds.
-		remaining = (remaining + 4) / 5 * 5;
-		snprintf(buf, sizeof(buf), "%" PRIu32 " s", remaining);
-
-	} else if (remaining <= 590) {
-		// A maximum of 9 minutes and 50 seconds remaining.
-		// Round up to the next multiple of ten seconds.
-		remaining = (remaining + 9) / 10 * 10;
-		snprintf(buf, sizeof(buf), "%" PRIu32 " min %" PRIu32 " s",
-				remaining / 60, remaining % 60);
-
-	} else if (remaining <= 59 * 60) {
-		// A maximum of 59 minutes remaining.
-		// Round up to the next multiple of a minute.
-		remaining = (remaining + 59) / 60;
-		snprintf(buf, sizeof(buf), "%" PRIu32 " min", remaining);
-
-	} else if (remaining <= 9 * 3600 + 50 * 60) {
-		// A maximum of 9 hours and 50 minutes left.
-		// Round up to the next multiple of ten minutes.
-		remaining = (remaining + 599) / 600 * 10;
-		snprintf(buf, sizeof(buf), "%" PRIu32 " h %" PRIu32 " min",
-				remaining / 60, remaining % 60);
-
-	} else if (remaining <= 23 * 3600) {
-		// A maximum of 23 hours remaining.
-		// Round up to the next multiple of an hour.
-		remaining = (remaining + 3599) / 3600;
-		snprintf(buf, sizeof(buf), "%" PRIu32 " h", remaining);
-
-	} else if (remaining <= 9 * 24 * 3600 + 23 * 3600) {
-		// A maximum of 9 days and 23 hours remaining.
-		// Round up to the next multiple of an hour.
-		remaining = (remaining + 3599) / 3600;
-		snprintf(buf, sizeof(buf), "%" PRIu32 " d %" PRIu32 " h",
-				remaining / 24, remaining % 24);
-
-	} else if (remaining <= 999 * 24 * 3600) {
-		// A maximum of 999 days remaining. ;-)
-		// Round up to the next multiple of a day.
-		remaining = (remaining + 24 * 3600 - 1) / (24 * 3600);
-		snprintf(buf, sizeof(buf), "%" PRIu32 " d", remaining);
-
-	} else {
-		// The estimated remaining time is too big. Don't show it.
-		return "";
-	}
-
-	return buf;
-}
-
-
-/// Calculate the elapsed time as microseconds.
-static uint64_t
-progress_elapsed(void)
-{
-	return my_time() - start_time;
-}
-
-
-/// Get information about position in the stream. This is currently simple,
-/// but it will become more complicated once we have multithreading support.
-static void
-progress_pos(uint64_t *in_pos,
-		uint64_t *compressed_pos, uint64_t *uncompressed_pos)
-{
-	*in_pos = progress_strm->total_in;
-
-	if (opt_mode == MODE_COMPRESS) {
-		*compressed_pos = progress_strm->total_out;
-		*uncompressed_pos = progress_strm->total_in;
-	} else {
-		*compressed_pos = progress_strm->total_in;
-		*uncompressed_pos = progress_strm->total_out;
-	}
-
-	return;
-}
-
-
-extern void
-message_progress_update(void)
-{
-	if (!progress_needs_updating)
-		return;
-
-	// Calculate how long we have been processing this file.
-	const uint64_t elapsed = progress_elapsed();
-
-#ifndef SIGALRM
-	if (progress_next_update > elapsed)
-		return;
-
-	progress_next_update = elapsed + 1000000;
-#endif
-
-	// Get our current position in the stream.
-	uint64_t in_pos;
-	uint64_t compressed_pos;
-	uint64_t uncompressed_pos;
-	progress_pos(&in_pos, &compressed_pos, &uncompressed_pos);
-
-	// Block signals so that fprintf() doesn't get interrupted.
-	signals_block();
-
-	// Print the filename if it hasn't been printed yet.
-	if (!current_filename_printed)
-		print_filename();
-
-	// Print the actual progress message. The idea is that there is at
-	// least three spaces between the fields in typical situations, but
-	// even in rare situations there is at least one space.
-	const char *cols[5] = {
-		progress_percentage(in_pos),
-		progress_sizes(compressed_pos, uncompressed_pos, false),
-		progress_speed(uncompressed_pos, elapsed),
-		progress_time(elapsed),
-		progress_remaining(in_pos, elapsed),
-	};
-	fprintf(stderr, "\r %*s %*s   %*s %10s   %10s\r",
-			tuklib_mbstr_fw(cols[0], 6), cols[0],
-			tuklib_mbstr_fw(cols[1], 35), cols[1],
-			tuklib_mbstr_fw(cols[2], 9), cols[2],
-			cols[3],
-			cols[4]);
-
-#ifdef SIGALRM
-	// Updating the progress info was finished. Reset
-	// progress_needs_updating to wait for the next SIGALRM.
-	//
-	// NOTE: This has to be done before alarm(1) or with (very) bad
-	// luck we could be setting this to false after the alarm has already
-	// been triggered.
-	progress_needs_updating = false;
-
-	if (verbosity >= V_VERBOSE && progress_automatic) {
-		// Mark that the progress indicator is active, so if an error
-		// occurs, the error message gets printed cleanly.
-		progress_active = true;
-
-		// Restart the timer so that progress_needs_updating gets
-		// set to true after about one second.
-		alarm(1);
-	} else {
-		// The progress message was printed because user had sent us
-		// SIGALRM. In this case, each progress message is printed
-		// on its own line.
-		fputc('\n', stderr);
-	}
-#else
-	// When SIGALRM isn't supported and we get here, it's always due to
-	// automatic progress update. We set progress_active here too like
-	// described above.
-	assert(verbosity >= V_VERBOSE);
-	assert(progress_automatic);
-	progress_active = true;
-#endif
-
-	signals_unblock();
-
-	return;
-}
-
-
-static void
-progress_flush(bool finished)
-{
-	if (!progress_started || verbosity < V_VERBOSE)
-		return;
-
-	uint64_t in_pos;
-	uint64_t compressed_pos;
-	uint64_t uncompressed_pos;
-	progress_pos(&in_pos, &compressed_pos, &uncompressed_pos);
-
-	// Avoid printing intermediate progress info if some error occurs
-	// in the beginning of the stream. (If something goes wrong later in
-	// the stream, it is sometimes useful to tell the user where the
-	// error approximately occurred, especially if the error occurs
-	// after a time-consuming operation.)
-	if (!finished && !progress_active
-			&& (compressed_pos == 0 || uncompressed_pos == 0))
-		return;
-
-	progress_active = false;
-
-	const uint64_t elapsed = progress_elapsed();
-
-	signals_block();
-
-	// When using the auto-updating progress indicator, the final
-	// statistics are printed in the same format as the progress
-	// indicator itself.
-	if (progress_automatic) {
-		const char *cols[5] = {
-			finished ? "100 %" : progress_percentage(in_pos),
-			progress_sizes(compressed_pos, uncompressed_pos, true),
-			progress_speed(uncompressed_pos, elapsed),
-			progress_time(elapsed),
-			finished ? "" : progress_remaining(in_pos, elapsed),
-		};
-		fprintf(stderr, "\r %*s %*s   %*s %10s   %10s\n",
-				tuklib_mbstr_fw(cols[0], 6), cols[0],
-				tuklib_mbstr_fw(cols[1], 35), cols[1],
-				tuklib_mbstr_fw(cols[2], 9), cols[2],
-				cols[3],
-				cols[4]);
-	} else {
-		// The filename is always printed.
-		fprintf(stderr, "%s: ", filename);
-
-		// Percentage is printed only if we didn't finish yet.
-		if (!finished) {
-			// Don't print the percentage when it isn't known
-			// (starts with a dash).
-			const char *percentage = progress_percentage(in_pos);
-			if (percentage[0] != '-')
-				fprintf(stderr, "%s, ", percentage);
-		}
-
-		// Size information is always printed.
-		fprintf(stderr, "%s", progress_sizes(
-				compressed_pos, uncompressed_pos, true));
-
-		// The speed and elapsed time aren't always shown.
-		const char *speed = progress_speed(uncompressed_pos, elapsed);
-		if (speed[0] != '\0')
-			fprintf(stderr, ", %s", speed);
-
-		const char *elapsed_str = progress_time(elapsed);
-		if (elapsed_str[0] != '\0')
-			fprintf(stderr, ", %s", elapsed_str);
-
-		fputc('\n', stderr);
-	}
-
-	signals_unblock();
-
-	return;
-}
-
-
-extern void
-message_progress_end(bool success)
-{
-	assert(progress_started);
-	progress_flush(success);
-	progress_started = false;
-	return;
-}
-
-
-static void
-vmessage(enum message_verbosity v, const char *fmt, va_list ap)
-{
-	if (v <= verbosity) {
-		signals_block();
-
-		progress_flush(false);
-
-		// TRANSLATORS: This is the program name in the beginning
-		// of the line in messages. Usually it becomes "xz: ".
-		// This is a translatable string because French needs
-		// a space before a colon.
-		fprintf(stderr, _("%s: "), progname);
-		vfprintf(stderr, fmt, ap);
-		fputc('\n', stderr);
-
-		signals_unblock();
-	}
-
-	return;
-}
-
-
-extern void
-message(enum message_verbosity v, const char *fmt, ...)
-{
-	va_list ap;
-	va_start(ap, fmt);
-	vmessage(v, fmt, ap);
-	va_end(ap);
-	return;
-}
-
-
-extern void
-message_warning(const char *fmt, ...)
-{
-	va_list ap;
-	va_start(ap, fmt);
-	vmessage(V_WARNING, fmt, ap);
-	va_end(ap);
-
-	set_exit_status(E_WARNING);
-	return;
-}
-
-
-extern void
-message_error(const char *fmt, ...)
-{
-	va_list ap;
-	va_start(ap, fmt);
-	vmessage(V_ERROR, fmt, ap);
-	va_end(ap);
-
-	set_exit_status(E_ERROR);
-	return;
-}
-
-
-extern void
-message_fatal(const char *fmt, ...)
-{
-	va_list ap;
-	va_start(ap, fmt);
-	vmessage(V_ERROR, fmt, ap);
-	va_end(ap);
-
-	tuklib_exit(E_ERROR, E_ERROR, false);
-}
-
-
-extern void
-message_bug(void)
-{
-	message_fatal(_("Internal error (bug)"));
-}
-
-
-extern void
-message_signal_handler(void)
-{
-	message_fatal(_("Cannot establish signal handlers"));
-}
-
-
-extern const char *
-message_strm(lzma_ret code)
-{
-	switch (code) {
-	case LZMA_NO_CHECK:
-		return _("No integrity check; not verifying file integrity");
-
-	case LZMA_UNSUPPORTED_CHECK:
-		return _("Unsupported type of integrity check; "
-				"not verifying file integrity");
-
-	case LZMA_MEM_ERROR:
-		return strerror(ENOMEM);
-
-	case LZMA_MEMLIMIT_ERROR:
-		return _("Memory usage limit reached");
-
-	case LZMA_FORMAT_ERROR:
-		return _("File format not recognized");
-
-	case LZMA_OPTIONS_ERROR:
-		return _("Unsupported options");
-
-	case LZMA_DATA_ERROR:
-		return _("Compressed data is corrupt");
-
-	case LZMA_BUF_ERROR:
-		return _("Unexpected end of input");
-
-	case LZMA_OK:
-	case LZMA_STREAM_END:
-	case LZMA_GET_CHECK:
-	case LZMA_PROG_ERROR:
-		// Without "default", compiler will warn if new constants
-		// are added to lzma_ret, it is not too easy to forget to
-		// add the new constants to this function.
-		break;
-	}
-
-	return _("Internal error (bug)");
-}
-
-
-extern void
-message_mem_needed(enum message_verbosity v, uint64_t memusage)
-{
-	if (v > verbosity)
-		return;
-
-	// Convert memusage to MiB, rounding up to the next full MiB.
-	// This way the user can always use the displayed usage as
-	// the new memory usage limit. (If we rounded to the nearest,
-	// the user might need to +1 MiB to get high enough limit.)
-	memusage = round_up_to_mib(memusage);
-
-	uint64_t memlimit = hardware_memlimit_get(opt_mode);
-
-	// Handle the case when there is no memory usage limit.
-	// This way we don't print a weird message with a huge number.
-	if (memlimit == UINT64_MAX) {
-		message(v, _("%s MiB of memory is required. "
-				"The limiter is disabled."),
-				uint64_to_str(memusage, 0));
-		return;
-	}
-
-	// With US-ASCII:
-	// 2^64 with thousand separators + " MiB" suffix + '\0' = 26 + 4 + 1
-	// But there may be multibyte chars so reserve enough space.
-	char memlimitstr[128];
-
-	// Show the memory usage limit as MiB unless it is less than 1 MiB.
-	// This way it's easy to notice errors where one has typed
-	// --memory=123 instead of --memory=123MiB.
-	if (memlimit < (UINT32_C(1) << 20)) {
-		snprintf(memlimitstr, sizeof(memlimitstr), "%s B",
-				uint64_to_str(memlimit, 1));
-	} else {
-		// Round up just like with memusage. If this function is
-		// called for informational purposes (to just show the
-		// current usage and limit), we should never show that
-		// the usage is higher than the limit, which would give
-		// a false impression that the memory usage limit isn't
-		// properly enforced.
-		snprintf(memlimitstr, sizeof(memlimitstr), "%s MiB",
-				uint64_to_str(round_up_to_mib(memlimit), 1));
-	}
-
-	message(v, _("%s MiB of memory is required. The limit is %s."),
-			uint64_to_str(memusage, 0), memlimitstr);
-
-	return;
-}
-
-
-/// \brief      Convert uint32_t to a nice string for --lzma[12]=dict=SIZE
-///
-/// The idea is to use KiB or MiB suffix when possible.
-static const char *
-uint32_to_optstr(uint32_t num)
-{
-	static char buf[16];
-
-	if ((num & ((UINT32_C(1) << 20) - 1)) == 0)
-		snprintf(buf, sizeof(buf), "%" PRIu32 "MiB", num >> 20);
-	else if ((num & ((UINT32_C(1) << 10) - 1)) == 0)
-		snprintf(buf, sizeof(buf), "%" PRIu32 "KiB", num >> 10);
-	else
-		snprintf(buf, sizeof(buf), "%" PRIu32, num);
-
-	return buf;
-}
-
-
-extern void
-message_filters_to_str(char buf[FILTERS_STR_SIZE],
-		const lzma_filter *filters, bool all_known)
-{
-	char *pos = buf;
-	size_t left = FILTERS_STR_SIZE;
-
-	for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
-		// Add the dashes for the filter option. A space is
-		// needed after the first and later filters.
-		my_snprintf(&pos, &left, "%s", i == 0 ? "--" : " --");
-
-		switch (filters[i].id) {
-		case LZMA_FILTER_LZMA1:
-		case LZMA_FILTER_LZMA2: {
-			const lzma_options_lzma *opt = filters[i].options;
-			const char *mode = NULL;
-			const char *mf = NULL;
-
-			if (all_known) {
-				switch (opt->mode) {
-				case LZMA_MODE_FAST:
-					mode = "fast";
-					break;
-
-				case LZMA_MODE_NORMAL:
-					mode = "normal";
-					break;
-
-				default:
-					mode = "UNKNOWN";
-					break;
-				}
-
-				switch (opt->mf) {
-				case LZMA_MF_HC3:
-					mf = "hc3";
-					break;
-
-				case LZMA_MF_HC4:
-					mf = "hc4";
-					break;
-
-				case LZMA_MF_BT2:
-					mf = "bt2";
-					break;
-
-				case LZMA_MF_BT3:
-					mf = "bt3";
-					break;
-
-				case LZMA_MF_BT4:
-					mf = "bt4";
-					break;
-
-				default:
-					mf = "UNKNOWN";
-					break;
-				}
-			}
-
-			// Add the filter name and dictionary size, which
-			// is always known.
-			my_snprintf(&pos, &left, "lzma%c=dict=%s",
-					filters[i].id == LZMA_FILTER_LZMA2
-						? '2' : '1',
-					uint32_to_optstr(opt->dict_size));
-
-			// With LZMA1 also lc/lp/pb are known when
-			// decompressing, but this function is never
-			// used to print information about .lzma headers.
-			assert(filters[i].id == LZMA_FILTER_LZMA2
-					|| all_known);
-
-			// Print the rest of the options, which are known
-			// only when compressing.
-			if (all_known)
-				my_snprintf(&pos, &left,
-					",lc=%" PRIu32 ",lp=%" PRIu32
-					",pb=%" PRIu32
-					",mode=%s,nice=%" PRIu32 ",mf=%s"
-					",depth=%" PRIu32,
-					opt->lc, opt->lp, opt->pb,
-					mode, opt->nice_len, mf, opt->depth);
-			break;
-		}
-
-		case LZMA_FILTER_X86:
-		case LZMA_FILTER_POWERPC:
-		case LZMA_FILTER_IA64:
-		case LZMA_FILTER_ARM:
-		case LZMA_FILTER_ARMTHUMB:
-		case LZMA_FILTER_SPARC: {
-			static const char bcj_names[][9] = {
-				"x86",
-				"powerpc",
-				"ia64",
-				"arm",
-				"armthumb",
-				"sparc",
-			};
-
-			const lzma_options_bcj *opt = filters[i].options;
-			my_snprintf(&pos, &left, "%s", bcj_names[filters[i].id
-					- LZMA_FILTER_X86]);
-
-			// Show the start offset only when really needed.
-			if (opt != NULL && opt->start_offset != 0)
-				my_snprintf(&pos, &left, "=start=%" PRIu32,
-						opt->start_offset);
-
-			break;
-		}
-
-		case LZMA_FILTER_DELTA: {
-			const lzma_options_delta *opt = filters[i].options;
-			my_snprintf(&pos, &left, "delta=dist=%" PRIu32,
-					opt->dist);
-			break;
-		}
-
-		default:
-			// This should be possible only if liblzma is
-			// newer than the xz tool.
-			my_snprintf(&pos, &left, "UNKNOWN");
-			break;
-		}
-	}
-
-	return;
-}
-
-
-extern void
-message_filters_show(enum message_verbosity v, const lzma_filter *filters)
-{
-	if (v > verbosity)
-		return;
-
-	char buf[FILTERS_STR_SIZE];
-	message_filters_to_str(buf, filters, true);
-	fprintf(stderr, _("%s: Filter chain: %s\n"), progname, buf);
-	return;
-}
-
-
-extern void
-message_try_help(void)
-{
-	// Print this with V_WARNING instead of V_ERROR to prevent it from
-	// showing up when --quiet has been specified.
-	message(V_WARNING, _("Try `%s --help' for more information."),
-			progname);
-	return;
-}
-
-
-extern void
-message_version(void)
-{
-	// It is possible that liblzma version is different than the command
-	// line tool version, so print both.
-	if (opt_robot) {
-		printf("XZ_VERSION=%" PRIu32 "\nLIBLZMA_VERSION=%" PRIu32 "\n",
-				LZMA_VERSION, lzma_version_number());
-	} else {
-		printf("xz (" PACKAGE_NAME ") " LZMA_VERSION_STRING "\n");
-		printf("liblzma %s\n", lzma_version_string());
-	}
-
-	tuklib_exit(E_SUCCESS, E_ERROR, verbosity != V_SILENT);
-}
-
-
-extern void
-message_help(bool long_help)
-{
-	printf(_("Usage: %s [OPTION]... [FILE]...\n"
-			"Compress or decompress FILEs in the .xz format.\n\n"),
-			progname);
-
-	// NOTE: The short help doesn't currently have options that
-	// take arguments.
-	if (long_help)
-		puts(_("Mandatory arguments to long options are mandatory "
-				"for short options too.\n"));
-
-	if (long_help)
-		puts(_(" Operation mode:\n"));
-
-	puts(_(
-"  -z, --compress      force compression\n"
-"  -d, --decompress    force decompression\n"
-"  -t, --test          test compressed file integrity\n"
-"  -l, --list          list information about .xz files"));
-
-	if (long_help)
-		puts(_("\n Operation modifiers:\n"));
-
-	puts(_(
-"  -k, --keep          keep (don't delete) input files\n"
-"  -f, --force         force overwrite of output file and (de)compress links\n"
-"  -c, --stdout        write to standard output and don't delete input files"));
-
-	if (long_help)
-		puts(_(
-"      --no-sparse     do not create sparse files when decompressing\n"
-"  -S, --suffix=.SUF   use the suffix `.SUF' on compressed files\n"
-"      --files[=FILE]  read filenames to process from FILE; if FILE is\n"
-"                      omitted, filenames are read from the standard input;\n"
-"                      filenames must be terminated with the newline character\n"
-"      --files0[=FILE] like --files but use the null character as terminator"));
-
-	if (long_help) {
-		puts(_("\n Basic file format and compression options:\n"));
-		puts(_(
-"  -F, --format=FMT    file format to encode or decode; possible values are\n"
-"                      `auto' (default), `xz', `lzma', and `raw'\n"
-"  -C, --check=CHECK   integrity check type: `none' (use with caution),\n"
-"                      `crc32', `crc64' (default), or `sha256'"));
-	}
-
-	puts(_(
-"  -0 ... -9           compression preset; default is 6; take compressor *and*\n"
-"                      decompressor memory usage into account before using 7-9!"));
-
-	puts(_(
-"  -e, --extreme       try to improve compression ratio by using more CPU time;\n"
-"                      does not affect decompressor memory requirements"));
-
-	if (long_help) {
-		puts(_( // xgettext:no-c-format
-"      --memlimit-compress=LIMIT\n"
-"      --memlimit-decompress=LIMIT\n"
-"  -M, --memlimit=LIMIT\n"
-"                      set memory usage limit for compression, decompression,\n"
-"                      or both; LIMIT is in bytes, % of RAM, or 0 for defaults"));
-
-		puts(_(
-"      --no-adjust     if compression settings exceed the memory usage limit,\n"
-"                      give an error instead of adjusting the settings downwards"));
-	}
-
-	if (long_help) {
-		puts(_(
-"\n Custom filter chain for compression (alternative for using presets):"));
-
-#if defined(HAVE_ENCODER_LZMA1) || defined(HAVE_DECODER_LZMA1) \
-		|| defined(HAVE_ENCODER_LZMA2) || defined(HAVE_DECODER_LZMA2)
-		// TRANSLATORS: The word "literal" in "literal context bits"
-		// means how many "context bits" to use when encoding
-		// literals. A literal is a single 8-bit byte. It doesn't
-		// mean "literally" here.
-		puts(_(
-"\n"
-"  --lzma1[=OPTS]      LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
-"  --lzma2[=OPTS]      more of the following options (valid values; default):\n"
-"                        preset=PRE reset options to a preset (0-9[e])\n"
-"                        dict=NUM   dictionary size (4KiB - 1536MiB; 8MiB)\n"
-"                        lc=NUM     number of literal context bits (0-4; 3)\n"
-"                        lp=NUM     number of literal position bits (0-4; 0)\n"
-"                        pb=NUM     number of position bits (0-4; 2)\n"
-"                        mode=MODE  compression mode (fast, normal; normal)\n"
-"                        nice=NUM   nice length of a match (2-273; 64)\n"
-"                        mf=NAME    match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
-"                        depth=NUM  maximum search depth; 0=automatic (default)"));
-#endif
-
-		puts(_(
-"\n"
-"  --x86[=OPTS]        x86 BCJ filter (32-bit and 64-bit)\n"
-"  --powerpc[=OPTS]    PowerPC BCJ filter (big endian only)\n"
-"  --ia64[=OPTS]       IA-64 (Itanium) BCJ filter\n"
-"  --arm[=OPTS]        ARM BCJ filter (little endian only)\n"
-"  --armthumb[=OPTS]   ARM-Thumb BCJ filter (little endian only)\n"
-"  --sparc[=OPTS]      SPARC BCJ filter\n"
-"                      Valid OPTS for all BCJ filters:\n"
-"                        start=NUM  start offset for conversions (default=0)"));
-
-#if defined(HAVE_ENCODER_DELTA) || defined(HAVE_DECODER_DELTA)
-		puts(_(
-"\n"
-"  --delta[=OPTS]      Delta filter; valid OPTS (valid values; default):\n"
-"                        dist=NUM   distance between bytes being subtracted\n"
-"                                   from each other (1-256; 1)"));
-#endif
-	}
-
-	if (long_help)
-		puts(_("\n Other options:\n"));
-
-	puts(_(
-"  -q, --quiet         suppress warnings; specify twice to suppress errors too\n"
-"  -v, --verbose       be verbose; specify twice for even more verbose"));
-
-	if (long_help) {
-		puts(_(
-"  -Q, --no-warn       make warnings not affect the exit status"));
-		puts(_(
-"      --robot         use machine-parsable messages (useful for scripts)"));
-		puts("");
-		puts(_(
-"      --info-memory   display the total amount of RAM and the currently active\n"
-"                      memory usage limits, and exit"));
-		puts(_(
-"  -h, --help          display the short help (lists only the basic options)\n"
-"  -H, --long-help     display this long help and exit"));
-	} else {
-		puts(_(
-"  -h, --help          display this short help and exit\n"
-"  -H, --long-help     display the long help (lists also the advanced options)"));
-	}
-
-	puts(_(
-"  -V, --version       display the version number and exit"));
-
-	puts(_("\nWith no FILE, or when FILE is -, read standard input.\n"));
-
-	// TRANSLATORS: This message indicates the bug reporting address
-	// for this package. Please add _another line_ saying
-	// "Report translation bugs to <...>\n" with the email or WWW
-	// address for translation bugs. Thanks.
-	printf(_("Report bugs to <%s> (in English or Finnish).\n"),
-			PACKAGE_BUGREPORT);
-	printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
-
-	tuklib_exit(E_SUCCESS, E_ERROR, verbosity != V_SILENT);
-}

Copied: vendor/xz/5.2.3/src/xz/message.c (from rev 9176, vendor/xz/dist/src/xz/message.c)
===================================================================
--- vendor/xz/5.2.3/src/xz/message.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/message.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,1258 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       message.c
+/// \brief      Printing messages
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+#include <stdarg.h>
+
+
+/// Number of the current file
+static unsigned int files_pos = 0;
+
+/// Total number of input files; zero if unknown.
+static unsigned int files_total;
+
+/// Verbosity level
+static enum message_verbosity verbosity = V_WARNING;
+
+/// Filename which we will print with the verbose messages
+static const char *filename;
+
+/// True once the a filename has been printed to stderr as part of progress
+/// message. If automatic progress updating isn't enabled, this becomes true
+/// after the first progress message has been printed due to user sending
+/// SIGINFO, SIGUSR1, or SIGALRM. Once this variable is true, we will print
+/// an empty line before the next filename to make the output more readable.
+static bool first_filename_printed = false;
+
+/// This is set to true when we have printed the current filename to stderr
+/// as part of a progress message. This variable is useful only if not
+/// updating progress automatically: if user sends many SIGINFO, SIGUSR1, or
+/// SIGALRM signals, we won't print the name of the same file multiple times.
+static bool current_filename_printed = false;
+
+/// True if we should print progress indicator and update it automatically
+/// if also verbose >= V_VERBOSE.
+static bool progress_automatic;
+
+/// True if message_progress_start() has been called but
+/// message_progress_end() hasn't been called yet.
+static bool progress_started = false;
+
+/// This is true when a progress message was printed and the cursor is still
+/// on the same line with the progress message. In that case, a newline has
+/// to be printed before any error messages.
+static bool progress_active = false;
+
+/// Pointer to lzma_stream used to do the encoding or decoding.
+static lzma_stream *progress_strm;
+
+/// Expected size of the input stream is needed to show completion percentage
+/// and estimate remaining time.
+static uint64_t expected_in_size;
+
+
+// Use alarm() and SIGALRM when they are supported. This has two minor
+// advantages over the alternative of polling gettimeofday():
+//  - It is possible for the user to send SIGINFO, SIGUSR1, or SIGALRM to
+//    get intermediate progress information even when --verbose wasn't used
+//    or stderr is not a terminal.
+//  - alarm() + SIGALRM seems to have slightly less overhead than polling
+//    gettimeofday().
+#ifdef SIGALRM
+
+const int message_progress_sigs[] = {
+	SIGALRM,
+#ifdef SIGINFO
+	SIGINFO,
+#endif
+#ifdef SIGUSR1
+	SIGUSR1,
+#endif
+	0
+};
+
+/// The signal handler for SIGALRM sets this to true. It is set back to false
+/// once the progress message has been updated.
+static volatile sig_atomic_t progress_needs_updating = false;
+
+/// Signal handler for SIGALRM
+static void
+progress_signal_handler(int sig lzma_attribute((__unused__)))
+{
+	progress_needs_updating = true;
+	return;
+}
+
+#else
+
+/// This is true when progress message printing is wanted. Using the same
+/// variable name as above to avoid some ifdefs.
+static bool progress_needs_updating = false;
+
+/// Elapsed time when the next progress message update should be done.
+static uint64_t progress_next_update;
+
+#endif
+
+
+extern void
+message_init(void)
+{
+	// If --verbose is used, we use a progress indicator if and only
+	// if stderr is a terminal. If stderr is not a terminal, we print
+	// verbose information only after finishing the file. As a special
+	// exception, even if --verbose was not used, user can send SIGALRM
+	// to make us print progress information once without automatic
+	// updating.
+	progress_automatic = isatty(STDERR_FILENO);
+
+	// Commented out because COLUMNS is rarely exported to environment.
+	// Most users have at least 80 columns anyway, let's think something
+	// fancy here if enough people complain.
+/*
+	if (progress_automatic) {
+		// stderr is a terminal. Check the COLUMNS environment
+		// variable to see if the terminal is wide enough. If COLUMNS
+		// doesn't exist or it has some unparsable value, we assume
+		// that the terminal is wide enough.
+		const char *columns_str = getenv("COLUMNS");
+		if (columns_str != NULL) {
+			char *endptr;
+			const long columns = strtol(columns_str, &endptr, 10);
+			if (*endptr != '\0' || columns < 80)
+				progress_automatic = false;
+		}
+	}
+*/
+
+#ifdef SIGALRM
+	// Establish the signal handlers which set a flag to tell us that
+	// progress info should be updated.
+	struct sigaction sa;
+	sigemptyset(&sa.sa_mask);
+	sa.sa_flags = 0;
+	sa.sa_handler = &progress_signal_handler;
+
+	for (size_t i = 0; message_progress_sigs[i] != 0; ++i)
+		if (sigaction(message_progress_sigs[i], &sa, NULL))
+			message_signal_handler();
+#endif
+
+	return;
+}
+
+
+extern void
+message_verbosity_increase(void)
+{
+	if (verbosity < V_DEBUG)
+		++verbosity;
+
+	return;
+}
+
+
+extern void
+message_verbosity_decrease(void)
+{
+	if (verbosity > V_SILENT)
+		--verbosity;
+
+	return;
+}
+
+
+extern enum message_verbosity
+message_verbosity_get(void)
+{
+	return verbosity;
+}
+
+
+extern void
+message_set_files(unsigned int files)
+{
+	files_total = files;
+	return;
+}
+
+
+/// Prints the name of the current file if it hasn't been printed already,
+/// except if we are processing exactly one stream from stdin to stdout.
+/// I think it looks nicer to not print "(stdin)" when --verbose is used
+/// in a pipe and no other files are processed.
+static void
+print_filename(void)
+{
+	if (!opt_robot && (files_total != 1 || filename != stdin_filename)) {
+		signals_block();
+
+		FILE *file = opt_mode == MODE_LIST ? stdout : stderr;
+
+		// If a file was already processed, put an empty line
+		// before the next filename to improve readability.
+		if (first_filename_printed)
+			fputc('\n', file);
+
+		first_filename_printed = true;
+		current_filename_printed = true;
+
+		// If we don't know how many files there will be due
+		// to usage of --files or --files0.
+		if (files_total == 0)
+			fprintf(file, "%s (%u)\n", filename,
+					files_pos);
+		else
+			fprintf(file, "%s (%u/%u)\n", filename,
+					files_pos, files_total);
+
+		signals_unblock();
+	}
+
+	return;
+}
+
+
+extern void
+message_filename(const char *src_name)
+{
+	// Start numbering the files starting from one.
+	++files_pos;
+	filename = src_name;
+
+	if (verbosity >= V_VERBOSE
+			&& (progress_automatic || opt_mode == MODE_LIST))
+		print_filename();
+	else
+		current_filename_printed = false;
+
+	return;
+}
+
+
+extern void
+message_progress_start(lzma_stream *strm, uint64_t in_size)
+{
+	// Store the pointer to the lzma_stream used to do the coding.
+	// It is needed to find out the position in the stream.
+	progress_strm = strm;
+
+	// Store the expected size of the file. If we aren't printing any
+	// statistics, then is will be unused. But since it is possible
+	// that the user sends us a signal to show statistics, we need
+	// to have it available anyway.
+	expected_in_size = in_size;
+
+	// Indicate that progress info may need to be printed before
+	// printing error messages.
+	progress_started = true;
+
+	// If progress indicator is wanted, print the filename and possibly
+	// the file count now.
+	if (verbosity >= V_VERBOSE && progress_automatic) {
+		// Start the timer to display the first progress message
+		// after one second. An alternative would be to show the
+		// first message almost immediately, but delaying by one
+		// second looks better to me, since extremely early
+		// progress info is pretty much useless.
+#ifdef SIGALRM
+		// First disable a possibly existing alarm.
+		alarm(0);
+		progress_needs_updating = false;
+		alarm(1);
+#else
+		progress_needs_updating = true;
+		progress_next_update = 1000;
+#endif
+	}
+
+	return;
+}
+
+
+/// Make the string indicating completion percentage.
+static const char *
+progress_percentage(uint64_t in_pos)
+{
+	// If the size of the input file is unknown or the size told us is
+	// clearly wrong since we have processed more data than the alleged
+	// size of the file, show a static string indicating that we have
+	// no idea of the completion percentage.
+	if (expected_in_size == 0 || in_pos > expected_in_size)
+		return "--- %";
+
+	// Never show 100.0 % before we actually are finished.
+	double percentage = (double)(in_pos) / (double)(expected_in_size)
+			* 99.9;
+
+	// Use big enough buffer to hold e.g. a multibyte decimal point.
+	static char buf[16];
+	snprintf(buf, sizeof(buf), "%.1f %%", percentage);
+
+	return buf;
+}
+
+
+/// Make the string containing the amount of input processed, amount of
+/// output produced, and the compression ratio.
+static const char *
+progress_sizes(uint64_t compressed_pos, uint64_t uncompressed_pos, bool final)
+{
+	// Use big enough buffer to hold e.g. a multibyte thousand separators.
+	static char buf[128];
+	char *pos = buf;
+	size_t left = sizeof(buf);
+
+	// Print the sizes. If this the final message, use more reasonable
+	// units than MiB if the file was small.
+	const enum nicestr_unit unit_min = final ? NICESTR_B : NICESTR_MIB;
+	my_snprintf(&pos, &left, "%s / %s",
+			uint64_to_nicestr(compressed_pos,
+				unit_min, NICESTR_TIB, false, 0),
+			uint64_to_nicestr(uncompressed_pos,
+				unit_min, NICESTR_TIB, false, 1));
+
+	// Avoid division by zero. If we cannot calculate the ratio, set
+	// it to some nice number greater than 10.0 so that it gets caught
+	// in the next if-clause.
+	const double ratio = uncompressed_pos > 0
+			? (double)(compressed_pos) / (double)(uncompressed_pos)
+			: 16.0;
+
+	// If the ratio is very bad, just indicate that it is greater than
+	// 9.999. This way the length of the ratio field stays fixed.
+	if (ratio > 9.999)
+		snprintf(pos, left, " > %.3f", 9.999);
+	else
+		snprintf(pos, left, " = %.3f", ratio);
+
+	return buf;
+}
+
+
+/// Make the string containing the processing speed of uncompressed data.
+static const char *
+progress_speed(uint64_t uncompressed_pos, uint64_t elapsed)
+{
+	// Don't print the speed immediately, since the early values look
+	// somewhat random.
+	if (elapsed < 3000)
+		return "";
+
+	static const char unit[][8] = {
+		"KiB/s",
+		"MiB/s",
+		"GiB/s",
+	};
+
+	size_t unit_index = 0;
+
+	// Calculate the speed as KiB/s.
+	double speed = (double)(uncompressed_pos)
+			/ ((double)(elapsed) * (1024.0 / 1000.0));
+
+	// Adjust the unit of the speed if needed.
+	while (speed > 999.0) {
+		speed /= 1024.0;
+		if (++unit_index == ARRAY_SIZE(unit))
+			return ""; // Way too fast ;-)
+	}
+
+	// Use decimal point only if the number is small. Examples:
+	//  - 0.1 KiB/s
+	//  - 9.9 KiB/s
+	//  - 99 KiB/s
+	//  - 999 KiB/s
+	// Use big enough buffer to hold e.g. a multibyte decimal point.
+	static char buf[16];
+	snprintf(buf, sizeof(buf), "%.*f %s",
+			speed > 9.9 ? 0 : 1, speed, unit[unit_index]);
+	return buf;
+}
+
+
+/// Make a string indicating elapsed time. The format is either
+/// M:SS or H:MM:SS depending on if the time is an hour or more.
+static const char *
+progress_time(uint64_t mseconds)
+{
+	// 9999 hours = 416 days
+	static char buf[sizeof("9999:59:59")];
+
+	// 32-bit variable is enough for elapsed time (136 years).
+	uint32_t seconds = (uint32_t)(mseconds / 1000);
+
+	// Don't show anything if the time is zero or ridiculously big.
+	if (seconds == 0 || seconds > ((9999 * 60) + 59) * 60 + 59)
+		return "";
+
+	uint32_t minutes = seconds / 60;
+	seconds %= 60;
+
+	if (minutes >= 60) {
+		const uint32_t hours = minutes / 60;
+		minutes %= 60;
+		snprintf(buf, sizeof(buf),
+				"%" PRIu32 ":%02" PRIu32 ":%02" PRIu32,
+				hours, minutes, seconds);
+	} else {
+		snprintf(buf, sizeof(buf), "%" PRIu32 ":%02" PRIu32,
+				minutes, seconds);
+	}
+
+	return buf;
+}
+
+
+/// Return a string containing estimated remaining time when
+/// reasonably possible.
+static const char *
+progress_remaining(uint64_t in_pos, uint64_t elapsed)
+{
+	// Don't show the estimated remaining time when it wouldn't
+	// make sense:
+	//  - Input size is unknown.
+	//  - Input has grown bigger since we started (de)compressing.
+	//  - We haven't processed much data yet, so estimate would be
+	//    too inaccurate.
+	//  - Only a few seconds has passed since we started (de)compressing,
+	//    so estimate would be too inaccurate.
+	if (expected_in_size == 0 || in_pos > expected_in_size
+			|| in_pos < (UINT64_C(1) << 19) || elapsed < 8000)
+		return "";
+
+	// Calculate the estimate. Don't give an estimate of zero seconds,
+	// since it is possible that all the input has been already passed
+	// to the library, but there is still quite a bit of output pending.
+	uint32_t remaining = (double)(expected_in_size - in_pos)
+			* ((double)(elapsed) / 1000.0) / (double)(in_pos);
+	if (remaining < 1)
+		remaining = 1;
+
+	static char buf[sizeof("9 h 55 min")];
+
+	// Select appropriate precision for the estimated remaining time.
+	if (remaining <= 10) {
+		// A maximum of 10 seconds remaining.
+		// Show the number of seconds as is.
+		snprintf(buf, sizeof(buf), "%" PRIu32 " s", remaining);
+
+	} else if (remaining <= 50) {
+		// A maximum of 50 seconds remaining.
+		// Round up to the next multiple of five seconds.
+		remaining = (remaining + 4) / 5 * 5;
+		snprintf(buf, sizeof(buf), "%" PRIu32 " s", remaining);
+
+	} else if (remaining <= 590) {
+		// A maximum of 9 minutes and 50 seconds remaining.
+		// Round up to the next multiple of ten seconds.
+		remaining = (remaining + 9) / 10 * 10;
+		snprintf(buf, sizeof(buf), "%" PRIu32 " min %" PRIu32 " s",
+				remaining / 60, remaining % 60);
+
+	} else if (remaining <= 59 * 60) {
+		// A maximum of 59 minutes remaining.
+		// Round up to the next multiple of a minute.
+		remaining = (remaining + 59) / 60;
+		snprintf(buf, sizeof(buf), "%" PRIu32 " min", remaining);
+
+	} else if (remaining <= 9 * 3600 + 50 * 60) {
+		// A maximum of 9 hours and 50 minutes left.
+		// Round up to the next multiple of ten minutes.
+		remaining = (remaining + 599) / 600 * 10;
+		snprintf(buf, sizeof(buf), "%" PRIu32 " h %" PRIu32 " min",
+				remaining / 60, remaining % 60);
+
+	} else if (remaining <= 23 * 3600) {
+		// A maximum of 23 hours remaining.
+		// Round up to the next multiple of an hour.
+		remaining = (remaining + 3599) / 3600;
+		snprintf(buf, sizeof(buf), "%" PRIu32 " h", remaining);
+
+	} else if (remaining <= 9 * 24 * 3600 + 23 * 3600) {
+		// A maximum of 9 days and 23 hours remaining.
+		// Round up to the next multiple of an hour.
+		remaining = (remaining + 3599) / 3600;
+		snprintf(buf, sizeof(buf), "%" PRIu32 " d %" PRIu32 " h",
+				remaining / 24, remaining % 24);
+
+	} else if (remaining <= 999 * 24 * 3600) {
+		// A maximum of 999 days remaining. ;-)
+		// Round up to the next multiple of a day.
+		remaining = (remaining + 24 * 3600 - 1) / (24 * 3600);
+		snprintf(buf, sizeof(buf), "%" PRIu32 " d", remaining);
+
+	} else {
+		// The estimated remaining time is too big. Don't show it.
+		return "";
+	}
+
+	return buf;
+}
+
+
+/// Get how much uncompressed and compressed data has been processed.
+static void
+progress_pos(uint64_t *in_pos,
+		uint64_t *compressed_pos, uint64_t *uncompressed_pos)
+{
+	uint64_t out_pos;
+	lzma_get_progress(progress_strm, in_pos, &out_pos);
+
+	// It cannot have processed more input than it has been given.
+	assert(*in_pos <= progress_strm->total_in);
+
+	// It cannot have produced more output than it claims to have ready.
+	assert(out_pos >= progress_strm->total_out);
+
+	if (opt_mode == MODE_COMPRESS) {
+		*compressed_pos = out_pos;
+		*uncompressed_pos = *in_pos;
+	} else {
+		*compressed_pos = *in_pos;
+		*uncompressed_pos = out_pos;
+	}
+
+	return;
+}
+
+
+extern void
+message_progress_update(void)
+{
+	if (!progress_needs_updating)
+		return;
+
+	// Calculate how long we have been processing this file.
+	const uint64_t elapsed = mytime_get_elapsed();
+
+#ifndef SIGALRM
+	if (progress_next_update > elapsed)
+		return;
+
+	progress_next_update = elapsed + 1000;
+#endif
+
+	// Get our current position in the stream.
+	uint64_t in_pos;
+	uint64_t compressed_pos;
+	uint64_t uncompressed_pos;
+	progress_pos(&in_pos, &compressed_pos, &uncompressed_pos);
+
+	// Block signals so that fprintf() doesn't get interrupted.
+	signals_block();
+
+	// Print the filename if it hasn't been printed yet.
+	if (!current_filename_printed)
+		print_filename();
+
+	// Print the actual progress message. The idea is that there is at
+	// least three spaces between the fields in typical situations, but
+	// even in rare situations there is at least one space.
+	const char *cols[5] = {
+		progress_percentage(in_pos),
+		progress_sizes(compressed_pos, uncompressed_pos, false),
+		progress_speed(uncompressed_pos, elapsed),
+		progress_time(elapsed),
+		progress_remaining(in_pos, elapsed),
+	};
+	fprintf(stderr, "\r %*s %*s   %*s %10s   %10s\r",
+			tuklib_mbstr_fw(cols[0], 6), cols[0],
+			tuklib_mbstr_fw(cols[1], 35), cols[1],
+			tuklib_mbstr_fw(cols[2], 9), cols[2],
+			cols[3],
+			cols[4]);
+
+#ifdef SIGALRM
+	// Updating the progress info was finished. Reset
+	// progress_needs_updating to wait for the next SIGALRM.
+	//
+	// NOTE: This has to be done before alarm(1) or with (very) bad
+	// luck we could be setting this to false after the alarm has already
+	// been triggered.
+	progress_needs_updating = false;
+
+	if (verbosity >= V_VERBOSE && progress_automatic) {
+		// Mark that the progress indicator is active, so if an error
+		// occurs, the error message gets printed cleanly.
+		progress_active = true;
+
+		// Restart the timer so that progress_needs_updating gets
+		// set to true after about one second.
+		alarm(1);
+	} else {
+		// The progress message was printed because user had sent us
+		// SIGALRM. In this case, each progress message is printed
+		// on its own line.
+		fputc('\n', stderr);
+	}
+#else
+	// When SIGALRM isn't supported and we get here, it's always due to
+	// automatic progress update. We set progress_active here too like
+	// described above.
+	assert(verbosity >= V_VERBOSE);
+	assert(progress_automatic);
+	progress_active = true;
+#endif
+
+	signals_unblock();
+
+	return;
+}
+
+
+static void
+progress_flush(bool finished)
+{
+	if (!progress_started || verbosity < V_VERBOSE)
+		return;
+
+	uint64_t in_pos;
+	uint64_t compressed_pos;
+	uint64_t uncompressed_pos;
+	progress_pos(&in_pos, &compressed_pos, &uncompressed_pos);
+
+	// Avoid printing intermediate progress info if some error occurs
+	// in the beginning of the stream. (If something goes wrong later in
+	// the stream, it is sometimes useful to tell the user where the
+	// error approximately occurred, especially if the error occurs
+	// after a time-consuming operation.)
+	if (!finished && !progress_active
+			&& (compressed_pos == 0 || uncompressed_pos == 0))
+		return;
+
+	progress_active = false;
+
+	const uint64_t elapsed = mytime_get_elapsed();
+
+	signals_block();
+
+	// When using the auto-updating progress indicator, the final
+	// statistics are printed in the same format as the progress
+	// indicator itself.
+	if (progress_automatic) {
+		const char *cols[5] = {
+			finished ? "100 %" : progress_percentage(in_pos),
+			progress_sizes(compressed_pos, uncompressed_pos, true),
+			progress_speed(uncompressed_pos, elapsed),
+			progress_time(elapsed),
+			finished ? "" : progress_remaining(in_pos, elapsed),
+		};
+		fprintf(stderr, "\r %*s %*s   %*s %10s   %10s\n",
+				tuklib_mbstr_fw(cols[0], 6), cols[0],
+				tuklib_mbstr_fw(cols[1], 35), cols[1],
+				tuklib_mbstr_fw(cols[2], 9), cols[2],
+				cols[3],
+				cols[4]);
+	} else {
+		// The filename is always printed.
+		fprintf(stderr, "%s: ", filename);
+
+		// Percentage is printed only if we didn't finish yet.
+		if (!finished) {
+			// Don't print the percentage when it isn't known
+			// (starts with a dash).
+			const char *percentage = progress_percentage(in_pos);
+			if (percentage[0] != '-')
+				fprintf(stderr, "%s, ", percentage);
+		}
+
+		// Size information is always printed.
+		fprintf(stderr, "%s", progress_sizes(
+				compressed_pos, uncompressed_pos, true));
+
+		// The speed and elapsed time aren't always shown.
+		const char *speed = progress_speed(uncompressed_pos, elapsed);
+		if (speed[0] != '\0')
+			fprintf(stderr, ", %s", speed);
+
+		const char *elapsed_str = progress_time(elapsed);
+		if (elapsed_str[0] != '\0')
+			fprintf(stderr, ", %s", elapsed_str);
+
+		fputc('\n', stderr);
+	}
+
+	signals_unblock();
+
+	return;
+}
+
+
+extern void
+message_progress_end(bool success)
+{
+	assert(progress_started);
+	progress_flush(success);
+	progress_started = false;
+	return;
+}
+
+
+static void
+vmessage(enum message_verbosity v, const char *fmt, va_list ap)
+{
+	if (v <= verbosity) {
+		signals_block();
+
+		progress_flush(false);
+
+		// TRANSLATORS: This is the program name in the beginning
+		// of the line in messages. Usually it becomes "xz: ".
+		// This is a translatable string because French needs
+		// a space before a colon.
+		fprintf(stderr, _("%s: "), progname);
+		vfprintf(stderr, fmt, ap);
+		fputc('\n', stderr);
+
+		signals_unblock();
+	}
+
+	return;
+}
+
+
+extern void
+message(enum message_verbosity v, const char *fmt, ...)
+{
+	va_list ap;
+	va_start(ap, fmt);
+	vmessage(v, fmt, ap);
+	va_end(ap);
+	return;
+}
+
+
+extern void
+message_warning(const char *fmt, ...)
+{
+	va_list ap;
+	va_start(ap, fmt);
+	vmessage(V_WARNING, fmt, ap);
+	va_end(ap);
+
+	set_exit_status(E_WARNING);
+	return;
+}
+
+
+extern void
+message_error(const char *fmt, ...)
+{
+	va_list ap;
+	va_start(ap, fmt);
+	vmessage(V_ERROR, fmt, ap);
+	va_end(ap);
+
+	set_exit_status(E_ERROR);
+	return;
+}
+
+
+extern void
+message_fatal(const char *fmt, ...)
+{
+	va_list ap;
+	va_start(ap, fmt);
+	vmessage(V_ERROR, fmt, ap);
+	va_end(ap);
+
+	tuklib_exit(E_ERROR, E_ERROR, false);
+}
+
+
+extern void
+message_bug(void)
+{
+	message_fatal(_("Internal error (bug)"));
+}
+
+
+extern void
+message_signal_handler(void)
+{
+	message_fatal(_("Cannot establish signal handlers"));
+}
+
+
+extern const char *
+message_strm(lzma_ret code)
+{
+	switch (code) {
+	case LZMA_NO_CHECK:
+		return _("No integrity check; not verifying file integrity");
+
+	case LZMA_UNSUPPORTED_CHECK:
+		return _("Unsupported type of integrity check; "
+				"not verifying file integrity");
+
+	case LZMA_MEM_ERROR:
+		return strerror(ENOMEM);
+
+	case LZMA_MEMLIMIT_ERROR:
+		return _("Memory usage limit reached");
+
+	case LZMA_FORMAT_ERROR:
+		return _("File format not recognized");
+
+	case LZMA_OPTIONS_ERROR:
+		return _("Unsupported options");
+
+	case LZMA_DATA_ERROR:
+		return _("Compressed data is corrupt");
+
+	case LZMA_BUF_ERROR:
+		return _("Unexpected end of input");
+
+	case LZMA_OK:
+	case LZMA_STREAM_END:
+	case LZMA_GET_CHECK:
+	case LZMA_PROG_ERROR:
+		// Without "default", compiler will warn if new constants
+		// are added to lzma_ret, it is not too easy to forget to
+		// add the new constants to this function.
+		break;
+	}
+
+	return _("Internal error (bug)");
+}
+
+
+extern void
+message_mem_needed(enum message_verbosity v, uint64_t memusage)
+{
+	if (v > verbosity)
+		return;
+
+	// Convert memusage to MiB, rounding up to the next full MiB.
+	// This way the user can always use the displayed usage as
+	// the new memory usage limit. (If we rounded to the nearest,
+	// the user might need to +1 MiB to get high enough limit.)
+	memusage = round_up_to_mib(memusage);
+
+	uint64_t memlimit = hardware_memlimit_get(opt_mode);
+
+	// Handle the case when there is no memory usage limit.
+	// This way we don't print a weird message with a huge number.
+	if (memlimit == UINT64_MAX) {
+		message(v, _("%s MiB of memory is required. "
+				"The limiter is disabled."),
+				uint64_to_str(memusage, 0));
+		return;
+	}
+
+	// With US-ASCII:
+	// 2^64 with thousand separators + " MiB" suffix + '\0' = 26 + 4 + 1
+	// But there may be multibyte chars so reserve enough space.
+	char memlimitstr[128];
+
+	// Show the memory usage limit as MiB unless it is less than 1 MiB.
+	// This way it's easy to notice errors where one has typed
+	// --memory=123 instead of --memory=123MiB.
+	if (memlimit < (UINT32_C(1) << 20)) {
+		snprintf(memlimitstr, sizeof(memlimitstr), "%s B",
+				uint64_to_str(memlimit, 1));
+	} else {
+		// Round up just like with memusage. If this function is
+		// called for informational purposes (to just show the
+		// current usage and limit), we should never show that
+		// the usage is higher than the limit, which would give
+		// a false impression that the memory usage limit isn't
+		// properly enforced.
+		snprintf(memlimitstr, sizeof(memlimitstr), "%s MiB",
+				uint64_to_str(round_up_to_mib(memlimit), 1));
+	}
+
+	message(v, _("%s MiB of memory is required. The limit is %s."),
+			uint64_to_str(memusage, 0), memlimitstr);
+
+	return;
+}
+
+
+/// \brief      Convert uint32_t to a nice string for --lzma[12]=dict=SIZE
+///
+/// The idea is to use KiB or MiB suffix when possible.
+static const char *
+uint32_to_optstr(uint32_t num)
+{
+	static char buf[16];
+
+	if ((num & ((UINT32_C(1) << 20) - 1)) == 0)
+		snprintf(buf, sizeof(buf), "%" PRIu32 "MiB", num >> 20);
+	else if ((num & ((UINT32_C(1) << 10) - 1)) == 0)
+		snprintf(buf, sizeof(buf), "%" PRIu32 "KiB", num >> 10);
+	else
+		snprintf(buf, sizeof(buf), "%" PRIu32, num);
+
+	return buf;
+}
+
+
+extern void
+message_filters_to_str(char buf[FILTERS_STR_SIZE],
+		const lzma_filter *filters, bool all_known)
+{
+	char *pos = buf;
+	size_t left = FILTERS_STR_SIZE;
+
+	for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
+		// Add the dashes for the filter option. A space is
+		// needed after the first and later filters.
+		my_snprintf(&pos, &left, "%s", i == 0 ? "--" : " --");
+
+		switch (filters[i].id) {
+		case LZMA_FILTER_LZMA1:
+		case LZMA_FILTER_LZMA2: {
+			const lzma_options_lzma *opt = filters[i].options;
+			const char *mode = NULL;
+			const char *mf = NULL;
+
+			if (all_known) {
+				switch (opt->mode) {
+				case LZMA_MODE_FAST:
+					mode = "fast";
+					break;
+
+				case LZMA_MODE_NORMAL:
+					mode = "normal";
+					break;
+
+				default:
+					mode = "UNKNOWN";
+					break;
+				}
+
+				switch (opt->mf) {
+				case LZMA_MF_HC3:
+					mf = "hc3";
+					break;
+
+				case LZMA_MF_HC4:
+					mf = "hc4";
+					break;
+
+				case LZMA_MF_BT2:
+					mf = "bt2";
+					break;
+
+				case LZMA_MF_BT3:
+					mf = "bt3";
+					break;
+
+				case LZMA_MF_BT4:
+					mf = "bt4";
+					break;
+
+				default:
+					mf = "UNKNOWN";
+					break;
+				}
+			}
+
+			// Add the filter name and dictionary size, which
+			// is always known.
+			my_snprintf(&pos, &left, "lzma%c=dict=%s",
+					filters[i].id == LZMA_FILTER_LZMA2
+						? '2' : '1',
+					uint32_to_optstr(opt->dict_size));
+
+			// With LZMA1 also lc/lp/pb are known when
+			// decompressing, but this function is never
+			// used to print information about .lzma headers.
+			assert(filters[i].id == LZMA_FILTER_LZMA2
+					|| all_known);
+
+			// Print the rest of the options, which are known
+			// only when compressing.
+			if (all_known)
+				my_snprintf(&pos, &left,
+					",lc=%" PRIu32 ",lp=%" PRIu32
+					",pb=%" PRIu32
+					",mode=%s,nice=%" PRIu32 ",mf=%s"
+					",depth=%" PRIu32,
+					opt->lc, opt->lp, opt->pb,
+					mode, opt->nice_len, mf, opt->depth);
+			break;
+		}
+
+		case LZMA_FILTER_X86:
+		case LZMA_FILTER_POWERPC:
+		case LZMA_FILTER_IA64:
+		case LZMA_FILTER_ARM:
+		case LZMA_FILTER_ARMTHUMB:
+		case LZMA_FILTER_SPARC: {
+			static const char bcj_names[][9] = {
+				"x86",
+				"powerpc",
+				"ia64",
+				"arm",
+				"armthumb",
+				"sparc",
+			};
+
+			const lzma_options_bcj *opt = filters[i].options;
+			my_snprintf(&pos, &left, "%s", bcj_names[filters[i].id
+					- LZMA_FILTER_X86]);
+
+			// Show the start offset only when really needed.
+			if (opt != NULL && opt->start_offset != 0)
+				my_snprintf(&pos, &left, "=start=%" PRIu32,
+						opt->start_offset);
+
+			break;
+		}
+
+		case LZMA_FILTER_DELTA: {
+			const lzma_options_delta *opt = filters[i].options;
+			my_snprintf(&pos, &left, "delta=dist=%" PRIu32,
+					opt->dist);
+			break;
+		}
+
+		default:
+			// This should be possible only if liblzma is
+			// newer than the xz tool.
+			my_snprintf(&pos, &left, "UNKNOWN");
+			break;
+		}
+	}
+
+	return;
+}
+
+
+extern void
+message_filters_show(enum message_verbosity v, const lzma_filter *filters)
+{
+	if (v > verbosity)
+		return;
+
+	char buf[FILTERS_STR_SIZE];
+	message_filters_to_str(buf, filters, true);
+	fprintf(stderr, _("%s: Filter chain: %s\n"), progname, buf);
+	return;
+}
+
+
+extern void
+message_try_help(void)
+{
+	// Print this with V_WARNING instead of V_ERROR to prevent it from
+	// showing up when --quiet has been specified.
+	message(V_WARNING, _("Try `%s --help' for more information."),
+			progname);
+	return;
+}
+
+
+extern void
+message_version(void)
+{
+	// It is possible that liblzma version is different than the command
+	// line tool version, so print both.
+	if (opt_robot) {
+		printf("XZ_VERSION=%" PRIu32 "\nLIBLZMA_VERSION=%" PRIu32 "\n",
+				LZMA_VERSION, lzma_version_number());
+	} else {
+		printf("xz (" PACKAGE_NAME ") " LZMA_VERSION_STRING "\n");
+		printf("liblzma %s\n", lzma_version_string());
+	}
+
+	tuklib_exit(E_SUCCESS, E_ERROR, verbosity != V_SILENT);
+}
+
+
+extern void
+message_help(bool long_help)
+{
+	printf(_("Usage: %s [OPTION]... [FILE]...\n"
+			"Compress or decompress FILEs in the .xz format.\n\n"),
+			progname);
+
+	// NOTE: The short help doesn't currently have options that
+	// take arguments.
+	if (long_help)
+		puts(_("Mandatory arguments to long options are mandatory "
+				"for short options too.\n"));
+
+	if (long_help)
+		puts(_(" Operation mode:\n"));
+
+	puts(_(
+"  -z, --compress      force compression\n"
+"  -d, --decompress    force decompression\n"
+"  -t, --test          test compressed file integrity\n"
+"  -l, --list          list information about .xz files"));
+
+	if (long_help)
+		puts(_("\n Operation modifiers:\n"));
+
+	puts(_(
+"  -k, --keep          keep (don't delete) input files\n"
+"  -f, --force         force overwrite of output file and (de)compress links\n"
+"  -c, --stdout        write to standard output and don't delete input files"));
+
+	if (long_help) {
+		puts(_(
+"      --single-stream decompress only the first stream, and silently\n"
+"                      ignore possible remaining input data"));
+		puts(_(
+"      --no-sparse     do not create sparse files when decompressing\n"
+"  -S, --suffix=.SUF   use the suffix `.SUF' on compressed files\n"
+"      --files[=FILE]  read filenames to process from FILE; if FILE is\n"
+"                      omitted, filenames are read from the standard input;\n"
+"                      filenames must be terminated with the newline character\n"
+"      --files0[=FILE] like --files but use the null character as terminator"));
+	}
+
+	if (long_help) {
+		puts(_("\n Basic file format and compression options:\n"));
+		puts(_(
+"  -F, --format=FMT    file format to encode or decode; possible values are\n"
+"                      `auto' (default), `xz', `lzma', and `raw'\n"
+"  -C, --check=CHECK   integrity check type: `none' (use with caution),\n"
+"                      `crc32', `crc64' (default), or `sha256'"));
+		puts(_(
+"      --ignore-check  don't verify the integrity check when decompressing"));
+	}
+
+	puts(_(
+"  -0 ... -9           compression preset; default is 6; take compressor *and*\n"
+"                      decompressor memory usage into account before using 7-9!"));
+
+	puts(_(
+"  -e, --extreme       try to improve compression ratio by using more CPU time;\n"
+"                      does not affect decompressor memory requirements"));
+
+	puts(_(
+"  -T, --threads=NUM   use at most NUM threads; the default is 1; set to 0\n"
+"                      to use as many threads as there are processor cores"));
+
+	if (long_help) {
+		puts(_(
+"      --block-size=SIZE\n"
+"                      start a new .xz block after every SIZE bytes of input;\n"
+"                      use this to set the block size for threaded compression"));
+		puts(_(
+"      --block-list=SIZES\n"
+"                      start a new .xz block after the given comma-separated\n"
+"                      intervals of uncompressed data"));
+		puts(_(
+"      --flush-timeout=TIMEOUT\n"
+"                      when compressing, if more than TIMEOUT milliseconds has\n"
+"                      passed since the previous flush and reading more input\n"
+"                      would block, all pending data is flushed out"
+		));
+		puts(_( // xgettext:no-c-format
+"      --memlimit-compress=LIMIT\n"
+"      --memlimit-decompress=LIMIT\n"
+"  -M, --memlimit=LIMIT\n"
+"                      set memory usage limit for compression, decompression,\n"
+"                      or both; LIMIT is in bytes, % of RAM, or 0 for defaults"));
+
+		puts(_(
+"      --no-adjust     if compression settings exceed the memory usage limit,\n"
+"                      give an error instead of adjusting the settings downwards"));
+	}
+
+	if (long_help) {
+		puts(_(
+"\n Custom filter chain for compression (alternative for using presets):"));
+
+#if defined(HAVE_ENCODER_LZMA1) || defined(HAVE_DECODER_LZMA1) \
+		|| defined(HAVE_ENCODER_LZMA2) || defined(HAVE_DECODER_LZMA2)
+		// TRANSLATORS: The word "literal" in "literal context bits"
+		// means how many "context bits" to use when encoding
+		// literals. A literal is a single 8-bit byte. It doesn't
+		// mean "literally" here.
+		puts(_(
+"\n"
+"  --lzma1[=OPTS]      LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
+"  --lzma2[=OPTS]      more of the following options (valid values; default):\n"
+"                        preset=PRE reset options to a preset (0-9[e])\n"
+"                        dict=NUM   dictionary size (4KiB - 1536MiB; 8MiB)\n"
+"                        lc=NUM     number of literal context bits (0-4; 3)\n"
+"                        lp=NUM     number of literal position bits (0-4; 0)\n"
+"                        pb=NUM     number of position bits (0-4; 2)\n"
+"                        mode=MODE  compression mode (fast, normal; normal)\n"
+"                        nice=NUM   nice length of a match (2-273; 64)\n"
+"                        mf=NAME    match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
+"                        depth=NUM  maximum search depth; 0=automatic (default)"));
+#endif
+
+		puts(_(
+"\n"
+"  --x86[=OPTS]        x86 BCJ filter (32-bit and 64-bit)\n"
+"  --powerpc[=OPTS]    PowerPC BCJ filter (big endian only)\n"
+"  --ia64[=OPTS]       IA-64 (Itanium) BCJ filter\n"
+"  --arm[=OPTS]        ARM BCJ filter (little endian only)\n"
+"  --armthumb[=OPTS]   ARM-Thumb BCJ filter (little endian only)\n"
+"  --sparc[=OPTS]      SPARC BCJ filter\n"
+"                      Valid OPTS for all BCJ filters:\n"
+"                        start=NUM  start offset for conversions (default=0)"));
+
+#if defined(HAVE_ENCODER_DELTA) || defined(HAVE_DECODER_DELTA)
+		puts(_(
+"\n"
+"  --delta[=OPTS]      Delta filter; valid OPTS (valid values; default):\n"
+"                        dist=NUM   distance between bytes being subtracted\n"
+"                                   from each other (1-256; 1)"));
+#endif
+	}
+
+	if (long_help)
+		puts(_("\n Other options:\n"));
+
+	puts(_(
+"  -q, --quiet         suppress warnings; specify twice to suppress errors too\n"
+"  -v, --verbose       be verbose; specify twice for even more verbose"));
+
+	if (long_help) {
+		puts(_(
+"  -Q, --no-warn       make warnings not affect the exit status"));
+		puts(_(
+"      --robot         use machine-parsable messages (useful for scripts)"));
+		puts("");
+		puts(_(
+"      --info-memory   display the total amount of RAM and the currently active\n"
+"                      memory usage limits, and exit"));
+		puts(_(
+"  -h, --help          display the short help (lists only the basic options)\n"
+"  -H, --long-help     display this long help and exit"));
+	} else {
+		puts(_(
+"  -h, --help          display this short help and exit\n"
+"  -H, --long-help     display the long help (lists also the advanced options)"));
+	}
+
+	puts(_(
+"  -V, --version       display the version number and exit"));
+
+	puts(_("\nWith no FILE, or when FILE is -, read standard input.\n"));
+
+	// TRANSLATORS: This message indicates the bug reporting address
+	// for this package. Please add _another line_ saying
+	// "Report translation bugs to <...>\n" with the email or WWW
+	// address for translation bugs. Thanks.
+	printf(_("Report bugs to <%s> (in English or Finnish).\n"),
+			PACKAGE_BUGREPORT);
+	printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
+
+#if LZMA_VERSION_STABILITY != LZMA_VERSION_STABILITY_STABLE
+	puts(_(
+"THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."));
+#endif
+
+	tuklib_exit(E_SUCCESS, E_ERROR, verbosity != V_SILENT);
+}

Copied: vendor/xz/5.2.3/src/xz/mytime.c (from rev 9176, vendor/xz/dist/src/xz/mytime.c)
===================================================================
--- vendor/xz/5.2.3/src/xz/mytime.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/mytime.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,89 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       mytime.c
+/// \brief      Time handling functions
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+#if !(defined(HAVE_CLOCK_GETTIME) && HAVE_DECL_CLOCK_MONOTONIC)
+#	include <sys/time.h>
+#endif
+
+uint64_t opt_flush_timeout = 0;
+bool flush_needed;
+
+static uint64_t start_time;
+static uint64_t next_flush;
+
+
+/// \brief      Get the current time as milliseconds
+///
+/// It's relative to some point but not necessarily to the UNIX Epoch.
+static uint64_t
+mytime_now(void)
+{
+	// NOTE: HAVE_DECL_CLOCK_MONOTONIC is always defined to 0 or 1.
+#if defined(HAVE_CLOCK_GETTIME) && HAVE_DECL_CLOCK_MONOTONIC
+	// If CLOCK_MONOTONIC was available at compile time but for some
+	// reason isn't at runtime, fallback to CLOCK_REALTIME which
+	// according to POSIX is mandatory for all implementations.
+	static clockid_t clk_id = CLOCK_MONOTONIC;
+	struct timespec tv;
+	while (clock_gettime(clk_id, &tv))
+		clk_id = CLOCK_REALTIME;
+
+	return (uint64_t)(tv.tv_sec) * UINT64_C(1000) + tv.tv_nsec / 1000000;
+#else
+	struct timeval tv;
+	gettimeofday(&tv, NULL);
+	return (uint64_t)(tv.tv_sec) * UINT64_C(1000) + tv.tv_usec / 1000;
+#endif
+}
+
+
+extern void
+mytime_set_start_time(void)
+{
+	start_time = mytime_now();
+	next_flush = start_time + opt_flush_timeout;
+	flush_needed = false;
+	return;
+}
+
+
+extern uint64_t
+mytime_get_elapsed(void)
+{
+	return mytime_now() - start_time;
+}
+
+
+extern void
+mytime_set_flush_time(void)
+{
+	next_flush = mytime_now() + opt_flush_timeout;
+	flush_needed = false;
+	return;
+}
+
+
+extern int
+mytime_get_flush_timeout(void)
+{
+	if (opt_flush_timeout == 0 || opt_mode != MODE_COMPRESS)
+		return -1;
+
+	const uint64_t now = mytime_now();
+	if (now >= next_flush)
+		return 0;
+
+	const uint64_t remaining = next_flush - now;
+	return remaining > INT_MAX ? INT_MAX : (int)remaining;
+}

Copied: vendor/xz/5.2.3/src/xz/mytime.h (from rev 9176, vendor/xz/dist/src/xz/mytime.h)
===================================================================
--- vendor/xz/5.2.3/src/xz/mytime.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/mytime.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,47 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       mytime.h
+/// \brief      Time handling functions
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+
+/// \brief      Number of milliseconds to between LZMA_SYNC_FLUSHes
+///
+/// If 0, timed flushing is disabled. Otherwise if no more input is available
+/// and not at the end of the file and at least opt_flush_timeout milliseconds
+/// has elapsed since the start of compression or the previous flushing
+/// (LZMA_SYNC_FLUSH or LZMA_FULL_FLUSH), set LZMA_SYNC_FLUSH to flush
+/// the pending data.
+extern uint64_t opt_flush_timeout;
+
+
+/// \brief      True when flushing is needed due to expired timeout
+extern bool flush_needed;
+
+
+/// \brief      Store the time when (de)compression was started
+///
+/// The start time is also stored as the time of the first flush.
+extern void mytime_set_start_time(void);
+
+
+/// \brief      Get the number of milliseconds since the operation started
+extern uint64_t mytime_get_elapsed(void);
+
+
+/// \brief      Store the time of when compressor was flushed
+extern void mytime_set_flush_time(void);
+
+
+/// \brief      Get the number of milliseconds until the next flush
+///
+/// This returns -1 if no timed flushing is used.
+///
+/// The return value is inteded for use with poll().
+extern int mytime_get_flush_timeout(void);

Deleted: vendor/xz/5.2.3/src/xz/options.c
===================================================================
--- vendor/xz/dist/src/xz/options.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/options.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,363 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       options.c
-/// \brief      Parser for filter-specific options
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "private.h"
-
-
-///////////////////
-// Generic stuff //
-///////////////////
-
-typedef struct {
-	const char *name;
-	uint64_t id;
-} name_id_map;
-
-
-typedef struct {
-	const char *name;
-	const name_id_map *map;
-	uint64_t min;
-	uint64_t max;
-} option_map;
-
-
-/// Parses option=value pairs that are separated with commas:
-/// opt=val,opt=val,opt=val
-///
-/// Each option is a string, that is converted to an integer using the
-/// index where the option string is in the array.
-///
-/// Value can be
-///  - a string-id map mapping a list of possible string values to integers
-///    (opts[i].map != NULL, opts[i].min and opts[i].max are ignored);
-///  - a number with minimum and maximum value limit
-///    (opts[i].map == NULL && opts[i].min != UINT64_MAX);
-///  - a string that will be parsed by the filter-specific code
-///    (opts[i].map == NULL && opts[i].min == UINT64_MAX, opts[i].max ignored)
-///
-/// When parsing both option and value succeed, a filter-specific function
-/// is called, which should update the given value to filter-specific
-/// options structure.
-///
-/// \param      str     String containing the options from the command line
-/// \param      opts    Filter-specific option map
-/// \param      set     Filter-specific function to update filter_options
-/// \param      filter_options  Pointer to filter-specific options structure
-///
-/// \return     Returns only if no errors occur.
-///
-static void
-parse_options(const char *str, const option_map *opts,
-		void (*set)(void *filter_options,
-			uint32_t key, uint64_t value, const char *valuestr),
-		void *filter_options)
-{
-	if (str == NULL || str[0] == '\0')
-		return;
-
-	char *s = xstrdup(str);
-	char *name = s;
-
-	while (*name != '\0') {
-		if (*name == ',') {
-			++name;
-			continue;
-		}
-
-		char *split = strchr(name, ',');
-		if (split != NULL)
-			*split = '\0';
-
-		char *value = strchr(name, '=');
-		if (value != NULL)
-			*value++ = '\0';
-
-		if (value == NULL || value[0] == '\0')
-			message_fatal(_("%s: Options must be `name=value' "
-					"pairs separated with commas"), str);
-
-		// Look for the option name from the option map.
-		size_t i = 0;
-		while (true) {
-			if (opts[i].name == NULL)
-				message_fatal(_("%s: Invalid option name"),
-						name);
-
-			if (strcmp(name, opts[i].name) == 0)
-				break;
-
-			++i;
-		}
-
-		// Option was found from the map. See how we should handle it.
-		if (opts[i].map != NULL) {
-			// value is a string which we should map
-			// to an integer.
-			size_t j;
-			for (j = 0; opts[i].map[j].name != NULL; ++j) {
-				if (strcmp(opts[i].map[j].name, value) == 0)
-					break;
-			}
-
-			if (opts[i].map[j].name == NULL)
-				message_fatal(_("%s: Invalid option value"),
-						value);
-
-			set(filter_options, i, opts[i].map[j].id, value);
-
-		} else if (opts[i].min == UINT64_MAX) {
-			// value is a special string that will be
-			// parsed by set().
-			set(filter_options, i, 0, value);
-
-		} else {
-			// value is an integer.
-			const uint64_t v = str_to_uint64(name, value,
-					opts[i].min, opts[i].max);
-			set(filter_options, i, v, value);
-		}
-
-		// Check if it was the last option.
-		if (split == NULL)
-			break;
-
-		name = split + 1;
-	}
-
-	free(s);
-	return;
-}
-
-
-///////////
-// Delta //
-///////////
-
-enum {
-	OPT_DIST,
-};
-
-
-static void
-set_delta(void *options, uint32_t key, uint64_t value,
-		const char *valuestr lzma_attribute((__unused__)))
-{
-	lzma_options_delta *opt = options;
-	switch (key) {
-	case OPT_DIST:
-		opt->dist = value;
-		break;
-	}
-}
-
-
-extern lzma_options_delta *
-options_delta(const char *str)
-{
-	static const option_map opts[] = {
-		{ "dist",     NULL,  LZMA_DELTA_DIST_MIN,
-		                     LZMA_DELTA_DIST_MAX },
-		{ NULL,       NULL,  0, 0 }
-	};
-
-	lzma_options_delta *options = xmalloc(sizeof(lzma_options_delta));
-	*options = (lzma_options_delta){
-		// It's hard to give a useful default for this.
-		.type = LZMA_DELTA_TYPE_BYTE,
-		.dist = LZMA_DELTA_DIST_MIN,
-	};
-
-	parse_options(str, opts, &set_delta, options);
-
-	return options;
-}
-
-
-/////////
-// BCJ //
-/////////
-
-enum {
-	OPT_START_OFFSET,
-};
-
-
-static void
-set_bcj(void *options, uint32_t key, uint64_t value,
-		const char *valuestr lzma_attribute((__unused__)))
-{
-	lzma_options_bcj *opt = options;
-	switch (key) {
-	case OPT_START_OFFSET:
-		opt->start_offset = value;
-		break;
-	}
-}
-
-
-extern lzma_options_bcj *
-options_bcj(const char *str)
-{
-	static const option_map opts[] = {
-		{ "start",    NULL,  0, UINT32_MAX },
-		{ NULL,       NULL,  0, 0 }
-	};
-
-	lzma_options_bcj *options = xmalloc(sizeof(lzma_options_bcj));
-	*options = (lzma_options_bcj){
-		.start_offset = 0,
-	};
-
-	parse_options(str, opts, &set_bcj, options);
-
-	return options;
-}
-
-
-//////////
-// LZMA //
-//////////
-
-enum {
-	OPT_PRESET,
-	OPT_DICT,
-	OPT_LC,
-	OPT_LP,
-	OPT_PB,
-	OPT_MODE,
-	OPT_NICE,
-	OPT_MF,
-	OPT_DEPTH,
-};
-
-
-static void lzma_attribute((__noreturn__))
-error_lzma_preset(const char *valuestr)
-{
-	message_fatal(_("Unsupported LZMA1/LZMA2 preset: %s"), valuestr);
-}
-
-
-static void
-set_lzma(void *options, uint32_t key, uint64_t value, const char *valuestr)
-{
-	lzma_options_lzma *opt = options;
-
-	switch (key) {
-	case OPT_PRESET: {
-		if (valuestr[0] < '0' || valuestr[0] > '9')
-			error_lzma_preset(valuestr);
-
-		uint32_t preset = valuestr[0] - '0';
-
-		// Currently only "e" is supported as a modifier,
-		// so keep this simple for now.
-		if (valuestr[1] != '\0') {
-			if (valuestr[1] == 'e')
-				preset |= LZMA_PRESET_EXTREME;
-			else
-				error_lzma_preset(valuestr);
-
-			if (valuestr[2] != '\0')
-				error_lzma_preset(valuestr);
-		}
-
-		if (lzma_lzma_preset(options, preset))
-			error_lzma_preset(valuestr);
-
-		break;
-	}
-
-	case OPT_DICT:
-		opt->dict_size = value;
-		break;
-
-	case OPT_LC:
-		opt->lc = value;
-		break;
-
-	case OPT_LP:
-		opt->lp = value;
-		break;
-
-	case OPT_PB:
-		opt->pb = value;
-		break;
-
-	case OPT_MODE:
-		opt->mode = value;
-		break;
-
-	case OPT_NICE:
-		opt->nice_len = value;
-		break;
-
-	case OPT_MF:
-		opt->mf = value;
-		break;
-
-	case OPT_DEPTH:
-		opt->depth = value;
-		break;
-	}
-}
-
-
-extern lzma_options_lzma *
-options_lzma(const char *str)
-{
-	static const name_id_map modes[] = {
-		{ "fast",   LZMA_MODE_FAST },
-		{ "normal", LZMA_MODE_NORMAL },
-		{ NULL,     0 }
-	};
-
-	static const name_id_map mfs[] = {
-		{ "hc3", LZMA_MF_HC3 },
-		{ "hc4", LZMA_MF_HC4 },
-		{ "bt2", LZMA_MF_BT2 },
-		{ "bt3", LZMA_MF_BT3 },
-		{ "bt4", LZMA_MF_BT4 },
-		{ NULL,  0 }
-	};
-
-	static const option_map opts[] = {
-		{ "preset", NULL,   UINT64_MAX, 0 },
-		{ "dict",   NULL,   LZMA_DICT_SIZE_MIN,
-				(UINT32_C(1) << 30) + (UINT32_C(1) << 29) },
-		{ "lc",     NULL,   LZMA_LCLP_MIN, LZMA_LCLP_MAX },
-		{ "lp",     NULL,   LZMA_LCLP_MIN, LZMA_LCLP_MAX },
-		{ "pb",     NULL,   LZMA_PB_MIN, LZMA_PB_MAX },
-		{ "mode",   modes,  0, 0 },
-		{ "nice",   NULL,   2, 273 },
-		{ "mf",     mfs,    0, 0 },
-		{ "depth",  NULL,   0, UINT32_MAX },
-		{ NULL,     NULL,   0, 0 }
-	};
-
-	lzma_options_lzma *options = xmalloc(sizeof(lzma_options_lzma));
-	if (lzma_lzma_preset(options, LZMA_PRESET_DEFAULT))
-		message_bug();
-
-	parse_options(str, opts, &set_lzma, options);
-
-	if (options->lc + options->lp > LZMA_LCLP_MAX)
-		message_fatal(_("The sum of lc and lp must not exceed 4"));
-
-	const uint32_t nice_len_min = options->mf & 0x0F;
-	if (options->nice_len < nice_len_min)
-		message_fatal(_("The selected match finder requires at "
-				"least nice=%" PRIu32), nice_len_min);
-
-	return options;
-}

Copied: vendor/xz/5.2.3/src/xz/options.c (from rev 9176, vendor/xz/dist/src/xz/options.c)
===================================================================
--- vendor/xz/5.2.3/src/xz/options.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/options.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,363 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       options.c
+/// \brief      Parser for filter-specific options
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+
+///////////////////
+// Generic stuff //
+///////////////////
+
+typedef struct {
+	const char *name;
+	uint64_t id;
+} name_id_map;
+
+
+typedef struct {
+	const char *name;
+	const name_id_map *map;
+	uint64_t min;
+	uint64_t max;
+} option_map;
+
+
+/// Parses option=value pairs that are separated with commas:
+/// opt=val,opt=val,opt=val
+///
+/// Each option is a string, that is converted to an integer using the
+/// index where the option string is in the array.
+///
+/// Value can be
+///  - a string-id map mapping a list of possible string values to integers
+///    (opts[i].map != NULL, opts[i].min and opts[i].max are ignored);
+///  - a number with minimum and maximum value limit
+///    (opts[i].map == NULL && opts[i].min != UINT64_MAX);
+///  - a string that will be parsed by the filter-specific code
+///    (opts[i].map == NULL && opts[i].min == UINT64_MAX, opts[i].max ignored)
+///
+/// When parsing both option and value succeed, a filter-specific function
+/// is called, which should update the given value to filter-specific
+/// options structure.
+///
+/// \param      str     String containing the options from the command line
+/// \param      opts    Filter-specific option map
+/// \param      set     Filter-specific function to update filter_options
+/// \param      filter_options  Pointer to filter-specific options structure
+///
+/// \return     Returns only if no errors occur.
+///
+static void
+parse_options(const char *str, const option_map *opts,
+		void (*set)(void *filter_options,
+			unsigned key, uint64_t value, const char *valuestr),
+		void *filter_options)
+{
+	if (str == NULL || str[0] == '\0')
+		return;
+
+	char *s = xstrdup(str);
+	char *name = s;
+
+	while (*name != '\0') {
+		if (*name == ',') {
+			++name;
+			continue;
+		}
+
+		char *split = strchr(name, ',');
+		if (split != NULL)
+			*split = '\0';
+
+		char *value = strchr(name, '=');
+		if (value != NULL)
+			*value++ = '\0';
+
+		if (value == NULL || value[0] == '\0')
+			message_fatal(_("%s: Options must be `name=value' "
+					"pairs separated with commas"), str);
+
+		// Look for the option name from the option map.
+		unsigned i = 0;
+		while (true) {
+			if (opts[i].name == NULL)
+				message_fatal(_("%s: Invalid option name"),
+						name);
+
+			if (strcmp(name, opts[i].name) == 0)
+				break;
+
+			++i;
+		}
+
+		// Option was found from the map. See how we should handle it.
+		if (opts[i].map != NULL) {
+			// value is a string which we should map
+			// to an integer.
+			unsigned j;
+			for (j = 0; opts[i].map[j].name != NULL; ++j) {
+				if (strcmp(opts[i].map[j].name, value) == 0)
+					break;
+			}
+
+			if (opts[i].map[j].name == NULL)
+				message_fatal(_("%s: Invalid option value"),
+						value);
+
+			set(filter_options, i, opts[i].map[j].id, value);
+
+		} else if (opts[i].min == UINT64_MAX) {
+			// value is a special string that will be
+			// parsed by set().
+			set(filter_options, i, 0, value);
+
+		} else {
+			// value is an integer.
+			const uint64_t v = str_to_uint64(name, value,
+					opts[i].min, opts[i].max);
+			set(filter_options, i, v, value);
+		}
+
+		// Check if it was the last option.
+		if (split == NULL)
+			break;
+
+		name = split + 1;
+	}
+
+	free(s);
+	return;
+}
+
+
+///////////
+// Delta //
+///////////
+
+enum {
+	OPT_DIST,
+};
+
+
+static void
+set_delta(void *options, unsigned key, uint64_t value,
+		const char *valuestr lzma_attribute((__unused__)))
+{
+	lzma_options_delta *opt = options;
+	switch (key) {
+	case OPT_DIST:
+		opt->dist = value;
+		break;
+	}
+}
+
+
+extern lzma_options_delta *
+options_delta(const char *str)
+{
+	static const option_map opts[] = {
+		{ "dist",     NULL,  LZMA_DELTA_DIST_MIN,
+		                     LZMA_DELTA_DIST_MAX },
+		{ NULL,       NULL,  0, 0 }
+	};
+
+	lzma_options_delta *options = xmalloc(sizeof(lzma_options_delta));
+	*options = (lzma_options_delta){
+		// It's hard to give a useful default for this.
+		.type = LZMA_DELTA_TYPE_BYTE,
+		.dist = LZMA_DELTA_DIST_MIN,
+	};
+
+	parse_options(str, opts, &set_delta, options);
+
+	return options;
+}
+
+
+/////////
+// BCJ //
+/////////
+
+enum {
+	OPT_START_OFFSET,
+};
+
+
+static void
+set_bcj(void *options, unsigned key, uint64_t value,
+		const char *valuestr lzma_attribute((__unused__)))
+{
+	lzma_options_bcj *opt = options;
+	switch (key) {
+	case OPT_START_OFFSET:
+		opt->start_offset = value;
+		break;
+	}
+}
+
+
+extern lzma_options_bcj *
+options_bcj(const char *str)
+{
+	static const option_map opts[] = {
+		{ "start",    NULL,  0, UINT32_MAX },
+		{ NULL,       NULL,  0, 0 }
+	};
+
+	lzma_options_bcj *options = xmalloc(sizeof(lzma_options_bcj));
+	*options = (lzma_options_bcj){
+		.start_offset = 0,
+	};
+
+	parse_options(str, opts, &set_bcj, options);
+
+	return options;
+}
+
+
+//////////
+// LZMA //
+//////////
+
+enum {
+	OPT_PRESET,
+	OPT_DICT,
+	OPT_LC,
+	OPT_LP,
+	OPT_PB,
+	OPT_MODE,
+	OPT_NICE,
+	OPT_MF,
+	OPT_DEPTH,
+};
+
+
+static void lzma_attribute((__noreturn__))
+error_lzma_preset(const char *valuestr)
+{
+	message_fatal(_("Unsupported LZMA1/LZMA2 preset: %s"), valuestr);
+}
+
+
+static void
+set_lzma(void *options, unsigned key, uint64_t value, const char *valuestr)
+{
+	lzma_options_lzma *opt = options;
+
+	switch (key) {
+	case OPT_PRESET: {
+		if (valuestr[0] < '0' || valuestr[0] > '9')
+			error_lzma_preset(valuestr);
+
+		uint32_t preset = valuestr[0] - '0';
+
+		// Currently only "e" is supported as a modifier,
+		// so keep this simple for now.
+		if (valuestr[1] != '\0') {
+			if (valuestr[1] == 'e')
+				preset |= LZMA_PRESET_EXTREME;
+			else
+				error_lzma_preset(valuestr);
+
+			if (valuestr[2] != '\0')
+				error_lzma_preset(valuestr);
+		}
+
+		if (lzma_lzma_preset(options, preset))
+			error_lzma_preset(valuestr);
+
+		break;
+	}
+
+	case OPT_DICT:
+		opt->dict_size = value;
+		break;
+
+	case OPT_LC:
+		opt->lc = value;
+		break;
+
+	case OPT_LP:
+		opt->lp = value;
+		break;
+
+	case OPT_PB:
+		opt->pb = value;
+		break;
+
+	case OPT_MODE:
+		opt->mode = value;
+		break;
+
+	case OPT_NICE:
+		opt->nice_len = value;
+		break;
+
+	case OPT_MF:
+		opt->mf = value;
+		break;
+
+	case OPT_DEPTH:
+		opt->depth = value;
+		break;
+	}
+}
+
+
+extern lzma_options_lzma *
+options_lzma(const char *str)
+{
+	static const name_id_map modes[] = {
+		{ "fast",   LZMA_MODE_FAST },
+		{ "normal", LZMA_MODE_NORMAL },
+		{ NULL,     0 }
+	};
+
+	static const name_id_map mfs[] = {
+		{ "hc3", LZMA_MF_HC3 },
+		{ "hc4", LZMA_MF_HC4 },
+		{ "bt2", LZMA_MF_BT2 },
+		{ "bt3", LZMA_MF_BT3 },
+		{ "bt4", LZMA_MF_BT4 },
+		{ NULL,  0 }
+	};
+
+	static const option_map opts[] = {
+		{ "preset", NULL,   UINT64_MAX, 0 },
+		{ "dict",   NULL,   LZMA_DICT_SIZE_MIN,
+				(UINT32_C(1) << 30) + (UINT32_C(1) << 29) },
+		{ "lc",     NULL,   LZMA_LCLP_MIN, LZMA_LCLP_MAX },
+		{ "lp",     NULL,   LZMA_LCLP_MIN, LZMA_LCLP_MAX },
+		{ "pb",     NULL,   LZMA_PB_MIN, LZMA_PB_MAX },
+		{ "mode",   modes,  0, 0 },
+		{ "nice",   NULL,   2, 273 },
+		{ "mf",     mfs,    0, 0 },
+		{ "depth",  NULL,   0, UINT32_MAX },
+		{ NULL,     NULL,   0, 0 }
+	};
+
+	lzma_options_lzma *options = xmalloc(sizeof(lzma_options_lzma));
+	if (lzma_lzma_preset(options, LZMA_PRESET_DEFAULT))
+		message_bug();
+
+	parse_options(str, opts, &set_lzma, options);
+
+	if (options->lc + options->lp > LZMA_LCLP_MAX)
+		message_fatal(_("The sum of lc and lp must not exceed 4"));
+
+	const uint32_t nice_len_min = options->mf & 0x0F;
+	if (options->nice_len < nice_len_min)
+		message_fatal(_("The selected match finder requires at "
+				"least nice=%" PRIu32), nice_len_min);
+
+	return options;
+}

Deleted: vendor/xz/5.2.3/src/xz/private.h
===================================================================
--- vendor/xz/dist/src/xz/private.h	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/private.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,57 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       private.h
-/// \brief      Common includes, definions, and prototypes
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "sysdefs.h"
-#include "mythread.h"
-#include "lzma.h"
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <signal.h>
-#include <locale.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#include "tuklib_gettext.h"
-#include "tuklib_progname.h"
-#include "tuklib_exit.h"
-#include "tuklib_mbstr.h"
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
-#	define WIN32_LEAN_AND_MEAN
-#	include <windows.h>
-#endif
-
-#ifndef STDIN_FILENO
-#	define STDIN_FILENO (fileno(stdin))
-#endif
-
-#ifndef STDOUT_FILENO
-#	define STDOUT_FILENO (fileno(stdout))
-#endif
-
-#ifndef STDERR_FILENO
-#	define STDERR_FILENO (fileno(stderr))
-#endif
-
-#include "main.h"
-#include "coder.h"
-#include "message.h"
-#include "args.h"
-#include "hardware.h"
-#include "file_io.h"
-#include "options.h"
-#include "signals.h"
-#include "suffix.h"
-#include "util.h"
-#include "list.h"

Copied: vendor/xz/5.2.3/src/xz/private.h (from rev 11013, vendor/xz/dist/src/xz/private.h)
===================================================================
--- vendor/xz/5.2.3/src/xz/private.h	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/private.h	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,66 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       private.h
+/// \brief      Common includes, definions, and prototypes
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "sysdefs.h"
+#include "mythread.h"
+
+#include "lzma.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <signal.h>
+#include <locale.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "tuklib_gettext.h"
+#include "tuklib_progname.h"
+#include "tuklib_exit.h"
+#include "tuklib_mbstr.h"
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+#	define WIN32_LEAN_AND_MEAN
+#	include <windows.h>
+#endif
+
+#ifndef STDIN_FILENO
+#	define STDIN_FILENO (fileno(stdin))
+#endif
+
+#ifndef STDOUT_FILENO
+#	define STDOUT_FILENO (fileno(stdout))
+#endif
+
+#ifndef STDERR_FILENO
+#	define STDERR_FILENO (fileno(stderr))
+#endif
+
+#ifdef HAVE_CAPSICUM
+#	define ENABLE_SANDBOX 1
+#endif
+
+#include "main.h"
+#include "mytime.h"
+#include "coder.h"
+#include "message.h"
+#include "args.h"
+#include "hardware.h"
+#include "file_io.h"
+#include "options.h"
+#include "signals.h"
+#include "suffix.h"
+#include "util.h"
+
+#ifdef HAVE_DECODERS
+#	include "list.h"
+#endif

Deleted: vendor/xz/5.2.3/src/xz/signals.c
===================================================================
--- vendor/xz/dist/src/xz/signals.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/signals.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,204 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       signals.c
-/// \brief      Handling signals to abort operation
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "private.h"
-
-
-volatile sig_atomic_t user_abort = false;
-
-
-#if !(defined(_WIN32) && !defined(__CYGWIN__))
-
-/// If we were interrupted by a signal, we store the signal number so that
-/// we can raise that signal to kill the program when all cleanups have
-/// been done.
-static volatile sig_atomic_t exit_signal = 0;
-
-/// Mask of signals for which have have established a signal handler to set
-/// user_abort to true.
-static sigset_t hooked_signals;
-
-/// True once signals_init() has finished. This is used to skip blocking
-/// signals (with uninitialized hooked_signals) if signals_block() and
-/// signals_unblock() are called before signals_init() has been called.
-static bool signals_are_initialized = false;
-
-/// signals_block() and signals_unblock() can be called recursively.
-static size_t signals_block_count = 0;
-
-
-static void
-signal_handler(int sig)
-{
-	exit_signal = sig;
-	user_abort = true;
-	return;
-}
-
-
-extern void
-signals_init(void)
-{
-	// List of signals for which we establish the signal handler.
-	static const int sigs[] = {
-		SIGINT,
-		SIGTERM,
-#ifdef SIGHUP
-		SIGHUP,
-#endif
-#ifdef SIGPIPE
-		SIGPIPE,
-#endif
-#ifdef SIGXCPU
-		SIGXCPU,
-#endif
-#ifdef SIGXFSZ
-		SIGXFSZ,
-#endif
-	};
-
-	// Mask of the signals for which we have established a signal handler.
-	sigemptyset(&hooked_signals);
-	for (size_t i = 0; i < ARRAY_SIZE(sigs); ++i)
-		sigaddset(&hooked_signals, sigs[i]);
-
-#ifdef SIGALRM
-	// Add also the signals from message.c to hooked_signals.
-	for (size_t i = 0; message_progress_sigs[i] != 0; ++i)
-		sigaddset(&hooked_signals, message_progress_sigs[i]);
-#endif
-
-	// Using "my_sa" because "sa" may conflict with a sockaddr variable
-	// from system headers on Solaris.
-	struct sigaction my_sa;
-
-	// All the signals that we handle we also blocked while the signal
-	// handler runs.
-	my_sa.sa_mask = hooked_signals;
-
-	// Don't set SA_RESTART, because we want EINTR so that we can check
-	// for user_abort and cleanup before exiting. We block the signals
-	// for which we have established a handler when we don't want EINTR.
-	my_sa.sa_flags = 0;
-	my_sa.sa_handler = &signal_handler;
-
-	for (size_t i = 0; i < ARRAY_SIZE(sigs); ++i) {
-		// If the parent process has left some signals ignored,
-		// we don't unignore them.
-		struct sigaction old;
-		if (sigaction(sigs[i], NULL, &old) == 0
-				&& old.sa_handler == SIG_IGN)
-			continue;
-
-		// Establish the signal handler.
-		if (sigaction(sigs[i], &my_sa, NULL))
-			message_signal_handler();
-	}
-
-	signals_are_initialized = true;
-
-	return;
-}
-
-
-#ifndef __VMS
-extern void
-signals_block(void)
-{
-	if (signals_are_initialized) {
-		if (signals_block_count++ == 0) {
-			const int saved_errno = errno;
-			mythread_sigmask(SIG_BLOCK, &hooked_signals, NULL);
-			errno = saved_errno;
-		}
-	}
-
-	return;
-}
-
-
-extern void
-signals_unblock(void)
-{
-	if (signals_are_initialized) {
-		assert(signals_block_count > 0);
-
-		if (--signals_block_count == 0) {
-			const int saved_errno = errno;
-			mythread_sigmask(SIG_UNBLOCK, &hooked_signals, NULL);
-			errno = saved_errno;
-		}
-	}
-
-	return;
-}
-#endif
-
-
-extern void
-signals_exit(void)
-{
-	const int sig = exit_signal;
-
-	if (sig != 0) {
-#if defined(TUKLIB_DOSLIKE) || defined(__VMS)
-		// Don't raise(), set only exit status. This avoids
-		// printing unwanted message about SIGINT when the user
-		// presses C-c.
-		set_exit_status(E_ERROR);
-#else
-		struct sigaction sa;
-		sa.sa_handler = SIG_DFL;
-		sigfillset(&sa.sa_mask);
-		sa.sa_flags = 0;
-		sigaction(sig, &sa, NULL);
-		raise(exit_signal);
-#endif
-	}
-
-	return;
-}
-
-#else
-
-// While Windows has some very basic signal handling functions as required
-// by C89, they are not really used, and e.g. SIGINT doesn't work exactly
-// the way it does on POSIX (Windows creates a new thread for the signal
-// handler). Instead, we use SetConsoleCtrlHandler() to catch user
-// pressing C-c, because that seems to be the recommended way to do it.
-//
-// NOTE: This doesn't work under MSYS. Trying with SIGINT doesn't work
-// either even if it appeared to work at first. So test using Windows
-// console window.
-
-static BOOL WINAPI
-signal_handler(DWORD type lzma_attribute((__unused__)))
-{
-	// Since we don't get a signal number which we could raise() at
-	// signals_exit() like on POSIX, just set the exit status to
-	// indicate an error, so that we cannot return with zero exit status.
-	set_exit_status(E_ERROR);
-	user_abort = true;
-	return TRUE;
-}
-
-
-extern void
-signals_init(void)
-{
-	if (!SetConsoleCtrlHandler(&signal_handler, TRUE))
-		message_signal_handler();
-
-	return;
-}
-
-#endif

Copied: vendor/xz/5.2.3/src/xz/signals.c (from rev 9176, vendor/xz/dist/src/xz/signals.c)
===================================================================
--- vendor/xz/5.2.3/src/xz/signals.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/signals.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,209 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       signals.c
+/// \brief      Handling signals to abort operation
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+
+volatile sig_atomic_t user_abort = false;
+
+
+#if !(defined(_WIN32) && !defined(__CYGWIN__))
+
+/// If we were interrupted by a signal, we store the signal number so that
+/// we can raise that signal to kill the program when all cleanups have
+/// been done.
+static volatile sig_atomic_t exit_signal = 0;
+
+/// Mask of signals for which have have established a signal handler to set
+/// user_abort to true.
+static sigset_t hooked_signals;
+
+/// True once signals_init() has finished. This is used to skip blocking
+/// signals (with uninitialized hooked_signals) if signals_block() and
+/// signals_unblock() are called before signals_init() has been called.
+static bool signals_are_initialized = false;
+
+/// signals_block() and signals_unblock() can be called recursively.
+static size_t signals_block_count = 0;
+
+
+static void
+signal_handler(int sig)
+{
+	exit_signal = sig;
+	user_abort = true;
+
+#ifndef TUKLIB_DOSLIKE
+	io_write_to_user_abort_pipe();
+#endif
+
+	return;
+}
+
+
+extern void
+signals_init(void)
+{
+	// List of signals for which we establish the signal handler.
+	static const int sigs[] = {
+		SIGINT,
+		SIGTERM,
+#ifdef SIGHUP
+		SIGHUP,
+#endif
+#ifdef SIGPIPE
+		SIGPIPE,
+#endif
+#ifdef SIGXCPU
+		SIGXCPU,
+#endif
+#ifdef SIGXFSZ
+		SIGXFSZ,
+#endif
+	};
+
+	// Mask of the signals for which we have established a signal handler.
+	sigemptyset(&hooked_signals);
+	for (size_t i = 0; i < ARRAY_SIZE(sigs); ++i)
+		sigaddset(&hooked_signals, sigs[i]);
+
+#ifdef SIGALRM
+	// Add also the signals from message.c to hooked_signals.
+	for (size_t i = 0; message_progress_sigs[i] != 0; ++i)
+		sigaddset(&hooked_signals, message_progress_sigs[i]);
+#endif
+
+	// Using "my_sa" because "sa" may conflict with a sockaddr variable
+	// from system headers on Solaris.
+	struct sigaction my_sa;
+
+	// All the signals that we handle we also blocked while the signal
+	// handler runs.
+	my_sa.sa_mask = hooked_signals;
+
+	// Don't set SA_RESTART, because we want EINTR so that we can check
+	// for user_abort and cleanup before exiting. We block the signals
+	// for which we have established a handler when we don't want EINTR.
+	my_sa.sa_flags = 0;
+	my_sa.sa_handler = &signal_handler;
+
+	for (size_t i = 0; i < ARRAY_SIZE(sigs); ++i) {
+		// If the parent process has left some signals ignored,
+		// we don't unignore them.
+		struct sigaction old;
+		if (sigaction(sigs[i], NULL, &old) == 0
+				&& old.sa_handler == SIG_IGN)
+			continue;
+
+		// Establish the signal handler.
+		if (sigaction(sigs[i], &my_sa, NULL))
+			message_signal_handler();
+	}
+
+	signals_are_initialized = true;
+
+	return;
+}
+
+
+#ifndef __VMS
+extern void
+signals_block(void)
+{
+	if (signals_are_initialized) {
+		if (signals_block_count++ == 0) {
+			const int saved_errno = errno;
+			mythread_sigmask(SIG_BLOCK, &hooked_signals, NULL);
+			errno = saved_errno;
+		}
+	}
+
+	return;
+}
+
+
+extern void
+signals_unblock(void)
+{
+	if (signals_are_initialized) {
+		assert(signals_block_count > 0);
+
+		if (--signals_block_count == 0) {
+			const int saved_errno = errno;
+			mythread_sigmask(SIG_UNBLOCK, &hooked_signals, NULL);
+			errno = saved_errno;
+		}
+	}
+
+	return;
+}
+#endif
+
+
+extern void
+signals_exit(void)
+{
+	const int sig = exit_signal;
+
+	if (sig != 0) {
+#if defined(TUKLIB_DOSLIKE) || defined(__VMS)
+		// Don't raise(), set only exit status. This avoids
+		// printing unwanted message about SIGINT when the user
+		// presses C-c.
+		set_exit_status(E_ERROR);
+#else
+		struct sigaction sa;
+		sa.sa_handler = SIG_DFL;
+		sigfillset(&sa.sa_mask);
+		sa.sa_flags = 0;
+		sigaction(sig, &sa, NULL);
+		raise(exit_signal);
+#endif
+	}
+
+	return;
+}
+
+#else
+
+// While Windows has some very basic signal handling functions as required
+// by C89, they are not really used, and e.g. SIGINT doesn't work exactly
+// the way it does on POSIX (Windows creates a new thread for the signal
+// handler). Instead, we use SetConsoleCtrlHandler() to catch user
+// pressing C-c, because that seems to be the recommended way to do it.
+//
+// NOTE: This doesn't work under MSYS. Trying with SIGINT doesn't work
+// either even if it appeared to work at first. So test using Windows
+// console window.
+
+static BOOL WINAPI
+signal_handler(DWORD type lzma_attribute((__unused__)))
+{
+	// Since we don't get a signal number which we could raise() at
+	// signals_exit() like on POSIX, just set the exit status to
+	// indicate an error, so that we cannot return with zero exit status.
+	set_exit_status(E_ERROR);
+	user_abort = true;
+	return TRUE;
+}
+
+
+extern void
+signals_init(void)
+{
+	if (!SetConsoleCtrlHandler(&signal_handler, TRUE))
+		message_signal_handler();
+
+	return;
+}
+
+#endif

Deleted: vendor/xz/5.2.3/src/xz/suffix.c
===================================================================
--- vendor/xz/dist/src/xz/suffix.c	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/suffix.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,241 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       suffix.c
-/// \brief      Checks filename suffix and creates the destination filename
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "private.h"
-
-// For case-insensitive filename suffix on case-insensitive systems
-#if defined(TUKLIB_DOSLIKE) || defined(__VMS)
-#	define strcmp strcasecmp
-#endif
-
-
-static char *custom_suffix = NULL;
-
-
-/// \brief      Test if the char is a directory separator
-static bool
-is_dir_sep(char c)
-{
-#ifdef TUKLIB_DOSLIKE
-	return c == '/' || c == '\\' || c == ':';
-#else
-	return c == '/';
-#endif
-}
-
-
-/// \brief      Test if the string contains a directory separator
-static bool
-has_dir_sep(const char *str)
-{
-#ifdef TUKLIB_DOSLIKE
-	return strpbrk(str, "/\\:") != NULL;
-#else
-	return strchr(str, '/') != NULL;
-#endif
-}
-
-
-/// \brief      Checks if src_name has given compressed_suffix
-///
-/// \param      suffix      Filename suffix to look for
-/// \param      src_name    Input filename
-/// \param      src_len     strlen(src_name)
-///
-/// \return     If src_name has the suffix, src_len - strlen(suffix) is
-///             returned. It's always a positive integer. Otherwise zero
-///             is returned.
-static size_t
-test_suffix(const char *suffix, const char *src_name, size_t src_len)
-{
-	const size_t suffix_len = strlen(suffix);
-
-	// The filename must have at least one character in addition to
-	// the suffix. src_name may contain path to the filename, so we
-	// need to check for directory separator too.
-	if (src_len <= suffix_len
-			|| is_dir_sep(src_name[src_len - suffix_len - 1]))
-		return 0;
-
-	if (strcmp(suffix, src_name + src_len - suffix_len) == 0)
-		return src_len - suffix_len;
-
-	return 0;
-}
-
-
-/// \brief      Removes the filename suffix of the compressed file
-///
-/// \return     Name of the uncompressed file, or NULL if file has unknown
-///             suffix.
-static char *
-uncompressed_name(const char *src_name, const size_t src_len)
-{
-	static const struct {
-		const char *compressed;
-		const char *uncompressed;
-	} suffixes[] = {
-		{ ".xz",    "" },
-		{ ".txz",   ".tar" }, // .txz abbreviation for .txt.gz is rare.
-		{ ".lzma",  "" },
-		{ ".tlz",   ".tar" },
-		// { ".gz",    "" },
-		// { ".tgz",   ".tar" },
-	};
-
-	const char *new_suffix = "";
-	size_t new_len = 0;
-
-	if (opt_format == FORMAT_RAW) {
-		// Don't check for known suffixes when --format=raw was used.
-		if (custom_suffix == NULL) {
-			message_error(_("%s: With --format=raw, "
-					"--suffix=.SUF is required unless "
-					"writing to stdout"), src_name);
-			return NULL;
-		}
-	} else {
-		for (size_t i = 0; i < ARRAY_SIZE(suffixes); ++i) {
-			new_len = test_suffix(suffixes[i].compressed,
-					src_name, src_len);
-			if (new_len != 0) {
-				new_suffix = suffixes[i].uncompressed;
-				break;
-			}
-		}
-	}
-
-	if (new_len == 0 && custom_suffix != NULL)
-		new_len = test_suffix(custom_suffix, src_name, src_len);
-
-	if (new_len == 0) {
-		message_warning(_("%s: Filename has an unknown suffix, "
-				"skipping"), src_name);
-		return NULL;
-	}
-
-	const size_t new_suffix_len = strlen(new_suffix);
-	char *dest_name = xmalloc(new_len + new_suffix_len + 1);
-
-	memcpy(dest_name, src_name, new_len);
-	memcpy(dest_name + new_len, new_suffix, new_suffix_len);
-	dest_name[new_len + new_suffix_len] = '\0';
-
-	return dest_name;
-}
-
-
-/// \brief      Appends suffix to src_name
-///
-/// In contrast to uncompressed_name(), we check only suffixes that are valid
-/// for the specified file format.
-static char *
-compressed_name(const char *src_name, const size_t src_len)
-{
-	// The order of these must match the order in args.h.
-	static const char *const all_suffixes[][3] = {
-		{
-			".xz",
-			".txz",
-			NULL
-		}, {
-			".lzma",
-			".tlz",
-			NULL
-/*
-		}, {
-			".gz",
-			".tgz",
-			NULL
-*/
-		}, {
-			// --format=raw requires specifying the suffix
-			// manually or using stdout.
-			NULL
-		}
-	};
-
-	// args.c ensures this.
-	assert(opt_format != FORMAT_AUTO);
-
-	const size_t format = opt_format - 1;
-	const char *const *suffixes = all_suffixes[format];
-
-	for (size_t i = 0; suffixes[i] != NULL; ++i) {
-		if (test_suffix(suffixes[i], src_name, src_len) != 0) {
-			message_warning(_("%s: File already has `%s' "
-					"suffix, skipping"), src_name,
-					suffixes[i]);
-			return NULL;
-		}
-	}
-
-	if (custom_suffix != NULL) {
-		if (test_suffix(custom_suffix, src_name, src_len) != 0) {
-			message_warning(_("%s: File already has `%s' "
-					"suffix, skipping"), src_name,
-					custom_suffix);
-			return NULL;
-		}
-	}
-
-	// TODO: Hmm, maybe it would be better to validate this in args.c,
-	// since the suffix handling when decoding is weird now.
-	if (opt_format == FORMAT_RAW && custom_suffix == NULL) {
-		message_error(_("%s: With --format=raw, "
-				"--suffix=.SUF is required unless "
-				"writing to stdout"), src_name);
-		return NULL;
-	}
-
-	const char *suffix = custom_suffix != NULL
-			? custom_suffix : suffixes[0];
-	const size_t suffix_len = strlen(suffix);
-
-	char *dest_name = xmalloc(src_len + suffix_len + 1);
-
-	memcpy(dest_name, src_name, src_len);
-	memcpy(dest_name + src_len, suffix, suffix_len);
-	dest_name[src_len + suffix_len] = '\0';
-
-	return dest_name;
-}
-
-
-extern char *
-suffix_get_dest_name(const char *src_name)
-{
-	assert(src_name != NULL);
-
-	// Length of the name is needed in all cases to locate the end of
-	// the string to compare the suffix, so calculate the length here.
-	const size_t src_len = strlen(src_name);
-
-	return opt_mode == MODE_COMPRESS
-			? compressed_name(src_name, src_len)
-			: uncompressed_name(src_name, src_len);
-}
-
-
-extern void
-suffix_set(const char *suffix)
-{
-	// Empty suffix and suffixes having a directory separator are
-	// rejected. Such suffixes would break things later.
-	if (suffix[0] == '\0' || has_dir_sep(suffix))
-		message_fatal(_("%s: Invalid filename suffix"), suffix);
-
-	// Replace the old custom_suffix (if any) with the new suffix.
-	free(custom_suffix);
-	custom_suffix = xstrdup(suffix);
-	return;
-}

Copied: vendor/xz/5.2.3/src/xz/suffix.c (from rev 9176, vendor/xz/dist/src/xz/suffix.c)
===================================================================
--- vendor/xz/5.2.3/src/xz/suffix.c	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/suffix.c	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,399 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file       suffix.c
+/// \brief      Checks filename suffix and creates the destination filename
+//
+//  Author:     Lasse Collin
+//
+//  This file has been put into the public domain.
+//  You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+#ifdef __DJGPP__
+#	include <fcntl.h>
+#endif
+
+// For case-insensitive filename suffix on case-insensitive systems
+#if defined(TUKLIB_DOSLIKE) || defined(__VMS)
+#	define strcmp strcasecmp
+#endif
+
+
+static char *custom_suffix = NULL;
+
+
+/// \brief      Test if the char is a directory separator
+static bool
+is_dir_sep(char c)
+{
+#ifdef TUKLIB_DOSLIKE
+	return c == '/' || c == '\\' || c == ':';
+#else
+	return c == '/';
+#endif
+}
+
+
+/// \brief      Test if the string contains a directory separator
+static bool
+has_dir_sep(const char *str)
+{
+#ifdef TUKLIB_DOSLIKE
+	return strpbrk(str, "/\\:") != NULL;
+#else
+	return strchr(str, '/') != NULL;
+#endif
+}
+
+
+#ifdef __DJGPP__
+/// \brief      Test for special suffix used for 8.3 short filenames (SFN)
+///
+/// \return     If str matches *.?- or *.??-, true is returned. Otherwise
+///             false is returned.
+static bool
+has_sfn_suffix(const char *str, size_t len)
+{
+	if (len >= 4 && str[len - 1] == '-' && str[len - 2] != '.'
+			&& !is_dir_sep(str[len - 2])) {
+		// *.?-
+		if (str[len - 3] == '.')
+			return !is_dir_sep(str[len - 4]);
+
+		// *.??-
+		if (len >= 5 && !is_dir_sep(str[len - 3])
+				&& str[len - 4] == '.')
+			return !is_dir_sep(str[len - 5]);
+	}
+
+	return false;
+}
+#endif
+
+
+/// \brief      Checks if src_name has given compressed_suffix
+///
+/// \param      suffix      Filename suffix to look for
+/// \param      src_name    Input filename
+/// \param      src_len     strlen(src_name)
+///
+/// \return     If src_name has the suffix, src_len - strlen(suffix) is
+///             returned. It's always a positive integer. Otherwise zero
+///             is returned.
+static size_t
+test_suffix(const char *suffix, const char *src_name, size_t src_len)
+{
+	const size_t suffix_len = strlen(suffix);
+
+	// The filename must have at least one character in addition to
+	// the suffix. src_name may contain path to the filename, so we
+	// need to check for directory separator too.
+	if (src_len <= suffix_len
+			|| is_dir_sep(src_name[src_len - suffix_len - 1]))
+		return 0;
+
+	if (strcmp(suffix, src_name + src_len - suffix_len) == 0)
+		return src_len - suffix_len;
+
+	return 0;
+}
+
+
+/// \brief      Removes the filename suffix of the compressed file
+///
+/// \return     Name of the uncompressed file, or NULL if file has unknown
+///             suffix.
+static char *
+uncompressed_name(const char *src_name, const size_t src_len)
+{
+	static const struct {
+		const char *compressed;
+		const char *uncompressed;
+	} suffixes[] = {
+		{ ".xz",    "" },
+		{ ".txz",   ".tar" }, // .txz abbreviation for .txt.gz is rare.
+		{ ".lzma",  "" },
+#ifdef __DJGPP__
+		{ ".lzm",   "" },
+#endif
+		{ ".tlz",   ".tar" },
+		// { ".gz",    "" },
+		// { ".tgz",   ".tar" },
+	};
+
+	const char *new_suffix = "";
+	size_t new_len = 0;
+
+	if (opt_format == FORMAT_RAW) {
+		// Don't check for known suffixes when --format=raw was used.
+		if (custom_suffix == NULL) {
+			message_error(_("%s: With --format=raw, "
+					"--suffix=.SUF is required unless "
+					"writing to stdout"), src_name);
+			return NULL;
+		}
+	} else {
+		for (size_t i = 0; i < ARRAY_SIZE(suffixes); ++i) {
+			new_len = test_suffix(suffixes[i].compressed,
+					src_name, src_len);
+			if (new_len != 0) {
+				new_suffix = suffixes[i].uncompressed;
+				break;
+			}
+		}
+
+#ifdef __DJGPP__
+		// Support also *.?- -> *.? and *.??- -> *.?? on DOS.
+		// This is done also when long filenames are available
+		// to keep it easy to decompress files created when
+		// long filename support wasn't available.
+		if (new_len == 0 && has_sfn_suffix(src_name, src_len)) {
+			new_suffix = "";
+			new_len = src_len - 1;
+		}
+#endif
+	}
+
+	if (new_len == 0 && custom_suffix != NULL)
+		new_len = test_suffix(custom_suffix, src_name, src_len);
+
+	if (new_len == 0) {
+		message_warning(_("%s: Filename has an unknown suffix, "
+				"skipping"), src_name);
+		return NULL;
+	}
+
+	const size_t new_suffix_len = strlen(new_suffix);
+	char *dest_name = xmalloc(new_len + new_suffix_len + 1);
+
+	memcpy(dest_name, src_name, new_len);
+	memcpy(dest_name + new_len, new_suffix, new_suffix_len);
+	dest_name[new_len + new_suffix_len] = '\0';
+
+	return dest_name;
+}
+
+
+/// This message is needed in multiple places in compressed_name(),
+/// so the message has been put into its own function.
+static void
+msg_suffix(const char *src_name, const char *suffix)
+{
+	message_warning(_("%s: File already has `%s' suffix, skipping"),
+			src_name, suffix);
+	return;
+}
+
+
+/// \brief      Appends suffix to src_name
+///
+/// In contrast to uncompressed_name(), we check only suffixes that are valid
+/// for the specified file format.
+static char *
+compressed_name(const char *src_name, size_t src_len)
+{
+	// The order of these must match the order in args.h.
+	static const char *const all_suffixes[][4] = {
+		{
+			".xz",
+			".txz",
+			NULL
+		}, {
+			".lzma",
+#ifdef __DJGPP__
+			".lzm",
+#endif
+			".tlz",
+			NULL
+/*
+		}, {
+			".gz",
+			".tgz",
+			NULL
+*/
+		}, {
+			// --format=raw requires specifying the suffix
+			// manually or using stdout.
+			NULL
+		}
+	};
+
+	// args.c ensures this.
+	assert(opt_format != FORMAT_AUTO);
+
+	const size_t format = opt_format - 1;
+	const char *const *suffixes = all_suffixes[format];
+
+	// Look for known filename suffixes and refuse to compress them.
+	for (size_t i = 0; suffixes[i] != NULL; ++i) {
+		if (test_suffix(suffixes[i], src_name, src_len) != 0) {
+			msg_suffix(src_name, suffixes[i]);
+			return NULL;
+		}
+	}
+
+#ifdef __DJGPP__
+	// Recognize also the special suffix that is used when long
+	// filename (LFN) support isn't available. This suffix is
+	// recognized on LFN systems too.
+	if (opt_format == FORMAT_XZ && has_sfn_suffix(src_name, src_len)) {
+		msg_suffix(src_name, "-");
+		return NULL;
+	}
+#endif
+
+	if (custom_suffix != NULL) {
+		if (test_suffix(custom_suffix, src_name, src_len) != 0) {
+			msg_suffix(src_name, custom_suffix);
+			return NULL;
+		}
+	}
+
+	// TODO: Hmm, maybe it would be better to validate this in args.c,
+	// since the suffix handling when decoding is weird now.
+	if (opt_format == FORMAT_RAW && custom_suffix == NULL) {
+		message_error(_("%s: With --format=raw, "
+				"--suffix=.SUF is required unless "
+				"writing to stdout"), src_name);
+		return NULL;
+	}
+
+	const char *suffix = custom_suffix != NULL
+			? custom_suffix : suffixes[0];
+	size_t suffix_len = strlen(suffix);
+
+#ifdef __DJGPP__
+	if (!_use_lfn(src_name)) {
+		// Long filename (LFN) support isn't available and we are
+		// limited to 8.3 short filenames (SFN).
+		//
+		// Look for suffix separator from the filename, and make sure
+		// that it is in the filename, not in a directory name.
+		const char *sufsep = strrchr(src_name, '.');
+		if (sufsep == NULL || sufsep[1] == '\0'
+				|| has_dir_sep(sufsep)) {
+			// src_name has no filename extension.
+			//
+			// Examples:
+			// xz foo         -> foo.xz
+			// xz -F lzma foo -> foo.lzm
+			// xz -S x foo    -> foox
+			// xz -S x foo.   -> foo.x
+			// xz -S x.y foo  -> foox.y
+			// xz -S .x foo   -> foo.x
+			// xz -S .x foo.  -> foo.x
+			//
+			// Avoid double dots:
+			if (sufsep != NULL && sufsep[1] == '\0'
+					&& suffix[0] == '.')
+				--src_len;
+
+		} else if (custom_suffix == NULL
+				&& strcasecmp(sufsep, ".tar") == 0) {
+			// ".tar" is handled specially.
+			//
+			// Examples:
+			// xz foo.tar          -> foo.txz
+			// xz -F lzma foo.tar  -> foo.tlz
+			static const char *const tar_suffixes[] = {
+				".txz",
+				".tlz",
+				// ".tgz",
+			};
+			suffix = tar_suffixes[format];
+			suffix_len = 4;
+			src_len -= 4;
+
+		} else {
+			if (custom_suffix == NULL && opt_format == FORMAT_XZ) {
+				// Instead of the .xz suffix, use a single
+				// character at the end of the filename
+				// extension. This is to minimize name
+				// conflicts when compressing multiple files
+				// with the same basename. E.g. foo.txt and
+				// foo.exe become foo.tx- and foo.ex-. Dash
+				// is rare as the last character of the
+				// filename extension, so it seems to be
+				// quite safe choice and it stands out better
+				// in directory listings than e.g. x. For
+				// comparison, gzip uses z.
+				suffix = "-";
+				suffix_len = 1;
+			}
+
+			if (suffix[0] == '.') {
+				// The first character of the suffix is a dot.
+				// Throw away the original filename extension
+				// and replace it with the new suffix.
+				//
+				// Examples:
+				// xz -F lzma foo.txt  -> foo.lzm
+				// xz -S .x  foo.txt   -> foo.x
+				src_len = sufsep - src_name;
+
+			} else {
+				// The first character of the suffix is not
+				// a dot. Preserve the first 0-2 characters
+				// of the original filename extension.
+				//
+				// Examples:
+				// xz foo.txt         -> foo.tx-
+				// xz -S x  foo.c     -> foo.cx
+				// xz -S ab foo.c     -> foo.cab
+				// xz -S ab foo.txt   -> foo.tab
+				// xz -S abc foo.txt  -> foo.abc
+				//
+				// Truncate the suffix to three chars:
+				if (suffix_len > 3)
+					suffix_len = 3;
+
+				// If needed, overwrite 1-3 characters.
+				if (strlen(sufsep) > 4 - suffix_len)
+					src_len = sufsep - src_name
+							+ 4 - suffix_len;
+			}
+		}
+	}
+#endif
+
+	char *dest_name = xmalloc(src_len + suffix_len + 1);
+
+	memcpy(dest_name, src_name, src_len);
+	memcpy(dest_name + src_len, suffix, suffix_len);
+	dest_name[src_len + suffix_len] = '\0';
+
+	return dest_name;
+}
+
+
+extern char *
+suffix_get_dest_name(const char *src_name)
+{
+	assert(src_name != NULL);
+
+	// Length of the name is needed in all cases to locate the end of
+	// the string to compare the suffix, so calculate the length here.
+	const size_t src_len = strlen(src_name);
+
+	return opt_mode == MODE_COMPRESS
+			? compressed_name(src_name, src_len)
+			: uncompressed_name(src_name, src_len);
+}
+
+
+extern void
+suffix_set(const char *suffix)
+{
+	// Empty suffix and suffixes having a directory separator are
+	// rejected. Such suffixes would break things later.
+	if (suffix[0] == '\0' || has_dir_sep(suffix))
+		message_fatal(_("%s: Invalid filename suffix"), suffix);
+
+	// Replace the old custom_suffix (if any) with the new suffix.
+	free(custom_suffix);
+	custom_suffix = xstrdup(suffix);
+	return;
+}

Deleted: vendor/xz/5.2.3/src/xz/xz.1
===================================================================
--- vendor/xz/dist/src/xz/xz.1	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/xz.1	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,2599 +0,0 @@
-'\" t
-.\"
-.\" Author: Lasse Collin
-.\"
-.\" This file has been put into the public domain.
-.\" You can do whatever you want with this file.
-.\"
-.TH XZ 1 "2013-06-21" "Tukaani" "XZ Utils"
-.
-.SH NAME
-xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files
-.
-.SH SYNOPSIS
-.B xz
-.RI [ option... ]
-.RI [ file... ]
-.
-.SH COMMAND ALIASES
-.B unxz
-is equivalent to
-.BR "xz \-\-decompress" .
-.br
-.B xzcat
-is equivalent to
-.BR "xz \-\-decompress \-\-stdout" .
-.br
-.B lzma
-is equivalent to
-.BR "xz \-\-format=lzma" .
-.br
-.B unlzma
-is equivalent to
-.BR "xz \-\-format=lzma \-\-decompress" .
-.br
-.B lzcat
-is equivalent to
-.BR "xz \-\-format=lzma \-\-decompress \-\-stdout" .
-.PP
-When writing scripts that need to decompress files,
-it is recommended to always use the name
-.B xz
-with appropriate arguments
-.RB ( "xz \-d"
-or
-.BR "xz \-dc" )
-instead of the names
-.B unxz
-and
-.BR xzcat .
-.
-.SH DESCRIPTION
-.B xz
-is a general-purpose data compression tool with
-command line syntax similar to
-.BR gzip (1)
-and
-.BR bzip2 (1).
-The native file format is the
-.B .xz
-format, but the legacy
-.B .lzma
-format used by LZMA Utils and
-raw compressed streams with no container format headers
-are also supported.
-.PP
-.B xz
-compresses or decompresses each
-.I file
-according to the selected operation mode.
-If no
-.I files
-are given or
-.I file
-is
-.BR \- ,
-.B xz
-reads from standard input and writes the processed data
-to standard output.
-.B xz
-will refuse (display an error and skip the
-.IR file )
-to write compressed data to standard output if it is a terminal.
-Similarly,
-.B xz
-will refuse to read compressed data
-from standard input if it is a terminal.
-.PP
-Unless
-.B \-\-stdout
-is specified,
-.I files
-other than
-.B \-
-are written to a new file whose name is derived from the source
-.I file
-name:
-.IP \(bu 3
-When compressing, the suffix of the target file format
-.RB ( .xz
-or
-.BR .lzma )
-is appended to the source filename to get the target filename.
-.IP \(bu 3
-When decompressing, the
-.B .xz
-or
-.B .lzma
-suffix is removed from the filename to get the target filename.
-.B xz
-also recognizes the suffixes
-.B .txz
-and
-.BR .tlz ,
-and replaces them with the
-.B .tar
-suffix.
-.PP
-If the target file already exists, an error is displayed and the
-.I file
-is skipped.
-.PP
-Unless writing to standard output,
-.B xz
-will display a warning and skip the
-.I file
-if any of the following applies:
-.IP \(bu 3
-.I File
-is not a regular file.
-Symbolic links are not followed,
-and thus they are not considered to be regular files.
-.IP \(bu 3
-.I File
-has more than one hard link.
-.IP \(bu 3
-.I File
-has setuid, setgid, or sticky bit set.
-.IP \(bu 3
-The operation mode is set to compress and the
-.I file
-already has a suffix of the target file format
-.RB ( .xz
-or
-.B .txz
-when compressing to the
-.B .xz
-format, and
-.B .lzma
-or
-.B .tlz
-when compressing to the
-.B .lzma
-format).
-.IP \(bu 3
-The operation mode is set to decompress and the
-.I file
-doesn't have a suffix of any of the supported file formats
-.RB ( .xz ,
-.BR .txz ,
-.BR .lzma ,
-or
-.BR .tlz ).
-.PP
-After successfully compressing or decompressing the
-.IR file ,
-.B xz
-copies the owner, group, permissions, access time,
-and modification time from the source
-.I file
-to the target file.
-If copying the group fails, the permissions are modified
-so that the target file doesn't become accessible to users
-who didn't have permission to access the source
-.IR file .
-.B xz
-doesn't support copying other metadata like access control lists
-or extended attributes yet.
-.PP
-Once the target file has been successfully closed, the source
-.I file
-is removed unless
-.B \-\-keep
-was specified.
-The source
-.I file
-is never removed if the output is written to standard output.
-.PP
-Sending
-.B SIGINFO
-or
-.B SIGUSR1
-to the
-.B xz
-process makes it print progress information to standard error.
-This has only limited use since when standard error
-is a terminal, using
-.B \-\-verbose
-will display an automatically updating progress indicator.
-.
-.SS "Memory usage"
-The memory usage of
-.B xz
-varies from a few hundred kilobytes to several gigabytes
-depending on the compression settings.
-The settings used when compressing a file determine
-the memory requirements of the decompressor.
-Typically the decompressor needs 5\ % to 20\ % of
-the amount of memory that the compressor needed when
-creating the file.
-For example, decompressing a file created with
-.B xz \-9
-currently requires 65\ MiB of memory.
-Still, it is possible to have
-.B .xz
-files that require several gigabytes of memory to decompress.
-.PP
-Especially users of older systems may find
-the possibility of very large memory usage annoying.
-To prevent uncomfortable surprises,
-.B xz
-has a built-in memory usage limiter, which is disabled by default.
-While some operating systems provide ways to limit
-the memory usage of processes, relying on it
-wasn't deemed to be flexible enough (e.g. using
-.BR ulimit (1)
-to limit virtual memory tends to cripple
-.BR mmap (2)).
-.PP
-The memory usage limiter can be enabled with
-the command line option \fB\-\-memlimit=\fIlimit\fR.
-Often it is more convenient to enable the limiter
-by default by setting the environment variable
-.BR XZ_DEFAULTS ,
-e.g.\&
-.BR XZ_DEFAULTS=\-\-memlimit=150MiB .
-It is possible to set the limits separately
-for compression and decompression
-by using \fB\-\-memlimit\-compress=\fIlimit\fR and
-\fB\-\-memlimit\-decompress=\fIlimit\fR.
-Using these two options outside
-.B XZ_DEFAULTS
-is rarely useful because a single run of
-.B xz
-cannot do both compression and decompression and
-.BI \-\-memlimit= limit
-(or \fB\-M\fR \fIlimit\fR)
-is shorter to type on the command line.
-.PP
-If the specified memory usage limit is exceeded when decompressing,
-.B xz
-will display an error and decompressing the file will fail.
-If the limit is exceeded when compressing,
-.B xz
-will try to scale the settings down so that the limit
-is no longer exceeded (except when using \fB\-\-format=raw\fR
-or \fB\-\-no\-adjust\fR).
-This way the operation won't fail unless the limit is very small.
-The scaling of the settings is done in steps that don't
-match the compression level presets, e.g. if the limit is
-only slightly less than the amount required for
-.BR "xz \-9" ,
-the settings will be scaled down only a little,
-not all the way down to
-.BR "xz \-8" .
-.
-.SS "Concatenation and padding with .xz files"
-It is possible to concatenate
-.B .xz
-files as is.
-.B xz
-will decompress such files as if they were a single
-.B .xz
-file.
-.PP
-It is possible to insert padding between the concatenated parts
-or after the last part.
-The padding must consist of null bytes and the size
-of the padding must be a multiple of four bytes.
-This can be useful e.g. if the
-.B .xz
-file is stored on a medium that measures file sizes
-in 512-byte blocks.
-.PP
-Concatenation and padding are not allowed with
-.B .lzma
-files or raw streams.
-.
-.SH OPTIONS
-.
-.SS "Integer suffixes and special values"
-In most places where an integer argument is expected,
-an optional suffix is supported to easily indicate large integers.
-There must be no space between the integer and the suffix.
-.TP
-.B KiB
-Multiply the integer by 1,024 (2^10).
-.BR Ki ,
-.BR k ,
-.BR kB ,
-.BR K ,
-and
-.B KB
-are accepted as synonyms for
-.BR KiB .
-.TP
-.B MiB
-Multiply the integer by 1,048,576 (2^20).
-.BR Mi ,
-.BR m ,
-.BR M ,
-and
-.B MB
-are accepted as synonyms for
-.BR MiB .
-.TP
-.B GiB
-Multiply the integer by 1,073,741,824 (2^30).
-.BR Gi ,
-.BR g ,
-.BR G ,
-and
-.B GB
-are accepted as synonyms for
-.BR GiB .
-.PP
-The special value
-.B max
-can be used to indicate the maximum integer value
-supported by the option.
-.
-.SS "Operation mode"
-If multiple operation mode options are given,
-the last one takes effect.
-.TP
-.BR \-z ", " \-\-compress
-Compress.
-This is the default operation mode when no operation mode option
-is specified and no other operation mode is implied from
-the command name (for example,
-.B unxz
-implies
-.BR \-\-decompress ).
-.TP
-.BR \-d ", " \-\-decompress ", " \-\-uncompress
-Decompress.
-.TP
-.BR \-t ", " \-\-test
-Test the integrity of compressed
-.IR files .
-This option is equivalent to
-.B "\-\-decompress \-\-stdout"
-except that the decompressed data is discarded instead of being
-written to standard output.
-No files are created or removed.
-.TP
-.BR \-l ", " \-\-list
-Print information about compressed
-.IR files .
-No uncompressed output is produced,
-and no files are created or removed.
-In list mode, the program cannot read
-the compressed data from standard
-input or from other unseekable sources.
-.IP ""
-The default listing shows basic information about
-.IR files ,
-one file per line.
-To get more detailed information, use also the
-.B \-\-verbose
-option.
-For even more information, use
-.B \-\-verbose
-twice, but note that this may be slow, because getting all the extra
-information requires many seeks.
-The width of verbose output exceeds
-80 characters, so piping the output to e.g.\&
-.B "less\ \-S"
-may be convenient if the terminal isn't wide enough.
-.IP ""
-The exact output may vary between
-.B xz
-versions and different locales.
-For machine-readable output,
-.B \-\-robot \-\-list
-should be used.
-.
-.SS "Operation modifiers"
-.TP
-.BR \-k ", " \-\-keep
-Don't delete the input files.
-.TP
-.BR \-f ", " \-\-force
-This option has several effects:
-.RS
-.IP \(bu 3
-If the target file already exists,
-delete it before compressing or decompressing.
-.IP \(bu 3
-Compress or decompress even if the input is
-a symbolic link to a regular file,
-has more than one hard link,
-or has the setuid, setgid, or sticky bit set.
-The setuid, setgid, and sticky bits are not copied
-to the target file.
-.IP \(bu 3
-When used with
-.B \-\-decompress
-.BR \-\-stdout
-and
-.B xz
-cannot recognize the type of the source file,
-copy the source file as is to standard output.
-This allows
-.B xzcat
-.B \-\-force
-to be used like
-.BR cat (1)
-for files that have not been compressed with
-.BR xz .
-Note that in future,
-.B xz
-might support new compressed file formats, which may make
-.B xz
-decompress more types of files instead of copying them as is to
-standard output.
-.BI \-\-format= format
-can be used to restrict
-.B xz
-to decompress only a single file format.
-.RE
-.TP
-.BR \-c ", " \-\-stdout ", " \-\-to\-stdout
-Write the compressed or decompressed data to
-standard output instead of a file.
-This implies
-.BR \-\-keep .
-.TP
-.B \-\-no\-sparse
-Disable creation of sparse files.
-By default, if decompressing into a regular file,
-.B xz
-tries to make the file sparse if the decompressed data contains
-long sequences of binary zeros.
-It also works when writing to standard output
-as long as standard output is connected to a regular file
-and certain additional conditions are met to make it safe.
-Creating sparse files may save disk space and speed up
-the decompression by reducing the amount of disk I/O.
-.TP
-\fB\-S\fR \fI.suf\fR, \fB\-\-suffix=\fI.suf
-When compressing, use
-.I .suf
-as the suffix for the target file instead of
-.B .xz
-or
-.BR .lzma .
-If not writing to standard output and
-the source file already has the suffix
-.IR .suf ,
-a warning is displayed and the file is skipped.
-.IP ""
-When decompressing, recognize files with the suffix
-.I .suf
-in addition to files with the
-.BR .xz ,
-.BR .txz ,
-.BR .lzma ,
-or
-.B .tlz
-suffix.
-If the source file has the suffix
-.IR .suf ,
-the suffix is removed to get the target filename.
-.IP ""
-When compressing or decompressing raw streams
-.RB ( \-\-format=raw ),
-the suffix must always be specified unless
-writing to standard output,
-because there is no default suffix for raw streams.
-.TP
-\fB\-\-files\fR[\fB=\fIfile\fR]
-Read the filenames to process from
-.IR file ;
-if
-.I file
-is omitted, filenames are read from standard input.
-Filenames must be terminated with the newline character.
-A dash
-.RB ( \- )
-is taken as a regular filename; it doesn't mean standard input.
-If filenames are given also as command line arguments, they are
-processed before the filenames read from
-.IR file .
-.TP
-\fB\-\-files0\fR[\fB=\fIfile\fR]
-This is identical to \fB\-\-files\fR[\fB=\fIfile\fR] except
-that each filename must be terminated with the null character.
-.
-.SS "Basic file format and compression options"
-.TP
-\fB\-F\fR \fIformat\fR, \fB\-\-format=\fIformat
-Specify the file
-.I format
-to compress or decompress:
-.RS
-.TP
-.B auto
-This is the default.
-When compressing,
-.B auto
-is equivalent to
-.BR xz .
-When decompressing,
-the format of the input file is automatically detected.
-Note that raw streams (created with
-.BR \-\-format=raw )
-cannot be auto-detected.
-.TP
-.B xz
-Compress to the
-.B .xz
-file format, or accept only
-.B .xz
-files when decompressing.
-.TP
-.BR lzma ", " alone
-Compress to the legacy
-.B .lzma
-file format, or accept only
-.B .lzma
-files when decompressing.
-The alternative name
-.B alone
-is provided for backwards compatibility with LZMA Utils.
-.TP
-.B raw
-Compress or uncompress a raw stream (no headers).
-This is meant for advanced users only.
-To decode raw streams, you need use
-.B \-\-format=raw
-and explicitly specify the filter chain,
-which normally would have been stored in the container headers.
-.RE
-.TP
-\fB\-C\fR \fIcheck\fR, \fB\-\-check=\fIcheck
-Specify the type of the integrity check.
-The check is calculated from the uncompressed data and
-stored in the
-.B .xz
-file.
-This option has an effect only when compressing into the
-.B .xz
-format; the
-.B .lzma
-format doesn't support integrity checks.
-The integrity check (if any) is verified when the
-.B .xz
-file is decompressed.
-.IP ""
-Supported
-.I check
-types:
-.RS
-.TP
-.B none
-Don't calculate an integrity check at all.
-This is usually a bad idea.
-This can be useful when integrity of the data is verified
-by other means anyway.
-.TP
-.B crc32
-Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet).
-.TP
-.B crc64
-Calculate CRC64 using the polynomial from ECMA-182.
-This is the default, since it is slightly better than CRC32
-at detecting damaged files and the speed difference is negligible.
-.TP
-.B sha256
-Calculate SHA-256.
-This is somewhat slower than CRC32 and CRC64.
-.RE
-.IP ""
-Integrity of the
-.B .xz
-headers is always verified with CRC32.
-It is not possible to change or disable it.
-.TP
-.BR \-0 " ... " \-9
-Select a compression preset level.
-The default is
-.BR \-6 .
-If multiple preset levels are specified,
-the last one takes effect.
-If a custom filter chain was already specified, setting
-a compression preset level clears the custom filter chain.
-.IP ""
-The differences between the presets are more significant than with
-.BR gzip (1)
-and
-.BR bzip2 (1).
-The selected compression settings determine
-the memory requirements of the decompressor,
-thus using a too high preset level might make it painful
-to decompress the file on an old system with little RAM.
-Specifically,
-.B "it's not a good idea to blindly use \-9 for everything"
-like it often is with
-.BR gzip (1)
-and
-.BR bzip2 (1).
-.RS
-.TP
-.BR "\-0" " ... " "\-3"
-These are somewhat fast presets.
-.B \-0
-is sometimes faster than
-.B "gzip \-9"
-while compressing much better.
-The higher ones often have speed comparable to
-.BR bzip2 (1)
-with comparable or better compression ratio,
-although the results
-depend a lot on the type of data being compressed.
-.TP
-.BR "\-4" " ... " "\-6"
-Good to very good compression while keeping
-decompressor memory usage reasonable even for old systems.
-.B \-6
-is the default, which is usually a good choice
-e.g. for distributing files that need to be decompressible
-even on systems with only 16\ MiB RAM.
-.RB ( \-5e
-or
-.B \-6e
-may be worth considering too.
-See
-.BR \-\-extreme .)
-.TP
-.B "\-7 ... \-9"
-These are like
-.B \-6
-but with higher compressor and decompressor memory requirements.
-These are useful only when compressing files bigger than
-8\ MiB, 16\ MiB, and 32\ MiB, respectively.
-.RE
-.IP ""
-On the same hardware, the decompression speed is approximately
-a constant number of bytes of compressed data per second.
-In other words, the better the compression,
-the faster the decompression will usually be.
-This also means that the amount of uncompressed output
-produced per second can vary a lot.
-.IP ""
-The following table summarises the features of the presets:
-.RS
-.RS
-.PP
-.TS
-tab(;);
-c c c c c
-n n n n n.
-Preset;DictSize;CompCPU;CompMem;DecMem
-\-0;256 KiB;0;3 MiB;1 MiB
-\-1;1 MiB;1;9 MiB;2 MiB
-\-2;2 MiB;2;17 MiB;3 MiB
-\-3;4 MiB;3;32 MiB;5 MiB
-\-4;4 MiB;4;48 MiB;5 MiB
-\-5;8 MiB;5;94 MiB;9 MiB
-\-6;8 MiB;6;94 MiB;9 MiB
-\-7;16 MiB;6;186 MiB;17 MiB
-\-8;32 MiB;6;370 MiB;33 MiB
-\-9;64 MiB;6;674 MiB;65 MiB
-.TE
-.RE
-.RE
-.IP ""
-Column descriptions:
-.RS
-.IP \(bu 3
-DictSize is the LZMA2 dictionary size.
-It is waste of memory to use a dictionary bigger than
-the size of the uncompressed file.
-This is why it is good to avoid using the presets
-.BR \-7 " ... " \-9
-when there's no real need for them.
-At
-.B \-6
-and lower, the amount of memory wasted is
-usually low enough to not matter.
-.IP \(bu 3
-CompCPU is a simplified representation of the LZMA2 settings
-that affect compression speed.
-The dictionary size affects speed too,
-so while CompCPU is the same for levels
-.BR \-6 " ... " \-9 ,
-higher levels still tend to be a little slower.
-To get even slower and thus possibly better compression, see
-.BR \-\-extreme .
-.IP \(bu 3
-CompMem contains the compressor memory requirements
-in the single-threaded mode.
-It may vary slightly between
-.B xz
-versions.
-Memory requirements of some of the future multithreaded modes may
-be dramatically higher than that of the single-threaded mode.
-.IP \(bu 3
-DecMem contains the decompressor memory requirements.
-That is, the compression settings determine
-the memory requirements of the decompressor.
-The exact decompressor memory usage is slightly more than
-the LZMA2 dictionary size, but the values in the table
-have been rounded up to the next full MiB.
-.RE
-.TP
-.BR \-e ", " \-\-extreme
-Use a slower variant of the selected compression preset level
-.RB ( \-0 " ... " \-9 )
-to hopefully get a little bit better compression ratio,
-but with bad luck this can also make it worse.
-Decompressor memory usage is not affected,
-but compressor memory usage increases a little at preset levels
-.BR \-0 " ... " \-3 .
-.IP ""
-Since there are two presets with dictionary sizes
-4\ MiB and 8\ MiB, the presets
-.B \-3e
-and
-.B \-5e
-use slightly faster settings (lower CompCPU) than
-.B \-4e
-and
-.BR \-6e ,
-respectively.
-That way no two presets are identical.
-.RS
-.RS
-.PP
-.TS
-tab(;);
-c c c c c
-n n n n n.
-Preset;DictSize;CompCPU;CompMem;DecMem
-\-0e;256 KiB;8;4 MiB;1 MiB
-\-1e;1 MiB;8;13 MiB;2 MiB
-\-2e;2 MiB;8;25 MiB;3 MiB
-\-3e;4 MiB;7;48 MiB;5 MiB
-\-4e;4 MiB;8;48 MiB;5 MiB
-\-5e;8 MiB;7;94 MiB;9 MiB
-\-6e;8 MiB;8;94 MiB;9 MiB
-\-7e;16 MiB;8;186 MiB;17 MiB
-\-8e;32 MiB;8;370 MiB;33 MiB
-\-9e;64 MiB;8;674 MiB;65 MiB
-.TE
-.RE
-.RE
-.IP ""
-For example, there are a total of four presets that use
-8\ MiB dictionary, whose order from the fastest to the slowest is
-.BR \-5 ,
-.BR \-6 ,
-.BR \-5e ,
-and
-.BR \-6e .
-.TP
-.B \-\-fast
-.PD 0
-.TP
-.B \-\-best
-.PD
-These are somewhat misleading aliases for
-.B \-0
-and
-.BR \-9 ,
-respectively.
-These are provided only for backwards compatibility
-with LZMA Utils.
-Avoid using these options.
-.TP
-.BI \-\-memlimit\-compress= limit
-Set a memory usage limit for compression.
-If this option is specified multiple times,
-the last one takes effect.
-.IP ""
-If the compression settings exceed the
-.IR limit ,
-.B xz
-will adjust the settings downwards so that
-the limit is no longer exceeded and display a notice that
-automatic adjustment was done.
-Such adjustments are not made when compressing with
-.B \-\-format=raw
-or if
-.B \-\-no\-adjust
-has been specified.
-In those cases, an error is displayed and
-.B xz
-will exit with exit status 1.
-.IP ""
-The
-.I limit
-can be specified in multiple ways:
-.RS
-.IP \(bu 3
-The
-.I limit
-can be an absolute value in bytes.
-Using an integer suffix like
-.B MiB
-can be useful.
-Example:
-.B "\-\-memlimit\-compress=80MiB"
-.IP \(bu 3
-The
-.I limit
-can be specified as a percentage of total physical memory (RAM).
-This can be useful especially when setting the
-.B XZ_DEFAULTS
-environment variable in a shell initialization script
-that is shared between different computers.
-That way the limit is automatically bigger
-on systems with more memory.
-Example:
-.B "\-\-memlimit\-compress=70%"
-.IP \(bu 3
-The
-.I limit
-can be reset back to its default value by setting it to
-.BR 0 .
-This is currently equivalent to setting the
-.I limit
-to
-.B max
-(no memory usage limit).
-Once multithreading support has been implemented,
-there may be a difference between
-.B 0
-and
-.B max
-for the multithreaded case, so it is recommended to use
-.B 0
-instead of
-.B max
-until the details have been decided.
-.RE
-.IP ""
-See also the section
-.BR "Memory usage" .
-.TP
-.BI \-\-memlimit\-decompress= limit
-Set a memory usage limit for decompression.
-This also affects the
-.B \-\-list
-mode.
-If the operation is not possible without exceeding the
-.IR limit ,
-.B xz
-will display an error and decompressing the file will fail.
-See
-.BI \-\-memlimit\-compress= limit
-for possible ways to specify the
-.IR limit .
-.TP
-\fB\-M\fR \fIlimit\fR, \fB\-\-memlimit=\fIlimit\fR, \fB\-\-memory=\fIlimit
-This is equivalent to specifying \fB\-\-memlimit\-compress=\fIlimit
-\fB\-\-memlimit\-decompress=\fIlimit\fR.
-.TP
-.B \-\-no\-adjust
-Display an error and exit if the compression settings exceed
-the memory usage limit.
-The default is to adjust the settings downwards so
-that the memory usage limit is not exceeded.
-Automatic adjusting is always disabled when creating raw streams
-.RB ( \-\-format=raw ).
-.TP
-\fB\-T\fR \fIthreads\fR, \fB\-\-threads=\fIthreads
-Specify the number of worker threads to use.
-The actual number of threads can be less than
-.I threads
-if using more threads would exceed the memory usage limit.
-.IP ""
-.B "Multithreaded compression and decompression are not"
-.B "implemented yet, so this option has no effect for now."
-.IP ""
-.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
-the compression settings in detail instead of relying on
-the settings associated to the presets.
-When a custom filter chain is specified,
-preset options (\fB\-0\fR ... \fB\-9\fR and \fB\-\-extreme\fR)
-earlier on the command line are forgotten.
-If a preset option is specified
-after one or more custom filter chain options,
-the new preset takes effect and
-the custom filter chain options specified earlier are forgotten.
-.PP
-A filter chain is comparable to piping on the command line.
-When compressing, the uncompressed input goes to the first filter,
-whose output goes to the next filter (if any).
-The output of the last filter gets written to the compressed file.
-The maximum number of filters in the chain is four,
-but typically a filter chain has only one or two filters.
-.PP
-Many filters have limitations on where they can be
-in the filter chain:
-some filters can work only as the last filter in the chain,
-some only as a non-last filter, and some work in any position
-in the chain.
-Depending on the filter, this limitation is either inherent to
-the filter design or exists to prevent security issues.
-.PP
-A custom filter chain is specified by using one or more
-filter options in the order they are wanted in the filter chain.
-That is, the order of filter options is significant!
-When decoding raw streams
-.RB ( \-\-format=raw ),
-the filter chain is specified in the same order as
-it was specified when compressing.
-.PP
-Filters take filter-specific
-.I options
-as a comma-separated list.
-Extra commas in
-.I options
-are ignored.
-Every option has a default value, so you need to
-specify only those you want to change.
-.PP
-To see the whole filter chain and
-.IR options ,
-use
-.B "xz \-vv"
-(that is, use
-.B \-\-verbose
-twice).
-This works also for viewing the filter chain options used by presets.
-.TP
-\fB\-\-lzma1\fR[\fB=\fIoptions\fR]
-.PD 0
-.TP
-\fB\-\-lzma2\fR[\fB=\fIoptions\fR]
-.PD
-Add LZMA1 or LZMA2 filter to the filter chain.
-These filters can be used only as the last filter in the chain.
-.IP ""
-LZMA1 is a legacy filter,
-which is supported almost solely due to the legacy
-.B .lzma
-file format, which supports only LZMA1.
-LZMA2 is an updated
-version of LZMA1 to fix some practical issues of LZMA1.
-The
-.B .xz
-format uses LZMA2 and doesn't support LZMA1 at all.
-Compression speed and ratios of LZMA1 and LZMA2
-are practically the same.
-.IP ""
-LZMA1 and LZMA2 share the same set of
-.IR options :
-.RS
-.TP
-.BI preset= preset
-Reset all LZMA1 or LZMA2
-.I options
-to
-.IR preset .
-.I Preset
-consist of an integer, which may be followed by single-letter
-preset modifiers.
-The integer can be from
-.B 0
-to
-.BR 9 ,
-matching the command line options \fB\-0\fR ... \fB\-9\fR.
-The only supported modifier is currently
-.BR e ,
-which matches
-.BR \-\-extreme .
-If no
-.B preset
-is specified, the default values of LZMA1 or LZMA2
-.I options
-are taken from the preset
-.BR 6 .
-.TP
-.BI dict= size
-Dictionary (history buffer)
-.I size
-indicates how many bytes of the recently processed
-uncompressed data is kept in memory.
-The algorithm tries to find repeating byte sequences (matches) in
-the uncompressed data, and replace them with references
-to the data currently in the dictionary.
-The bigger the dictionary, the higher is the chance
-to find a match.
-Thus, increasing dictionary
-.I size
-usually improves compression ratio, but
-a dictionary bigger than the uncompressed file is waste of memory.
-.IP ""
-Typical dictionary
-.I size
-is from 64\ KiB to 64\ MiB.
-The minimum is 4\ KiB.
-The maximum for compression is currently 1.5\ GiB (1536\ MiB).
-The decompressor already supports dictionaries up to
-one byte less than 4\ GiB, which is the maximum for
-the LZMA1 and LZMA2 stream formats.
-.IP ""
-Dictionary
-.I size
-and match finder
-.RI ( mf )
-together determine the memory usage of the LZMA1 or LZMA2 encoder.
-The same (or bigger) dictionary
-.I size
-is required for decompressing that was used when compressing,
-thus the memory usage of the decoder is determined
-by the dictionary size used when compressing.
-The
-.B .xz
-headers store the dictionary
-.I size
-either as
-.RI "2^" n
-or
-.RI "2^" n " + 2^(" n "\-1),"
-so these
-.I sizes
-are somewhat preferred for compression.
-Other
-.I sizes
-will get rounded up when stored in the
-.B .xz
-headers.
-.TP
-.BI lc= lc
-Specify the number of literal context bits.
-The minimum is 0 and the maximum is 4; the default is 3.
-In addition, the sum of
-.I lc
-and
-.I lp
-must not exceed 4.
-.IP ""
-All bytes that cannot be encoded as matches
-are encoded as literals.
-That is, literals are simply 8-bit bytes
-that are encoded one at a time.
-.IP ""
-The literal coding makes an assumption that the highest
-.I lc
-bits of the previous uncompressed byte correlate
-with the next byte.
-E.g. in typical English text, an upper-case letter is
-often followed by a lower-case letter, and a lower-case
-letter is usually followed by another lower-case letter.
-In the US-ASCII character set, the highest three bits are 010
-for upper-case letters and 011 for lower-case letters.
-When
-.I lc
-is at least 3, the literal coding can take advantage of
-this property in the uncompressed data.
-.IP ""
-The default value (3) is usually good.
-If you want maximum compression, test
-.BR lc=4 .
-Sometimes it helps a little, and
-sometimes it makes compression worse.
-If it makes it worse, test e.g.\&
-.B lc=2
-too.
-.TP
-.BI lp= lp
-Specify the number of literal position bits.
-The minimum is 0 and the maximum is 4; the default is 0.
-.IP ""
-.I Lp
-affects what kind of alignment in the uncompressed data is
-assumed when encoding literals.
-See
-.I pb
-below for more information about alignment.
-.TP
-.BI pb= pb
-Specify the number of position bits.
-The minimum is 0 and the maximum is 4; the default is 2.
-.IP ""
-.I Pb
-affects what kind of alignment in the uncompressed data is
-assumed in general.
-The default means four-byte alignment
-.RI (2^ pb =2^2=4),
-which is often a good choice when there's no better guess.
-.IP ""
-When the aligment is known, setting
-.I pb
-accordingly may reduce the file size a little.
-E.g. with text files having one-byte
-alignment (US-ASCII, ISO-8859-*, UTF-8), setting
-.B pb=0
-can improve compression slightly.
-For UTF-16 text,
-.B pb=1
-is a good choice.
-If the alignment is an odd number like 3 bytes,
-.B pb=0
-might be the best choice.
-.IP ""
-Even though the assumed alignment can be adjusted with
-.I pb
-and
-.IR lp ,
-LZMA1 and LZMA2 still slightly favor 16-byte alignment.
-It might be worth taking into account when designing file formats
-that are likely to be often compressed with LZMA1 or LZMA2.
-.TP
-.BI mf= mf
-Match finder has a major effect on encoder speed,
-memory usage, and compression ratio.
-Usually Hash Chain match finders are faster than Binary Tree
-match finders.
-The default depends on the
-.IR preset :
-0 uses
-.BR hc3 ,
-1\-3
-use
-.BR hc4 ,
-and the rest use
-.BR bt4 .
-.IP ""
-The following match finders are supported.
-The memory usage formulas below are rough approximations,
-which are closest to the reality when
-.I dict
-is a power of two.
-.RS
-.TP
-.B hc3
-Hash Chain with 2- and 3-byte hashing
-.br
-Minimum value for
-.IR nice :
-3
-.br
-Memory usage:
-.br
-.I dict
-* 7.5 (if
-.I dict
-<= 16 MiB);
-.br
-.I dict
-* 5.5 + 64 MiB (if
-.I dict
-> 16 MiB)
-.TP
-.B hc4
-Hash Chain with 2-, 3-, and 4-byte hashing
-.br
-Minimum value for
-.IR nice :
-4
-.br
-Memory usage:
-.br
-.I dict
-* 7.5 (if
-.I dict
-<= 32 MiB);
-.br
-.I dict
-* 6.5 (if
-.I dict
-> 32 MiB)
-.TP
-.B bt2
-Binary Tree with 2-byte hashing
-.br
-Minimum value for
-.IR nice :
-2
-.br
-Memory usage:
-.I dict
-* 9.5
-.TP
-.B bt3
-Binary Tree with 2- and 3-byte hashing
-.br
-Minimum value for
-.IR nice :
-3
-.br
-Memory usage:
-.br
-.I dict
-* 11.5 (if
-.I dict
-<= 16 MiB);
-.br
-.I dict
-* 9.5 + 64 MiB (if
-.I dict
-> 16 MiB)
-.TP
-.B bt4
-Binary Tree with 2-, 3-, and 4-byte hashing
-.br
-Minimum value for
-.IR nice :
-4
-.br
-Memory usage:
-.br
-.I dict
-* 11.5 (if
-.I dict
-<= 32 MiB);
-.br
-.I dict
-* 10.5 (if
-.I dict
-> 32 MiB)
-.RE
-.TP
-.BI mode= mode
-Compression
-.I mode
-specifies the method to analyze
-the data produced by the match finder.
-Supported
-.I modes
-are
-.B fast
-and
-.BR normal .
-The default is
-.B fast
-for
-.I presets
-0\-3 and
-.B normal
-for
-.I presets
-4\-9.
-.IP ""
-Usually
-.B fast
-is used with Hash Chain match finders and
-.B normal
-with Binary Tree match finders.
-This is also what the
-.I presets
-do.
-.TP
-.BI nice= nice
-Specify what is considered to be a nice length for a match.
-Once a match of at least
-.I nice
-bytes is found, the algorithm stops
-looking for possibly better matches.
-.IP ""
-.I Nice
-can be 2\-273 bytes.
-Higher values tend to give better compression ratio
-at the expense of speed.
-The default depends on the
-.IR preset .
-.TP
-.BI depth= depth
-Specify the maximum search depth in the match finder.
-The default is the special value of 0,
-which makes the compressor determine a reasonable
-.I depth
-from
-.I mf
-and
-.IR nice .
-.IP ""
-Reasonable
-.I depth
-for Hash Chains is 4\-100 and 16\-1000 for Binary Trees.
-Using very high values for
-.I depth
-can make the encoder extremely slow with some files.
-Avoid setting the
-.I depth
-over 1000 unless you are prepared to interrupt
-the compression in case it is taking far too long.
-.RE
-.IP ""
-When decoding raw streams
-.RB ( \-\-format=raw ),
-LZMA2 needs only the dictionary
-.IR size .
-LZMA1 needs also
-.IR lc ,
-.IR lp ,
-and
-.IR pb .
-.TP
-\fB\-\-x86\fR[\fB=\fIoptions\fR]
-.PD 0
-.TP
-\fB\-\-powerpc\fR[\fB=\fIoptions\fR]
-.TP
-\fB\-\-ia64\fR[\fB=\fIoptions\fR]
-.TP
-\fB\-\-arm\fR[\fB=\fIoptions\fR]
-.TP
-\fB\-\-armthumb\fR[\fB=\fIoptions\fR]
-.TP
-\fB\-\-sparc\fR[\fB=\fIoptions\fR]
-.PD
-Add a branch/call/jump (BCJ) filter to the filter chain.
-These filters can be used only as a non-last filter
-in the filter chain.
-.IP ""
-A BCJ filter converts relative addresses in
-the machine code to their absolute counterparts.
-This doesn't change the size of the data,
-but it increases redundancy,
-which can help LZMA2 to produce 0\-15\ % smaller
-.B .xz
-file.
-The BCJ filters are always reversible,
-so using a BCJ filter for wrong type of data
-doesn't cause any data loss, although it may make
-the compression ratio slightly worse.
-.IP ""
-It is fine to apply a BCJ filter on a whole executable;
-there's no need to apply it only on the executable section.
-Applying a BCJ filter on an archive that contains both executable
-and non-executable files may or may not give good results,
-so it generally isn't good to blindly apply a BCJ filter when
-compressing binary packages for distribution.
-.IP ""
-These BCJ filters are very fast and
-use insignificant amount of memory.
-If a BCJ filter improves compression ratio of a file,
-it can improve decompression speed at the same time.
-This is because, on the same hardware,
-the decompression speed of LZMA2 is roughly
-a fixed number of bytes of compressed data per second.
-.IP ""
-These BCJ filters have known problems related to
-the compression ratio:
-.RS
-.IP \(bu 3
-Some types of files containing executable code
-(e.g. object files, static libraries, and Linux kernel modules)
-have the addresses in the instructions filled with filler values.
-These BCJ filters will still do the address conversion,
-which will make the compression worse with these files.
-.IP \(bu 3
-Applying a BCJ filter on an archive containing multiple similar
-executables can make the compression ratio worse than not using
-a BCJ filter.
-This is because the BCJ filter doesn't detect the boundaries
-of the executable files, and doesn't reset
-the address conversion counter for each executable.
-.RE
-.IP ""
-Both of the above problems will be fixed
-in the future in a new filter.
-The old BCJ filters will still be useful in embedded systems,
-because the decoder of the new filter will be bigger
-and use more memory.
-.IP ""
-Different instruction sets have have different alignment:
-.RS
-.RS
-.PP
-.TS
-tab(;);
-l n l
-l n l.
-Filter;Alignment;Notes
-x86;1;32-bit or 64-bit x86
-PowerPC;4;Big endian only
-ARM;4;Little endian only
-ARM-Thumb;2;Little endian only
-IA-64;16;Big or little endian
-SPARC;4;Big or little endian
-.TE
-.RE
-.RE
-.IP ""
-Since the BCJ-filtered data is usually compressed with LZMA2,
-the compression ratio may be improved slightly if
-the LZMA2 options are set to match the
-alignment of the selected BCJ filter.
-For example, with the IA-64 filter, it's good to set
-.B pb=4
-with LZMA2 (2^4=16).
-The x86 filter is an exception;
-it's usually good to stick to LZMA2's default
-four-byte alignment when compressing x86 executables.
-.IP ""
-All BCJ filters support the same
-.IR options :
-.RS
-.TP
-.BI start= offset
-Specify the start
-.I offset
-that is used when converting between relative
-and absolute addresses.
-The
-.I offset
-must be a multiple of the alignment of the filter
-(see the table above).
-The default is zero.
-In practice, the default is good; specifying a custom
-.I offset
-is almost never useful.
-.RE
-.TP
-\fB\-\-delta\fR[\fB=\fIoptions\fR]
-Add the Delta filter to the filter chain.
-The Delta filter can be only used as a non-last filter
-in the filter chain.
-.IP ""
-Currently only simple byte-wise delta calculation is supported.
-It can be useful when compressing e.g. uncompressed bitmap images
-or uncompressed PCM audio.
-However, special purpose algorithms may give significantly better
-results than Delta + LZMA2.
-This is true especially with audio,
-which compresses faster and better e.g. with
-.BR flac (1).
-.IP ""
-Supported
-.IR options :
-.RS
-.TP
-.BI dist= distance
-Specify the
-.I distance
-of the delta calculation in bytes.
-.I distance
-must be 1\-256.
-The default is 1.
-.IP ""
-For example, with
-.B dist=2
-and eight-byte input A1 B1 A2 B3 A3 B5 A4 B7, the output will be
-A1 B1 01 02 01 02 01 02.
-.RE
-.
-.SS "Other options"
-.TP
-.BR \-q ", " \-\-quiet
-Suppress warnings and notices.
-Specify this twice to suppress errors too.
-This option has no effect on the exit status.
-That is, even if a warning was suppressed,
-the exit status to indicate a warning is still used.
-.TP
-.BR \-v ", " \-\-verbose
-Be verbose.
-If standard error is connected to a terminal,
-.B xz
-will display a progress indicator.
-Specifying
-.B \-\-verbose
-twice will give even more verbose output.
-.IP ""
-The progress indicator shows the following information:
-.RS
-.IP \(bu 3
-Completion percentage is shown
-if the size of the input file is known.
-That is, the percentage cannot be shown in pipes.
-.IP \(bu 3
-Amount of compressed data produced (compressing)
-or consumed (decompressing).
-.IP \(bu 3
-Amount of uncompressed data consumed (compressing)
-or produced (decompressing).
-.IP \(bu 3
-Compression ratio, which is calculated by dividing
-the amount of compressed data processed so far by
-the amount of uncompressed data processed so far.
-.IP \(bu 3
-Compression or decompression speed.
-This is measured as the amount of uncompressed data consumed
-(compression) or produced (decompression) per second.
-It is shown after a few seconds have passed since
-.B xz
-started processing the file.
-.IP \(bu 3
-Elapsed time in the format M:SS or H:MM:SS.
-.IP \(bu 3
-Estimated remaining time is shown
-only when the size of the input file is
-known and a couple of seconds have already passed since
-.B xz
-started processing the file.
-The time is shown in a less precise format which
-never has any colons, e.g. 2 min 30 s.
-.RE
-.IP ""
-When standard error is not a terminal,
-.B \-\-verbose
-will make
-.B xz
-print the filename, compressed size, uncompressed size,
-compression ratio, and possibly also the speed and elapsed time
-on a single line to standard error after compressing or
-decompressing the file.
-The speed and elapsed time are included only when
-the operation took at least a few seconds.
-If the operation didn't finish, e.g. due to user interruption,
-also the completion percentage is printed
-if the size of the input file is known.
-.TP
-.BR \-Q ", " \-\-no\-warn
-Don't set the exit status to 2
-even if a condition worth a warning was detected.
-This option doesn't affect the verbosity level, thus both
-.B \-\-quiet
-and
-.B \-\-no\-warn
-have to be used to not display warnings and
-to not alter the exit status.
-.TP
-.B \-\-robot
-Print messages in a machine-parsable format.
-This is intended to ease writing frontends that want to use
-.B xz
-instead of liblzma, which may be the case with various scripts.
-The output with this option enabled is meant to be stable across
-.B xz
-releases.
-See the section
-.B "ROBOT MODE"
-for details.
-.TP
-.BR \-\-info\-memory
-Display, in human-readable format, how much physical memory (RAM)
-.B xz
-thinks the system has and the memory usage limits for compression
-and decompression, and exit successfully.
-.TP
-.BR \-h ", " \-\-help
-Display a help message describing the most commonly used options,
-and exit successfully.
-.TP
-.BR \-H ", " \-\-long\-help
-Display a help message describing all features of
-.BR xz ,
-and exit successfully
-.TP
-.BR \-V ", " \-\-version
-Display the version number of
-.B xz
-and liblzma in human readable format.
-To get machine-parsable output, specify
-.B \-\-robot
-before
-.BR \-\-version .
-.
-.SH "ROBOT MODE"
-The robot mode is activated with the
-.B \-\-robot
-option.
-It makes the output of
-.B xz
-easier to parse by other programs.
-Currently
-.B \-\-robot
-is supported only together with
-.BR \-\-version ,
-.BR \-\-info\-memory ,
-and
-.BR \-\-list .
-It will be supported for compression and
-decompression in the future.
-.
-.SS Version
-.B "xz \-\-robot \-\-version"
-will print the version number of
-.B xz
-and liblzma in the following format:
-.PP
-.BI XZ_VERSION= XYYYZZZS
-.br
-.BI LIBLZMA_VERSION= XYYYZZZS
-.TP
-.I X
-Major version.
-.TP
-.I YYY
-Minor version.
-Even numbers are stable.
-Odd numbers are alpha or beta versions.
-.TP
-.I ZZZ
-Patch level for stable releases or
-just a counter for development releases.
-.TP
-.I S
-Stability.
-0 is alpha, 1 is beta, and 2 is stable.
-.I S
-should be always 2 when
-.I YYY
-is even.
-.PP
-.I XYYYZZZS
-are the same on both lines if
-.B xz
-and liblzma are from the same XZ Utils release.
-.PP
-Examples: 4.999.9beta is
-.B 49990091
-and
-5.0.0 is
-.BR 50000002 .
-.
-.SS "Memory limit information"
-.B "xz \-\-robot \-\-info\-memory"
-prints a single line with three tab-separated columns:
-.IP 1. 4
-Total amount of physical memory (RAM) in bytes
-.IP 2. 4
-Memory usage limit for compression in bytes.
-A special value of zero indicates the default setting,
-which for single-threaded mode is the same as no limit.
-.IP 3. 4
-Memory usage limit for decompression in bytes.
-A special value of zero indicates the default setting,
-which for single-threaded mode is the same as no limit.
-.PP
-In the future, the output of
-.B "xz \-\-robot \-\-info\-memory"
-may have more columns, but never more than a single line.
-.
-.SS "List mode"
-.B "xz \-\-robot \-\-list"
-uses tab-separated output.
-The first column of every line has a string
-that indicates the type of the information found on that line:
-.TP
-.B name
-This is always the first line when starting to list a file.
-The second column on the line is the filename.
-.TP
-.B file
-This line contains overall information about the
-.B .xz
-file.
-This line is always printed after the
-.B name
-line.
-.TP
-.B stream
-This line type is used only when
-.B \-\-verbose
-was specified.
-There are as many
-.B stream
-lines as there are streams in the
-.B .xz
-file.
-.TP
-.B block
-This line type is used only when
-.B \-\-verbose
-was specified.
-There are as many
-.B block
-lines as there are blocks in the
-.B .xz
-file.
-The
-.B block
-lines are shown after all the
-.B stream
-lines; different line types are not interleaved.
-.TP
-.B summary
-This line type is used only when
-.B \-\-verbose
-was specified twice.
-This line is printed after all
-.B block
-lines.
-Like the
-.B file
-line, the
-.B summary
-line contains overall information about the
-.B .xz
-file.
-.TP
-.B totals
-This line is always the very last line of the list output.
-It shows the total counts and sizes.
-.PP
-The columns of the
-.B file
-lines:
-.PD 0
-.RS
-.IP 2. 4
-Number of streams in the file
-.IP 3. 4
-Total number of blocks in the stream(s)
-.IP 4. 4
-Compressed size of the file
-.IP 5. 4
-Uncompressed size of the file
-.IP 6. 4
-Compression ratio, for example
-.BR 0.123.
-If ratio is over 9.999, three dashes
-.RB ( \-\-\- )
-are displayed instead of the ratio.
-.IP 7. 4
-Comma-separated list of integrity check names.
-The following strings are used for the known check types:
-.BR None ,
-.BR CRC32 ,
-.BR CRC64 ,
-and
-.BR SHA\-256 .
-For unknown check types,
-.BI Unknown\- N
-is used, where
-.I N
-is the Check ID as a decimal number (one or two digits).
-.IP 8. 4
-Total size of stream padding in the file
-.RE
-.PD
-.PP
-The columns of the
-.B stream
-lines:
-.PD 0
-.RS
-.IP 2. 4
-Stream number (the first stream is 1)
-.IP 3. 4
-Number of blocks in the stream
-.IP 4. 4
-Compressed start offset
-.IP 5. 4
-Uncompressed start offset
-.IP 6. 4
-Compressed size (does not include stream padding)
-.IP 7. 4
-Uncompressed size
-.IP 8. 4
-Compression ratio
-.IP 9. 4
-Name of the integrity check
-.IP 10. 4
-Size of stream padding
-.RE
-.PD
-.PP
-The columns of the
-.B block
-lines:
-.PD 0
-.RS
-.IP 2. 4
-Number of the stream containing this block
-.IP 3. 4
-Block number relative to the beginning of the stream
-(the first block is 1)
-.IP 4. 4
-Block number relative to the beginning of the file
-.IP 5. 4
-Compressed start offset relative to the beginning of the file
-.IP 6. 4
-Uncompressed start offset relative to the beginning of the file
-.IP 7. 4
-Total compressed size of the block (includes headers)
-.IP 8. 4
-Uncompressed size
-.IP 9. 4
-Compression ratio
-.IP 10. 4
-Name of the integrity check
-.RE
-.PD
-.PP
-If
-.B \-\-verbose
-was specified twice, additional columns are included on the
-.B block
-lines.
-These are not displayed with a single
-.BR \-\-verbose ,
-because getting this information requires many seeks
-and can thus be slow:
-.PD 0
-.RS
-.IP 11. 4
-Value of the integrity check in hexadecimal
-.IP 12. 4
-Block header size
-.IP 13. 4
-Block flags:
-.B c
-indicates that compressed size is present, and
-.B u
-indicates that uncompressed size is present.
-If the flag is not set, a dash
-.RB ( \- )
-is shown instead to keep the string length fixed.
-New flags may be added to the end of the string in the future.
-.IP 14. 4
-Size of the actual compressed data in the block (this excludes
-the block header, block padding, and check fields)
-.IP 15. 4
-Amount of memory (in bytes) required to decompress
-this block with this
-.B xz
-version
-.IP 16. 4
-Filter chain.
-Note that most of the options used at compression time
-cannot be known, because only the options
-that are needed for decompression are stored in the
-.B .xz
-headers.
-.RE
-.PD
-.PP
-The columns of the
-.B summary
-lines:
-.PD 0
-.RS
-.IP 2. 4
-Amount of memory (in bytes) required to decompress
-this file with this
-.B xz
-version
-.IP 3. 4
-.B yes
-or
-.B no
-indicating if all block headers have both compressed size and
-uncompressed size stored in them
-.RE
-.PD
-.PP
-The columns of the
-.B totals
-line:
-.PD 0
-.RS
-.IP 2. 4
-Number of streams
-.IP 3. 4
-Number of blocks
-.IP 4. 4
-Compressed size
-.IP 5. 4
-Uncompressed size
-.IP 6. 4
-Average compression ratio
-.IP 7. 4
-Comma-separated list of integrity check names
-that were present in the files
-.IP 8. 4
-Stream padding size
-.IP 9. 4
-Number of files.
-This is here to
-keep the order of the earlier columns the same as on
-.B file
-lines.
-.PD
-.RE
-.PP
-If
-.B \-\-verbose
-was specified twice, additional columns are included on the
-.B totals
-line:
-.PD 0
-.RS
-.IP 10. 4
-Maximum amount of memory (in bytes) required to decompress
-the files with this
-.B xz
-version
-.IP 11. 4
-.B yes
-or
-.B no
-indicating if all block headers have both compressed size and
-uncompressed size stored in them
-.RE
-.PD
-.PP
-Future versions may add new line types and
-new columns can be added to the existing line types,
-but the existing columns won't be changed.
-.
-.SH "EXIT STATUS"
-.TP
-.B 0
-All is good.
-.TP
-.B 1
-An error occurred.
-.TP
-.B 2
-Something worth a warning occurred,
-but no actual errors occurred.
-.PP
-Notices (not warnings or errors) printed on standard error
-don't affect the exit status.
-.
-.SH ENVIRONMENT
-.B xz
-parses space-separated lists of options
-from the environment variables
-.B XZ_DEFAULTS
-and
-.BR XZ_OPT ,
-in this order, before parsing the options from the command line.
-Note that only options are parsed from the environment variables;
-all non-options are silently ignored.
-Parsing is done with
-.BR getopt_long (3)
-which is used also for the command line arguments.
-.TP
-.B XZ_DEFAULTS
-User-specific or system-wide default options.
-Typically this is set in a shell initialization script to enable
-.BR xz 's
-memory usage limiter by default.
-Excluding shell initialization scripts
-and similar special cases, scripts must never set or unset
-.BR XZ_DEFAULTS .
-.TP
-.B XZ_OPT
-This is for passing options to
-.B xz
-when it is not possible to set the options directly on the
-.B xz
-command line.
-This is the case e.g. when
-.B xz
-is run by a script or tool, e.g. GNU
-.BR tar (1):
-.RS
-.RS
-.PP
-.nf
-.ft CW
-XZ_OPT=\-2v tar caf foo.tar.xz foo
-.ft R
-.fi
-.RE
-.RE
-.IP ""
-Scripts may use
-.B XZ_OPT
-e.g. to set script-specific default compression options.
-It is still recommended to allow users to override
-.B XZ_OPT
-if that is reasonable, e.g. in
-.BR sh (1)
-scripts one may use something like this:
-.RS
-.RS
-.PP
-.nf
-.ft CW
-XZ_OPT=${XZ_OPT\-"\-7e"}
-export XZ_OPT
-.ft R
-.fi
-.RE
-.RE
-.
-.SH "LZMA UTILS COMPATIBILITY"
-The command line syntax of
-.B xz
-is practically a superset of
-.BR lzma ,
-.BR unlzma ,
-and
-.BR lzcat
-as found from LZMA Utils 4.32.x.
-In most cases, it is possible to replace
-LZMA Utils with XZ Utils without breaking existing scripts.
-There are some incompatibilities though,
-which may sometimes cause problems.
-.
-.SS "Compression preset levels"
-The numbering of the compression level presets is not identical in
-.B xz
-and LZMA Utils.
-The most important difference is how dictionary sizes
-are mapped to different presets.
-Dictionary size is roughly equal to the decompressor memory usage.
-.RS
-.PP
-.TS
-tab(;);
-c c c
-c n n.
-Level;xz;LZMA Utils
-\-0;256 KiB;N/A
-\-1;1 MiB;64 KiB
-\-2;2 MiB;1 MiB
-\-3;4 MiB;512 KiB
-\-4;4 MiB;1 MiB
-\-5;8 MiB;2 MiB
-\-6;8 MiB;4 MiB
-\-7;16 MiB;8 MiB
-\-8;32 MiB;16 MiB
-\-9;64 MiB;32 MiB
-.TE
-.RE
-.PP
-The dictionary size differences affect
-the compressor memory usage too,
-but there are some other differences between
-LZMA Utils and XZ Utils, which
-make the difference even bigger:
-.RS
-.PP
-.TS
-tab(;);
-c c c
-c n n.
-Level;xz;LZMA Utils 4.32.x
-\-0;3 MiB;N/A
-\-1;9 MiB;2 MiB
-\-2;17 MiB;12 MiB
-\-3;32 MiB;12 MiB
-\-4;48 MiB;16 MiB
-\-5;94 MiB;26 MiB
-\-6;94 MiB;45 MiB
-\-7;186 MiB;83 MiB
-\-8;370 MiB;159 MiB
-\-9;674 MiB;311 MiB
-.TE
-.RE
-.PP
-The default preset level in LZMA Utils is
-.B \-7
-while in XZ Utils it is
-.BR \-6 ,
-so both use an 8 MiB dictionary by default.
-.
-.SS "Streamed vs. non-streamed .lzma files"
-The uncompressed size of the file can be stored in the
-.B .lzma
-header.
-LZMA Utils does that when compressing regular files.
-The alternative is to mark that uncompressed size is unknown
-and use end-of-payload marker to indicate
-where the decompressor should stop.
-LZMA Utils uses this method when uncompressed size isn't known,
-which is the case for example in pipes.
-.PP
-.B xz
-supports decompressing
-.B .lzma
-files with or without end-of-payload marker, but all
-.B .lzma
-files created by
-.B xz
-will use end-of-payload marker and have uncompressed size
-marked as unknown in the
-.B .lzma
-header.
-This may be a problem in some uncommon situations.
-For example, a
-.B .lzma
-decompressor in an embedded device might work
-only with files that have known uncompressed size.
-If you hit this problem, you need to use LZMA Utils
-or LZMA SDK to create
-.B .lzma
-files with known uncompressed size.
-.
-.SS "Unsupported .lzma files"
-The
-.B .lzma
-format allows
-.I lc
-values up to 8, and
-.I lp
-values up to 4.
-LZMA Utils can decompress files with any
-.I lc
-and
-.IR lp ,
-but always creates files with
-.B lc=3
-and
-.BR lp=0 .
-Creating files with other
-.I lc
-and
-.I lp
-is possible with
-.B xz
-and with LZMA SDK.
-.PP
-The implementation of the LZMA1 filter in liblzma
-requires that the sum of
-.I lc
-and
-.I lp
-must not exceed 4.
-Thus,
-.B .lzma
-files, which exceed this limitation, cannot be decompressed with
-.BR xz .
-.PP
-LZMA Utils creates only
-.B .lzma
-files which have a dictionary size of
-.RI "2^" n
-(a power of 2) but accepts files with any dictionary size.
-liblzma accepts only
-.B .lzma
-files which have a dictionary size of
-.RI "2^" n
-or
-.RI "2^" n " + 2^(" n "\-1)."
-This is to decrease false positives when detecting
-.B .lzma
-files.
-.PP
-These limitations shouldn't be a problem in practice,
-since practically all
-.B .lzma
-files have been compressed with settings that liblzma will accept.
-.
-.SS "Trailing garbage"
-When decompressing,
-LZMA Utils silently ignore everything after the first
-.B .lzma
-stream.
-In most situations, this is a bug.
-This also means that LZMA Utils
-don't support decompressing concatenated
-.B .lzma
-files.
-.PP
-If there is data left after the first
-.B .lzma
-stream,
-.B xz
-considers the file to be corrupt.
-This may break obscure scripts which have
-assumed that trailing garbage is ignored.
-.
-.SH NOTES
-.
-.SS "Compressed output may vary"
-The exact compressed output produced from
-the same uncompressed input file
-may vary between XZ Utils versions even if
-compression options are identical.
-This is because the encoder can be improved
-(faster or better compression)
-without affecting the file format.
-The output can vary even between different
-builds of the same XZ Utils version,
-if different build options are used.
-.PP
-The above means that once
-.B \-\-rsyncable
-has been implemented,
-the resulting files won't necessarily be rsyncable
-unless both old and new files have been compressed
-with the same xz version.
-This problem can be fixed if a part of the encoder
-implementation is frozen to keep rsyncable output
-stable across xz versions.
-.
-.SS "Embedded .xz decompressors"
-Embedded
-.B .xz
-decompressor implementations like XZ Embedded don't necessarily
-support files created with integrity
-.I check
-types other than
-.B none
-and
-.BR crc32 .
-Since the default is
-.BR \-\-check=crc64 ,
-you must use
-.B \-\-check=none
-or
-.B \-\-check=crc32
-when creating files for embedded systems.
-.PP
-Outside embedded systems, all
-.B .xz
-format decompressors support all the
-.I check
-types, or at least are able to decompress
-the file without verifying the
-integrity check if the particular
-.I check
-is not supported.
-.PP
-XZ Embedded supports BCJ filters,
-but only with the default start offset.
-.
-.SH EXAMPLES
-.
-.SS Basics
-Compress the file
-.I foo
-into
-.I foo.xz
-using the default compression level
-.RB ( \-6 ),
-and remove
-.I foo
-if compression is successful:
-.RS
-.PP
-.nf
-.ft CW
-xz foo
-.ft R
-.fi
-.RE
-.PP
-Decompress
-.I bar.xz
-into
-.I bar
-and don't remove
-.I bar.xz
-even if decompression is successful:
-.RS
-.PP
-.nf
-.ft CW
-xz \-dk bar.xz
-.ft R
-.fi
-.RE
-.PP
-Create
-.I baz.tar.xz
-with the preset
-.B \-4e
-.RB ( "\-4 \-\-extreme" ),
-which is slower than e.g. the default
-.BR \-6 ,
-but needs less memory for compression and decompression (48\ MiB
-and 5\ MiB, respectively):
-.RS
-.PP
-.nf
-.ft CW
-tar cf \- baz | xz \-4e > baz.tar.xz
-.ft R
-.fi
-.RE
-.PP
-A mix of compressed and uncompressed files can be decompressed
-to standard output with a single command:
-.RS
-.PP
-.nf
-.ft CW
-xz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt
-.ft R
-.fi
-.RE
-.
-.SS "Parallel compression of many files"
-On GNU and *BSD,
-.BR find (1)
-and
-.BR xargs (1)
-can be used to parallelize compression of many files:
-.RS
-.PP
-.nf
-.ft CW
-find . \-type f \e! \-name '*.xz' \-print0 \e
-    | xargs \-0r \-P4 \-n16 xz \-T1
-.ft R
-.fi
-.RE
-.PP
-The
-.B \-P
-option to
-.BR xargs (1)
-sets the number of parallel
-.B xz
-processes.
-The best value for the
-.B \-n
-option depends on how many files there are to be compressed.
-If there are only a couple of files,
-the value should probably be 1;
-with tens of thousands of files,
-100 or even more may be appropriate to reduce the number of
-.B xz
-processes that
-.BR xargs (1)
-will eventually create.
-.PP
-The option
-.B \-T1
-for
-.B xz
-is there to force it to single-threaded mode, because
-.BR xargs (1)
-is used to control the amount of parallelization.
-.
-.SS "Robot mode"
-Calculate how many bytes have been saved in total
-after compressing multiple files:
-.RS
-.PP
-.nf
-.ft CW
-xz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'
-.ft R
-.fi
-.RE
-.PP
-A script may want to know that it is using new enough
-.BR xz .
-The following
-.BR sh (1)
-script checks that the version number of the
-.B xz
-tool is at least 5.0.0.
-This method is compatible with old beta versions,
-which didn't support the
-.B \-\-robot
-option:
-.RS
-.PP
-.nf
-.ft CW
-if ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" ||
-        [ "$XZ_VERSION" \-lt 50000002 ]; then
-    echo "Your xz is too old."
-fi
-unset XZ_VERSION LIBLZMA_VERSION
-.ft R
-.fi
-.RE
-.PP
-Set a memory usage limit for decompression using
-.BR XZ_OPT ,
-but if a limit has already been set, don't increase it:
-.RS
-.PP
-.nf
-.ft CW
-NEWLIM=$((123 << 20))  # 123 MiB
-OLDLIM=$(xz \-\-robot \-\-info\-memory | cut \-f3)
-if [ $OLDLIM \-eq 0 \-o $OLDLIM \-gt $NEWLIM ]; then
-    XZ_OPT="$XZ_OPT \-\-memlimit\-decompress=$NEWLIM"
-    export XZ_OPT
-fi
-.ft R
-.fi
-.RE
-.
-.SS "Custom compressor filter chains"
-The simplest use for custom filter chains is
-customizing a LZMA2 preset.
-This can be useful,
-because the presets cover only a subset of the
-potentially useful combinations of compression settings.
-.PP
-The CompCPU columns of the tables
-from the descriptions of the options
-.BR "\-0" " ... " "\-9"
-and
-.B \-\-extreme
-are useful when customizing LZMA2 presets.
-Here are the relevant parts collected from those two tables:
-.RS
-.PP
-.TS
-tab(;);
-c c
-n n.
-Preset;CompCPU
-\-0;0
-\-1;1
-\-2;2
-\-3;3
-\-4;4
-\-5;5
-\-6;6
-\-5e;7
-\-6e;8
-.TE
-.RE
-.PP
-If you know that a file requires
-somewhat big dictionary (e.g. 32 MiB) to compress well,
-but you want to compress it quicker than
-.B "xz \-8"
-would do, a preset with a low CompCPU value (e.g. 1)
-can be modified to use a bigger dictionary:
-.RS
-.PP
-.nf
-.ft CW
-xz \-\-lzma2=preset=1,dict=32MiB foo.tar
-.ft R
-.fi
-.RE
-.PP
-With certain files, the above command may be faster than
-.B "xz \-6"
-while compressing significantly better.
-However, it must be emphasized that only some files benefit from
-a big dictionary while keeping the CompCPU value low.
-The most obvious situation,
-where a big dictionary can help a lot,
-is an archive containing very similar files
-of at least a few megabytes each.
-The dictionary size has to be significantly bigger
-than any individual file to allow LZMA2 to take
-full advantage of the similarities between consecutive files.
-.PP
-If very high compressor and decompressor memory usage is fine,
-and the file being compressed is
-at least several hundred megabytes, it may be useful
-to use an even bigger dictionary than the 64 MiB that
-.B "xz \-9"
-would use:
-.RS
-.PP
-.nf
-.ft CW
-xz \-vv \-\-lzma2=dict=192MiB big_foo.tar
-.ft R
-.fi
-.RE
-.PP
-Using
-.B \-vv
-.RB ( "\-\-verbose \-\-verbose" )
-like in the above example can be useful
-to see the memory requirements
-of the compressor and decompressor.
-Remember that using a dictionary bigger than
-the size of the uncompressed file is waste of memory,
-so the above command isn't useful for small files.
-.PP
-Sometimes the compression time doesn't matter,
-but the decompressor memory usage has to be kept low
-e.g. to make it possible to decompress the file on
-an embedded system.
-The following command uses
-.B \-6e
-.RB ( "\-6 \-\-extreme" )
-as a base and sets the dictionary to only 64\ KiB.
-The resulting file can be decompressed with XZ Embedded
-(that's why there is
-.BR \-\-check=crc32 )
-using about 100\ KiB of memory.
-.RS
-.PP
-.nf
-.ft CW
-xz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo
-.ft R
-.fi
-.RE
-.PP
-If you want to squeeze out as many bytes as possible,
-adjusting the number of literal context bits
-.RI ( lc )
-and number of position bits
-.RI ( pb )
-can sometimes help.
-Adjusting the number of literal position bits
-.RI ( lp )
-might help too, but usually
-.I lc
-and
-.I pb
-are more important.
-E.g. a source code archive contains mostly US-ASCII text,
-so something like the following might give
-slightly (like 0.1\ %) smaller file than
-.B "xz \-6e"
-(try also without
-.BR lc=4 ):
-.RS
-.PP
-.nf
-.ft CW
-xz \-\-lzma2=preset=6e,pb=0,lc=4 source_code.tar
-.ft R
-.fi
-.RE
-.PP
-Using another filter together with LZMA2 can improve
-compression with certain file types.
-E.g. to compress a x86-32 or x86-64 shared library
-using the x86 BCJ filter:
-.RS
-.PP
-.nf
-.ft CW
-xz \-\-x86 \-\-lzma2 libfoo.so
-.ft R
-.fi
-.RE
-.PP
-Note that the order of the filter options is significant.
-If
-.B \-\-x86
-is specified after
-.BR \-\-lzma2 ,
-.B xz
-will give an error,
-because there cannot be any filter after LZMA2,
-and also because the x86 BCJ filter cannot be used
-as the last filter in the chain.
-.PP
-The Delta filter together with LZMA2
-can give good results with bitmap images.
-It should usually beat PNG,
-which has a few more advanced filters than simple
-delta but uses Deflate for the actual compression.
-.PP
-The image has to be saved in uncompressed format,
-e.g. as uncompressed TIFF.
-The distance parameter of the Delta filter is set
-to match the number of bytes per pixel in the image.
-E.g. 24-bit RGB bitmap needs
-.BR dist=3 ,
-and it is also good to pass
-.B pb=0
-to LZMA2 to accommodate the three-byte alignment:
-.RS
-.PP
-.nf
-.ft CW
-xz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff
-.ft R
-.fi
-.RE
-.PP
-If multiple images have been put into a single archive (e.g.\&
-.BR .tar ),
-the Delta filter will work on that too as long as all images
-have the same number of bytes per pixel.
-.
-.SH "SEE ALSO"
-.BR xzdec (1),
-.BR xzdiff (1),
-.BR xzgrep (1),
-.BR xzless (1),
-.BR xzmore (1),
-.BR gzip (1),
-.BR bzip2 (1),
-.BR 7z (1)
-.PP
-XZ Utils: <http://tukaani.org/xz/>
-.br
-XZ Embedded: <http://tukaani.org/xz/embedded.html>
-.br
-LZMA SDK: <http://7-zip.org/sdk.html>

Copied: vendor/xz/5.2.3/src/xz/xz.1 (from rev 9176, vendor/xz/dist/src/xz/xz.1)
===================================================================
--- vendor/xz/5.2.3/src/xz/xz.1	                        (rev 0)
+++ vendor/xz/5.2.3/src/xz/xz.1	2018-06-15 22:33:43 UTC (rev 11014)
@@ -0,0 +1,2786 @@
+'\" t
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.TH XZ 1 "2015-05-11" "Tukaani" "XZ Utils"
+.
+.SH NAME
+xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files
+.
+.SH SYNOPSIS
+.B xz
+.RI [ option... ]
+.RI [ file... ]
+.
+.SH COMMAND ALIASES
+.B unxz
+is equivalent to
+.BR "xz \-\-decompress" .
+.br
+.B xzcat
+is equivalent to
+.BR "xz \-\-decompress \-\-stdout" .
+.br
+.B lzma
+is equivalent to
+.BR "xz \-\-format=lzma" .
+.br
+.B unlzma
+is equivalent to
+.BR "xz \-\-format=lzma \-\-decompress" .
+.br
+.B lzcat
+is equivalent to
+.BR "xz \-\-format=lzma \-\-decompress \-\-stdout" .
+.PP
+When writing scripts that need to decompress files,
+it is recommended to always use the name
+.B xz
+with appropriate arguments
+.RB ( "xz \-d"
+or
+.BR "xz \-dc" )
+instead of the names
+.B unxz
+and
+.BR xzcat .
+.
+.SH DESCRIPTION
+.B xz
+is a general-purpose data compression tool with
+command line syntax similar to
+.BR gzip (1)
+and
+.BR bzip2 (1).
+The native file format is the
+.B .xz
+format, but the legacy
+.B .lzma
+format used by LZMA Utils and
+raw compressed streams with no container format headers
+are also supported.
+.PP
+.B xz
+compresses or decompresses each
+.I file
+according to the selected operation mode.
+If no
+.I files
+are given or
+.I file
+is
+.BR \- ,
+.B xz
+reads from standard input and writes the processed data
+to standard output.
+.B xz
+will refuse (display an error and skip the
+.IR file )
+to write compressed data to standard output if it is a terminal.
+Similarly,
+.B xz
+will refuse to read compressed data
+from standard input if it is a terminal.
+.PP
+Unless
+.B \-\-stdout
+is specified,
+.I files
+other than
+.B \-
+are written to a new file whose name is derived from the source
+.I file
+name:
+.IP \(bu 3
+When compressing, the suffix of the target file format
+.RB ( .xz
+or
+.BR .lzma )
+is appended to the source filename to get the target filename.
+.IP \(bu 3
+When decompressing, the
+.B .xz
+or
+.B .lzma
+suffix is removed from the filename to get the target filename.
+.B xz
+also recognizes the suffixes
+.B .txz
+and
+.BR .tlz ,
+and replaces them with the
+.B .tar
+suffix.
+.PP
+If the target file already exists, an error is displayed and the
+.I file
+is skipped.
+.PP
+Unless writing to standard output,
+.B xz
+will display a warning and skip the
+.I file
+if any of the following applies:
+.IP \(bu 3
+.I File
+is not a regular file.
+Symbolic links are not followed,
+and thus they are not considered to be regular files.
+.IP \(bu 3
+.I File
+has more than one hard link.
+.IP \(bu 3
+.I File
+has setuid, setgid, or sticky bit set.
+.IP \(bu 3
+The operation mode is set to compress and the
+.I file
+already has a suffix of the target file format
+.RB ( .xz
+or
+.B .txz
+when compressing to the
+.B .xz
+format, and
+.B .lzma
+or
+.B .tlz
+when compressing to the
+.B .lzma
+format).
+.IP \(bu 3
+The operation mode is set to decompress and the
+.I file
+doesn't have a suffix of any of the supported file formats
+.RB ( .xz ,
+.BR .txz ,
+.BR .lzma ,
+or
+.BR .tlz ).
+.PP
+After successfully compressing or decompressing the
+.IR file ,
+.B xz
+copies the owner, group, permissions, access time,
+and modification time from the source
+.I file
+to the target file.
+If copying the group fails, the permissions are modified
+so that the target file doesn't become accessible to users
+who didn't have permission to access the source
+.IR file .
+.B xz
+doesn't support copying other metadata like access control lists
+or extended attributes yet.
+.PP
+Once the target file has been successfully closed, the source
+.I file
+is removed unless
+.B \-\-keep
+was specified.
+The source
+.I file
+is never removed if the output is written to standard output.
+.PP
+Sending
+.B SIGINFO
+or
+.B SIGUSR1
+to the
+.B xz
+process makes it print progress information to standard error.
+This has only limited use since when standard error
+is a terminal, using
+.B \-\-verbose
+will display an automatically updating progress indicator.
+.
+.SS "Memory usage"
+The memory usage of
+.B xz
+varies from a few hundred kilobytes to several gigabytes
+depending on the compression settings.
+The settings used when compressing a file determine
+the memory requirements of the decompressor.
+Typically the decompressor needs 5\ % to 20\ % of
+the amount of memory that the compressor needed when
+creating the file.
+For example, decompressing a file created with
+.B xz \-9
+currently requires 65\ MiB of memory.
+Still, it is possible to have
+.B .xz
+files that require several gigabytes of memory to decompress.
+.PP
+Especially users of older systems may find
+the possibility of very large memory usage annoying.
+To prevent uncomfortable surprises,
+.B xz
+has a built-in memory usage limiter, which is disabled by default.
+While some operating systems provide ways to limit
+the memory usage of processes, relying on it
+wasn't deemed to be flexible enough (e.g. using
+.BR ulimit (1)
+to limit virtual memory tends to cripple
+.BR mmap (2)).
+.PP
+The memory usage limiter can be enabled with
+the command line option \fB\-\-memlimit=\fIlimit\fR.
+Often it is more convenient to enable the limiter
+by default by setting the environment variable
+.BR XZ_DEFAULTS ,
+e.g.\&
+.BR XZ_DEFAULTS=\-\-memlimit=150MiB .
+It is possible to set the limits separately
+for compression and decompression
+by using \fB\-\-memlimit\-compress=\fIlimit\fR and
+\fB\-\-memlimit\-decompress=\fIlimit\fR.
+Using these two options outside
+.B XZ_DEFAULTS
+is rarely useful because a single run of
+.B xz
+cannot do both compression and decompression and
+.BI \-\-memlimit= limit
+(or \fB\-M\fR \fIlimit\fR)
+is shorter to type on the command line.
+.PP
+If the specified memory usage limit is exceeded when decompressing,
+.B xz
+will display an error and decompressing the file will fail.
+If the limit is exceeded when compressing,
+.B xz
+will try to scale the settings down so that the limit
+is no longer exceeded (except when using \fB\-\-format=raw\fR
+or \fB\-\-no\-adjust\fR).
+This way the operation won't fail unless the limit is very small.
+The scaling of the settings is done in steps that don't
+match the compression level presets, e.g. if the limit is
+only slightly less than the amount required for
+.BR "xz \-9" ,
+the settings will be scaled down only a little,
+not all the way down to
+.BR "xz \-8" .
+.
+.SS "Concatenation and padding with .xz files"
+It is possible to concatenate
+.B .xz
+files as is.
+.B xz
+will decompress such files as if they were a single
+.B .xz
+file.
+.PP
+It is possible to insert padding between the concatenated parts
+or after the last part.
+The padding must consist of null bytes and the size
+of the padding must be a multiple of four bytes.
+This can be useful e.g. if the
+.B .xz
+file is stored on a medium that measures file sizes
+in 512-byte blocks.
+.PP
+Concatenation and padding are not allowed with
+.B .lzma
+files or raw streams.
+.
+.SH OPTIONS
+.
+.SS "Integer suffixes and special values"
+In most places where an integer argument is expected,
+an optional suffix is supported to easily indicate large integers.
+There must be no space between the integer and the suffix.
+.TP
+.B KiB
+Multiply the integer by 1,024 (2^10).
+.BR Ki ,
+.BR k ,
+.BR kB ,
+.BR K ,
+and
+.B KB
+are accepted as synonyms for
+.BR KiB .
+.TP
+.B MiB
+Multiply the integer by 1,048,576 (2^20).
+.BR Mi ,
+.BR m ,
+.BR M ,
+and
+.B MB
+are accepted as synonyms for
+.BR MiB .
+.TP
+.B GiB
+Multiply the integer by 1,073,741,824 (2^30).
+.BR Gi ,
+.BR g ,
+.BR G ,
+and
+.B GB
+are accepted as synonyms for
+.BR GiB .
+.PP
+The special value
+.B max
+can be used to indicate the maximum integer value
+supported by the option.
+.
+.SS "Operation mode"
+If multiple operation mode options are given,
+the last one takes effect.
+.TP
+.BR \-z ", " \-\-compress
+Compress.
+This is the default operation mode when no operation mode option
+is specified and no other operation mode is implied from
+the command name (for example,
+.B unxz
+implies
+.BR \-\-decompress ).
+.TP
+.BR \-d ", " \-\-decompress ", " \-\-uncompress
+Decompress.
+.TP
+.BR \-t ", " \-\-test
+Test the integrity of compressed
+.IR files .
+This option is equivalent to
+.B "\-\-decompress \-\-stdout"
+except that the decompressed data is discarded instead of being
+written to standard output.
+No files are created or removed.
+.TP
+.BR \-l ", " \-\-list
+Print information about compressed
+.IR files .
+No uncompressed output is produced,
+and no files are created or removed.
+In list mode, the program cannot read
+the compressed data from standard
+input or from other unseekable sources.
+.IP ""
+The default listing shows basic information about
+.IR files ,
+one file per line.
+To get more detailed information, use also the
+.B \-\-verbose
+option.
+For even more information, use
+.B \-\-verbose
+twice, but note that this may be slow, because getting all the extra
+information requires many seeks.
+The width of verbose output exceeds
+80 characters, so piping the output to e.g.\&
+.B "less\ \-S"
+may be convenient if the terminal isn't wide enough.
+.IP ""
+The exact output may vary between
+.B xz
+versions and different locales.
+For machine-readable output,
+.B \-\-robot \-\-list
+should be used.
+.
+.SS "Operation modifiers"
+.TP
+.BR \-k ", " \-\-keep
+Don't delete the input files.
+.TP
+.BR \-f ", " \-\-force
+This option has several effects:
+.RS
+.IP \(bu 3
+If the target file already exists,
+delete it before compressing or decompressing.
+.IP \(bu 3
+Compress or decompress even if the input is
+a symbolic link to a regular file,
+has more than one hard link,
+or has the setuid, setgid, or sticky bit set.
+The setuid, setgid, and sticky bits are not copied
+to the target file.
+.IP \(bu 3
+When used with
+.B \-\-decompress
+.BR \-\-stdout
+and
+.B xz
+cannot recognize the type of the source file,
+copy the source file as is to standard output.
+This allows
+.B xzcat
+.B \-\-force
+to be used like
+.BR cat (1)
+for files that have not been compressed with
+.BR xz .
+Note that in future,
+.B xz
+might support new compressed file formats, which may make
+.B xz
+decompress more types of files instead of copying them as is to
+standard output.
+.BI \-\-format= format
+can be used to restrict
+.B xz
+to decompress only a single file format.
+.RE
+.TP
+.BR \-c ", " \-\-stdout ", " \-\-to\-stdout
+Write the compressed or decompressed data to
+standard output instead of a file.
+This implies
+.BR \-\-keep .
+.TP
+.B \-\-single\-stream
+Decompress only the first
+.B .xz
+stream, and
+silently ignore possible remaining input data following the stream.
+Normally such trailing garbage makes
+.B xz
+display an error.
+.IP ""
+.B xz
+never decompresses more than one stream from
+.B .lzma
+files or raw streams, but this option still makes
+.B xz
+ignore the possible trailing data after the
+.B .lzma
+file or raw stream.
+.IP ""
+This option has no effect if the operation mode is not
+.B \-\-decompress
+or
+.BR \-\-test .
+.TP
+.B \-\-no\-sparse
+Disable creation of sparse files.
+By default, if decompressing into a regular file,
+.B xz
+tries to make the file sparse if the decompressed data contains
+long sequences of binary zeros.
+It also works when writing to standard output
+as long as standard output is connected to a regular file
+and certain additional conditions are met to make it safe.
+Creating sparse files may save disk space and speed up
+the decompression by reducing the amount of disk I/O.
+.TP
+\fB\-S\fR \fI.suf\fR, \fB\-\-suffix=\fI.suf
+When compressing, use
+.I .suf
+as the suffix for the target file instead of
+.B .xz
+or
+.BR .lzma .
+If not writing to standard output and
+the source file already has the suffix
+.IR .suf ,
+a warning is displayed and the file is skipped.
+.IP ""
+When decompressing, recognize files with the suffix
+.I .suf
+in addition to files with the
+.BR .xz ,
+.BR .txz ,
+.BR .lzma ,
+or
+.B .tlz
+suffix.
+If the source file has the suffix
+.IR .suf ,
+the suffix is removed to get the target filename.
+.IP ""
+When compressing or decompressing raw streams
+.RB ( \-\-format=raw ),
+the suffix must always be specified unless
+writing to standard output,
+because there is no default suffix for raw streams.
+.TP
+\fB\-\-files\fR[\fB=\fIfile\fR]
+Read the filenames to process from
+.IR file ;
+if
+.I file
+is omitted, filenames are read from standard input.
+Filenames must be terminated with the newline character.
+A dash
+.RB ( \- )
+is taken as a regular filename; it doesn't mean standard input.
+If filenames are given also as command line arguments, they are
+processed before the filenames read from
+.IR file .
+.TP
+\fB\-\-files0\fR[\fB=\fIfile\fR]
+This is identical to \fB\-\-files\fR[\fB=\fIfile\fR] except
+that each filename must be terminated with the null character.
+.
+.SS "Basic file format and compression options"
+.TP
+\fB\-F\fR \fIformat\fR, \fB\-\-format=\fIformat
+Specify the file
+.I format
+to compress or decompress:
+.RS
+.TP
+.B auto
+This is the default.
+When compressing,
+.B auto
+is equivalent to
+.BR xz .
+When decompressing,
+the format of the input file is automatically detected.
+Note that raw streams (created with
+.BR \-\-format=raw )
+cannot be auto-detected.
+.TP
+.B xz
+Compress to the
+.B .xz
+file format, or accept only
+.B .xz
+files when decompressing.
+.TP
+.BR lzma ", " alone
+Compress to the legacy
+.B .lzma
+file format, or accept only
+.B .lzma
+files when decompressing.
+The alternative name
+.B alone
+is provided for backwards compatibility with LZMA Utils.
+.TP
+.B raw
+Compress or uncompress a raw stream (no headers).
+This is meant for advanced users only.
+To decode raw streams, you need use
+.B \-\-format=raw
+and explicitly specify the filter chain,
+which normally would have been stored in the container headers.
+.RE
+.TP
+\fB\-C\fR \fIcheck\fR, \fB\-\-check=\fIcheck
+Specify the type of the integrity check.
+The check is calculated from the uncompressed data and
+stored in the
+.B .xz
+file.
+This option has an effect only when compressing into the
+.B .xz
+format; the
+.B .lzma
+format doesn't support integrity checks.
+The integrity check (if any) is verified when the
+.B .xz
+file is decompressed.
+.IP ""
+Supported
+.I check
+types:
+.RS
+.TP
+.B none
+Don't calculate an integrity check at all.
+This is usually a bad idea.
+This can be useful when integrity of the data is verified
+by other means anyway.
+.TP
+.B crc32
+Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet).
+.TP
+.B crc64
+Calculate CRC64 using the polynomial from ECMA-182.
+This is the default, since it is slightly better than CRC32
+at detecting damaged files and the speed difference is negligible.
+.TP
+.B sha256
+Calculate SHA-256.
+This is somewhat slower than CRC32 and CRC64.
+.RE
+.IP ""
+Integrity of the
+.B .xz
+headers is always verified with CRC32.
+It is not possible to change or disable it.
+.TP
+.B \-\-ignore\-check
+Don't verify the integrity check of the compressed data when decompressing.
+The CRC32 values in the
+.B .xz
+headers will still be verified normally.
+.IP ""
+.B "Do not use this option unless you know what you are doing."
+Possible reasons to use this option:
+.RS
+.IP \(bu 3
+Trying to recover data from a corrupt .xz file.
+.IP \(bu 3
+Speeding up decompression.
+This matters mostly with SHA-256 or
+with files that have compressed extremely well.
+It's recommended to not use this option for this purpose
+unless the file integrity is verified externally in some other way.
+.RE
+.TP
+.BR \-0 " ... " \-9
+Select a compression preset level.
+The default is
+.BR \-6 .
+If multiple preset levels are specified,
+the last one takes effect.
+If a custom filter chain was already specified, setting
+a compression preset level clears the custom filter chain.
+.IP ""
+The differences between the presets are more significant than with
+.BR gzip (1)
+and
+.BR bzip2 (1).
+The selected compression settings determine
+the memory requirements of the decompressor,
+thus using a too high preset level might make it painful
+to decompress the file on an old system with little RAM.
+Specifically,
+.B "it's not a good idea to blindly use \-9 for everything"
+like it often is with
+.BR gzip (1)
+and
+.BR bzip2 (1).
+.RS
+.TP
+.BR "\-0" " ... " "\-3"
+These are somewhat fast presets.
+.B \-0
+is sometimes faster than
+.B "gzip \-9"
+while compressing much better.
+The higher ones often have speed comparable to
+.BR bzip2 (1)
+with comparable or better compression ratio,
+although the results
+depend a lot on the type of data being compressed.
+.TP
+.BR "\-4" " ... " "\-6"
+Good to very good compression while keeping
+decompressor memory usage reasonable even for old systems.
+.B \-6
+is the default, which is usually a good choice
+e.g. for distributing files that need to be decompressible
+even on systems with only 16\ MiB RAM.
+.RB ( \-5e
+or
+.B \-6e
+may be worth considering too.
+See
+.BR \-\-extreme .)
+.TP
+.B "\-7 ... \-9"
+These are like
+.B \-6
+but with higher compressor and decompressor memory requirements.
+These are useful only when compressing files bigger than
+8\ MiB, 16\ MiB, and 32\ MiB, respectively.
+.RE
+.IP ""
+On the same hardware, the decompression speed is approximately
+a constant number of bytes of compressed data per second.
+In other words, the better the compression,
+the faster the decompression will usually be.
+This also means that the amount of uncompressed output
+produced per second can vary a lot.
+.IP ""
+The following table summarises the features of the presets:
+.RS
+.RS
+.PP
+.TS
+tab(;);
+c c c c c
+n n n n n.
+Preset;DictSize;CompCPU;CompMem;DecMem
+\-0;256 KiB;0;3 MiB;1 MiB
+\-1;1 MiB;1;9 MiB;2 MiB
+\-2;2 MiB;2;17 MiB;3 MiB
+\-3;4 MiB;3;32 MiB;5 MiB
+\-4;4 MiB;4;48 MiB;5 MiB
+\-5;8 MiB;5;94 MiB;9 MiB
+\-6;8 MiB;6;94 MiB;9 MiB
+\-7;16 MiB;6;186 MiB;17 MiB
+\-8;32 MiB;6;370 MiB;33 MiB
+\-9;64 MiB;6;674 MiB;65 MiB
+.TE
+.RE
+.RE
+.IP ""
+Column descriptions:
+.RS
+.IP \(bu 3
+DictSize is the LZMA2 dictionary size.
+It is waste of memory to use a dictionary bigger than
+the size of the uncompressed file.
+This is why it is good to avoid using the presets
+.BR \-7 " ... " \-9
+when there's no real need for them.
+At
+.B \-6
+and lower, the amount of memory wasted is
+usually low enough to not matter.
+.IP \(bu 3
+CompCPU is a simplified representation of the LZMA2 settings
+that affect compression speed.
+The dictionary size affects speed too,
+so while CompCPU is the same for levels
+.BR \-6 " ... " \-9 ,
+higher levels still tend to be a little slower.
+To get even slower and thus possibly better compression, see
+.BR \-\-extreme .
+.IP \(bu 3
+CompMem contains the compressor memory requirements
+in the single-threaded mode.
+It may vary slightly between
+.B xz
+versions.
+Memory requirements of some of the future multithreaded modes may
+be dramatically higher than that of the single-threaded mode.
+.IP \(bu 3
+DecMem contains the decompressor memory requirements.
+That is, the compression settings determine
+the memory requirements of the decompressor.
+The exact decompressor memory usage is slightly more than
+the LZMA2 dictionary size, but the values in the table
+have been rounded up to the next full MiB.
+.RE
+.TP
+.BR \-e ", " \-\-extreme
+Use a slower variant of the selected compression preset level
+.RB ( \-0 " ... " \-9 )
+to hopefully get a little bit better compression ratio,
+but with bad luck this can also make it worse.
+Decompressor memory usage is not affected,
+but compressor memory usage increases a little at preset levels
+.BR \-0 " ... " \-3 .
+.IP ""
+Since there are two presets with dictionary sizes
+4\ MiB and 8\ MiB, the presets
+.B \-3e
+and
+.B \-5e
+use slightly faster settings (lower CompCPU) than
+.B \-4e
+and
+.BR \-6e ,
+respectively.
+That way no two presets are identical.
+.RS
+.RS
+.PP
+.TS
+tab(;);
+c c c c c
+n n n n n.
+Preset;DictSize;CompCPU;CompMem;DecMem
+\-0e;256 KiB;8;4 MiB;1 MiB
+\-1e;1 MiB;8;13 MiB;2 MiB
+\-2e;2 MiB;8;25 MiB;3 MiB
+\-3e;4 MiB;7;48 MiB;5 MiB
+\-4e;4 MiB;8;48 MiB;5 MiB
+\-5e;8 MiB;7;94 MiB;9 MiB
+\-6e;8 MiB;8;94 MiB;9 MiB
+\-7e;16 MiB;8;186 MiB;17 MiB
+\-8e;32 MiB;8;370 MiB;33 MiB
+\-9e;64 MiB;8;674 MiB;65 MiB
+.TE
+.RE
+.RE
+.IP ""
+For example, there are a total of four presets that use
+8\ MiB dictionary, whose order from the fastest to the slowest is
+.BR \-5 ,
+.BR \-6 ,
+.BR \-5e ,
+and
+.BR \-6e .
+.TP
+.B \-\-fast
+.PD 0
+.TP
+.B \-\-best
+.PD
+These are somewhat misleading aliases for
+.B \-0
+and
+.BR \-9 ,
+respectively.
+These are provided only for backwards compatibility
+with LZMA Utils.
+Avoid using these options.
+.TP
+.BI \-\-block\-size= size
+When compressing to the
+.B .xz
+format, split the input data into blocks of
+.I size
+bytes.
+The blocks are compressed independently from each other,
+which helps with multi-threading and
+makes limited random-access decompression possible.
+This option is typically used to override the default
+block size in multi-threaded mode,
+but this option can be used in single-threaded mode too.
+.IP ""
+In multi-threaded mode about three times
+.I size
+bytes will be allocated in each thread for buffering input and output.
+The default
+.I size
+is three times the LZMA2 dictionary size or 1 MiB,
+whichever is more.
+Typically a good value is 2\-4 times
+the size of the LZMA2 dictionary or at least 1 MiB.
+Using
+.I size
+less than the LZMA2 dictionary size is waste of RAM
+because then the LZMA2 dictionary buffer will never get fully used.
+The sizes of the blocks are stored in the block headers,
+which a future version of
+.B xz
+will use for multi-threaded decompression.
+.IP ""
+In single-threaded mode no block splitting is done by default.
+Setting this option doesn't affect memory usage.
+No size information is stored in block headers,
+thus files created in single-threaded mode
+won't be identical to files created in multi-threaded mode.
+The lack of size information also means that a future version of
+.B xz
+won't be able decompress the files in multi-threaded mode.
+.TP
+.BI \-\-block\-list= sizes
+When compressing to the
+.B .xz
+format, start a new block after
+the given intervals of uncompressed data.
+.IP ""
+The uncompressed
+.I sizes
+of the blocks are specified as a comma-separated list.
+Omitting a size (two or more consecutive commas) is a shorthand
+to use the size of the previous block.
+.IP ""
+If the input file is bigger than the sum of
+.IR sizes ,
+the last value in
+.I sizes
+is repeated until the end of the file.
+A special value of
+.B 0
+may be used as the last value to indicate that
+the rest of the file should be encoded as a single block.
+.IP ""
+If one specifies
+.I sizes
+that exceed the encoder's block size
+(either the default value in threaded mode or
+the value specified with \fB\-\-block\-size=\fIsize\fR),
+the encoder will create additional blocks while
+keeping the boundaries specified in
+.IR sizes .
+For example, if one specifies
+.B \-\-block\-size=10MiB
+.B \-\-block\-list=5MiB,10MiB,8MiB,12MiB,24MiB
+and the input file is 80 MiB,
+one will get 11 blocks:
+5, 10, 8, 10, 2, 10, 10, 4, 10, 10, and 1 MiB.
+.IP ""
+In multi-threaded mode the sizes of the blocks
+are stored in the block headers.
+This isn't done in single-threaded mode,
+so the encoded output won't be
+identical to that of the multi-threaded mode.
+.TP
+.BI \-\-flush\-timeout= timeout
+When compressing, if more than
+.I timeout
+milliseconds (a positive integer) has passed since the previous flush and
+reading more input would block,
+all the pending input data is flushed from the encoder and
+made available in the output stream.
+This can be useful if
+.B xz
+is used to compress data that is streamed over a network.
+Small
+.I timeout
+values make the data available at the receiving end
+with a small delay, but large
+.I timeout
+values give better compression ratio.
+.IP ""
+This feature is disabled by default.
+If this option is specified more than once, the last one takes effect.
+The special
+.I timeout
+value of
+.B 0
+can be used to explicitly disable this feature.
+.IP ""
+This feature is not available on non-POSIX systems.
+.IP ""
+.\" FIXME
+.B "This feature is still experimental."
+Currently
+.B xz
+is unsuitable for decompressing the stream in real time due to how
+.B xz
+does buffering.
+.TP
+.BI \-\-memlimit\-compress= limit
+Set a memory usage limit for compression.
+If this option is specified multiple times,
+the last one takes effect.
+.IP ""
+If the compression settings exceed the
+.IR limit ,
+.B xz
+will adjust the settings downwards so that
+the limit is no longer exceeded and display a notice that
+automatic adjustment was done.
+Such adjustments are not made when compressing with
+.B \-\-format=raw
+or if
+.B \-\-no\-adjust
+has been specified.
+In those cases, an error is displayed and
+.B xz
+will exit with exit status 1.
+.IP ""
+The
+.I limit
+can be specified in multiple ways:
+.RS
+.IP \(bu 3
+The
+.I limit
+can be an absolute value in bytes.
+Using an integer suffix like
+.B MiB
+can be useful.
+Example:
+.B "\-\-memlimit\-compress=80MiB"
+.IP \(bu 3
+The
+.I limit
+can be specified as a percentage of total physical memory (RAM).
+This can be useful especially when setting the
+.B XZ_DEFAULTS
+environment variable in a shell initialization script
+that is shared between different computers.
+That way the limit is automatically bigger
+on systems with more memory.
+Example:
+.B "\-\-memlimit\-compress=70%"
+.IP \(bu 3
+The
+.I limit
+can be reset back to its default value by setting it to
+.BR 0 .
+This is currently equivalent to setting the
+.I limit
+to
+.B max
+(no memory usage limit).
+Once multithreading support has been implemented,
+there may be a difference between
+.B 0
+and
+.B max
+for the multithreaded case, so it is recommended to use
+.B 0
+instead of
+.B max
+until the details have been decided.
+.RE
+.IP ""
+See also the section
+.BR "Memory usage" .
+.TP
+.BI \-\-memlimit\-decompress= limit
+Set a memory usage limit for decompression.
+This also affects the
+.B \-\-list
+mode.
+If the operation is not possible without exceeding the
+.IR limit ,
+.B xz
+will display an error and decompressing the file will fail.
+See
+.BI \-\-memlimit\-compress= limit
+for possible ways to specify the
+.IR limit .
+.TP
+\fB\-M\fR \fIlimit\fR, \fB\-\-memlimit=\fIlimit\fR, \fB\-\-memory=\fIlimit
+This is equivalent to specifying \fB\-\-memlimit\-compress=\fIlimit
+\fB\-\-memlimit\-decompress=\fIlimit\fR.
+.TP
+.B \-\-no\-adjust
+Display an error and exit if the compression settings exceed
+the memory usage limit.
+The default is to adjust the settings downwards so
+that the memory usage limit is not exceeded.
+Automatic adjusting is always disabled when creating raw streams
+.RB ( \-\-format=raw ).
+.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.
+.IP ""
+Threaded decompression hasn't been implemented yet.
+It will only work on files that contain multiple blocks
+with size information in block headers.
+All files compressed in multi-threaded mode meet this condition,
+but files compressed in single-threaded mode don't even if
+.BI \-\-block\-size= size
+is used.
+.
+.SS "Custom compressor filter chains"
+A custom filter chain allows specifying
+the compression settings in detail instead of relying on
+the settings associated to the presets.
+When a custom filter chain is specified,
+preset options (\fB\-0\fR ... \fB\-9\fR and \fB\-\-extreme\fR)
+earlier on the command line are forgotten.
+If a preset option is specified
+after one or more custom filter chain options,
+the new preset takes effect and
+the custom filter chain options specified earlier are forgotten.
+.PP
+A filter chain is comparable to piping on the command line.
+When compressing, the uncompressed input goes to the first filter,
+whose output goes to the next filter (if any).
+The output of the last filter gets written to the compressed file.
+The maximum number of filters in the chain is four,
+but typically a filter chain has only one or two filters.
+.PP
+Many filters have limitations on where they can be
+in the filter chain:
+some filters can work only as the last filter in the chain,
+some only as a non-last filter, and some work in any position
+in the chain.
+Depending on the filter, this limitation is either inherent to
+the filter design or exists to prevent security issues.
+.PP
+A custom filter chain is specified by using one or more
+filter options in the order they are wanted in the filter chain.
+That is, the order of filter options is significant!
+When decoding raw streams
+.RB ( \-\-format=raw ),
+the filter chain is specified in the same order as
+it was specified when compressing.
+.PP
+Filters take filter-specific
+.I options
+as a comma-separated list.
+Extra commas in
+.I options
+are ignored.
+Every option has a default value, so you need to
+specify only those you want to change.
+.PP
+To see the whole filter chain and
+.IR options ,
+use
+.B "xz \-vv"
+(that is, use
+.B \-\-verbose
+twice).
+This works also for viewing the filter chain options used by presets.
+.TP
+\fB\-\-lzma1\fR[\fB=\fIoptions\fR]
+.PD 0
+.TP
+\fB\-\-lzma2\fR[\fB=\fIoptions\fR]
+.PD
+Add LZMA1 or LZMA2 filter to the filter chain.
+These filters can be used only as the last filter in the chain.
+.IP ""
+LZMA1 is a legacy filter,
+which is supported almost solely due to the legacy
+.B .lzma
+file format, which supports only LZMA1.
+LZMA2 is an updated
+version of LZMA1 to fix some practical issues of LZMA1.
+The
+.B .xz
+format uses LZMA2 and doesn't support LZMA1 at all.
+Compression speed and ratios of LZMA1 and LZMA2
+are practically the same.
+.IP ""
+LZMA1 and LZMA2 share the same set of
+.IR options :
+.RS
+.TP
+.BI preset= preset
+Reset all LZMA1 or LZMA2
+.I options
+to
+.IR preset .
+.I Preset
+consist of an integer, which may be followed by single-letter
+preset modifiers.
+The integer can be from
+.B 0
+to
+.BR 9 ,
+matching the command line options \fB\-0\fR ... \fB\-9\fR.
+The only supported modifier is currently
+.BR e ,
+which matches
+.BR \-\-extreme .
+If no
+.B preset
+is specified, the default values of LZMA1 or LZMA2
+.I options
+are taken from the preset
+.BR 6 .
+.TP
+.BI dict= size
+Dictionary (history buffer)
+.I size
+indicates how many bytes of the recently processed
+uncompressed data is kept in memory.
+The algorithm tries to find repeating byte sequences (matches) in
+the uncompressed data, and replace them with references
+to the data currently in the dictionary.
+The bigger the dictionary, the higher is the chance
+to find a match.
+Thus, increasing dictionary
+.I size
+usually improves compression ratio, but
+a dictionary bigger than the uncompressed file is waste of memory.
+.IP ""
+Typical dictionary
+.I size
+is from 64\ KiB to 64\ MiB.
+The minimum is 4\ KiB.
+The maximum for compression is currently 1.5\ GiB (1536\ MiB).
+The decompressor already supports dictionaries up to
+one byte less than 4\ GiB, which is the maximum for
+the LZMA1 and LZMA2 stream formats.
+.IP ""
+Dictionary
+.I size
+and match finder
+.RI ( mf )
+together determine the memory usage of the LZMA1 or LZMA2 encoder.
+The same (or bigger) dictionary
+.I size
+is required for decompressing that was used when compressing,
+thus the memory usage of the decoder is determined
+by the dictionary size used when compressing.
+The
+.B .xz
+headers store the dictionary
+.I size
+either as
+.RI "2^" n
+or
+.RI "2^" n " + 2^(" n "\-1),"
+so these
+.I sizes
+are somewhat preferred for compression.
+Other
+.I sizes
+will get rounded up when stored in the
+.B .xz
+headers.
+.TP
+.BI lc= lc
+Specify the number of literal context bits.
+The minimum is 0 and the maximum is 4; the default is 3.
+In addition, the sum of
+.I lc
+and
+.I lp
+must not exceed 4.
+.IP ""
+All bytes that cannot be encoded as matches
+are encoded as literals.
+That is, literals are simply 8-bit bytes
+that are encoded one at a time.
+.IP ""
+The literal coding makes an assumption that the highest
+.I lc
+bits of the previous uncompressed byte correlate
+with the next byte.
+E.g. in typical English text, an upper-case letter is
+often followed by a lower-case letter, and a lower-case
+letter is usually followed by another lower-case letter.
+In the US-ASCII character set, the highest three bits are 010
+for upper-case letters and 011 for lower-case letters.
+When
+.I lc
+is at least 3, the literal coding can take advantage of
+this property in the uncompressed data.
+.IP ""
+The default value (3) is usually good.
+If you want maximum compression, test
+.BR lc=4 .
+Sometimes it helps a little, and
+sometimes it makes compression worse.
+If it makes it worse, test e.g.\&
+.B lc=2
+too.
+.TP
+.BI lp= lp
+Specify the number of literal position bits.
+The minimum is 0 and the maximum is 4; the default is 0.
+.IP ""
+.I Lp
+affects what kind of alignment in the uncompressed data is
+assumed when encoding literals.
+See
+.I pb
+below for more information about alignment.
+.TP
+.BI pb= pb
+Specify the number of position bits.
+The minimum is 0 and the maximum is 4; the default is 2.
+.IP ""
+.I Pb
+affects what kind of alignment in the uncompressed data is
+assumed in general.
+The default means four-byte alignment
+.RI (2^ pb =2^2=4),
+which is often a good choice when there's no better guess.
+.IP ""
+When the aligment is known, setting
+.I pb
+accordingly may reduce the file size a little.
+E.g. with text files having one-byte
+alignment (US-ASCII, ISO-8859-*, UTF-8), setting
+.B pb=0
+can improve compression slightly.
+For UTF-16 text,
+.B pb=1
+is a good choice.
+If the alignment is an odd number like 3 bytes,
+.B pb=0
+might be the best choice.
+.IP ""
+Even though the assumed alignment can be adjusted with
+.I pb
+and
+.IR lp ,
+LZMA1 and LZMA2 still slightly favor 16-byte alignment.
+It might be worth taking into account when designing file formats
+that are likely to be often compressed with LZMA1 or LZMA2.
+.TP
+.BI mf= mf
+Match finder has a major effect on encoder speed,
+memory usage, and compression ratio.
+Usually Hash Chain match finders are faster than Binary Tree
+match finders.
+The default depends on the
+.IR preset :
+0 uses
+.BR hc3 ,
+1\-3
+use
+.BR hc4 ,
+and the rest use
+.BR bt4 .
+.IP ""
+The following match finders are supported.
+The memory usage formulas below are rough approximations,
+which are closest to the reality when
+.I dict
+is a power of two.
+.RS
+.TP
+.B hc3
+Hash Chain with 2- and 3-byte hashing
+.br
+Minimum value for
+.IR nice :
+3
+.br
+Memory usage:
+.br
+.I dict
+* 7.5 (if
+.I dict
+<= 16 MiB);
+.br
+.I dict
+* 5.5 + 64 MiB (if
+.I dict
+> 16 MiB)
+.TP
+.B hc4
+Hash Chain with 2-, 3-, and 4-byte hashing
+.br
+Minimum value for
+.IR nice :
+4
+.br
+Memory usage:
+.br
+.I dict
+* 7.5 (if
+.I dict
+<= 32 MiB);
+.br
+.I dict
+* 6.5 (if
+.I dict
+> 32 MiB)
+.TP
+.B bt2
+Binary Tree with 2-byte hashing
+.br
+Minimum value for
+.IR nice :
+2
+.br
+Memory usage:
+.I dict
+* 9.5
+.TP
+.B bt3
+Binary Tree with 2- and 3-byte hashing
+.br
+Minimum value for
+.IR nice :
+3
+.br
+Memory usage:
+.br
+.I dict
+* 11.5 (if
+.I dict
+<= 16 MiB);
+.br
+.I dict
+* 9.5 + 64 MiB (if
+.I dict
+> 16 MiB)
+.TP
+.B bt4
+Binary Tree with 2-, 3-, and 4-byte hashing
+.br
+Minimum value for
+.IR nice :
+4
+.br
+Memory usage:
+.br
+.I dict
+* 11.5 (if
+.I dict
+<= 32 MiB);
+.br
+.I dict
+* 10.5 (if
+.I dict
+> 32 MiB)
+.RE
+.TP
+.BI mode= mode
+Compression
+.I mode
+specifies the method to analyze
+the data produced by the match finder.
+Supported
+.I modes
+are
+.B fast
+and
+.BR normal .
+The default is
+.B fast
+for
+.I presets
+0\-3 and
+.B normal
+for
+.I presets
+4\-9.
+.IP ""
+Usually
+.B fast
+is used with Hash Chain match finders and
+.B normal
+with Binary Tree match finders.
+This is also what the
+.I presets
+do.
+.TP
+.BI nice= nice
+Specify what is considered to be a nice length for a match.
+Once a match of at least
+.I nice
+bytes is found, the algorithm stops
+looking for possibly better matches.
+.IP ""
+.I Nice
+can be 2\-273 bytes.
+Higher values tend to give better compression ratio
+at the expense of speed.
+The default depends on the
+.IR preset .
+.TP
+.BI depth= depth
+Specify the maximum search depth in the match finder.
+The default is the special value of 0,
+which makes the compressor determine a reasonable
+.I depth
+from
+.I mf
+and
+.IR nice .
+.IP ""
+Reasonable
+.I depth
+for Hash Chains is 4\-100 and 16\-1000 for Binary Trees.
+Using very high values for
+.I depth
+can make the encoder extremely slow with some files.
+Avoid setting the
+.I depth
+over 1000 unless you are prepared to interrupt
+the compression in case it is taking far too long.
+.RE
+.IP ""
+When decoding raw streams
+.RB ( \-\-format=raw ),
+LZMA2 needs only the dictionary
+.IR size .
+LZMA1 needs also
+.IR lc ,
+.IR lp ,
+and
+.IR pb .
+.TP
+\fB\-\-x86\fR[\fB=\fIoptions\fR]
+.PD 0
+.TP
+\fB\-\-powerpc\fR[\fB=\fIoptions\fR]
+.TP
+\fB\-\-ia64\fR[\fB=\fIoptions\fR]
+.TP
+\fB\-\-arm\fR[\fB=\fIoptions\fR]
+.TP
+\fB\-\-armthumb\fR[\fB=\fIoptions\fR]
+.TP
+\fB\-\-sparc\fR[\fB=\fIoptions\fR]
+.PD
+Add a branch/call/jump (BCJ) filter to the filter chain.
+These filters can be used only as a non-last filter
+in the filter chain.
+.IP ""
+A BCJ filter converts relative addresses in
+the machine code to their absolute counterparts.
+This doesn't change the size of the data,
+but it increases redundancy,
+which can help LZMA2 to produce 0\-15\ % smaller
+.B .xz
+file.
+The BCJ filters are always reversible,
+so using a BCJ filter for wrong type of data
+doesn't cause any data loss, although it may make
+the compression ratio slightly worse.
+.IP ""
+It is fine to apply a BCJ filter on a whole executable;
+there's no need to apply it only on the executable section.
+Applying a BCJ filter on an archive that contains both executable
+and non-executable files may or may not give good results,
+so it generally isn't good to blindly apply a BCJ filter when
+compressing binary packages for distribution.
+.IP ""
+These BCJ filters are very fast and
+use insignificant amount of memory.
+If a BCJ filter improves compression ratio of a file,
+it can improve decompression speed at the same time.
+This is because, on the same hardware,
+the decompression speed of LZMA2 is roughly
+a fixed number of bytes of compressed data per second.
+.IP ""
+These BCJ filters have known problems related to
+the compression ratio:
+.RS
+.IP \(bu 3
+Some types of files containing executable code
+(e.g. object files, static libraries, and Linux kernel modules)
+have the addresses in the instructions filled with filler values.
+These BCJ filters will still do the address conversion,
+which will make the compression worse with these files.
+.IP \(bu 3
+Applying a BCJ filter on an archive containing multiple similar
+executables can make the compression ratio worse than not using
+a BCJ filter.
+This is because the BCJ filter doesn't detect the boundaries
+of the executable files, and doesn't reset
+the address conversion counter for each executable.
+.RE
+.IP ""
+Both of the above problems will be fixed
+in the future in a new filter.
+The old BCJ filters will still be useful in embedded systems,
+because the decoder of the new filter will be bigger
+and use more memory.
+.IP ""
+Different instruction sets have have different alignment:
+.RS
+.RS
+.PP
+.TS
+tab(;);
+l n l
+l n l.
+Filter;Alignment;Notes
+x86;1;32-bit or 64-bit x86
+PowerPC;4;Big endian only
+ARM;4;Little endian only
+ARM-Thumb;2;Little endian only
+IA-64;16;Big or little endian
+SPARC;4;Big or little endian
+.TE
+.RE
+.RE
+.IP ""
+Since the BCJ-filtered data is usually compressed with LZMA2,
+the compression ratio may be improved slightly if
+the LZMA2 options are set to match the
+alignment of the selected BCJ filter.
+For example, with the IA-64 filter, it's good to set
+.B pb=4
+with LZMA2 (2^4=16).
+The x86 filter is an exception;
+it's usually good to stick to LZMA2's default
+four-byte alignment when compressing x86 executables.
+.IP ""
+All BCJ filters support the same
+.IR options :
+.RS
+.TP
+.BI start= offset
+Specify the start
+.I offset
+that is used when converting between relative
+and absolute addresses.
+The
+.I offset
+must be a multiple of the alignment of the filter
+(see the table above).
+The default is zero.
+In practice, the default is good; specifying a custom
+.I offset
+is almost never useful.
+.RE
+.TP
+\fB\-\-delta\fR[\fB=\fIoptions\fR]
+Add the Delta filter to the filter chain.
+The Delta filter can be only used as a non-last filter
+in the filter chain.
+.IP ""
+Currently only simple byte-wise delta calculation is supported.
+It can be useful when compressing e.g. uncompressed bitmap images
+or uncompressed PCM audio.
+However, special purpose algorithms may give significantly better
+results than Delta + LZMA2.
+This is true especially with audio,
+which compresses faster and better e.g. with
+.BR flac (1).
+.IP ""
+Supported
+.IR options :
+.RS
+.TP
+.BI dist= distance
+Specify the
+.I distance
+of the delta calculation in bytes.
+.I distance
+must be 1\-256.
+The default is 1.
+.IP ""
+For example, with
+.B dist=2
+and eight-byte input A1 B1 A2 B3 A3 B5 A4 B7, the output will be
+A1 B1 01 02 01 02 01 02.
+.RE
+.
+.SS "Other options"
+.TP
+.BR \-q ", " \-\-quiet
+Suppress warnings and notices.
+Specify this twice to suppress errors too.
+This option has no effect on the exit status.
+That is, even if a warning was suppressed,
+the exit status to indicate a warning is still used.
+.TP
+.BR \-v ", " \-\-verbose
+Be verbose.
+If standard error is connected to a terminal,
+.B xz
+will display a progress indicator.
+Specifying
+.B \-\-verbose
+twice will give even more verbose output.
+.IP ""
+The progress indicator shows the following information:
+.RS
+.IP \(bu 3
+Completion percentage is shown
+if the size of the input file is known.
+That is, the percentage cannot be shown in pipes.
+.IP \(bu 3
+Amount of compressed data produced (compressing)
+or consumed (decompressing).
+.IP \(bu 3
+Amount of uncompressed data consumed (compressing)
+or produced (decompressing).
+.IP \(bu 3
+Compression ratio, which is calculated by dividing
+the amount of compressed data processed so far by
+the amount of uncompressed data processed so far.
+.IP \(bu 3
+Compression or decompression speed.
+This is measured as the amount of uncompressed data consumed
+(compression) or produced (decompression) per second.
+It is shown after a few seconds have passed since
+.B xz
+started processing the file.
+.IP \(bu 3
+Elapsed time in the format M:SS or H:MM:SS.
+.IP \(bu 3
+Estimated remaining time is shown
+only when the size of the input file is
+known and a couple of seconds have already passed since
+.B xz
+started processing the file.
+The time is shown in a less precise format which
+never has any colons, e.g. 2 min 30 s.
+.RE
+.IP ""
+When standard error is not a terminal,
+.B \-\-verbose
+will make
+.B xz
+print the filename, compressed size, uncompressed size,
+compression ratio, and possibly also the speed and elapsed time
+on a single line to standard error after compressing or
+decompressing the file.
+The speed and elapsed time are included only when
+the operation took at least a few seconds.
+If the operation didn't finish, e.g. due to user interruption,
+also the completion percentage is printed
+if the size of the input file is known.
+.TP
+.BR \-Q ", " \-\-no\-warn
+Don't set the exit status to 2
+even if a condition worth a warning was detected.
+This option doesn't affect the verbosity level, thus both
+.B \-\-quiet
+and
+.B \-\-no\-warn
+have to be used to not display warnings and
+to not alter the exit status.
+.TP
+.B \-\-robot
+Print messages in a machine-parsable format.
+This is intended to ease writing frontends that want to use
+.B xz
+instead of liblzma, which may be the case with various scripts.
+The output with this option enabled is meant to be stable across
+.B xz
+releases.
+See the section
+.B "ROBOT MODE"
+for details.
+.TP
+.BR \-\-info\-memory
+Display, in human-readable format, how much physical memory (RAM)
+.B xz
+thinks the system has and the memory usage limits for compression
+and decompression, and exit successfully.
+.TP
+.BR \-h ", " \-\-help
+Display a help message describing the most commonly used options,
+and exit successfully.
+.TP
+.BR \-H ", " \-\-long\-help
+Display a help message describing all features of
+.BR xz ,
+and exit successfully
+.TP
+.BR \-V ", " \-\-version
+Display the version number of
+.B xz
+and liblzma in human readable format.
+To get machine-parsable output, specify
+.B \-\-robot
+before
+.BR \-\-version .
+.
+.SH "ROBOT MODE"
+The robot mode is activated with the
+.B \-\-robot
+option.
+It makes the output of
+.B xz
+easier to parse by other programs.
+Currently
+.B \-\-robot
+is supported only together with
+.BR \-\-version ,
+.BR \-\-info\-memory ,
+and
+.BR \-\-list .
+It will be supported for compression and
+decompression in the future.
+.
+.SS Version
+.B "xz \-\-robot \-\-version"
+will print the version number of
+.B xz
+and liblzma in the following format:
+.PP
+.BI XZ_VERSION= XYYYZZZS
+.br
+.BI LIBLZMA_VERSION= XYYYZZZS
+.TP
+.I X
+Major version.
+.TP
+.I YYY
+Minor version.
+Even numbers are stable.
+Odd numbers are alpha or beta versions.
+.TP
+.I ZZZ
+Patch level for stable releases or
+just a counter for development releases.
+.TP
+.I S
+Stability.
+0 is alpha, 1 is beta, and 2 is stable.
+.I S
+should be always 2 when
+.I YYY
+is even.
+.PP
+.I XYYYZZZS
+are the same on both lines if
+.B xz
+and liblzma are from the same XZ Utils release.
+.PP
+Examples: 4.999.9beta is
+.B 49990091
+and
+5.0.0 is
+.BR 50000002 .
+.
+.SS "Memory limit information"
+.B "xz \-\-robot \-\-info\-memory"
+prints a single line with three tab-separated columns:
+.IP 1. 4
+Total amount of physical memory (RAM) in bytes
+.IP 2. 4
+Memory usage limit for compression in bytes.
+A special value of zero indicates the default setting,
+which for single-threaded mode is the same as no limit.
+.IP 3. 4
+Memory usage limit for decompression in bytes.
+A special value of zero indicates the default setting,
+which for single-threaded mode is the same as no limit.
+.PP
+In the future, the output of
+.B "xz \-\-robot \-\-info\-memory"
+may have more columns, but never more than a single line.
+.
+.SS "List mode"
+.B "xz \-\-robot \-\-list"
+uses tab-separated output.
+The first column of every line has a string
+that indicates the type of the information found on that line:
+.TP
+.B name
+This is always the first line when starting to list a file.
+The second column on the line is the filename.
+.TP
+.B file
+This line contains overall information about the
+.B .xz
+file.
+This line is always printed after the
+.B name
+line.
+.TP
+.B stream
+This line type is used only when
+.B \-\-verbose
+was specified.
+There are as many
+.B stream
+lines as there are streams in the
+.B .xz
+file.
+.TP
+.B block
+This line type is used only when
+.B \-\-verbose
+was specified.
+There are as many
+.B block
+lines as there are blocks in the
+.B .xz
+file.
+The
+.B block
+lines are shown after all the
+.B stream
+lines; different line types are not interleaved.
+.TP
+.B summary
+This line type is used only when
+.B \-\-verbose
+was specified twice.
+This line is printed after all
+.B block
+lines.
+Like the
+.B file
+line, the
+.B summary
+line contains overall information about the
+.B .xz
+file.
+.TP
+.B totals
+This line is always the very last line of the list output.
+It shows the total counts and sizes.
+.PP
+The columns of the
+.B file
+lines:
+.PD 0
+.RS
+.IP 2. 4
+Number of streams in the file
+.IP 3. 4
+Total number of blocks in the stream(s)
+.IP 4. 4
+Compressed size of the file
+.IP 5. 4
+Uncompressed size of the file
+.IP 6. 4
+Compression ratio, for example
+.BR 0.123.
+If ratio is over 9.999, three dashes
+.RB ( \-\-\- )
+are displayed instead of the ratio.
+.IP 7. 4
+Comma-separated list of integrity check names.
+The following strings are used for the known check types:
+.BR None ,
+.BR CRC32 ,
+.BR CRC64 ,
+and
+.BR SHA\-256 .
+For unknown check types,
+.BI Unknown\- N
+is used, where
+.I N
+is the Check ID as a decimal number (one or two digits).
+.IP 8. 4
+Total size of stream padding in the file
+.RE
+.PD
+.PP
+The columns of the
+.B stream
+lines:
+.PD 0
+.RS
+.IP 2. 4
+Stream number (the first stream is 1)
+.IP 3. 4
+Number of blocks in the stream
+.IP 4. 4
+Compressed start offset
+.IP 5. 4
+Uncompressed start offset
+.IP 6. 4
+Compressed size (does not include stream padding)
+.IP 7. 4
+Uncompressed size
+.IP 8. 4
+Compression ratio
+.IP 9. 4
+Name of the integrity check
+.IP 10. 4
+Size of stream padding
+.RE
+.PD
+.PP
+The columns of the
+.B block
+lines:
+.PD 0
+.RS
+.IP 2. 4
+Number of the stream containing this block
+.IP 3. 4
+Block number relative to the beginning of the stream
+(the first block is 1)
+.IP 4. 4
+Block number relative to the beginning of the file
+.IP 5. 4
+Compressed start offset relative to the beginning of the file
+.IP 6. 4
+Uncompressed start offset relative to the beginning of the file
+.IP 7. 4
+Total compressed size of the block (includes headers)
+.IP 8. 4
+Uncompressed size
+.IP 9. 4
+Compression ratio
+.IP 10. 4
+Name of the integrity check
+.RE
+.PD
+.PP
+If
+.B \-\-verbose
+was specified twice, additional columns are included on the
+.B block
+lines.
+These are not displayed with a single
+.BR \-\-verbose ,
+because getting this information requires many seeks
+and can thus be slow:
+.PD 0
+.RS
+.IP 11. 4
+Value of the integrity check in hexadecimal
+.IP 12. 4
+Block header size
+.IP 13. 4
+Block flags:
+.B c
+indicates that compressed size is present, and
+.B u
+indicates that uncompressed size is present.
+If the flag is not set, a dash
+.RB ( \- )
+is shown instead to keep the string length fixed.
+New flags may be added to the end of the string in the future.
+.IP 14. 4
+Size of the actual compressed data in the block (this excludes
+the block header, block padding, and check fields)
+.IP 15. 4
+Amount of memory (in bytes) required to decompress
+this block with this
+.B xz
+version
+.IP 16. 4
+Filter chain.
+Note that most of the options used at compression time
+cannot be known, because only the options
+that are needed for decompression are stored in the
+.B .xz
+headers.
+.RE
+.PD
+.PP
+The columns of the
+.B summary
+lines:
+.PD 0
+.RS
+.IP 2. 4
+Amount of memory (in bytes) required to decompress
+this file with this
+.B xz
+version
+.IP 3. 4
+.B yes
+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
+The columns of the
+.B totals
+line:
+.PD 0
+.RS
+.IP 2. 4
+Number of streams
+.IP 3. 4
+Number of blocks
+.IP 4. 4
+Compressed size
+.IP 5. 4
+Uncompressed size
+.IP 6. 4
+Average compression ratio
+.IP 7. 4
+Comma-separated list of integrity check names
+that were present in the files
+.IP 8. 4
+Stream padding size
+.IP 9. 4
+Number of files.
+This is here to
+keep the order of the earlier columns the same as on
+.B file
+lines.
+.PD
+.RE
+.PP
+If
+.B \-\-verbose
+was specified twice, additional columns are included on the
+.B totals
+line:
+.PD 0
+.RS
+.IP 10. 4
+Maximum amount of memory (in bytes) required to decompress
+the files with this
+.B xz
+version
+.IP 11. 4
+.B yes
+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
+Future versions may add new line types and
+new columns can be added to the existing line types,
+but the existing columns won't be changed.
+.
+.SH "EXIT STATUS"
+.TP
+.B 0
+All is good.
+.TP
+.B 1
+An error occurred.
+.TP
+.B 2
+Something worth a warning occurred,
+but no actual errors occurred.
+.PP
+Notices (not warnings or errors) printed on standard error
+don't affect the exit status.
+.
+.SH ENVIRONMENT
+.B xz
+parses space-separated lists of options
+from the environment variables
+.B XZ_DEFAULTS
+and
+.BR XZ_OPT ,
+in this order, before parsing the options from the command line.
+Note that only options are parsed from the environment variables;
+all non-options are silently ignored.
+Parsing is done with
+.BR getopt_long (3)
+which is used also for the command line arguments.
+.TP
+.B XZ_DEFAULTS
+User-specific or system-wide default options.
+Typically this is set in a shell initialization script to enable
+.BR xz 's
+memory usage limiter by default.
+Excluding shell initialization scripts
+and similar special cases, scripts must never set or unset
+.BR XZ_DEFAULTS .
+.TP
+.B XZ_OPT
+This is for passing options to
+.B xz
+when it is not possible to set the options directly on the
+.B xz
+command line.
+This is the case e.g. when
+.B xz
+is run by a script or tool, e.g. GNU
+.BR tar (1):
+.RS
+.RS
+.PP
+.nf
+.ft CW
+XZ_OPT=\-2v tar caf foo.tar.xz foo
+.ft R
+.fi
+.RE
+.RE
+.IP ""
+Scripts may use
+.B XZ_OPT
+e.g. to set script-specific default compression options.
+It is still recommended to allow users to override
+.B XZ_OPT
+if that is reasonable, e.g. in
+.BR sh (1)
+scripts one may use something like this:
+.RS
+.RS
+.PP
+.nf
+.ft CW
+XZ_OPT=${XZ_OPT\-"\-7e"}
+export XZ_OPT
+.ft R
+.fi
+.RE
+.RE
+.
+.SH "LZMA UTILS COMPATIBILITY"
+The command line syntax of
+.B xz
+is practically a superset of
+.BR lzma ,
+.BR unlzma ,
+and
+.BR lzcat
+as found from LZMA Utils 4.32.x.
+In most cases, it is possible to replace
+LZMA Utils with XZ Utils without breaking existing scripts.
+There are some incompatibilities though,
+which may sometimes cause problems.
+.
+.SS "Compression preset levels"
+The numbering of the compression level presets is not identical in
+.B xz
+and LZMA Utils.
+The most important difference is how dictionary sizes
+are mapped to different presets.
+Dictionary size is roughly equal to the decompressor memory usage.
+.RS
+.PP
+.TS
+tab(;);
+c c c
+c n n.
+Level;xz;LZMA Utils
+\-0;256 KiB;N/A
+\-1;1 MiB;64 KiB
+\-2;2 MiB;1 MiB
+\-3;4 MiB;512 KiB
+\-4;4 MiB;1 MiB
+\-5;8 MiB;2 MiB
+\-6;8 MiB;4 MiB
+\-7;16 MiB;8 MiB
+\-8;32 MiB;16 MiB
+\-9;64 MiB;32 MiB
+.TE
+.RE
+.PP
+The dictionary size differences affect
+the compressor memory usage too,
+but there are some other differences between
+LZMA Utils and XZ Utils, which
+make the difference even bigger:
+.RS
+.PP
+.TS
+tab(;);
+c c c
+c n n.
+Level;xz;LZMA Utils 4.32.x
+\-0;3 MiB;N/A
+\-1;9 MiB;2 MiB
+\-2;17 MiB;12 MiB
+\-3;32 MiB;12 MiB
+\-4;48 MiB;16 MiB
+\-5;94 MiB;26 MiB
+\-6;94 MiB;45 MiB
+\-7;186 MiB;83 MiB
+\-8;370 MiB;159 MiB
+\-9;674 MiB;311 MiB
+.TE
+.RE
+.PP
+The default preset level in LZMA Utils is
+.B \-7
+while in XZ Utils it is
+.BR \-6 ,
+so both use an 8 MiB dictionary by default.
+.
+.SS "Streamed vs. non-streamed .lzma files"
+The uncompressed size of the file can be stored in the
+.B .lzma
+header.
+LZMA Utils does that when compressing regular files.
+The alternative is to mark that uncompressed size is unknown
+and use end-of-payload marker to indicate
+where the decompressor should stop.
+LZMA Utils uses this method when uncompressed size isn't known,
+which is the case for example in pipes.
+.PP
+.B xz
+supports decompressing
+.B .lzma
+files with or without end-of-payload marker, but all
+.B .lzma
+files created by
+.B xz
+will use end-of-payload marker and have uncompressed size
+marked as unknown in the
+.B .lzma
+header.
+This may be a problem in some uncommon situations.
+For example, a
+.B .lzma
+decompressor in an embedded device might work
+only with files that have known uncompressed size.
+If you hit this problem, you need to use LZMA Utils
+or LZMA SDK to create
+.B .lzma
+files with known uncompressed size.
+.
+.SS "Unsupported .lzma files"
+The
+.B .lzma
+format allows
+.I lc
+values up to 8, and
+.I lp
+values up to 4.
+LZMA Utils can decompress files with any
+.I lc
+and
+.IR lp ,
+but always creates files with
+.B lc=3
+and
+.BR lp=0 .
+Creating files with other
+.I lc
+and
+.I lp
+is possible with
+.B xz
+and with LZMA SDK.
+.PP
+The implementation of the LZMA1 filter in liblzma
+requires that the sum of
+.I lc
+and
+.I lp
+must not exceed 4.
+Thus,
+.B .lzma
+files, which exceed this limitation, cannot be decompressed with
+.BR xz .
+.PP
+LZMA Utils creates only
+.B .lzma
+files which have a dictionary size of
+.RI "2^" n
+(a power of 2) but accepts files with any dictionary size.
+liblzma accepts only
+.B .lzma
+files which have a dictionary size of
+.RI "2^" n
+or
+.RI "2^" n " + 2^(" n "\-1)."
+This is to decrease false positives when detecting
+.B .lzma
+files.
+.PP
+These limitations shouldn't be a problem in practice,
+since practically all
+.B .lzma
+files have been compressed with settings that liblzma will accept.
+.
+.SS "Trailing garbage"
+When decompressing,
+LZMA Utils silently ignore everything after the first
+.B .lzma
+stream.
+In most situations, this is a bug.
+This also means that LZMA Utils
+don't support decompressing concatenated
+.B .lzma
+files.
+.PP
+If there is data left after the first
+.B .lzma
+stream,
+.B xz
+considers the file to be corrupt unless
+.B \-\-single\-stream
+was used.
+This may break obscure scripts which have
+assumed that trailing garbage is ignored.
+.
+.SH NOTES
+.
+.SS "Compressed output may vary"
+The exact compressed output produced from
+the same uncompressed input file
+may vary between XZ Utils versions even if
+compression options are identical.
+This is because the encoder can be improved
+(faster or better compression)
+without affecting the file format.
+The output can vary even between different
+builds of the same XZ Utils version,
+if different build options are used.
+.PP
+The above means that once
+.B \-\-rsyncable
+has been implemented,
+the resulting files won't necessarily be rsyncable
+unless both old and new files have been compressed
+with the same xz version.
+This problem can be fixed if a part of the encoder
+implementation is frozen to keep rsyncable output
+stable across xz versions.
+.
+.SS "Embedded .xz decompressors"
+Embedded
+.B .xz
+decompressor implementations like XZ Embedded don't necessarily
+support files created with integrity
+.I check
+types other than
+.B none
+and
+.BR crc32 .
+Since the default is
+.BR \-\-check=crc64 ,
+you must use
+.B \-\-check=none
+or
+.B \-\-check=crc32
+when creating files for embedded systems.
+.PP
+Outside embedded systems, all
+.B .xz
+format decompressors support all the
+.I check
+types, or at least are able to decompress
+the file without verifying the
+integrity check if the particular
+.I check
+is not supported.
+.PP
+XZ Embedded supports BCJ filters,
+but only with the default start offset.
+.
+.SH EXAMPLES
+.
+.SS Basics
+Compress the file
+.I foo
+into
+.I foo.xz
+using the default compression level
+.RB ( \-6 ),
+and remove
+.I foo
+if compression is successful:
+.RS
+.PP
+.nf
+.ft CW
+xz foo
+.ft R
+.fi
+.RE
+.PP
+Decompress
+.I bar.xz
+into
+.I bar
+and don't remove
+.I bar.xz
+even if decompression is successful:
+.RS
+.PP
+.nf
+.ft CW
+xz \-dk bar.xz
+.ft R
+.fi
+.RE
+.PP
+Create
+.I baz.tar.xz
+with the preset
+.B \-4e
+.RB ( "\-4 \-\-extreme" ),
+which is slower than e.g. the default
+.BR \-6 ,
+but needs less memory for compression and decompression (48\ MiB
+and 5\ MiB, respectively):
+.RS
+.PP
+.nf
+.ft CW
+tar cf \- baz | xz \-4e > baz.tar.xz
+.ft R
+.fi
+.RE
+.PP
+A mix of compressed and uncompressed files can be decompressed
+to standard output with a single command:
+.RS
+.PP
+.nf
+.ft CW
+xz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt
+.ft R
+.fi
+.RE
+.
+.SS "Parallel compression of many files"
+On GNU and *BSD,
+.BR find (1)
+and
+.BR xargs (1)
+can be used to parallelize compression of many files:
+.RS
+.PP
+.nf
+.ft CW
+find . \-type f \e! \-name '*.xz' \-print0 \e
+    | xargs \-0r \-P4 \-n16 xz \-T1
+.ft R
+.fi
+.RE
+.PP
+The
+.B \-P
+option to
+.BR xargs (1)
+sets the number of parallel
+.B xz
+processes.
+The best value for the
+.B \-n
+option depends on how many files there are to be compressed.
+If there are only a couple of files,
+the value should probably be 1;
+with tens of thousands of files,
+100 or even more may be appropriate to reduce the number of
+.B xz
+processes that
+.BR xargs (1)
+will eventually create.
+.PP
+The option
+.B \-T1
+for
+.B xz
+is there to force it to single-threaded mode, because
+.BR xargs (1)
+is used to control the amount of parallelization.
+.
+.SS "Robot mode"
+Calculate how many bytes have been saved in total
+after compressing multiple files:
+.RS
+.PP
+.nf
+.ft CW
+xz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'
+.ft R
+.fi
+.RE
+.PP
+A script may want to know that it is using new enough
+.BR xz .
+The following
+.BR sh (1)
+script checks that the version number of the
+.B xz
+tool is at least 5.0.0.
+This method is compatible with old beta versions,
+which didn't support the
+.B \-\-robot
+option:
+.RS
+.PP
+.nf
+.ft CW
+if ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" ||
+        [ "$XZ_VERSION" \-lt 50000002 ]; then
+    echo "Your xz is too old."
+fi
+unset XZ_VERSION LIBLZMA_VERSION
+.ft R
+.fi
+.RE
+.PP
+Set a memory usage limit for decompression using
+.BR XZ_OPT ,
+but if a limit has already been set, don't increase it:
+.RS
+.PP
+.nf
+.ft CW
+NEWLIM=$((123 << 20))  # 123 MiB
+OLDLIM=$(xz \-\-robot \-\-info\-memory | cut \-f3)
+if [ $OLDLIM \-eq 0 \-o $OLDLIM \-gt $NEWLIM ]; then
+    XZ_OPT="$XZ_OPT \-\-memlimit\-decompress=$NEWLIM"
+    export XZ_OPT
+fi
+.ft R
+.fi
+.RE
+.
+.SS "Custom compressor filter chains"
+The simplest use for custom filter chains is
+customizing a LZMA2 preset.
+This can be useful,
+because the presets cover only a subset of the
+potentially useful combinations of compression settings.
+.PP
+The CompCPU columns of the tables
+from the descriptions of the options
+.BR "\-0" " ... " "\-9"
+and
+.B \-\-extreme
+are useful when customizing LZMA2 presets.
+Here are the relevant parts collected from those two tables:
+.RS
+.PP
+.TS
+tab(;);
+c c
+n n.
+Preset;CompCPU
+\-0;0
+\-1;1
+\-2;2
+\-3;3
+\-4;4
+\-5;5
+\-6;6
+\-5e;7
+\-6e;8
+.TE
+.RE
+.PP
+If you know that a file requires
+somewhat big dictionary (e.g. 32 MiB) to compress well,
+but you want to compress it quicker than
+.B "xz \-8"
+would do, a preset with a low CompCPU value (e.g. 1)
+can be modified to use a bigger dictionary:
+.RS
+.PP
+.nf
+.ft CW
+xz \-\-lzma2=preset=1,dict=32MiB foo.tar
+.ft R
+.fi
+.RE
+.PP
+With certain files, the above command may be faster than
+.B "xz \-6"
+while compressing significantly better.
+However, it must be emphasized that only some files benefit from
+a big dictionary while keeping the CompCPU value low.
+The most obvious situation,
+where a big dictionary can help a lot,
+is an archive containing very similar files
+of at least a few megabytes each.
+The dictionary size has to be significantly bigger
+than any individual file to allow LZMA2 to take
+full advantage of the similarities between consecutive files.
+.PP
+If very high compressor and decompressor memory usage is fine,
+and the file being compressed is
+at least several hundred megabytes, it may be useful
+to use an even bigger dictionary than the 64 MiB that
+.B "xz \-9"
+would use:
+.RS
+.PP
+.nf
+.ft CW
+xz \-vv \-\-lzma2=dict=192MiB big_foo.tar
+.ft R
+.fi
+.RE
+.PP
+Using
+.B \-vv
+.RB ( "\-\-verbose \-\-verbose" )
+like in the above example can be useful
+to see the memory requirements
+of the compressor and decompressor.
+Remember that using a dictionary bigger than
+the size of the uncompressed file is waste of memory,
+so the above command isn't useful for small files.
+.PP
+Sometimes the compression time doesn't matter,
+but the decompressor memory usage has to be kept low
+e.g. to make it possible to decompress the file on
+an embedded system.
+The following command uses
+.B \-6e
+.RB ( "\-6 \-\-extreme" )
+as a base and sets the dictionary to only 64\ KiB.
+The resulting file can be decompressed with XZ Embedded
+(that's why there is
+.BR \-\-check=crc32 )
+using about 100\ KiB of memory.
+.RS
+.PP
+.nf
+.ft CW
+xz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo
+.ft R
+.fi
+.RE
+.PP
+If you want to squeeze out as many bytes as possible,
+adjusting the number of literal context bits
+.RI ( lc )
+and number of position bits
+.RI ( pb )
+can sometimes help.
+Adjusting the number of literal position bits
+.RI ( lp )
+might help too, but usually
+.I lc
+and
+.I pb
+are more important.
+E.g. a source code archive contains mostly US-ASCII text,
+so something like the following might give
+slightly (like 0.1\ %) smaller file than
+.B "xz \-6e"
+(try also without
+.BR lc=4 ):
+.RS
+.PP
+.nf
+.ft CW
+xz \-\-lzma2=preset=6e,pb=0,lc=4 source_code.tar
+.ft R
+.fi
+.RE
+.PP
+Using another filter together with LZMA2 can improve
+compression with certain file types.
+E.g. to compress a x86-32 or x86-64 shared library
+using the x86 BCJ filter:
+.RS
+.PP
+.nf
+.ft CW
+xz \-\-x86 \-\-lzma2 libfoo.so
+.ft R
+.fi
+.RE
+.PP
+Note that the order of the filter options is significant.
+If
+.B \-\-x86
+is specified after
+.BR \-\-lzma2 ,
+.B xz
+will give an error,
+because there cannot be any filter after LZMA2,
+and also because the x86 BCJ filter cannot be used
+as the last filter in the chain.
+.PP
+The Delta filter together with LZMA2
+can give good results with bitmap images.
+It should usually beat PNG,
+which has a few more advanced filters than simple
+delta but uses Deflate for the actual compression.
+.PP
+The image has to be saved in uncompressed format,
+e.g. as uncompressed TIFF.
+The distance parameter of the Delta filter is set
+to match the number of bytes per pixel in the image.
+E.g. 24-bit RGB bitmap needs
+.BR dist=3 ,
+and it is also good to pass
+.B pb=0
+to LZMA2 to accommodate the three-byte alignment:
+.RS
+.PP
+.nf
+.ft CW
+xz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff
+.ft R
+.fi
+.RE
+.PP
+If multiple images have been put into a single archive (e.g.\&
+.BR .tar ),
+the Delta filter will work on that too as long as all images
+have the same number of bytes per pixel.
+.
+.SH "SEE ALSO"
+.BR xzdec (1),
+.BR xzdiff (1),
+.BR xzgrep (1),
+.BR xzless (1),
+.BR xzmore (1),
+.BR gzip (1),
+.BR bzip2 (1),
+.BR 7z (1)
+.PP
+XZ Utils: <http://tukaani.org/xz/>
+.br
+XZ Embedded: <http://tukaani.org/xz/embedded.html>
+.br
+LZMA SDK: <http://7-zip.org/sdk.html>

Deleted: vendor/xz/5.2.3/src/xz/xz_w32res.rc
===================================================================
--- vendor/xz/dist/src/xz/xz_w32res.rc	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xz/xz_w32res.rc	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,12 +0,0 @@
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#define MY_TYPE VFT_APP
-#define MY_NAME "xz"
-#define MY_SUFFIX ".exe"
-#define MY_DESC "xz data compression tool for .xz and .lzma files"
-#include "common_w32res.rc"

Deleted: vendor/xz/5.2.3/src/xzdec/lzmadec_w32res.rc
===================================================================
--- vendor/xz/dist/src/xzdec/lzmadec_w32res.rc	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xzdec/lzmadec_w32res.rc	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,12 +0,0 @@
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#define MY_TYPE VFT_APP
-#define MY_NAME "lzmadec"
-#define MY_SUFFIX ".exe"
-#define MY_DESC "lzmadec decompression tool for .lzma files"
-#include "common_w32res.rc"

Deleted: vendor/xz/5.2.3/src/xzdec/xzdec_w32res.rc
===================================================================
--- vendor/xz/dist/src/xzdec/xzdec_w32res.rc	2016-10-15 13:51:14 UTC (rev 9175)
+++ vendor/xz/5.2.3/src/xzdec/xzdec_w32res.rc	2018-06-15 22:33:43 UTC (rev 11014)
@@ -1,12 +0,0 @@
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#define MY_TYPE VFT_APP
-#define MY_NAME "xzdec"
-#define MY_SUFFIX ".exe"
-#define MY_DESC "xzdec decompression tool for .xz files"
-#include "common_w32res.rc"



More information about the Midnightbsd-cvs mailing list