Lasse Collin [Fri, 22 May 2009 09:27:43 +0000 (12:27 +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.
Lasse Collin [Fri, 22 May 2009 08:29:50 +0000 (11:29 +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.
Lasse Collin [Thu, 21 May 2009 14:22:01 +0000 (17:22 +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.
ABCD [Wed, 20 May 2009 21:31:18 +0000 (17:31 -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.
Lasse Collin [Sat, 2 May 2009 11:46:50 +0000 (14:46 +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.
Lasse Collin [Tue, 28 Apr 2009 20:08:32 +0000 (23:08 +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.
Lasse Collin [Sun, 22 Feb 2009 16:52:49 +0000 (18:52 +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.
Lasse Collin [Tue, 17 Feb 2009 08:43:00 +0000 (10:43 +0200)]
Added lzma_easy_buffer_encode(). Splitted easy.c into small
pieces to avoid unneeded dependencies making statically
linked applications bigger than needed.
Lasse Collin [Fri, 13 Feb 2009 22:45:29 +0000 (00:45 +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.
Lasse Collin [Fri, 13 Feb 2009 16:00:03 +0000 (18:00 +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.
Lasse Collin [Tue, 10 Feb 2009 19:48:35 +0000 (21:48 +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.
Lasse Collin [Sun, 8 Feb 2009 16:24:50 +0000 (18:24 +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.
Lasse Collin [Sat, 7 Feb 2009 19:17:07 +0000 (21:17 +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.
Lasse Collin [Sat, 7 Feb 2009 14:26:58 +0000 (16:26 +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.
Lasse Collin [Sat, 7 Feb 2009 09:11:50 +0000 (11:11 +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.
Lasse Collin [Fri, 6 Feb 2009 07:13:15 +0000 (09:13 +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.
Lasse Collin [Mon, 2 Feb 2009 19:19:01 +0000 (21:19 +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.
Lasse Collin [Mon, 2 Feb 2009 18:14:03 +0000 (20:14 +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.
Lasse Collin [Sat, 31 Jan 2009 09:01:48 +0000 (11:01 +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.
Lasse Collin [Wed, 28 Jan 2009 15:16:38 +0000 (17:16 +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.
Lasse Collin [Wed, 28 Jan 2009 06:43:26 +0000 (08:43 +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.