summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* minor refactor of lz4ioYann Collet2020-11-131-2/+3
| | | | | for readability. Mostly around --list capability
* minor : lz4frame include stdlib only if neededYann Collet2020-11-101-1/+1
|
* changed LZ4_calloc() to a 2-arguments signatureYann Collet2020-11-091-2/+2
| | | | | | to remain similar to stdlib's calloc(). Updated test to use c++ compiler for stricter signature check.
* Merge branch 'dev' into customMemYann Collet2020-11-092-4/+7
|\
| * Merge pull request #944 from lz4/fix874Yann Collet2020-11-091-1/+1
| |\ | | | | | | fix #874
| | * fix #874Yann Collet2020-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | coverity reported a warning regarding a memcpy() overwrite. This is a false positive (the memory area is large enough), but it's true that it's not trivial to determine (encompassing struct), and it's proper anyway to only memcpy() just the right amount of data.
| * | Merge pull request #945 from lz4/fix926Yann Collet2020-11-092-3/+6
| |\ \ | | |/ | |/| fixed remaining ubsan warnings
| | * fixed remaining ubsan warningsYann Collet2020-11-092-3/+6
| | |
* | | first proposal for LZ4_USER_MEMORY_FUNCTIONSYann Collet2020-11-093-12/+28
|/ / | | | | | | | | | | | | | | | | makes it possible to replace at link time malloc, calloc and free by user-provided functions which must be named LZ4_malloc(), LZ4_calloc() and LZ4_free(). answer #937
* | update obsolete section documentationYann Collet2020-11-081-12/+11
|/ | | | | and update manuals. fix #712
* fix minor UBsYann Collet2020-11-082-3/+5
| | | | | - check alignment before casting a pointer - saveDict : don't memmove() on NULL dst
* fix #926Yann Collet2020-11-081-18/+20
| | | | | fix incorrect behavior of LZ4_saveDictHC() when invoked right after initialization.
* Merge pull request #941 from lz4/revertinlineYann Collet2020-11-082-20/+20
|\ | | | | Revert "Replace "static" to "LZ4_FORCE_INLINE" for small functions"
| * Revert "Replace "static" to "LZ4_FORCE_INLINE" for small functions"Yann Collet2020-11-072-20/+20
| | | | | | | | This reverts commit 0e3933edd435c54cc2e21e38f5d4ba7bf644a24e.
* | fix #935Yann Collet2020-11-072-3/+4
|/ | | | | | | minor: identical declaration and prototypes of `LZ4HC_compress_optimal()` also : very minor optimization of `LZ4_memcpy_using_offset()`
* LZ4F_decompress requires a valid dctx stateYann Collet2020-11-073-7/+10
| | | | | This is now explicitly documented and asserted. fix #927
* Merge pull request #936 from lz4/alignTestYann Collet2020-11-075-108/+77
|\ | | | | More alignment tests
| * static state sizeYann Collet2020-11-072-4/+4
| | | | | | | | for better inter-version compatibility
| * re-enable alignment test on all targetsYann Collet2020-11-073-17/+10
| |
| * unified internal state declarationYann Collet2020-11-072-74/+41
| | | | | | | | align on `void*` instead : there is no `long long` inside the structure
| * document LZ4_ALIGN_TESTYann Collet2020-11-061-0/+3
| |
| * unified alignment testYann Collet2020-11-062-27/+30
| | | | | | | | across lz4.c and lz4hc.c
| * preserver alignment test on Visual Studio x64Yann Collet2020-10-021-16/+19
| | | | | | | | | | this it works fine in this environment (only x86 is suspicious)
* | Merge pull request #930 from remittor-pr/fix_msvcYann Collet2020-10-312-38/+38
|\ \ | | | | | | Fix: The "inline" specifier do not use for LZ4_wildCopy8 and LZ4_wildCopy32
| * | Replace "static" to "LZ4_FORCE_INLINE" for small functionsremittor2020-10-072-20/+20
| | | | | | | | | | | | The "static" specifier does not guarantee that the function will be inlined.
| * | Replace define LZ4_FORCE_O2_INLINE_GCC_PPC64LE to LZ4_FORCE_INLINEremittor2020-10-071-18/+18
| | | | | | | | | | | | There is no reason to separate these two definitions!
| * | Fix: The "inline" specifier do not use for LZ4_wildCopy8 and LZ4_wildCopy32remittor2020-10-061-1/+1
| |/ | | | | | | This problem was reproduced on MSVC 2015 (32-bit). Both functions were called using the operator "call".
* | [lz4hc] Made function LZ4HC_encodeSequence a human readableremittor2020-10-031-23/+30
|/
* add LZ4F_decompress() tests with (NULL,0) input and outputYann Collet2020-10-021-32/+52
| | | | fix one (rare & complex) issue discovered by this test
* make scan-build accept assert()Yann Collet2020-10-011-6/+9
|
* fix bad init scenarioYann Collet2020-10-011-3/+5
|
* added memcpy() related SA warning fixesYann Collet2020-10-011-8/+14
| | | | memcpy() on NULL is UB, even if length is 0.
* fix conversion warningYann Collet2020-09-301-5/+5
|
* Merge branch 'dev' into safixesYann Collet2020-09-301-1/+1
|\
| * bump version numberYann Collet2020-09-291-1/+1
| | | | | | | | to v1.9.3
* | fix minor static analyzer warningsYann Collet2020-09-303-37/+39
|/ | | | | detected by scan-build, cppcheck and advanved compilation flags fix #786
* Merge pull request #923 from lz4/fix784Yann Collet2020-09-282-42/+105
|\ | | | | fix efficiency of LZ4_compress_HC_destSize()
| * improved last literals run on LZ4_compress_destSizeYann Collet2020-09-281-2/+2
| | | | | | | | | | | | applying new more accurate formula from LZ4_compress_HC_destSize() also : fix some minor display issue in tests/frametest
| * ensure last match not too close to endYann Collet2020-09-282-21/+40
| | | | | | | | must respect MFLIMIT distance from oend
| * fix incorrect countingYann Collet2020-09-281-2/+3
| | | | | | | | after truncation of last sequence
| * fix efficiency of LZ4_compress_HC_destSize()Yann Collet2020-09-282-25/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | LZ4_compress_HC_destSize() had a tendency to discard its last match when this match overflowed specified dstBuffer limit. The impact is generally moderate, but occasionally huge, typically when this last match is very large (such as compressing a bunch of zeroes). Issue #784 fixed for both Chain and Opt implementations. Added a unit test suggested by @remittor checking this topic.
* | Merge pull request #921 from lz4/doubleNullYann Collet2020-09-281-0/+1
|\ \ | | | | | | fix compressing into NULL
| * | fix compressing into NULLYann Collet2020-09-261-0/+1
| |/ | | | | | | | | fails properly bug discovered by oss-fuzz
* | Fix compilation with TinyCCAnton Kochkov2020-09-271-2/+2
|/
* comment bug on older versions of ZSTD_compress_destSize()Yann Collet2020-09-181-1/+12
| | | | following investigation in #859
* fixed lz4frame with blocks of size 1Yann Collet2020-09-172-22/+23
| | | | properly track history
* added the actual code changeYann Collet2020-09-171-6/+53
|
* fix #783Yann Collet2020-08-272-28/+45
| | | | | | | | | | | | | | | | | LZ4_decompress_safe_partial() now also supports a scenario where nb_bytes_to_generate is <= block_decompressed_size And nb_bytes_to_read is >= block_compressed_size. Previously, the only supported scenario was nb_bytes_to_read == block_compress_size. Pay attention that, if nb_bytes_to_read is > block_compressed_size, then, necessarily, it requires that nb_bytes_to_generate is <= block_decompress_size. If both are larger, it will generate corrupted data.
* Merge branch 'dev' into extraInputYann Collet2020-08-272-61/+71
|\
| * added documentation about LZ4_FORCE_SW_BITCOUNTYann Collet2020-08-262-8/+33
| | | | | | | | | | Also : added memory-frugal software byte count for big endian 64-bit cpus. Disabled by default.