aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lzma (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-12-09Make the memusage functions of LZMA1 and LZMA2 encodersLasse Collin3-16/+35
to validate the filter options. Add missing validation to LZMA2 encoder when options are changed in the middle of encoding.
2008-12-01Make the memusage functions of LZMA1 and LZMA2 decodersLasse Collin3-9/+17
to validate the filter options.
2008-12-01LZMA2 decoder cleanups. Make it require new LZMA propertiesLasse Collin1-54/+41
also in the first LZMA chunk after a dictionary reset in uncompressed chunk.
2008-10-07Made the preset numbering more logical in liblzma API.Lasse Collin1-1/+2
2008-09-27Some API changes, bug fixes, cleanups etc.Lasse Collin9-123/+112
2008-09-17Miscellaneous LZ and LZMA encoder cleanupsLasse Collin3-101/+23
2008-09-13Renamed constants:Lasse Collin3-14/+14
- LZMA_VLI_VALUE_MAX -> LZMA_VLI_MAX - LZMA_VLI_VALUE_UNKNOWN -> LZMA_VLI_UNKNOWN - LZMA_HEADER_ERRRO -> LZMA_OPTIONS_ERROR
2008-08-31Fix wrong pointer calculation in LZMA encoder.Lasse Collin1-1/+3
2008-08-28Sort of garbage collection commit. :-| Many things are stillLasse Collin21-2334/+3425
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.
2008-06-20Remove some redundant code from LZMA encoder.Lasse Collin1-14/+1
2008-06-19Add limit of lc + lp <= 4. Now we can allocate theLasse Collin5-90/+34
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.
2008-06-18CommentsLasse Collin1-5/+2
2008-06-18Update the code to mostly match the new simpler file formatLasse Collin2-5/+18
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.
2008-06-11Fix uninitialized variable in LZMA encoder. This wasLasse Collin1-0/+2
introduced in 369f72fd656f537a9a8e06f13e6d0d4c242be22f.
2008-06-01Fix a buffer overflow in the LZMA encoder. It was due to myLasse Collin5-318/+320
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.
2008-04-24Added two assert()s.Lasse Collin1-1/+3
2008-04-24Fix fastpos problem in Makefile.am when built with --enable-small.Lasse Collin1-1/+4
2008-03-22Update a comment to use the variable name rep_len_decoder.Lasse Collin1-1/+1
(And BTW, the previous commit actually did change the program logic slightly.)
2008-03-22Demystified the "state" variable in LZMA code. Use theLasse Collin6-70/+107
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.
2008-03-14Fix data corruption in LZMA encoder. Note that this bug wasLasse Collin1-0/+4
specific to liblzma and was *not* present in LZMA SDK.
2008-03-11Apply a minor speed optimization to LZMA decoder.Lasse Collin1-42/+43
2008-03-10Really fix the price count initialization.Lasse Collin1-2/+2
2008-03-10Initialize align_price_count and match_price_count inLasse Collin1-0/+2
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.
2008-02-28Remove two redundant validity checks from the LZMA decoder.Lasse Collin1-19/+4
These are already checked elsewhere, so omitting these gives (very) tiny speed up.
2008-01-18Fix LZMA_SYNC_FLUSH handling in LZ and LZMA encoders.Lasse Collin1-25/+2
That code is now almost completely in LZ coder, where it can be shared with other LZ77-based algorithms in future.
2008-01-15Revised the fastpos code. It now uses the slightly fasterLasse Collin9-44/+746
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.
2008-01-15Removed a few unused macros from lzma_common.h.Lasse Collin1-6/+2
2008-01-15Fix a typo in lzma_encoder.c.Lasse Collin1-1/+1
2008-01-15Convert bittree_get_price() and bittree_reverse_get_price()Lasse Collin2-22/+13
from macros to inline functions.
2008-01-14Remove RC_BUFFER_SIZE from lzma_encoder_private.hLasse Collin1-2/+4
and replace it with a sanity check.
2008-01-14Major changes to LZ encoder, LZMA encoder, and range encoder.Lasse Collin1-31/+43
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.
2008-01-14In lzma_read_match_distances(), don't useLasse Collin1-3/+3
coder->lz.stream_end_was_reached. That variable will be removed, and the check isn't required anyway. Rearrange the check so that it doesn't make one to think that there could be an integer overflow.
2008-01-14More fixes to LZMA decoder's flush marker handling.Lasse Collin1-22/+30
2008-01-05Another bug fix for flush marker detection.Lasse Collin1-1/+9
2008-01-04Fix stupid bugs in flush marker detection.Lasse Collin1-3/+4
2008-01-04Added support for flush marker, which will be in filesLasse Collin2-117/+104
that use LZMA_SYNC_FLUSH with encoder (not implemented yet). This is a new feature in the raw LZMA format, which isn't supported by old decoders. This shouldn't be a problem in practice, since lzma_alone_encoder() will not allow LZMA_SYNC_FLUSH, and thus not allow creating files on decodable with old decoders. Made lzma_decoder.c to require tab width of 4 characters if one wants to fit the code in 80 columns. This makes the code easier to read.
2008-01-04Moved range decoder initialization (reading the firstLasse Collin1-36/+6
five input bytes) from LZMA decoder to range decoder header. Did the same for decoding of direct bits.
2007-12-09Imported to git.Lasse Collin14-0/+3309