aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lz/lz_encoder.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-02-08Add a separate internal function to initialize the CRC32Lasse Collin1-2/+2
table, which is used also by LZ encoder. This was needed because calling lzma_crc32() and ignoring the result is a no-op due to lzma_attr_pure.
2009-02-02Modify LZMA_API macro so that it works on Windows withLasse Collin1-1/+1
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-27Added initial support for preset dictionary for raw LZMA1Lasse Collin1-2/+16
and LZMA2. It is not supported by the .xz format or the xz command line tool yet.
2008-12-31Remove lzma_init() and other init functions from liblzma API.Lasse Collin1-0/+6
Half of developers were already forgetting to use these functions, which could have caused total breakage in some future liblzma version or even now if --enable-small was used. Now liblzma uses pthread_once() to do the initializations unless it has been built with --disable-threads which make these initializations thread-unsafe. When --enable-small isn't used, liblzma currently gets needlessly linked against libpthread (on systems that have it). While it is stupid for now, liblzma will need threads in future anyway, so this stupidity will be temporary only. When --enable-small is used, different code CRC32 and CRC64 is now used than without --enable-small. This made the resulting binary slightly smaller, but the main reason was to clean it up and to handle the lack of lzma_init_check(). The pkg-config file lzma.pc was renamed to liblzma.pc. I'm not sure if it works correctly and portably for static linking (Libs.private includes -pthread or other operating system specific flags). Hopefully someone complains if it is bad. lzma_rc_prices[] is now included as a precomputed array even with --enable-small. It's just 128 bytes now that it uses uint8_t instead of uint32_t. Smaller array seemed to be at least as fast as the more bloated uint32_t array on x86; hopefully it's not bad on other architectures.
2008-09-27Some API changes, bug fixes, cleanups etc.Lasse Collin1-16/+14
2008-09-17Miscellaneous LZ and LZMA encoder cleanupsLasse Collin1-2/+6
2008-09-13Renamed constants:Lasse Collin1-1/+1
- LZMA_VLI_VALUE_MAX -> LZMA_VLI_MAX - LZMA_VLI_VALUE_UNKNOWN -> LZMA_VLI_UNKNOWN - LZMA_HEADER_ERRRO -> LZMA_OPTIONS_ERROR
2008-09-06CommentsLasse Collin1-2/+1
2008-09-02Some fixes to LZ encoder.Lasse Collin1-10/+46
2008-08-28Sort of garbage collection commit. :-| Many things are stillLasse Collin1-392/+388
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-01Fix a buffer overflow in the LZMA encoder. It was due to myLasse Collin1-108/+5
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-25Prevent LZ encoder from hanging with known uncompressedlarhzu/v4.999.3alphaLasse Collin1-2/+7
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.
2008-04-24Fix wrong return type (uint32_t -> bool).Lasse Collin1-1/+1
2008-04-24Fix data corruption in LZ encoder with LZMA_SYNC_FLUSH.Lasse Collin1-0/+16
2008-01-18Fix LZMA_SYNC_FLUSH handling in LZ and LZMA encoders.Lasse Collin1-8/+26
That code is now almost completely in LZ coder, where it can be shared with other LZ77-based algorithms in future.
2008-01-14Major changes to LZ encoder, LZMA encoder, and range encoder.Lasse Collin1-20/+118
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-10Eliminate lzma_lz_encoder.must_move_pos. It's neededLasse Collin1-4/+2
only in one place which isn't performance criticial.
2007-12-09Imported to git.Lasse Collin1-0/+481