]> icculus.org git repositories - icculus/xz.git/log
icculus/xz.git
15 years agoPrevent LZ encoder from hanging with known uncompressed v4.999.3alpha
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.

15 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.

15 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.

15 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.

15 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().

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

15 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.

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

15 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.

15 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).

15 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.

15 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.

15 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.

16 years agoFix Multi-Block Stream encoder's EOPM usage.
Lasse Collin [Tue, 22 Jan 2008 19:16:22 +0000 (21:16 +0200)]
Fix Multi-Block Stream encoder's EOPM usage.

16 years agoMade lzma_extra pointers const in lzma_options_stream.
Lasse Collin [Mon, 21 Jan 2008 22:15:11 +0000 (00:15 +0200)]
Made lzma_extra pointers const in lzma_options_stream.

16 years agoUpdated debug/sync_flush.c.
Lasse Collin [Sun, 20 Jan 2008 18:15:21 +0000 (20:15 +0200)]
Updated debug/sync_flush.c.

16 years agoAdded debug/repeat.c.
Lasse Collin [Sun, 20 Jan 2008 18:14:26 +0000 (20:14 +0200)]
Added debug/repeat.c.

16 years agoFix alignment handling bugs in Subblock encoder.
Lasse Collin [Sun, 20 Jan 2008 18:12:58 +0000 (20:12 +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.

16 years agoImplemented LZMA_SYNC_FLUSH support to the Subblock encoder.
Lasse Collin [Sat, 19 Jan 2008 19:16:33 +0000 (21:16 +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.

16 years agoRevised the Delta filter implementation. The initialization
Lasse Collin [Sat, 19 Jan 2008 13:19:21 +0000 (15:19 +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.

16 years agoAdded the debug directory and the first debug tool
Lasse Collin [Fri, 18 Jan 2008 18:18:08 +0000 (20:18 +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.

16 years agoAdded test files to test usage of flush marker in LZMA.
Lasse Collin [Fri, 18 Jan 2008 18:13:00 +0000 (20:13 +0200)]
Added test files to test usage of flush marker in LZMA.

16 years agoFix LZMA_SYNC_FLUSH handling in LZ and LZMA encoders.
Lasse Collin [Fri, 18 Jan 2008 18:02:52 +0000 (20:02 +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.

16 years agoDon't add -g to CFLAGS when --enable-debug is specified.
Lasse Collin [Fri, 18 Jan 2008 15:21:24 +0000 (17:21 +0200)]
Don't add -g to CFLAGS when --enable-debug is specified.
It's the job of the user to put that in CFLAGS.

16 years agoSet stdin and stdout to binary mode on Windows. This patch is
Lasse Collin [Fri, 18 Jan 2008 12:17:37 +0000 (14:17 +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.

16 years agoAdded test_compress.sh and bunch of files needed by it.
Lasse Collin [Thu, 17 Jan 2008 22:50:29 +0000 (00:50 +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.

16 years agoSubblock decoder: Don't exit the main loop in decode_buffer()
Lasse Collin [Thu, 17 Jan 2008 16:56:53 +0000 (18:56 +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.

16 years agoFix wrong too small size of argument unfiltered_max
Lasse Collin [Thu, 17 Jan 2008 15:39:42 +0000 (17:39 +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.

16 years agoAdded --delta to the output of "lzma --help".
Lasse Collin [Thu, 17 Jan 2008 15:27:45 +0000 (17:27 +0200)]
Added --delta to the output of "lzma --help".

16 years agoFix Subblock docoder: If Subblock filter was used with known
Lasse Collin [Thu, 17 Jan 2008 11:14:20 +0000 (13:14 +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.

16 years agoTiny non-technical edits to file-format.txt.
Lasse Collin [Wed, 16 Jan 2008 14:33:37 +0000 (16:33 +0200)]
Tiny non-technical edits to file-format.txt.

16 years agoPlugged a memory leak in stream_decoder.c.
Lasse Collin [Wed, 16 Jan 2008 12:48:04 +0000 (14:48 +0200)]
Plugged a memory leak in stream_decoder.c.

16 years agoAdded memory leak detection to lzmadec.c.
Lasse Collin [Wed, 16 Jan 2008 12:47:27 +0000 (14:47 +0200)]
Added memory leak detection to lzmadec.c.

16 years agoAdded lzma_memlimit_count().
Lasse Collin [Wed, 16 Jan 2008 12:46:50 +0000 (14:46 +0200)]
Added lzma_memlimit_count().

16 years agoAdded ARRAY_SIZE(array) macro.
Lasse Collin [Wed, 16 Jan 2008 12:31:44 +0000 (14:31 +0200)]
Added ARRAY_SIZE(array) macro.

16 years agoMake Uncompresed Size validation more strict
Lasse Collin [Wed, 16 Jan 2008 11:27:03 +0000 (13:27 +0200)]
Make Uncompresed Size validation more strict
in alone_decoder.c.

16 years agoFree the allocated memory in lzmadec if debugging is
Lasse Collin [Tue, 15 Jan 2008 15:46:59 +0000 (17:46 +0200)]
Free the allocated memory in lzmadec if debugging is
enabled. This should make it possible to detect possible
memory leaks with Valgrind.

16 years agoFix memory leaks from test_block_header.c.
Lasse Collin [Tue, 15 Jan 2008 14:25:38 +0000 (16:25 +0200)]
Fix memory leaks from test_block_header.c.

16 years agoUse fastpos.h when encoding LZMA dictionary size in
Lasse Collin [Tue, 15 Jan 2008 12:23:35 +0000 (14:23 +0200)]
Use fastpos.h when encoding LZMA dictionary size in
Filter Flags encoder.

16 years agoRevised the fastpos code. It now uses the slightly faster
Lasse Collin [Tue, 15 Jan 2008 12:02:22 +0000 (14:02 +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.

16 years agoAdded bsr.h.
Lasse Collin [Tue, 15 Jan 2008 11:32:13 +0000 (13:32 +0200)]
Added bsr.h.

16 years agoFixed assembler detection in configure.ac, and added
Lasse Collin [Tue, 15 Jan 2008 11:29:14 +0000 (13:29 +0200)]
Fixed assembler detection in configure.ac, and added
detection for x86_64.

16 years agoOmit invalid space from printf() format string
Lasse Collin [Tue, 15 Jan 2008 10:20:41 +0000 (12:20 +0200)]
Omit invalid space from printf() format string
in price_table_gen.c.

16 years agoRemoved a few unused macros from lzma_common.h.
Lasse Collin [Tue, 15 Jan 2008 07:54:34 +0000 (09:54 +0200)]
Removed a few unused macros from lzma_common.h.

16 years agoFix a typo in lzma_encoder.c.
Lasse Collin [Tue, 15 Jan 2008 06:37:42 +0000 (08:37 +0200)]
Fix a typo in lzma_encoder.c.

16 years agoConvert bittree_get_price() and bittree_reverse_get_price()
Lasse Collin [Tue, 15 Jan 2008 06:36:25 +0000 (08:36 +0200)]
Convert bittree_get_price() and bittree_reverse_get_price()
from macros to inline functions.

16 years agoFix CRC code in case --enable-small is used.
Lasse Collin [Tue, 15 Jan 2008 05:44:59 +0000 (07:44 +0200)]
Fix CRC code in case --enable-small is used.

16 years agoFix typo in test_index.c.
Lasse Collin [Tue, 15 Jan 2008 05:41:39 +0000 (07:41 +0200)]
Fix typo in test_index.c.

16 years agoAdded precomputed range coder probability price table.
Lasse Collin [Tue, 15 Jan 2008 05:40:21 +0000 (07:40 +0200)]
Added precomputed range coder probability price table.

16 years agoRemove RC_BUFFER_SIZE from lzma_encoder_private.h
Lasse Collin [Mon, 14 Jan 2008 11:42:43 +0000 (13:42 +0200)]
Remove RC_BUFFER_SIZE from lzma_encoder_private.h
and replace it with a sanity check.

16 years agoMajor changes to LZ encoder, LZMA encoder, and range encoder.
Lasse Collin [Mon, 14 Jan 2008 11:39:54 +0000 (13:39 +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.

16 years agoAdded one assert() to process.c of the command line tool.
Lasse Collin [Mon, 14 Jan 2008 11:34:29 +0000 (13:34 +0200)]
Added one assert() to process.c of the command line tool.