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.
Lasse Collin [Sat, 17 Jan 2009 12:24:25 +0000 (14:24 +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.
Lasse Collin [Thu, 15 Jan 2009 12:27:32 +0000 (14:27 +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.
Lasse Collin [Wed, 31 Dec 2008 14:29:39 +0000 (16:29 +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.
Lasse Collin [Tue, 30 Dec 2008 22:30:49 +0000 (00:30 +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.
Lasse Collin [Sat, 27 Dec 2008 17:32:20 +0000 (19:32 +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.
Lasse Collin [Wed, 17 Dec 2008 19:49:53 +0000 (21:49 +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.
Lasse Collin [Fri, 12 Dec 2008 20:43:21 +0000 (22:43 +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.
Lasse Collin [Tue, 9 Dec 2008 15:41:49 +0000 (17:41 +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.
Lasse Collin [Mon, 1 Dec 2008 21:04:12 +0000 (23:04 +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).
Lasse Collin [Fri, 28 Nov 2008 10:00:48 +0000 (12:00 +0200)]
Tested using COLUMNS environment variable to avoid broken
progress indicator but since COLUMNS isn't usually available,
the code was left commented out.
Lasse Collin [Wed, 19 Nov 2008 21:52:24 +0000 (23:52 +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.
Lasse Collin [Wed, 19 Nov 2008 18:46:52 +0000 (20:46 +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