summaryrefslogtreecommitdiffstats
path: root/lib/lz4.c
Commit message (Collapse)AuthorAgeFilesLines
* remove `register` keywordYann Collet2017-12-051-13/+13
| | | | | deprecated in newer C++ versions, and dubious utility
* Merge pull request #416 from lz4/newoptYann Collet2017-11-091-5/+15
|\ | | | | Improve Optimal parser
| * fixed last lost bytes in maximal modeYann Collet2017-11-021-5/+7
| | | | | | | | | | even gained 2 bytes on calgary.tar... added conditional traces `g_debuglog_enable`
| * Merge branch 'dev' into btoptYann Collet2017-11-011-1/+34
| |\
| * | added assertYann Collet2017-10-191-0/+8
| | |
* | | added LZ4_FORCEINLINE to counter gcc regressionYann Collet2017-11-071-1/+2
| | | | | | | | | | | | as recommended by @terrelln
* | | 2-stages LZ4_countYann Collet2017-11-061-1/+9
| | | | | | | | | | | | | | | | | | | | | separate first branch from the rest of the compare loop to get dedicated prediction. measured a 3-4% compression speed improvement.
* | | Only ignore with C++17Sylvestre Ledru2017-11-061-3/+3
| | |
* | | When building with a C++ compiler, remove the 'register' keyword to silent a ↵Sylvestre Ledru2017-11-051-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | warning For example, with clang: lz4.c:XXX:36: error: 'register' storage class specifier is deprecated and incompatible with C++17 [-Werror,-Wdeprecated-register] static unsigned LZ4_NbCommonBytes (register reg_t val) ^~~~~~~~~
* | | minor change, to help store forwardingYann Collet2017-10-311-6/+5
| | | | | | | | | | | | in a marginal case (offset==4)
* | | extended shortcut match length to 18Yann Collet2017-10-311-5/+6
| | |
* | | minor : coding style : use ML_MASK constantYann Collet2017-10-311-2/+2
| | |
* | | added comments, as suggested by @terrellnYann Collet2017-10-311-4/+5
| | |
* | | more complete shortcut - passes testsYann Collet2017-10-301-12/+13
| | |
* | | small modification of lz4 decoder to shortcut common case (short branch).Yann Collet2017-10-251-0/+16
| |/ |/|
* | Use the optimization level of O2 for the decompression functions on ppc64le ↵Rei Odaira2017-10-131-1/+34
|/ | | | with gcc, to avoid harmful unrolling and SIMDization with O3
* fix #404Yann Collet2017-09-301-2/+5
| | | | | | | | | | | | | | | | static analyzer `cppcheck` complains about a shift-by-32 on a 32 bits value, which is an undefined behavior. However, the flagged code path is never triggered in 32-bits mode, (actually, it's not even generated if DCE kicks in), the shift-by-32 is necessarily performed on a 64-bits value. While it doesn't change anything regarding lz4 code generation, for both 32 and 64 bits mode, (can be checked by md5sum on the generated binary), the shift has been rewritten in a way which should please this static analyzer, since it now pretends to shift by 16 on 32-bits cpu (note : it doesn't matter since the code will not even be generated in this case). Note : this is a blind fix, the new code has not been tested with cppcheck, because cppcheck only works on Windows. Other static analyzer, such as scan-build, do not trigger this false positive.
* fixed a bunch of -Wcomma warningsYann Collet2017-09-101-1/+5
| | | | reported by @rvandermeulen (#398)
* fix #397 : decompression failed when using a combination of extDict + low ↵Yann Collet2017-09-071-2/+1
| | | | | | | | memory address Reported and fixed by @jscheid Note : we are missing a test case to include it in the CI
* bench : made decompression speed evaluation same time as compressionYann Collet2017-09-071-17/+16
| | | | minor : slightly modified an example do avoid disabling a gcc warning through #pragma
* FIX: added prefix to FORCE_INLINE to prevent redefinition error during ↵tcpan2017-08-241-12/+12
| | | | compilation when used with other libraries that define FORCE_INLINE
* Merge pull request #380 from lz4/dictIDYann Collet2017-08-151-5/+2
|\ | | | | Frame Dictionary API
| * implemented dictionary compression in lz4frameYann Collet2017-08-091-5/+2
| | | | | | | | | | note : only compression API is implemented and tested still to do : decompression API
* | Allow to predefine FORCE_INLINE macro.Alex Deymo2017-08-071-9/+16
|/ | | | | | | | | | | FORCE_INLINE macro is defined based on the compiler used. When using gcc, it will include "__attribute__((always_inline))" forcing gcc to always inline all the functions marked as FORCE_INLINE. However, this can cause a performance degradation of about 15%. This patch allows to set the FORCE_INLINE macro from the compiler command line to either "static" or "static inline" giving allowing it to inline functions as needed when performing optimizations.
* fix #369Yann Collet2017-06-261-1/+13
| | | | | | | | | | | | | | The bug would make the bt search read one byte in an invalid memory region, and make a branch decision based on its value. Impact was small (missed compression opportunity). It only happens in -BD mode, with extDict-prefix overlapping matches. The bt match search is supposed to work also in extDict mode. In which case, the match ptr can point into Dict. When the match was overlapping Dict<->Prefix, match[matchLength] would end up outside of Dict, in an invalid memory area. The correction ensures that in such a case, match[matchLength] ends up at intended location, inside prefix.
* changed macro HEAPMODE into LZ4_HEAPMODEYann Collet2017-05-021-7/+7
| | | | | | | This macro is susceptible to be triggered from user side typically through compiler flag (-DLZ4_HEAPMODE=1). In which case, it makes sense to prefix the macro since we want to reduce potential side-effect on namespace.
* make __packed memory access default for gccYann Collet2017-03-301-4/+3
| | | | | | | It's always as good or better then memcpy() but depends on gcc-specific extension. solves https://github.com/facebook/zstd/issues/620
* LZ4_compress_HC_destSize() uses LZ4HC_compress_generic() code pathYann Collet2017-03-161-1/+1
| | | | | Limits compression level to 10, to remain compatible with Hash Chain.
* fix #283 : implement LZ4_versionString().Yann Collet2016-12-041-0/+1
|
* highly improved speed on -mx32 modeYann Collet2016-11-191-44/+40
| | | | Now -mx32 is fastest mode on x64 CPU
* attempt to fix sanitize32 package dependencyYann Collet2016-11-181-1/+1
|
* fix 32-bits mode.Yann Collet2016-11-171-3/+5
| | | | | | Large File support for Mac OS-X in 32-bits mode Fixed potential undefined behavior Changed makefile for 32-bits mode
* fixed minor conversion warningYann Collet2016-11-141-3/+2
|
* silence a minor msan warningYann Collet2016-11-141-0/+1
|
* fixed minor msan warningYann Collet2016-11-141-2/+2
|
* fixed __GNUC__ macroYann Collet2016-11-121-5/+5
|
* enabled deprecation warnings on remaining obsolete functionsYann Collet2016-11-121-3/+4
|
* Expose internal types to remove strict aliasingNick Terrell2016-11-111-69/+48
|
* Fixed #178 fullbench on small inputYann Collet2016-11-101-2/+9
|
* small compression ratio and speed improvement on small filesYann Collet2016-11-081-17/+12
|
* Merge branch 'dev' of github.com:Cyan4973/lz4 into devYann Collet2016-11-071-1/+1
|\
| * Fix LZ4_decompress_fast_continue() bugNick Terrell2016-11-051-1/+1
| | | | | | | | | | It specified the external dictionary location incorrectly. Add tests that expose this bug with both normal compilation and ASAN.
* | minor refactorYann Collet2016-11-051-1/+1
|/
* Quiet gcc-4.6.3 narrowing warningNick Terrell2016-11-041-2/+2
|
* better correctness on big-endian 64-bits platformsYann Collet2016-11-041-2/+6
|
* small compression speed improvement on 64-bits systemsYann Collet2016-11-041-8/+9
|
* updated commentsYann Collet2016-11-041-13/+12
|
* updated links to LZ4 repositoryPrzemyslaw Skibinski2016-11-031-1/+1
|
* removed test artefactsYann Collet2016-09-061-3/+2
|
* minor commentsYann Collet2016-08-201-17/+10
|