Commit Graph

2192 Commits

Author SHA1 Message Date
Yann Collet
baf9b0e043 fix #734 : --version should output to stdout
instead of stderr
2019-06-24 16:08:30 -07:00
Yann Collet
798301b4e1 update simple_buffer example
there were a few tiny inaccuracies, especially in error conditions.
2019-06-06 14:17:44 -07:00
Yann Collet
1d759576b9 precise again that LZ4 decoder needs metadata
and that such metadata must be provided / sent / saved by the application.
2019-06-06 13:20:30 -07:00
Yann Collet
3a3639e32d
Merge pull request #727 from ephiepark/dev
CircleCI : use custom Docker Image with pre-installed dependencies
2019-06-05 14:34:28 -07:00
Ephraim Park
f7b52ecbba circleci : use custom docker image with pre-installed dependencies 2019-06-05 13:12:51 -07:00
Yann Collet
348e107d99 restored FORCE_INLINE 2019-06-04 14:04:49 -07:00
Yann Collet
d82a22b3f1
Merge pull request #718 from lz4/fullbench
fullbench: added test scenario LZ4F_decompress_followHint
2019-05-31 15:18:12 -07:00
Yann Collet
33a04fb8bd fullbench: ensure decompressionFunction and dName are initialized
Visual Studio seems to miss that they are necessarily initialized in the switch() { case: }
2019-05-31 13:25:12 -07:00
Yann Collet
280fc0856d
Merge pull request #717 from lz4/inplace
Added documentation and macro to support in-place compression and decompression
2019-05-31 12:59:38 -07:00
Yann Collet
8008fdf396
Merge pull request #719 from parheliamm/dev
FAST_DEC_LOOP: move offset check in specific condition.
2019-05-31 12:23:52 -07:00
Yann Collet
99f1721ff5 replaced while(1)
by for (;;)
just to please Visual Studio C4127 .
2019-05-31 12:01:33 -07:00
Yann Collet
5997e139f5 added more details for in-place documentation 2019-05-31 11:56:59 -07:00
Yann Collet
33cb8518ac decompress: changed final memcpy() into memmove()
for compatibility with in-place decompression scenarios.
2019-05-31 11:44:37 -07:00
Yann Collet
4eec64e4d8 Makefile removed CFLAGS modifier
which was removing `-O3` as a side effect
2019-05-31 11:31:48 -07:00
Chenxi Mao
64b5917736 FAST_DEC_LOOP: only did offset check in specific condition.
When I did FAST_DEC_LOOP performance test, I found the
offset check is much more than v1.8.3

You will see the condition check difference via lzbench with dickens test case.
v1.8.3 34959
v.1.9.x 1055885

After investigate the code, we could see the difference.
v.1.8.3 SKIP the condition check if
if condition is true in:
https://github.com/lz4/lz4/blob/v1.8.3/lib/lz4.c#L1463
AND below condition is true
https://github.com/lz4/lz4/blob/v1.8.3/lib/lz4.c#L1478\
The offset check should be invoked.

v1.9.3
The offset check code will be invoked in every loop which lead to downgrade.
So the fix would be move this check to specific condition
to avoid useless condition check.

After this change, the call number is same as v1.8.3
2019-05-31 08:36:13 +08:00
Yann Collet
89c97d5ea6 fullbench: added test scenario LZ4F_decompress_followHint
This emulates a streaming scenario,
where the caller follows rigorously the srcSize hints
provided as return value of LZ4F_decompress().

