aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/stream_buffer_encoder.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-01-05liblzma: Remove common.h include from common/index.h.Jia Tan1-0/+1
common/index.h is needed by liblzma internally and tests. common.h will include and define many things that are not needed by the tests. Also, this prevents include order problems because common.h will redefine LZMA_API resulting in a warning.
2012-07-17liblzma: Make the use of lzma_allocator const-correct.Lasse Collin1-1/+2
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-04-11liblzma: Don't create an empty Block in lzma_stream_buffer_encode().Lasse Collin1-7/+13
Empty Block was created if the input buffer was empty. Empty Block wastes a few bytes of space, but more importantly it triggers a bug in XZ Utils 5.0.1 and older when trying to decompress such a file. 5.0.1 and older consider such files to be corrupt. I thought that no encoder creates empty Blocks when releasing 5.0.2 but I was wrong.
2011-04-11liblzma: Validate encoder arguments better.Lasse Collin1-0/+3
The biggest problem was that the integrity check type wasn't validated, and e.g. lzma_easy_buffer_encode() would create a corrupt .xz Stream if given an unsupported Check ID. Luckily applications don't usually try to use an unsupport Check ID, so this bug is unlikely to cause many real-world problems.
2010-05-26Rename MIN() and MAX() to my_min() and my_max().Lasse Collin1-1/+1
This should avoid some minor portability issues.
2009-12-31Revised the Index handling code.Lasse Collin1-3/+3
This breaks API and ABI but most apps are not affected since most apps don't use this part of the API. You will get a compile error if you are using anything that got broken. Summary of changes: - Ability to store Stream Flags, which are needed for random-access reading in multi-Stream files. - Separate function to set size of Stream Padding. - Iterator structure makes it possible to read the same lzma_index from multiple threads at the same time. - A lot faster code to locate Blocks. - Removed lzma_index_equal() without adding anything to replace it. I don't know what it should do exactly with the new features and what actually needs this function in the first place other than test_index.c, which now has its own code to compare lzma_indexes.
2009-04-13Put the interesting parts of XZ Utils into the public domain.Lasse Collin1-10/+3
Some minor documentation cleanups were made at the same time.
2009-02-02Modify LZMA_API macro so that it works on Windows withLasse Collin1-2/+2
other compilers than MinGW. This may hurt readability of the API headers slightly, but I don't know any better way to do this.
2009-01-20Add some single-call buffer-to-buffer coding functions.Lasse Collin1-0/+138