Yann Collet
9a6e93859d
Merge pull request #899 from lz4/endMark
...
Clarifies and fix EndMark
2020-08-14 15:48:21 -07:00
Yann Collet
5ab7d22fa5
clarify endMark definition
2020-08-14 15:03:03 -07:00
Yann Collet
e9cfa49d0d
Clarifies and fix EndMark
...
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.
2020-08-12 17:27:33 -07:00
BellaXlp
ab713923a2
fix issue #783 ( #862 )
...
* fix issue #783
2020-08-12 14:42:10 -07:00
Yann Collet
f9f3fdfb1c
added test decompress-partial with extraneous input bytes
...
fails currently,
for investigation of #783
2020-08-12 14:39:01 -07:00
aqrit
e72897402d
rejigger bit counting intrinsics
...
Fix lz4/lz4#867
Optimize software fallback routines.
Delete some faulty (and dead?) MSVC big endian code.
2020-08-11 21:14:09 -04:00
Yann Collet
3dd34df751
added target lz4-wlib
...
variant of lz4 linking to liblz4 dynamic library
requires the dynamic library to expose static-only symbols (experimental API)
Example for #888
2020-08-11 14:07:51 -07:00
Yann Collet
f328e329b3
Merge branch 'fix832' into dev
2020-08-10 18:17:09 -07:00
Yann Collet
28e5a4e054
fixed test of gnu c version
2020-08-10 17:11:49 -07:00
Yann Collet
ac65f939cd
Merge pull request #896 from lz4/fix832
...
fix #832
2020-08-10 14:31:48 -07:00
Yann Collet
b26c140a54
Merge pull request #895 from lz4/hugefast
...
Fix #876
2020-08-10 12:52:32 -07:00
Yann Collet
a29ade17a0
fix #832
...
does no longer rely on default 0-interpretation when __GNUC__ is not defined
2020-08-10 11:51:57 -07:00
Yann Collet
ad14a98a09
Merge pull request #892 from felixhandte/lz4-clean-up-fast-reset
...
Remove dirty Flag in LZ4_stream_t
2020-08-10 11:28:46 -07:00
Yann Collet
7b1b078dfc
fix #876
...
by introducing a max limit acceleration value
2020-08-10 11:03:27 -07:00
Yann Collet
b01c58000e
add test that breaks --fast
...
with huge values, as expected from #876
Also : added target `check`
2020-08-10 10:54:35 -07:00
W. Felix Handte
a78235e6ad
Fix Enum Casts
...
Fixes `-Wsign-compare` issues.
2020-08-10 13:47:08 -04:00
Yann Collet
97654d3cd2
Merge pull request #856 from indragiek/indragiek/lz4f-visibility
...
Add LZ4FLIB_VISIBILITY for controlling library symbol visibility
2020-08-08 13:21:07 -07:00
W. Felix Handte
9af86f0841
Remove dirty Field From LZ4_stream_t
2020-08-06 16:06:40 -04:00
Indragie Karunaratne
ae1372690d
LZ4LIB_VISIBILITY -> LZ4FLIB_VISIBILITY in comment
2020-08-05 15:34:07 -06:00
W. Felix Handte
d7399232a4
Remove Extraneous Reset in LZ4_attach_dictionary()
...
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.
2020-08-05 12:46:32 -04:00
Yann Collet
cd5d78ebd0
Merge pull request #890 from terrelln/lz4-memcpy
...
Call LZ4_memcpy() instead of memcpy()
2020-08-03 18:34:16 -07:00
Nick Terrell
fe2a1b3707
Call LZ4_memcpy() instead of memcpy()
...
`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.
2020-08-03 11:28:02 -07:00
Yann Collet
349b343cf0
Merge pull request #885 from neheb/mes
...
meson: remove build requirement for distutils
2020-08-03 10:47:24 -07:00
Yann Collet
f4054274fa
Merge pull request #860 from adeason/old-style-definitions
...
Avoid old-style function definitions
2020-07-28 17:44:25 -07:00
Nate
e416cc9baa
Optimized by replacing endl
with '\n'
2020-07-23 20:13:14 -04:00
Rosen Penev
4ebc792cab
meson: remove build requirement for distutils
...
Tested on a default installation of Debian 10.
Same as https://github.com/facebook/zstd/pull/2197
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-21 15:27:22 -07:00
Yann Collet
48f9ecfb34
Merge pull request #863 from Devernua/reducing_stack_usage_in_t_alignment
...
Reducing stack usage in _t_alignment checks
2020-07-16 09:44:40 -07:00
Yann Collet
8ef649f3a8
Merge pull request #866 from sandyharvie/dev
...
Fix issue #865
2020-07-13 18:09:02 -07:00
Yann Collet
3d5311edc6
Merge pull request #871 from bimbashrestha/bsd
...
[build] FreeBSD update version 12.0 -> 12.1
2020-07-13 18:07:05 -07:00
Yann Collet
6b12fde42a
Merge pull request #884 from vectorizedio/clang-ubsan
...
avoid computing 0 offsets from null pointers
2020-07-08 09:12:25 -07:00
Alexander Gallego
e68c7d3878
avoid computing 0 offsets from null pointers
...
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
2020-07-08 08:30:07 -07:00
Yann Collet
49b3ad4bd4
Update issue templates
2020-06-13 14:31:15 -07:00
Bimba Shrestha
a05312d924
bsd upsate to 12-1
2020-06-05 11:57:44 -05:00
Yann Collet
1db9be5c47
Merge pull request #869 from bket/fix_tests_openbsd
...
Fix tests on OpenBSD
2020-05-30 00:07:48 -07:00
Björn Ketelaars
7c57828096
Fix tests on OpenBSD
...
Add condition for OpenBSD, which uses gmake
2020-05-30 07:36:22 +02:00
Christopher Harvie
2a7203c05d
add tests
2020-05-13 23:01:43 -04:00
Christopher Harvie
57c35511d4
fix LZ4F_compressBound when automatic flushing is enabled
2020-05-13 21:48:12 -04:00
Aleksandr Kukuev
7a75b045bd
Reducing stack usage in _t_alignment checks
2020-05-11 23:32:02 +03:00
Andrew Deason
12001d6c1a
Avoid old-style function definitions
...
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.
2020-05-07 15:02:09 -05:00
Indragie Karunaratne
8ec5ee30be
Add LZ4FLIB_VISIBILITY for controlling library symbol visibility
2020-04-26 14:51:41 -07:00
Yann Collet
f39b79fb02
Merge pull request #846 from bimbashrestha/issues-tmp
...
Adding issue templates
2020-03-03 14:17:52 -08:00
Bimba Shrestha
c5af6992f5
Adding issue templates
2020-03-03 13:29:57 -08:00
Yann Collet
23b6a700b3
Merge pull request #838 from Yanpas/stack_frame_2
...
fix: allocate LZ4HC_optimal_t opt on heap each time (#837 )
2020-02-26 10:06:54 -08:00
Yann Collet
9f3ee55223
Merge pull request #843 from filipecalasans/multiples-files-with-legacy
...
Implement -m option with legacy format on cli
2020-02-07 18:49:24 -08:00
Filipe Calasans
3f53227b96
Add test scenario test-lz4-multiple-legacy
2020-02-07 17:14:01 -08:00
Filipe Calasans
781417a369
Implement -m option with legacy format on cli
2020-02-07 17:03:13 -08:00
Yann Collet
8372862e0f
Merge pull request #842 from filipecalasans/fix-list
...
Fix lz4cli --list option
2020-02-07 10:17:33 -08:00
Filipe Calasans
ac4940cd98
Fix lz4cli --list option
2020-02-06 21:39:54 -08:00
Yan Pashkovsky
4cc9d863a3
fix malloc handling
2020-02-03 16:50:02 +03:00
Yan Pashkovsky
2553cd550b
fix: allocate LZ4HC_optimal_t opt on heap each time ( #837 )
2020-01-31 20:10:56 +03:00