summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* make `_fast*()` decoder generate a deprecation warningYann Collet2019-04-042-9/+25
| | | | updated modification
* moved LZ4_decompress_fast*() into deprecated sectionYann Collet2019-04-042-24/+30
|
* fixed an old bug in LZ4F_flush()Yann Collet2019-04-032-66/+109
| | | | | | | which remained undetected so far, as it requires a fairly large number of conditions to be triggered, starting with enabling Block checksum, which is disabled by default, and which usage is known to be extremely rare.
* fixed docYann Collet2019-04-031-7/+10
| | | | and bumped version number fo v1.9.0
* moved _destSize() into "stable API" statusYann Collet2019-04-031-41/+41
| | | | as requested in #642
* minor comments and reformattingYann Collet2019-04-031-12/+17
|
* fixed minor conversion warningsYann Collet2019-04-031-14/+10
|
* created LZ4_FAST_DEC_LOOP build macroYann Collet2019-04-022-9/+31
|
* fixed a few minor conversion warningsYann Collet2019-04-021-20/+22
|
* Merge pull request #652 from vtorri/devYann Collet2019-03-031-1/+1
|\ | | | | Allow installation of lz4 for Windows 10 with MSYS2
| * Allow installation of lz4 for Windows 10 with MSYS2Vincent Torri2019-03-031-1/+1
| |
* | Merge pull request #645 from djwatson/optimize_decompress_genericYann Collet2019-02-121-19/+245
|\ \ | | | | | | Optimize decompress generic
| * | decompress_generic: Limit fastpath to x86Dave Watson2019-02-111-3/+9
| | | | | | | | | | | | | | | New fastpath currently shows a regression on qualcomm arm chips. Restrict it to x86 for now
| * | decompress_generic: Add fastpath for small offsetsDave Watson2019-02-081-19/+59
| | | | | | | | | | | | | | | | | | | | | | | | For small offsets of size 1, 2, 4 and 8, we can set a single uint64_t, and then use it to do a memset() variation. In particular, this makes the somewhat-common RLE (offset 1) about 2-4x faster than the previous implementation - we avoid not only the load blocked by store, but also avoid the loads entirely.
| * | decompress_generic: Unroll loops a bit moreDave Watson2019-02-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | Generally we want our wildcopy loops to look like the memcpy loops from our libc, but without the final byte copy checks. We can unroll a bit to make long copies even faster. The only catch is that this affects the value of FASTLOOP_SAFE_DISTANCE.
| * | decompress_generic: remove msan writeDave Watson2019-02-081-5/+0
| | | | | | | | | | | | | | | This store is also causing load-blocked-by-store issues, remove it. The msan warning will have to be fixed another way if it is still an issue.
| * | decompress_generic: re-add fastpathDave Watson2019-02-081-4/+19
| | | | | | | | | | | | | | | This is the remaineder of the original 'shortcut'. If true, we can avoid the loop in LZ4_wildCopy, and directly copy instead.
| * | decompress_generic: drop partial copy check in fast loopDave Watson2019-02-081-15/+0
| | | | | | | | | | | | | | | | | | We've already checked that we are more than FASTLOOP_SAFE_DISTANCE away from the end, so this branch can never be true, we will have already jumped to the second decode loop.
| * | decompress_generic: Optimize literal copiesDave Watson2019-02-081-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | Use LZ4_wildCopy16 for variable-length literals. For literal counts that fit in the flag byte, copy directly. We can also omit oend checks for roughly the same reason as the previous shortcut: We check once that both match length and literal length fit in FASTLOOP_SAFE_DISTANCE, including wildcopy distance.
| * | decompress_generic: optimize match copyDave Watson2019-02-081-23/+28
| | | | | | | | | | | | | | | | | | Add an LZ4_wildCopy16, that will wildcopy, potentially smashing up to 16 bytes, and use it for match copy. On x64, this avoids many blocked loads due to store forwarding, similar to issue #411.
| * | decompress_generic: Add a loop fastpathDave Watson2019-02-081-5/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copy the main loop, and change checks such that op is always less than oend-SAFE_DISTANCE. Currently these are added for the literal copy length check, and for the match copy length check. Otherwise the first loop is exactly the same as the second. Follow on diffs will optimize the first copy loop based on this new requirement. I also tried instead making a separate inlineable function for the copy loop (similar to existing partialDecode flags, etc), but I think the changes might be significant enough to warrent doubling the code, instead pulling out common functionality to separate functions. This is the basic transformation that will allow several following optimisations.
| * | decompress_generic: Refactor variable length fieldsDave Watson2019-02-081-12/+35
| | | | | | | | | | | | | | | Make a helper function to read variable lengths for literals and match length.
* | | Eliminate optimize attribute warning with clang on PPC64LEJeremy Maitin-Shepard2019-02-041-1/+1
|/ /
* | Make fact that certain variables that are passed into LZ4HC_encodeSequence ↵Tim Zakian2019-01-091-7/+9
| | | | | | | | are changed by the function call
* | Merge pull request #631 from qiuyangs/devYann Collet2019-01-091-2/+2
|\ \ | | | | | | lz4hc.c: change (length >> 8) to (length / 255)
| * | lz4hc.c: change (length >> 8) to (length / 255)qiuyangs2019-01-061-2/+2
| | | | | | | | | Every 0xff byte in the compressed block corresponds to a length of 255 (not 256) in the input data. For long repeating sequences, using (length >> 8) may generate bad compressed blocks.
* | | Make LZ4F_getBlockSize public and publis in experimental sectionTim Zakian2019-01-092-8/+8
|/ /
* | Fix Dict Size Test in `LZ4_compress_fast_continue()`W. Felix Handte2018-12-051-4/+2
| | | | | | | | | | | | | | Dictionaries don't need to be > 4 bytes, they need to be >= 4 bytes. This test was overly conservative. Also removes the test in `LZ4_attach_dictionary()`.
* | Don't Attach Very Small DictionariesW. Felix Handte2018-12-041-1/+3
|/ | | | | | | | | | | | | | | | | Fixes a mismatch in behavior between loading into the context (via `LZ4_loadDict()`) a very small (<= 4 bytes) non-contiguous dictionary, versus attaching it with `LZ4_attach_dictionary()`. Before this patch, this divergence could be reproduced by running ``` make -C tests fuzzer MOREFLAGS="-m32" tests/fuzzer -v -s1239 -t3146 ``` Making sure these two paths behave exactly identically is an easy way to test the correctness of the attach path, so it's desirable that this remain an unpolluted, high signal test.
* Merge remote-tracking branch 'upstream/dev' into devVincent Torri2018-12-022-0/+20
|\
| * Merge pull request #610 from antinucleon/bootcampYann Collet2018-11-262-0/+20
| |\ | | | | | | [amalgamation] lz4frame.c
| | * [amalgamation] lz4frame.cBing Xu2018-11-262-0/+20
| | |
* | | Windows: create import library with gcc directly, remove now useless def fileVincent Torri2018-12-022-66/+1
|/ /
* | Uninstall DLL and import libVincent Torri2018-11-211-0/+5
| |
* | Add explanation for the installation of the DLL in the bin directoryVincent Torri2018-11-211-0/+3
| |
* | Allow installation of lz4 for Windows (MSYS2 or when cross-compiling)Vincent Torri2018-11-201-2/+13
| |
* | update lib/README.mdVincent Torri2018-11-181-1/+4
| |
* | Add documentation about DLLTOOL variableVincent Torri2018-11-181-0/+1
| |
* | Add DLLTOOL variable so that one can override dlltool binaryVincent Torri2018-11-171-1/+3
| | | | | | | | This fix cross compilation on linux for Windows
* | Use / instead of \ when accessing files in the dll subdirectory.Vincent Torri2018-11-171-2/+2
|/ | | | This allow cross-compilation for Windows on Linux
* Enable amalgamation of lz4hc.c and lz4.cBing Xu2018-11-162-15/+29
|
* Merge pull request #593 from felixhandte/lz4hc-publish-staticYann Collet2018-10-162-31/+43
|\ | | | | Extend Macro to Allow Publishing Experimental LZ4HC Functions in Dynamic Libraries
| * Make LZ4HC Experimental Functions Dynamically PublishableW. Felix Handte2018-10-161-12/+23
| |
| * Change Comment and Make LZ4LIB_STATIC_API Available to LZ4HCW. Felix Handte2018-10-161-19/+20
| |
* | updated code documentationYann Collet2018-10-151-8/+13
| | | | | | | | to clarify #589
* | Adding information about dirty context for _HC_ family of functionsOleg Khabinov2018-10-102-14/+34
| |
* | Merge pull request #592 from lz4/compressEndYann Collet2018-10-092-11/+20
|\ \ | | | | | | fix LZ4F_compressEnd()
| * | fixed #589Yann Collet2018-10-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | following recommendations by @raggi. The fix is slightly different, but achieves the same goal, and is backed by a test tool which proves that it works (generates the error before the patch, no longer after the patch).
| * | added a test for LZ4F_compressEnd()Yann Collet2018-10-092-11/+16
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | which actively tries to make it write out of bound. For this scenario to be possible, it's necessary to set dstCapacity < LZ4F_compressBound() When a compression operation fails, the CCtx context is left in an undefined state, therefore compression cannot resume. As a consequence : - round trip tests must be aborted, since there is nothing valid to decompress - most users avoid this situation, by ensuring that dstCapacity >= LZ4F_compressBound() For these reasons, this use case was poorly tested up to now.
* | Some followups and renamingsOleg Khabinov2018-10-012-9/+10
|/