platform/upstream/xz.git
16 years agoSilence a compiler warning.
Lasse Collin [Thu, 11 Sep 2008 07:46:14 +0000 (10:46 +0300)]
Silence a compiler warning.

16 years agoBumped version to 4.999.6alpha.
Lasse Collin [Wed, 10 Sep 2008 16:16:32 +0000 (19:16 +0300)]
Bumped version to 4.999.6alpha.

16 years agoCheck for LZMA_FILTER_RESERVED_START in filter_flags_encoder.c.
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.

16 years agoFilter handling cleanups
Lasse Collin [Wed, 10 Sep 2008 13:44:32 +0000 (16:44 +0300)]
Filter handling cleanups

16 years agoComments
Lasse Collin [Tue, 9 Sep 2008 21:33:00 +0000 (00:33 +0300)]
Comments

16 years agoCleaned up Block encoder and moved the no longer shared
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.

16 years agoChanged Filter ID of LZMA to 0x20.
Lasse Collin [Sun, 7 Sep 2008 07:23:13 +0000 (10:23 +0300)]
Changed Filter ID of LZMA to 0x20.

16 years agoComments
Lasse Collin [Sat, 6 Sep 2008 20:42:50 +0000 (23:42 +0300)]
Comments

16 years agoSome API cleanups
Lasse Collin [Sat, 6 Sep 2008 12:14:30 +0000 (15:14 +0300)]
Some API cleanups

16 years agoAdded support for raw encoding and decoding to the command
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.

16 years agoDon't allow LZMA_SYNC_FLUSH with decoders anymore. There's
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).

16 years agoMinor updates to the file format specification.
Lasse Collin [Wed, 3 Sep 2008 14:06:25 +0000 (17:06 +0300)]
Minor updates to the file format specification.

16 years agoCommand line tool fixes
Lasse Collin [Tue, 2 Sep 2008 16:33:32 +0000 (19:33 +0300)]
Command line tool fixes

16 years agoAuto decoder cleanup
Lasse Collin [Tue, 2 Sep 2008 16:31:42 +0000 (19:31 +0300)]
Auto decoder cleanup

16 years agoUpdated auto decoder to handle LZMA_CONCATENATED when decoding
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.

16 years agoStream decoder cleanups
Lasse Collin [Tue, 2 Sep 2008 11:56:52 +0000 (14:56 +0300)]
Stream decoder cleanups

16 years agoSome fixes to LZ encoder.
Lasse Collin [Tue, 2 Sep 2008 08:45:39 +0000 (11:45 +0300)]
Some fixes to LZ encoder.

16 years agoFix wrong pointer calculation in LZMA encoder.
Lasse Collin [Sun, 31 Aug 2008 08:47:01 +0000 (11:47 +0300)]
Fix wrong pointer calculation in LZMA encoder.

16 years agoSort of garbage collection commit. :-| Many things are still
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.

16 years agoFix test_filter_flags to match the new restriction of lc+lp.
Lasse Collin [Fri, 20 Jun 2008 14:16:32 +0000 (17:16 +0300)]
Fix test_filter_flags to match the new restriction of lc+lp.

16 years agoRemove some redundant code from LZMA encoder.
Lasse Collin [Fri, 20 Jun 2008 13:19:54 +0000 (16:19 +0300)]
Remove some redundant code from LZMA encoder.

