aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lzma/lzma2_decoder.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-07-24liblzma: Add optional autodetection of LZMA end marker.Lasse Collin1-1/+1
Turns out that this is needed for .lzma files as the spec in LZMA SDK says that end marker may be present even if the size is stored in the header. Such files are rare but exist in the real world. The code in liblzma is so old that the spec didn't exist in LZMA SDK back then and I had understood that such files weren't possible (the lzma tool in LZMA SDK didn't create such files). This modifies the internal API so that LZMA decoder can be told if EOPM is allowed even when the uncompressed size is known. It's allowed with .lzma and not with other uses. Thanks to Karl Beldan for reporting the problem.
2019-12-31liblzma: Fix warnings from -Wsign-conversion.Lasse Collin1-4/+4
Also, more parentheses were added to the literal_subcoder macro in lzma_comon.h (better style but no functional change in the current usage).
2016-12-28liblzma: Avoid multiple definitions of lzma_coder structures.Lasse Collin1-13/+19
Only one definition was visible in a translation unit. It avoided a few casts and temp variables but seems that this hack doesn't work with link-time optimizations in compilers as it's not C99/C11 compliant. Fixes: http://www.mail-archive.com/xz-devel@tukaani.org/msg00279.html
2012-07-17liblzma: Make the use of lzma_allocator const-correct.Lasse Collin1-4/+4
There is a tiny risk of causing breakage: If an application assigns lzma_stream.allocator to a non-const pointer, such code won't compile anymore. I don't know why anyone would do such a thing though, so in practice this shouldn't cause trouble. Thanks to Jan Kratochvil for the patch.
2011-03-31liblzma: Fix decoding of LZMA2 streams having no uncompressed data.Lasse Collin1-4/+4
The decoder considered empty LZMA2 streams to be corrupt. This shouldn't matter much with .xz files, because no encoder creates empty LZMA2 streams in .xz. This bug is more likely to cause problems in applications that use raw LZMA2 streams.
2010-10-19Clean up a few FIXMEs and TODOs.Lasse Collin1-1/+0
lzma_chunk_size() was commented out because it is currently useless.
2009-04-13Put the interesting parts of XZ Utils into the public domain.Lasse Collin1-12/+5
Some minor documentation cleanups were made at the same time.
2009-01-27Added initial support for preset dictionary for raw LZMA1Lasse Collin1-3/+6
and LZMA2. It is not supported by the .xz format or the xz command line tool yet.
2008-12-15Fix data corruption in LZMA2 decoder.Lasse Collin1-4/+11
2008-12-01Make the memusage functions of LZMA1 and LZMA2 decodersLasse Collin1-5/+2
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-09-27Some API changes, bug fixes, cleanups etc.Lasse Collin1-5/+5
2008-09-13Renamed constants:Lasse Collin1-3/+3
- LZMA_VLI_VALUE_MAX -> LZMA_VLI_MAX - LZMA_VLI_VALUE_UNKNOWN -> LZMA_VLI_UNKNOWN - LZMA_HEADER_ERRRO -> LZMA_OPTIONS_ERROR
2008-08-28Sort of garbage collection commit. :-| Many things are stillLasse Collin1-0/+318
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.