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
Lasse Collin [Thu, 2 Oct 2008 19:51:46 +0000 (22:51 +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.
Lasse Collin [Wed, 10 Sep 2008 14:02:00 +0000 (17:02 +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.
Lasse Collin [Tue, 9 Sep 2008 21:27:02 +0000 (00:27 +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.
Lasse Collin [Thu, 4 Sep 2008 08:53:06 +0000 (11:53 +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.
Lasse Collin [Thu, 4 Sep 2008 07:39:15 +0000 (10:39 +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).
Lasse Collin [Tue, 2 Sep 2008 16:12:12 +0000 (19: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.
Lasse Collin [Thu, 28 Aug 2008 19:53:15 +0000 (22:53 +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.
Lasse Collin [Wed, 18 Jun 2008 15:02:10 +0000 (18:02 +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.
Lasse Collin [Tue, 17 Jun 2008 12:03:46 +0000 (15:03 +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.
Lasse Collin [Wed, 11 Jun 2008 12:08:44 +0000 (15:08 +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.
Lasse Collin [Sun, 1 Jun 2008 09:48:17 +0000 (12:48 +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.
Lasse Collin [Sun, 11 May 2008 11:17:21 +0000 (14:17 +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().