aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/simple (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-07-10BCJ filters: Reject invalid start offsets with LZMA_OPTIONS_ERROR.Lasse Collin8-8/+12
This is a quick and slightly dirty fix to make the code conform to the latest file format specification. Without this patch, it's possible to make corrupt files by specifying start offset that is not a multiple of the filter's alignment. Custom start offset is almost never used, so this was only a minor bug. The xz command line tool doesn't validate the start offset, so one will get a bit unclear error message if trying to use an invalid start offset.
2009-06-30Build system fixesLasse Collin2-51/+47
Don't use libtool convenience libraries to avoid recently discovered long-standing subtle but somewhat severe bugs in libtool (at least 1.5.22 and 2.2.6 are affected). It was found when porting XZ Utils to Windows <http://lists.gnu.org/archive/html/libtool/2009-06/msg00070.html> but the problem is significant also e.g. on GNU/Linux. Unless --disable-shared is passed to configure, static library built from a set of convenience libraries will contain PIC objects. That is, while libtool builds non-PIC objects too, only PIC objects will be used from the convenience libraries. On 32-bit x86 (tested on mobile XP2400+), using PIC instead of non-PIC makes the decompressor 10 % slower with the default CFLAGS. So while xz was linked against static liblzma by default, it got the slower PIC objects unless --disable-shared was used. I tend develop and benchmark with --disable-shared due to faster build time, so I hadn't noticed the problem in benchmarks earlier. This commit also adds support for building Windows resources into liblzma and executables.
2009-06-26Fix @variables@ to $(variables) in Makefile.am files.Lasse Collin1-2/+2
Fix the ordering of libgnu.a and LTLIBINTL on the linker command line and added missing LTLIBINTL to tests/Makefile.am.
2009-04-15Fix uint32_t -> size_t in ARM and ARM-Thumb filters.Lasse Collin2-2/+2
On 64-bit system it would have gone into infinite loop if a single input buffer was over 4 GiB (unlikely).
2009-04-13Put the interesting parts of XZ Utils into the public domain.Lasse Collin14-153/+54
Some minor documentation cleanups were made at the same time.
2008-12-31Renamed lzma_options_simple to lzma_options_bcj in the API.Lasse Collin3-5/+5
The internal implementation is still using the name "simple". It may need some cleanups, so I look at it later.
2008-09-13Renamed constants:Lasse Collin2-2/+2
- 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 Collin6-4/+167
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-18Update the code to mostly match the new simpler file formatLasse Collin2-29/+4
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-01-26Return LZMA_HEADER_ERROR if LZMA_SYNC_FLUSH is used with anyLasse Collin1-0/+8
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.
2008-01-17Fix wrong too small size of argument unfiltered_maxLasse Collin1-1/+1
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.
2007-12-11Remove uncompressed size tracking from the filter encoders.Lasse Collin1-25/+4
It's not strictly needed there, and just complicates the code. LZ encoder never even had this feature. The primary reason to have uncompressed size tracking in filter encoders was validating that the application doesn't give different amount of input that it had promised. A side effect was to validate internal workings of liblzma. Uncompressed size tracking is still present in the Block encoder. Maybe it should be added to LZMA_Alone and raw encoders too. It's simpler to have one coder just to validate the uncompressed size instead of having it in every filter.
2007-12-09Imported to git.Lasse Collin10-0/+1109