This is useful to show the issue in #714,
where data is uselessly copied in a tmp buffer first.
2019-05-30 17:29:51 -07:00
Yann Collet
b77c9c062d
Merge pull request #714 from dreambottle/fix-lz4f-input-buf-use
Fix src temporary buffer use in lz4frame
2019-05-30 17:28:59 -07:00
Yann Collet
2f9d1736fb updated API manual 2019-05-30 16:23:53 -07:00
Yann Collet
676d46df27 updated LZ4_DECOMPRESS_INPLACE_MARGIN
to pass worst case scenario.
Now adds margin proportional to input size to counter local expansion.
2019-05-30 16:19:30 -07:00
Yann Collet
6c69ae6bd6 added test case for in-place decompression
worst case, designed to make the decoder overwrite into input
2019-05-30 16:17:47 -07:00
Yann Collet
22adbb176a add more doc on in-place (de)compression 2019-05-30 09:45:21 -07:00
Yann Collet
b2ba857a4f fuzzer: changed internal buffer size
to ensure no overflow during unit tests
2019-05-29 13:33:55 -07:00
Yann Collet
45eba5b030 one more conversion warning 2019-05-29 13:17:45 -07:00
Yann Collet
76116495bf some more minor conversion warnings fixes 2019-05-29 13:14:52 -07:00
Yann Collet
c5bcb4d68b fixed minor conversion warning 2019-05-29 12:56:27 -07:00
Yann Collet
444550defa ensure lz4.h can be included with or without LZ4_STATIC_LINKING_ONLY in any order
ensure correct propagation of LZ4_DISTANCE_MAX
2019-05-29 12:21:14 -07:00
Yann Collet
b17f578a91 added comments and macros for in-place (de)compression 2019-05-29 12:06:13 -07:00
Yann Collet
4fc6b48550 added test case for in-place compression 2019-05-29 11:19:10 -07:00
Yann Collet
ab2248b90a
Merge pull request #715 from gabrielstedman/ret
Handle file not existing case #704
2019-05-27 11:59:23 -07:00
gabrielstedman
729eef61a1 Handle file not existing case #704 2019-05-26 15:04:45 +01:00
Niko Dzhus
2be2fe43a8 fix temporary buffer use when input size hint is respected 2019-05-24 22:08:44 +03:00
Yann Collet
2037af1346
Merge pull request #709 from lz4/circle
updated tests for CircleCI
2019-05-17 12:22:39 -07:00
Yann Collet
e2527ad725 updated tests
- only play listTest with `make test`, not `make all` which is limited to build
- update `clangtest`, so that it's possible to disable O3 optimization, for faster processing
2019-05-16 16:46:16 -07:00
Yann Collet
a7151324af
Merge pull request #708 from gabrielstedman/list
Add multiframe report to --list command
2019-05-16 15:56:42 -07:00
gstedman
81081f9b2d List mode improvements.
Improve formatting
  Include static assert
  Use UTIL_fseek to handle potential fseek limitation
  Be explicit when refusing to read from stdin
  Properly free dctx after use
  Include valgrind tests
2019-05-16 20:53:29 +01:00
gstedman
98a86c8ef6 Add multiframe report to --list command 2019-05-15 21:13:19 +01:00
Yann Collet
df2451479c
Merge pull request #707 from prekageo/dev
enable LZ4_FAST_DEC_LOOP build macro on aarch64 by default
2019-05-13 20:35:10 -07:00
George Prekas
605d811e6c enable LZ4_FAST_DEC_LOOP build macro on aarch64/GCC by default 2019-05-07 08:36:06 -05:00
Yann Collet
0291430018
Merge pull request #700 from lzutao/meson-non-failures
contrib: Make Meson build non optional
2019-04-29 23:40:42 -07:00
Lzu Tao
cb1be75c84 meson: Rely only on extracted version in lz4.h
So now instead of warning when failing to extract version number
from lz4.h, we error and stop the build instead.
2019-04-30 12:25:40 +07:00
Lzu Tao
dd54ea01a2 contrib: Make Meson build non optional
* Update ninja version to 1.9 in CI.
* Update default project version in meson script.
2019-04-27 01:41:03 +07:00
Yann Collet
ce55e7eef9
Merge pull request #699 from brendene/compressBound
Include block checksum in worst case scenario calculation of dstCapacity
2019-04-25 20:26:04 -07:00
Brenden Eng
9e056bc032 Include block checksum in worst case scenario calculation of dstCapacity 2019-04-25 22:37:39 -04:00
Yann Collet
8453e071f1
Merge pull request #698 from lz4/tidy
several minor style changes recommended by clang-tidy
2019-04-24 11:50:50 -07:00
Yann Collet
ba99eac4d0 several minor style changes recommended by clang-tidy 2019-04-24 10:03:02 -07:00
Yann Collet
f9781a6643
Merge pull request #697 from ldv-alt/fixes/test-amalgamation
Fix test-amalgamation
2019-04-23 17:20:03 -07:00
Yann Collet
49c20c498b
Merge pull request #696 from lz4/mactest
Fix dynamic library compilation on Mac OS-X
2019-04-23 15:08:46 -07:00
Dmitry V. Levin
0d3f85df65 test-amalgamation: split the rule
Change test-amalgamation to follow each-rule-makes-a-single-target idiom.

Fixes: a7e8d394 ("[amalgamation] add test")
2019-04-23 21:18:11 +00:00
Dmitry V. Levin
8069d2ae6f test-amalgamation: fix compilation options
Use the same compilation options to compile lz4_all.c and other object files.

Fixes: a7e8d394 ("[amalgamation] add test")
2019-04-23 21:18:11 +00:00
Dmitry V. Levin
10726d4c56 test-amalgamation: use a single cat command
Use the list of prerequisites instead of listing those files manually,
this way they will never fall out of sync.

Also update the amalgamation example to use a single cat command.

Fixes: a7e8d394 ("[amalgamation] add test")
Fixes: b192c86b ("[amalgamation] lz4frame.c")
2019-04-23 21:18:11 +00:00