summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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.
| * Merge pull request #898 from aqrit/aqrit-prefixlenYann Collet2020-08-241-45/+46
| |\ | | | | | | rejigger bit counting intrinsics
| | * silence warningaqrit2020-08-171-2/+2
| | | | | | | | | MSVC debug mode complains
| | * rejigger bit counting intrinsicsaqrit2020-08-121-45/+46
| | | | | | | | | | | | | | | Fix lz4/lz4#867 Optimize software fallback routines. Delete some faulty (and dead?) MSVC big endian code.
| * | removed LZ4_compress_fast_force()Yann Collet2020-08-221-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which serves no more purpose. The comment implies that the simple presence of this unused function was affecting performance, and that's the reason why it was not removed earlier. This is likely another side effect of instruction alignment. It's obviously unreliable to rely on it in this way, meaning that the impact will be different, positive of negative, with any minor code change, and any minor compiler version change, even parameter change.
* | | Merge branch 'dev' into extraInputYann Collet2020-08-183-9/+12
|\ \ \ | |/ /
| * | Merge pull request #897 from lz4/lz4wlibYann Collet2020-08-182-6/+7
| |\ \ | | | | | | | | added target lz4-wlib
| | * | added target lz4-wlibYann Collet2020-08-112-6/+7
| | |/ | | | | | | | | | | | | | | | | | | | | | variant of lz4 linking to liblz4 dynamic library requires the dynamic library to expose static-only symbols (experimental API) Example for #888
| * | Clarifies and fix EndMarkYann Collet2020-08-131-3/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EndMark, the 4-bytes value indicating the end of frame, must be `0x00000000`. Previously, it was just mentioned as a `0-size` block. But such definition could encompass uncompressed blocks of size 0, with a header of value `0x80000000`. But the intention was to also support uncompressed empty blocks. They could be used as a keep-alive signal. Note that compressed empty blocks are already supported, it's just that they have a size 1 instead of 0 (for the `0` token). Unfortunately, the decoder implementation was also wrong, and would also interpret a `0x80000000` block header as an endMark. This issue evaded detection so far simply because this situation never happens, as LZ4Frame always issues a clean 0x00000000 value as a endMark. It also does not flush empty blocks. This is fixed in this PR. The decoder can now deal with empty uncompressed blocks, and do not confuse them with EndMark. The specification is also clarified. Finally, FrameTest is updated to randomly insert empty blocks during fuzzing.
* | fix issue #783 (#862)BellaXlp2020-08-121-1/+1
|/ | | * fix issue #783
* Merge branch 'fix832' into devYann Collet2020-08-111-2/+2
|\
| * fixed test of gnu c versionYann Collet2020-08-111-2/+2
| |
* | Merge pull request #896 from lz4/fix832Yann Collet2020-08-101-7/+6
|\ \ | |/ | | fix #832
| * fix #832Yann Collet2020-08-101-7/+6
| | | | | | | | does no longer rely on default 0-interpretation when __GNUC__ is not defined
* | Merge pull request #895 from lz4/hugefastYann Collet2020-08-102-6/+16
|\ \ | |/ |/| Fix #876
| * fix #876Yann Collet2020-08-102-6/+16
| | | | | | | | by introducing a max limit acceleration value
* | Merge pull request #892 from felixhandte/lz4-clean-up-fast-resetYann Collet2020-08-102-25/+7
|\ \ | |/ |/| Remove dirty Flag in LZ4_stream_t
| * Fix Enum CastsW. Felix Handte2020-08-101-5/+5
| | | | | | | | Fixes `-Wsign-compare` issues.
| * Remove dirty Field From LZ4_stream_tW. Felix Handte2020-08-062-14/+2
| |
| * Remove Extraneous Reset in LZ4_attach_dictionary()W. Felix Handte2020-08-051-6/+0
| | | | | | | | | | Nothing internally sets dirty anymore. The only way to get that is if you use an uninitialized context, in which case your warranty is void anyways.
* | Merge pull request #856 from indragiek/indragiek/lz4f-visibilityYann Collet2020-08-081-6/+11
|\ \ | |/ |/| Add LZ4FLIB_VISIBILITY for controlling library symbol visibility
| * LZ4LIB_VISIBILITY -> LZ4FLIB_VISIBILITY in commentIndragie Karunaratne2020-08-051-1/+1
| |
| * Add LZ4FLIB_VISIBILITY for controlling library symbol visibilityIndragie Karunaratne2020-04-261-6/+11
| |
* | Call LZ4_memcpy() instead of memcpy()Nick Terrell2020-08-031-36/+51
| | | | | | | | | | | | | | | | | | `LZ4_memcpy()` uses `__builtin_memcpy()` to ensure that clang/gcc can inline the `memcpy()` calls in freestanding mode. This is necessary for decompressing the Linux Kernel with LZ4. Without an analogous patch decompression ran at 77 MB/s, and with the patch it ran at 884 MB/s.
* | Merge pull request #860 from adeason/old-style-definitionsYann Collet2020-07-291-2/+2
|\ \ | | | | | | Avoid old-style function definitions
| * | Avoid old-style function definitionsAndrew Deason2020-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | Define 0-argument functions like foo(void) instead of foo(), in order to avoid a warning with -Wold-style-definition. This makes it easier to embed lz4.c in projects that compile with -Werror -Wold-style-definition.
* | | Merge pull request #863 from Devernua/reducing_stack_usage_in_t_alignmentYann Collet2020-07-162-4/+4
|\ \ \ | | | | | | | | Reducing stack usage in _t_alignment checks
| * | | Reducing stack usage in _t_alignment checksAleksandr Kukuev2020-05-112-4/+4
| | |/ | |/|
* | | Merge pull request #866 from sandyharvie/devYann Collet2020-07-142-1/+4
|\ \ \ | | | | | | | | Fix issue #865
| * | | fix LZ4F_compressBound when automatic flushing is enabledChristopher Harvie2020-05-142-1/+4
| |/ /
* | | avoid computing 0 offsets from null pointersAlexander Gallego2020-07-081-2/+2
|/ / | | | | | | | | | | | | | | | | | | Similar work in the kernel: https://patchwork.kernel.org/patch/11351499/ UBsan (+clang-10) complains about doing pointer arithmetic (adding 0) to a nullpointer. This patch is tested with clang-10+ubsan