16 years agoAdd limit of lc + lp <= 4. Now we can allocate the
Lasse Collin [Thu, 19 Jun 2008 13:35:08 +0000 (16:35 +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.

16 years agoComments
Lasse Collin [Wed, 18 Jun 2008 18:45:19 +0000 (21:45 +0300)]
Comments

16 years agoDelete old code that was supposed to be already deleted
Lasse Collin [Wed, 18 Jun 2008 16:19:02 +0000 (19:19 +0300)]
Delete old code that was supposed to be already deleted
from test_block_header.c.

16 years agoUpdate the code to mostly match the new simpler file format
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.

16 years agoUpdate the file format specification draft. The new one is
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.

16 years agoFix uninitialized variable in LZMA encoder. This was
Lasse Collin [Wed, 11 Jun 2008 18:42:47 +0000 (21:42 +0300)]
Fix uninitialized variable in LZMA encoder. This was
introduced in 369f72fd656f537a9a8e06f13e6d0d4c242be22f.

16 years agoImprove command line integer parsing a little in lzma and
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.

16 years agos/decompressed/compressed/ in the command line tool's
Lasse Collin [Tue, 10 Jun 2008 17:36:12 +0000 (20:36 +0300)]
s/decompressed/compressed/ in the command line tool's
error message.

16 years agoFix a buffer overflow in the LZMA encoder. It was due to my
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.

16 years agoTypo fixes from meyering.
Lasse Collin [Fri, 30 May 2008 08:53:41 +0000 (11:53 +0300)]
Typo fixes from meyering.

16 years agoRemove support for pre-C89 libc versions that lack memcpy,
Lasse Collin [Sun, 11 May 2008 11:24:42 +0000 (14:24 +0300)]
Remove support for pre-C89 libc versions that lack memcpy,
memmove, and memset.

16 years agoImproved C99 compiler detection in configure.ac. It will
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().

16 years agoBunch of grammar fixes from meyering.
Lasse Collin [Tue, 6 May 2008 12:15:07 +0000 (15:15 +0300)]
Bunch of grammar fixes from meyering.

16 years agoTypo fix
Lasse Collin [Tue, 6 May 2008 10:41:05 +0000 (13:41 +0300)]
Typo fix

16 years agoDon't print an error message on broken pipe unless --verbose
Lasse Collin [Sun, 4 May 2008 19:29:27 +0000 (22:29 +0300)]
Don't print an error message on broken pipe unless --verbose
is used.

16 years agoFix a crash with --format=alone if other filters than LZMA
Lasse Collin [Wed, 30 Apr 2008 19:16:17 +0000 (22:16 +0300)]
Fix a crash with --format=alone if other filters than LZMA
are specified on the command line.

16 years agoUpdated THANKS.
Lasse Collin [Mon, 28 Apr 2008 14:08:27 +0000 (17:08 +0300)]
Updated THANKS.

16 years agoFixed wrong spelling "limitter" to "limiter". This affects
Lasse Collin [Mon, 28 Apr 2008 14:06:34 +0000 (17:06 +0300)]
Fixed wrong spelling "limitter" to "limiter". This affects
liblzma's API.

16 years agoPrevent LZ encoder from hanging with known uncompressed
Lasse Collin [Fri, 25 Apr 2008 12:39:50 +0000 (15:39 +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.

16 years agoRemoved src/liblzma/common/sysdefs.h symlink, which was
Lasse Collin [Fri, 25 Apr 2008 10:58:56 +0000 (13:58 +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.

16 years agoAdded memusage.c to debug directory.
Lasse Collin [Fri, 25 Apr 2008 10:41:29 +0000 (13:41 +0300)]
Added memusage.c to debug directory.

16 years agoBumped version number to 4.999.3alpha. It will become 5.0.0
Lasse Collin [Fri, 25 Apr 2008 10:32:35 +0000 (13:32 +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.

16 years agoFix a memory leak by calling free(extra->data) in
Lasse Collin [Thu, 24 Apr 2008 17:25:39 +0000 (20:25 +0300)]
Fix a memory leak by calling free(extra->data) in
lzma_extra_free().

16 years agoMake unlzma and lzcat symlinks.
Lasse Collin [Thu, 24 Apr 2008 17:23:05 +0000 (20:23 +0300)]
Make unlzma and lzcat symlinks.

16 years agoFixed a bug in command line option parsing.
Lasse Collin [Thu, 24 Apr 2008 17:20:27 +0000 (20:20 +0300)]
Fixed a bug in command line option parsing.

16 years agoAdded two assert()s.
Lasse Collin [Thu, 24 Apr 2008 17:19:20 +0000 (20:19 +0300)]
Added two assert()s.

16 years agoSwitch to uint16_t as the type of range coder probabilities.
Lasse Collin [Thu, 24 Apr 2008 16:22:53 +0000 (19:22 +0300)]
Switch to uint16_t as the type of range coder probabilities.

16 years agoFix wrong return type (uint32_t -> bool).
Lasse Collin [Thu, 24 Apr 2008 15:39:57 +0000 (18:39 +0300)]
Fix wrong return type (uint32_t -> bool).

16 years agoFix data corruption in LZ encoder with LZMA_SYNC_FLUSH.
Lasse Collin [Thu, 24 Apr 2008 15:38:00 +0000 (18:38 +0300)]
Fix data corruption in LZ encoder with LZMA_SYNC_FLUSH.

16 years agoFix fastpos problem in Makefile.am when built with --enable-small.
Lasse Collin [Thu, 24 Apr 2008 14:33:01 +0000 (17:33 +0300)]
Fix fastpos problem in Makefile.am when built with --enable-small.

16 years agoUse 64-bit integer as range encoder's cache size. This fixes a
Lasse Collin [Thu, 24 Apr 2008 14:30:51 +0000 (17:30 +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.

16 years agoReplaced the range decoder optimization that used arithmetic
Lasse Collin [Mon, 24 Mar 2008 14:38:40 +0000 (16:38 +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.

16 years agoTake advantage of arithmetic right shift in range decoder.
Lasse Collin [Sat, 22 Mar 2008 12:39:34 +0000 (14:39 +0200)]
Take advantage of arithmetic right shift in range decoder.

16 years agoAdded autoconf check to detect if we can use arithmetic
Lasse Collin [Sat, 22 Mar 2008 12:18:29 +0000 (14:18 +0200)]
Added autoconf check to detect if we can use arithmetic
right shift for optimizations.

16 years agoUpdate a comment to use the variable name rep_len_decoder.
Lasse Collin [Fri, 21 Mar 2008 23:26:36 +0000 (01:26 +0200)]
Update a comment to use the variable name rep_len_decoder.

(And BTW, the previous commit actually did change the
program logic slightly.)

16 years agoDemystified the "state" variable in LZMA code. Use the
Lasse Collin [Fri, 21 Mar 2008 22:57:33 +0000 (00:57 +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.

16 years agoFix data corruption in LZMA encoder. Note that this bug was
Lasse Collin [Fri, 14 Mar 2008 21:16:11 +0000 (23:16 +0200)]
Fix data corruption in LZMA encoder. Note that this bug was
specific to liblzma and was *not* present in LZMA SDK.

16 years agoFix a comment API header.
Lasse Collin [Fri, 14 Mar 2008 19:32:37 +0000 (21:32 +0200)]
Fix a comment API header.

16 years agoMake lzma_stream.next_in const. Let's see if anyone complains.
Lasse Collin [Wed, 12 Mar 2008 21:14:50 +0000 (23:14 +0200)]
Make lzma_stream.next_in const. Let's see if anyone complains.

16 years agoApply a minor speed optimization to LZMA decoder.
Lasse Collin [Tue, 11 Mar 2008 13:35:34 +0000 (15:35 +0200)]
Apply a minor speed optimization to LZMA decoder.

16 years agoInitialize the last byte of the dictionary to zero so that
Lasse Collin [Tue, 11 Mar 2008 13:17:16 +0000 (15:17 +0200)]
Initialize the last byte of the dictionary to zero so that
lz_get_byte(lz, 0) returns zero. This was broken by
1a3b21859818e4d8e89a1da99699233c1bfd197d.

16 years agoReally fix the price count initialization.
Lasse Collin [Mon, 10 Mar 2008 13:57:55 +0000 (15:57 +0200)]
Really fix the price count initialization.

16 years agoUpdated THANKS.
Lasse Collin [Mon, 10 Mar 2008 11:47:17 +0000 (13:47 +0200)]
Updated THANKS.

16 years agoInitialize align_price_count and match_price_count in
Lasse Collin [Mon, 10 Mar 2008 11:46:48 +0000 (13:46 +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.

16 years agoAlways initialize lz->temp_size in lz_decoder.c. temp_size did
Lasse Collin [Mon, 10 Mar 2008 11:44:29 +0000 (13:44 +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.

16 years agoDon't fill allocated memory with 0xFD when debugging is
Lasse Collin [Mon, 10 Mar 2008 11:41:25 +0000 (13:41 +0200)]
Don't fill allocated memory with 0xFD when debugging is
enabled. It hides errors from Valgrind.

16 years agoRemove two redundant validity checks from the LZMA decoder.
Lasse Collin [Thu, 28 Feb 2008 08:24:31 +0000 (10:24 +0200)]
Remove two redundant validity checks from the LZMA decoder.
These are already checked elsewhere, so omitting these
gives (very) tiny speed up.

16 years agoTiny clean up to file-format.txt.
Lasse Collin [Wed, 6 Feb 2008 11:25:32 +0000 (13:25 +0200)]
Tiny clean up to file-format.txt.

16 years agoDon't memzero() the history buffer when initializing LZ
Lasse Collin [Sat, 2 Feb 2008 12:51:06 +0000 (14:51 +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.

16 years agoDo uncompressed size validation in raw encoder. This way
Lasse Collin [Fri, 1 Feb 2008 06:39:26 +0000 (08:39 +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.

16 years agoAvoid unneeded function call in raw_common.c.
Lasse Collin [Fri, 1 Feb 2008 06:32:05 +0000 (08:32 +0200)]
Avoid unneeded function call in raw_common.c.

16 years agoUpdated THANKS.
Lasse Collin [Sat, 26 Jan 2008 19:42:38 +0000 (21:42 +0200)]
Updated THANKS.

16 years agoAdded note.GNU-stack to x86 assembler files. It is needed
Lasse Collin [Sat, 26 Jan 2008 19:40:23 +0000 (21:40 +0200)]
Added note.GNU-stack to x86 assembler files. It is needed
when using non-executable stack.

16 years agoAdded api/lzma/easy.h. I had forgot to add this to the
Lasse Collin [Sat, 26 Jan 2008 17:12:50 +0000 (19:12 +0200)]
Added api/lzma/easy.h. I had forgot to add this to the
git repo. Thanks to Stephan Kulow.

16 years agoAdded more test files.
Lasse Collin [Sat, 26 Jan 2008 09:09:17 +0000 (11:09 +0200)]
Added more test files.

16 years agoAdded more test files.
Lasse Collin [Sat, 26 Jan 2008 08:47:55 +0000 (10:47 +0200)]
Added more test files.

16 years agoReturn LZMA_HEADER_ERROR if LZMA_SYNC_FLUSH is used with any
Lasse Collin [Fri, 25 Jan 2008 22:25:34 +0000 (00:25 +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.

16 years agoAdded more Multi-Block test files. Improved some
Lasse Collin [Fri, 25 Jan 2008 21:50:35 +0000 (23:50 +0200)]
Added more Multi-Block test files. Improved some
descriptions in the test files' README.

16 years agoCombine lzma_options_block validation needed by both Block
Lasse Collin [Fri, 25 Jan 2008 21:12:36 +0000 (23:12 +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.

16 years agoAdded test_memlimit.c.
Lasse Collin [Fri, 25 Jan 2008 17:21:22 +0000 (19:21 +0200)]
Added test_memlimit.c.

16 years agoImproved the memory limitter:
Lasse Collin [Fri, 25 Jan 2008 17:20:28 +0000 (19:20 +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.

16 years agoUse more parenthesis in succeed() macro in tests/tests.h.
Lasse Collin [Fri, 25 Jan 2008 11:55:52 +0000 (13:55 +0200)]
Use more parenthesis in succeed() macro in tests/tests.h.

16 years agoAdded more Multi-Block Stream test files.
Lasse Collin [Thu, 24 Jan 2008 12:49:34 +0000 (14:49 +0200)]
Added more Multi-Block Stream test files.

16 years agoAdded bunch of test files containing Multi-Block Streams.
Lasse Collin [Wed, 23 Jan 2008 22:46:05 +0000 (00:46 +0200)]
Added bunch of test files containing Multi-Block Streams.

16 years agoFix decoding of empty Metadata Blocks, that don't have
Lasse Collin [Wed, 23 Jan 2008 21:43:00 +0000 (23:43 +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.

16 years agoFix a bug related to 99e12af4e2b866c011fe0106cd1e0bfdcc8fe9c6.
Lasse Collin [Wed, 23 Jan 2008 21:38:18 +0000 (23:38 +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.

16 years agoFix decoding of Extra Records that have empty Data.
Lasse Collin [Wed, 23 Jan 2008 21:35:49 +0000 (23:35 +0200)]
Fix decoding of Extra Records that have empty Data.

16 years agoAdd the trailing '\0' to lzma_extra.data as the API header
Lasse Collin [Wed, 23 Jan 2008 20:02:38 +0000 (22:02 +0200)]
Add the trailing '\0' to lzma_extra.data as the API header
already documents.

16 years agoAdded debug/full_flush.c.
Lasse Collin [Wed, 23 Jan 2008 19:21:21 +0000 (21:21 +0200)]
Added debug/full_flush.c.

16 years agoReturn LZMA_STREAM_END instead of LZMA_OK if
Lasse Collin [Wed, 23 Jan 2008 19:05:33 +0000 (21:05 +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.

16 years agoAdded bad-single-none-footer_filter_flags.lzma and
Lasse Collin [Wed, 23 Jan 2008 18:05:01 +0000 (20:05 +0200)]
Added bad-single-none-footer_filter_flags.lzma and
bad-single-none-too_long_vli.lzma.

16 years agoFixed a typo.
Lasse Collin [Wed, 23 Jan 2008 11:42:35 +0000 (13:42 +0200)]
Fixed a typo.

16 years agoFix a memory leak in the Subblock encoder.
Lasse Collin [Wed, 23 Jan 2008 11:40:45 +0000 (13:40 +0200)]
Fix a memory leak in the Subblock encoder.

16 years agoFix Size of Header Metadata Block handling. Now
Lasse Collin [Wed, 23 Jan 2008 11:36:07 +0000 (13:36 +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.

16 years agoFix a memory leak in metadata_decoder.c.
Lasse Collin [Wed, 23 Jan 2008 11:15:55 +0000 (13:15 +0200)]
Fix a memory leak in metadata_decoder.c.

16 years agoFix the fix 863028cb7ad6d8d0455fa69348f56b376d7b908f which
Lasse Collin [Wed, 23 Jan 2008 11:13:58 +0000 (13:13 +0200)]
Fix the fix 863028cb7ad6d8d0455fa69348f56b376d7b908f which
just moved to problem. Now it's really fixed.

16 years agoTake advantage of return_if_error() macro in
Lasse Collin [Tue, 22 Jan 2008 22:21:04 +0000 (00:21 +0200)]
Take advantage of return_if_error() macro in
lzma_info_metadata_set() in info.c.

16 years agoFixed a dangling pointer that caused invalid free().
Lasse Collin [Tue, 22 Jan 2008 22:18:32 +0000 (00:18 +0200)]
Fixed a dangling pointer that caused invalid free().

16 years agoAdded lzma_easy_* functions. These should make using
Lasse Collin [Tue, 22 Jan 2008 20:49:24 +0000 (22:49 +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.