Yann Collet
c4fe7a2047
Merge pull request #689 from JPeterMugaas/jpm-makefile
...
Jpm makefile - as described in https://github.com/lz4/lz4/issues/688
2019-04-22 15:29:50 -07:00
Yann Collet
0d4c885abb
refactored --list function
...
better handling of special conditions,
better scoping of variables.
Also : updated man page
2019-04-22 14:01:19 -07:00
JPeterMugaas
2acddd9918
Fix a test for mingw
2019-04-22 16:06:04 -04:00
JPeterMugaas
b48f823f90
Try to put some tests I made in ONE place. I also moved a test for "install" in one place to try to isolate it.
2019-04-22 15:48:48 -04:00
JPeterMugaas
773b66547f
Initial commits from diff I submitted earlier
2019-04-22 13:48:59 -04:00
Yann Collet
22fae16c6f
ensure tests work when stdout
is not the console
...
ensure this case is continuously tested on travis.
Update documentation on implicit output,
invite to not rely on implicit output in scripts.
2019-04-21 17:01:03 -07:00
Yann Collet
467e352de9
tests/Makefile : created CMP variable
...
for potential redirection, if need be.
note : should probably converge all comparison operations onto CMP
2019-04-21 12:42:13 -07:00
Yann Collet
5f8ac02b77
cli: display a warning whenever default output is stdout while input != stdin
...
This behavior has been preserved for compatibility with existing ecosystem.
But it's problematic, as some environment start `lz4` without identifying stdout as console by default,
leading to a change of behavior for a same line of script.
A more sensible policy would be to default to stdout only when input is stdin.
Soft change for the time being : keep the behavior, just print a warning message.
User should prefer `-c` to explicitly select `stdout`.
Also : updated tests in Makefile to explicitly select `stdout` with `-c`.
2019-04-19 17:08:40 -07:00
Yann Collet
ae199124e5
fixed read-after input in LZ4_decompress_safe()
2019-04-18 18:50:51 -07:00
Yann Collet
4790994568
fuzzer : reduced stack usage
2019-04-18 17:12:14 -07:00
Yann Collet
6cb084ed36
fuzzer: reduce stack usage to please Visual static analyzer
2019-04-18 17:01:36 -07:00
Yann Collet
0b876db6d4
address a few minor Visual warnings
...
and created target cxx17build
2019-04-18 16:07:16 -07:00
Yann Collet
4f6de46f60
fix several minor static analyzer warnings
2019-04-18 12:05:50 -07:00
Yann Collet
3f558163ad
fuzzer: fixed scan-build leak warning
...
the program exit(),
so there is no need to track and dealloc every buffer.
2019-04-18 10:38:51 -07:00
Yann Collet
8f0e744063
fuzzer: fix explicit cast for C++
2019-04-17 15:44:14 -07:00
Yann Collet
1ed69691a1
fuzzer: added tests to detect LZ4_decompress_fast() out of bound read
2019-04-17 13:31:24 -07:00
Norm Green
1848ea5cbd
Fix AIX errors/warnings
2019-04-17 09:20:09 -07:00
Yann Collet
0d4a974639
Merge branch 'dev' into fixframe
2019-04-15 11:18:33 -07:00
Yann Collet
ac5d2629c1
added a fake initialization to please an analyzer
...
which is unable to understand that the variable is necessarily initialized
in spite of an assert just before.
2019-04-15 11:17:35 -07:00
Yann Collet
ce0f316989
fix fuzzer tests on dirty context
...
context is no longer dirty after a failed compressed block.
Actually, all indexes are fine.
It remains compatible with continued streaming, and reset*_fast().
2019-04-15 11:12:54 -07:00
Yann Collet
98e5c0062f
added more margin for canary in frametest
2019-04-15 10:44:46 -07:00
Yann Collet
3ab916c6a2
frametest: removed uninitialized warning
...
was a false positive, but better remove it anyway
2019-04-15 10:14:36 -07:00
Yann Collet
9c41e5804e
assert() the failed test
...
ensure canary remains within buffer limits
2019-04-15 02:11:59 -07:00
Yann Collet
c222dd9010
fixed frametest
...
One test could write a canary value out of bound
in exceptional conditions involving multiple flushes
triggered by -s3421 -t462948.
2019-04-15 01:54:40 -07:00
Yann Collet
63bfb64b80
and even more visual conversion warnings
2019-04-12 17:40:23 -07:00
Yann Collet
c7554c3004
fixed minor Visual conversion warnings
2019-04-12 17:03:28 -07:00
Yann Collet
9c49e3ca07
added tests for -d -m -c
...
seems to work properly
2019-04-12 16:10:55 -07:00
Yann Collet
e865a3e7ec
fixed lz4 -m -c
...
can compress multiple files into stdout
2019-04-12 15:17:48 -07:00
Yann Collet
20c2a5fc94
added command -BI for "Independent Blocks"
...
This is the reverse of `-BD`, and the current default.
This command can be useful to reverse a previous `-BD` command.
It may in the future be more important
if `lz4` switches to generating dependent blocks by default.
2019-04-12 13:27:11 -07:00
Yann Collet
9e501702bd
made LZ4F_getHeaderSize() public
2019-04-09 18:10:58 -07:00
Yann Collet
d8d5f14138
fixed loadDictHC
...
by making a full initialization
instead of a fast reset.
2019-04-09 15:37:59 -07:00
Yann Collet
14c71dfa9c
modified LZ4_initStreamHC() to look like LZ4_initStream()
...
it is now a pure initializer, for statically allocated states.
It can initialize any memory area, and because of this, requires size.
2019-04-09 13:55:42 -07:00
Yann Collet
da19cc79da
checkFrame: removed %zu
...
not liked by mingw
2019-04-08 14:21:09 -07:00
Yann Collet
b92681f3c0
fullbench: assert lz4_stream_t initialization
2019-04-08 14:10:59 -07:00
Yann Collet
3f5f10c63e
fixed cleaning tmp directory
2019-04-08 14:01:32 -07:00
Yann Collet
249703ae2e
slightly faster huge file test
...
level down 5->4
size down 6G->5G
2019-04-08 13:49:26 -07:00
Yann Collet
5db9a2f8b6
added make list target to tests
2019-04-08 13:45:01 -07:00
Yann Collet
2ece0d8380
created LZ4_initStream()
...
- promoted LZ4_resetStream_fast() to stable
- moved LZ4_resetStream() into deprecate, but without triggering a compiler warning
- update all sources to no longer rely on LZ4_resetStream()
note : LZ4_initStream() proposal is slightly different :
it's able to initialize any buffer, provided that it's large enough.
To this end, it accepts a void*, and returns an LZ4_stream_t*.
2019-04-05 12:56:26 -07:00
Yann Collet
2a94faf462
fixed _GNU_SOURCE duplicate
2019-04-05 11:55:34 -07:00
Yann Collet
a4f1635b0a
fuzzer: fixed strict c99 with mmap+MAP_ANONYMOUS
2019-04-05 11:47:06 -07:00
Yann Collet
c491df54ec
created LZ4_initStreamHC()
...
- promoted LZ4_resetStreamHC_fast() to stable
- moved LZ4_resetStreamHC() to deprecated (but do not generate a warning yet)
- Updated doc, to highlight difference between init and reset
- switched all invocations of LZ4_resetStreamHC() onto LZ4_initStreamHC()
- misc: ensure `make all` also builds /tests
2019-04-04 17:05:11 -07:00
Yann Collet
7a39fb8fb6
make _fast*()
decoder generate a deprecation warning
...
updated modification
2019-04-04 12:47:36 -07:00
Tim Zakian
9028682e7a
Fix pass-through mode
2019-01-10 10:20:17 -08:00
Yann Collet
186015a5d2
fixed strict C++ compilation
2019-01-09 13:45:42 -08:00
Yann Collet
baed01a9c7
fixed long sequence overflow test
2019-01-09 13:38:33 -08:00
Yann Collet
fbebf0345d
minor explicit cast warning
2019-01-09 13:18:43 -08:00
Yann Collet
e953474464
Merge pull request #634 from lz4/longSeqTest
...
add a test to check long sequences (#631 )
2019-01-09 12:22:04 -08:00
Yann Collet
7741c60f98
add a test to check long sequences ( #631 )
...
the test fails, as intended,
since #631 is not merged yet in this branch.
2019-01-09 12:09:52 -08:00
Tim Zakian
4ec29b0fab
Fix C90 compatibility issue
2019-01-09 11:17:46 -08:00
Tim Zakian
8193742251
Make LZ4F_getBlockSize public and publis in experimental section
2019-01-09 10:49:49 -08:00
Ruben O. Chiavone
4c953b46ef
Add test to cover issue #596
2019-01-09 01:51:40 -03:00
Lzu Tao
49073aca86
clang: Fix -Wcomma
2018-12-02 20:39:47 +07:00
Lzu Tao
b9d3080d75
clang: Fix -Wcast-qual
2018-12-02 20:30:25 +07:00
Lzu Tao
0241755dbf
Fix clang warnings: -Wformat-pedantic and -Werror=overflow
2018-12-02 20:12:24 +07:00
Bing Xu
b192c86ba4
[amalgamation] lz4frame.c
2018-11-26 11:30:15 -08:00
Bing Xu
a7e8d394c0
[amalgamation] add test
2018-11-16 09:37:19 -08:00
Oleg Khabinov
f27ea0774e
Adding information about dirty context for _HC_ family of functions
2018-10-10 10:33:04 -07:00
Yann Collet
df6d00ede5
Merge pull request #592 from lz4/compressEnd
...
fix LZ4F_compressEnd()
2018-10-09 15:37:55 -07:00
Yann Collet
e07a37d712
added a test for LZ4F_compressEnd()
...
which actively tries to make it write out of bound.
For this scenario to be possible,
it's necessary to set dstCapacity < LZ4F_compressBound()
When a compression operation fails,
the CCtx context is left in an undefined state,
therefore compression cannot resume.
As a consequence :
- round trip tests must be aborted, since there is nothing valid to decompress
- most users avoid this situation, by ensuring that dstCapacity >= LZ4F_compressBound()
For these reasons, this use case was poorly tested up to now.
2018-10-09 14:25:18 -07:00
Yann Collet
637245958f
Merge pull request #588 from khabinov/stream-dirty-followups
...
Some followups and renamings
2018-10-09 13:14:00 -07:00
Blaise Sanouillet
294293d899
support custom block sizes: fix memory leak to make CI builds happy
2018-10-02 05:38:30 -07:00
Oleg Khabinov
28eb88d988
Some followups and renamings
2018-10-01 15:19:45 -07:00
Blaise Sanouillet
d4703852b1
support custom block sizes: remove unneeded fudging, fix leaked filehandles, other nits
2018-10-01 05:22:50 -07:00
Blaise Sanouillet
7f18842244
Merge branch 'dev' into custom_block_sizes
2018-10-01 05:09:19 -07:00
Oleg Khabinov
f2ae385c2f
Rename initCheck to dirtyContext and use it in LZ4_resetStream_fast() to check if full reset is needed.
2018-09-28 14:55:05 -07:00
Blaise Sanouillet
4d9435f1ee
support custom block sizes: fix const
2018-09-28 10:00:38 -07:00
Blaise Sanouillet
64ad395d27
support custom block sizes
2018-09-28 08:02:49 -07:00
Yann Collet
b2215f2a89
tried to clean another bunch of cppcheck warnings
...
so "funny" thing with cppcheck
is that no 2 versions give the same list of warnings.
On Mac, I'm using v1.81, which had all warnings fixed.
On Travis CI, it's v1.61, and it complains about a dozen more/different things.
On Linux, it's v1.72, and it finds a completely different list of a half dozen warnings.
Some of these seems to be bugs/limitations in cppcheck itself.
The TravisCI version v1.61 seems unable to understand %zu correctly, and seems to assume it means %u.
2018-09-19 12:12:49 -07:00
Yann Collet
5a10ed2f7b
added cppcheck
...
as Makefile target and Travis CI test.
Fixed last cppcheck warnings in tests and examples
2018-09-18 16:52:02 -07:00
Yann Collet
b87a8e9e62
fixed minor warning in fuzzer.c
...
added a few more comments and assert()
2018-09-10 16:48:41 -07:00
Yann Collet
d28389b2dc
Merge branch 'dev' into partialDecode
2018-09-10 15:44:40 -07:00
Lucas Holt
3318d573ba
Add support for MidnightBSD
2018-09-08 14:46:54 -04:00
Yann Collet
e22bb80074
fixed fuzzer test
...
and removed one blind copy, since there is no more guarantee that at least 4 bytes are still available in output buffer
2018-09-07 18:22:01 -07:00
Yann Collet
bf614d3c51
first sketch for a byte-accurate partial decoder
2018-09-07 15:44:19 -07:00
Yann Collet
0f08c22c31
Merge pull request #563 from lz4/docDict
...
updated documentation for dictionary compression
2018-09-06 12:43:29 -07:00
Yann Collet
0fea528e3a
updated documentation regarding dictionary compression
...
following suggestion from @stbrumme (#558 )
Also : bumped version number, regenerated man page and html doc
2018-09-05 14:05:08 -07:00
Yann Collet
30f6f34328
removed one assert() condition
...
which is not correct when using LZ4_HC with dictionary and starting from a low address (<0x10000).
2018-09-05 11:25:10 -07:00
Yann Collet
52cce30562
made roundTripTest fully general
...
no longer "locked" on level 9
2018-09-05 10:25:38 -07:00
Yann Collet
943fa6244a
fix minor cast warning for C++ compilation
2018-09-04 17:45:51 -07:00
Yann Collet
d2d5660970
new test program : roundTripTest
...
make a round trip test with arbitrary input file,
generate an `abort()` on error,
to work in tandem with `afl`.
note : currently locked on level 9, to investigate #560 .
2018-09-04 16:50:34 -07:00
Jennifer Liu
e778db373b
Fixed bugs about incorrect acceleration calculation and benchmarking negative compresion level
2018-06-27 13:36:38 -07:00
Jennifer Liu
8745638d7c
Fixed invalid argument test and reformatted else
2018-06-26 17:53:12 -07:00
Jennifer Liu
9ee5183d9b
Fixed code based on comments from pull request
2018-06-26 17:31:15 -07:00
Jennifer Liu
e95706bb2a
Fixed lz4 not found error part 2
2018-06-26 11:24:21 -07:00
Jennifer Liu
075952e340
Fixed lz4 not found error
2018-06-26 11:15:55 -07:00
Jennifer Liu
17bcb58eb0
Fixed bug about file to be compressed is not present
2018-06-25 18:51:47 -07:00
Jennifer Liu
536b79afd9
Added --fast command to cli
2018-06-25 17:46:39 -07:00
Norm Green
ebe7e35601
Fix AIX 32 bit build problem of fuzzer.c
2018-06-01 11:52:22 -07:00
W. Felix Handte
c746a27e91
Test Linking C-Compiled Library and C++-Compiled Tests
2018-05-21 22:29:20 -04:00
fbrosson
2149b1a8f6
Add Haiku as a validated target.
...
lz4 1.8.2 works fine on Haiku and passes all tests.
2018-05-17 16:52:53 +00:00
Yann Collet
abb1f70e17
Merge pull request #538 from lz4/frameTestError
...
Fix frametest error
2018-05-07 11:33:53 -07:00
Yann Collet
d7b6c726ed
small extDict : fixed side-effect
...
don't fix dictionaries of size 0.
setting dictEnd == source triggers prefix mode,
thus removing possibility to use CDict.
2018-05-05 19:59:00 -07:00
Yann Collet
af12733467
fixed frametest error
...
The error can be reproduced using following command :
./frametest -v -i100000000 -s1659 -t31096808
It's actually a bug in the stream LZ4 API,
when starting a new stream
and providing a first chunk to complete with size < MINMATCH.
In which case, the chunk becomes a dictionary.
No hash was generated and stored,
but the chunk is accessible as default position 0 points to dictStart,
and position 0 is still within MAX_DISTANCE.
Then, next attempt to read 32-bits from position 0 fails.
The issue would have been mitigated by starting from index 64 KB,
effectively eliminating position 0 as too far away.
The proper fix is to eliminate such "dictionary" as too small.
Which is what this patch does.
2018-05-05 18:24:11 -07:00
Nick Terrell
3e7fa1b14d
Attempt to fix travis
2018-05-04 14:33:59 -07:00
Nick Terrell
a7cc0b590a
Fix make install
...
* Uninstall didn't remove the pkg-config correctly.
* Fix `mandir`
* Allow overriding either upper- or lower-case location variables, but
always use the lower case variables.
* Add test case that ensures overriding both upper- and lower-case
variables is the same, and that the directory is empty after uninstall.
2018-05-04 13:50:23 -07:00
Yann Collet
999a8488f6
removed test that might be optimized away
...
under UB rule "no overflow on int"
2018-05-02 13:57:33 -07:00
Yann Collet
93cf628a08
introduce LZ4_decoderRingBufferSize()
...
fuzzer : fix and robustify ring buffer tests
2018-05-02 13:01:04 -07:00
Cyan4973
5a2501a90d
added a test case for LZ4_decompress_fast_usingDict
...
with a separated dictionary
since a joined dictionary is now detected as prefix64K.
Also : fixed a minor warning under msys
2018-04-29 07:42:24 -07:00
Yann Collet
9d4eae59f0
Merge pull request #522 from svpv/refactorDec
...
Refactor dec
2018-04-27 17:22:06 -07:00
Alexey Tourbin
ce4e1389cc
fuzzer.c: enabled ring buffer tests for decompress_fast
...
Ring buffer tests were performed only with LZ4_decompress_safe_continue,
leaving my buggy changes to LZ4_decompress_safe_continue undetected.
The tests are now replicated and performed in a similar manner for both
LZ4_decompress_safe_continue and LZ4_decompress_safe_continue (except
for the small buffer case where only one function can be tested,
because part of the dictionary is overwritten with the output).
I also updated function names in the messages (changed them to the
actual ones). The error was reported for LZ4_decompress_safe(),
which I found misleading.
2018-04-27 07:27:10 +03:00
W. Felix Handte
2becd69bb1
Add _destSize() to Fullbench
2018-04-26 17:25:12 -04:00
Alexey Tourbin
5603d30f81
lz4.c: fixed the LZ4_decompress_safe_continue case
...
The previous change broke decoding with a ring buffer. That's because
I didn't realize that the "double dictionary mode" was possible, i.e.
that the decoding routine can look both at the first part of the
dictionary passed as prefix and the second part passed via dictStart+dictSize.
So this change introduces the LZ4_decompress_safe_doubleDict helper,
which handles this "double dictionary" situation. (This is a bit of
a misnomer, there is only one dictionary, but I can't think of a better
name, and perhaps the designation is not all too bad.) The helper is
used only once, in LZ4_decompress_safe_continue, it should be inlined
with LZ4_FORCE_O2_GCC_PPC64LE attached to LZ4_decompress_safe_continue.
(Also, in the helper functions, I change the dictStart parameter type
to "const void*", to avoid a cast when calling helpers. In the helpers,
the upcast to "BYTE*" is still required, for compatibility with C++.)
So this fixes the case of LZ4_decompress_safe_continue, and I'm
surprised by the fact that the fuzzer is now happy and does not detect
a similar problem with LZ4_decompress_fast_continue. So before fixing
LZ4_decompress_fast_continue, the next logical step is to enhance
the fuzzer.
2018-04-26 08:23:54 +03:00
W. Felix Handte
27c6eec18d
Multiply-Include Header to Check Guard Macro Correctness
2018-04-24 18:50:03 -04:00
W. Felix Handte
2dfc7cbe82
Change Over Includes in the Project
2018-04-24 16:22:28 -04:00
Yann Collet
b2637ab7b2
Merge pull request #512 from lz4/HC_dict
...
In-place unmutable dictionaries for LZ4HC
2018-04-24 13:18:40 -07:00
W. Felix Handte
db9deb7b74
Remove the Framebench Tool
2018-04-24 11:58:51 -04:00
Cyan4973
bd06fde104
fullbench compiled without assert()
...
to better reflect release speed
2018-04-23 15:42:27 -07:00
Nick Terrell
672799e814
Fix compilation error and assert.
2018-04-23 14:21:02 -07:00
Nick Terrell
bb83cad98f
Fix input size validation edge cases
...
The bug is a read up to 2 bytes past the end of the buffer.
There are three cases for this bug, one for each test case added.
* An empty input causes `token = *ip++` to read one byte too far.
* A one byte input with `(token >> ML_BITS) == RUN_MASK` causes
one extra byte to be read without validation. This could be
combined with the first bug to cause 2 extra bytes to be read.
* The case pointed out in issue #508 , where `ip == iend` at the
beginning of the loop after taking the shortcut.
Benchmarks show no regressions on clang or gcc-7 on both my mac
and devserver.
Fixes #508 .
2018-04-23 13:34:18 -07:00
W. Felix Handte
209c9c29d1
Add Some Simple Fuzzer Tests
2018-04-20 15:16:41 -04:00
W. Felix Handte
e0d8add791
Fix Framebench Output Buffer Sizing
2018-04-19 20:45:48 -04:00
W. Felix Handte
9dae661b1f
Fix Cast
2018-04-19 20:45:48 -04:00
W. Felix Handte
f646c512e9
Print Failure Message in Framebench
2018-04-19 20:45:48 -04:00
W. Felix Handte
9d971fd5c3
Switch to Unaligned Samples to Compress Different Blobs Each Time
2018-04-19 20:45:47 -04:00
W. Felix Handte
66f0c29aa4
Fix Framebench Statistics
2018-04-19 20:45:47 -04:00
W. Felix Handte
09df7a05f9
Add Run Name to Frame Bench Output
2018-04-19 20:45:47 -04:00
W. Felix Handte
a9a62321ff
Auto-Calculate Appropriate Repetition Count
2018-04-19 20:45:47 -04:00
W. Felix Handte
d4ee7554fc
Print More Detailed Results Inside bench(), Add Compression Levels
2018-04-19 20:45:47 -04:00
W. Felix Handte
ffb2d8b0ed
Check Compressed Buffer is Correct in Frame Bench
2018-04-19 20:45:47 -04:00
W. Felix Handte
0bc13ab69c
Add HC Calls to Framebench
2018-04-19 20:45:47 -04:00
W. Felix Handte
b9836b2a03
Restore Framebench Tool
...
This reverts commit 70f14823a4
.
2018-04-19 20:45:47 -04:00
Yann Collet
444211d259
edited a few traces for debugging
2018-04-16 17:16:08 -07:00
Yann Collet
4aff9b10b5
fixed fuzzer tests
...
which were modified in parallel within branc `dev`
2018-04-16 16:14:28 -07:00
Yann Collet
b5528ac86c
Merge branch 'dev' into lowAddr
2018-04-16 16:12:38 -07:00
W. Felix Handte
9f0f6b89bb
Further Test that ExtDictCtx Mode Produces the Exact Same Output
2018-04-13 11:50:52 -04:00
W. Felix Handte
6dd64e0776
Add Tests for LZ4_attach_dictionary and Friends
2018-04-13 11:50:52 -04:00
test4973
8af32ce6f7
modified a few traces for debug
2018-04-12 13:35:19 -07:00
Yann Collet
ca388790e6
allow system-defined CPPFLAGS in /tests
2018-04-11 16:41:25 -07:00
Yann Collet
7b3cd10579
reduced test time on circle-ci
2018-04-11 16:31:43 -07:00
test4973
ad7e040384
fix minor conversion warning
...
cast from void not implicit for C++
2018-04-09 20:38:00 -07:00
test4973
f9992fa37f
noticed a bug when re-using hash table
...
./fuzzer -vv -s4217 -t7518
2018-04-05 19:09:24 -07:00
test4973
6d931b6a93
fixed lz4 compression starting at small address
...
when using byU32 and byU16 modes
2018-04-05 12:40:33 -07:00
test4973
43132af808
Merge branch 'dev' into lowAddr
2018-04-04 11:38:55 -07:00
W. Felix Handte
ebdcbc359b
Add Dependency to Fix Parallel make test
Runs
...
When run with `-jN`, the `rm tmp*` can run in the middle of the `test-lz4-dict`
job, which will then fail, finding its files to have been axed. This adds a
dependency between the two.
2018-03-21 11:31:22 -04:00
test4973
c3f0ed28ff
added low address fuzzer tests
2018-03-21 07:14:13 -07:00
W. Felix Handte
70f14823a4
Remove Framebench Tool
2018-03-14 15:59:36 -04:00
W. Felix Handte
c4aef7cd62
Restore checkTag Cleaning
2018-03-13 15:18:08 -04:00
W. Felix Handte
f9fef255a1
Renames and Comment Fixes
2018-03-12 18:34:41 -04:00
W. Felix Handte
9dcd9abc14
Make LZ4F_compressFrame_usingCDict Take a Compression Context
2018-03-12 14:58:43 -04:00
W. Felix Handte
b3628cb0c5
Avoid Resetting the Context When Possible
2018-03-12 14:58:43 -04:00
W. Felix Handte
f34fb3c42d
Add Bounds Check to locateBuffDiff
2018-03-12 14:58:43 -04:00
W. Felix Handte
8c006b19bb
Add a Benchmarking Tool For Compression with Context Re-Use
2018-03-12 14:58:43 -04:00
Yann Collet
0ddd1ceb1d
added target make check
...
according to GNU Makefile conventions,
the Makefile should feature a make check target
to self-test the generated program:
https://www.gnu.org/prep/standards/html_node/Standard-Targets.html .
this is much less thorough and less taxing than `make test`,
and can be run on any target in a reasonable timeframe (several seconds).
2018-02-26 14:09:46 -08:00
Yann Collet
20e969e579
fuzzer: added low address compression test
...
is expected to work on linux+gcc only.
2018-02-05 15:19:00 -08:00
Yann Collet
b077a99347
added checkTag
...
checkTag verifies that provided tag and library version match.
It's started automatically in circleCI when a new tag is created.
2018-01-14 16:57:25 -08:00
Yann Collet
e2900241e8
object files in /tests
...
object files created from /tests are compiled with specific flags (`-g -DLZ4_DEBUG=1`)
which are not welcomed in release binary.
`lib/*.o` files created from /tests are now stored in /tests, to avoid unintentional mix.
2017-12-27 13:02:40 +01:00
Yann Collet
7d2f30c7d1
lz4opt supports _destSize
...
no longer limited to level 9
2017-12-22 12:47:59 +01:00
Yann Collet
fdde4311fb
/tests programs compiled with LZ4_DEBUG=1
...
to enable assert() within /lib
2017-12-22 11:54:43 +01:00
Yann Collet
1025546347
unified HC levels
...
LZ4_setCompressionLevel() can be users accross the whole range of HC levels
No more transition issue between Optimal and HC modes
2017-11-03 11:28:28 -07:00
W. Felix Handte
93f8284c17
Add some tests verifying command line dictionary functionality
2017-10-09 20:18:03 -04:00
Yann Collet
2ed3612477
removed test-fasttest
2017-08-24 18:30:00 -07:00
Yann Collet
c04655bebf
fixed make recurrence from /tests
2017-08-24 17:58:13 -07:00
Yann Collet
517dd95d92
removed fasttest
2017-08-24 17:03:03 -07:00
Yann Collet
82ccdec2fb
minor : added header license
2017-08-24 16:59:47 -07:00
Yann Collet
5637d8856f
make test is compatible with parallel execution (-j#)
...
each test section runs with its own set of files
2017-08-21 15:26:03 -07:00
Yann Collet
930a692110
cli : restored command -BX to enable block checksum ( #322 )
2017-08-11 17:58:46 -07:00
Yann Collet
77f99d2922
restored block checksum capability at lz4frame API level
2017-08-11 17:46:52 -07:00
Yann Collet
757497ae3d
implemented lz4frame decompression API
2017-08-10 16:53:57 -07:00
Yann Collet
4531637ecd
support dictionary compression with independent blocks
2017-08-10 12:12:53 -07:00
Yann Collet
d8aafe2c52
dictionary compression correctly uses compression level
...
Not obvious : copying the state was copying cdict's compression level
2017-08-10 00:48:19 -07:00
Yann Collet
31f2cdf4d2
implemented dictionary compression in lz4frame
...
note : only compression API is implemented and tested
still to do : decompression API
2017-08-09 16:51:19 -07:00
Yann Collet
a82dadfbae
added dictID inside LZ4F_frameInfo_t
...
Compressor can set dictID on LZ4F_compressBegin()
Decompressor can retrieve it using LZ4F_getFrameInfo()
2017-08-08 17:43:11 -07:00
Jussi Kukkonen
e14b4c5a3e
tests/Makefile: don't use LIBDIR as variable
...
LIBDIR may be overriden with a environment variable: In this case make
clean breaks in tests/. Use another variable name.
2017-06-26 13:32:40 +03:00
Yann Collet
d18084c655
report where decompression ends ( #313 )
...
suggested by @ehem
note : only works for files < 2 GB
2017-06-12 15:47:43 -07:00
Yann Collet
2600a154be
fix (minor) g++ compatibility for frametest
2017-05-10 17:06:31 -07:00
Yann Collet
e60cbb5cac
added test for LZ4F_resetDecompressionContext()
2017-05-10 16:28:36 -07:00
Yann Collet
2012e4de9e
fixed c_standards tests
...
and added entry "make list"
2017-05-10 14:51:09 -07:00
Yann Collet
e2c9b19122
lz4frame : Added negative compression levels
2017-04-09 01:41:36 -07:00
Yann Collet
fc31257ab2
added LZ4F_resetDecompressionContext()
2017-03-28 17:36:12 -07:00
Yann Collet
f0a7651fce
Safer LZ4_getFrameInfo()
...
LZ4_getFrameInfo() is now guaranteed to keep dctx state clean,
even in case of failure.
2017-03-28 17:10:01 -07:00
Dmitry V. Levin
b1daffc4e5
cli: add GNU separator -- specifying that all following arguments are files
...
This option is supported by other compressors with compatible cli,
so add it to lz4 as well for better compatibility.
2017-03-23 03:48:51 +00:00
Yann Collet
0d073d4d28
added extern C
for lz4.h static section
...
should make the file more compatible with C++ compiler, such as Visual or g++
2017-03-17 15:11:09 -07:00
Yann Collet
aae447fffd
LZ4_compress_HC_continue_destSize() works as intended up to level 10
...
It's incompatible with btopt though,
so cLevel >= 11 feature much reduced performance (degraded mode)
2017-03-16 15:41:30 -07:00
Yann Collet
cd35f0d98c
LZ4_compress_HC_destSize() uses LZ4HC_compress_generic() code path
...
Limits compression level to 10,
to remain compatible with Hash Chain.
2017-03-16 15:10:38 -07:00
Yann Collet
430b7d32b3
created LZ4_HC_STATIC_LINKING_ONLY section
...
where are exposed new prototypes *_destSize()
2017-03-16 02:16:24 -07:00
remittor
66b26a389f
tests: fuzzer: Add test for LZ4_compressHC_destSize
2017-03-08 11:13:28 +03:00
Dmitry V. Levin
0dfb0b9dad
Fix test-lz4-basic
...
When no output filename is specified and stdout is not a terminal,
lz4 doesn't attempt to guess an output filename and uses stdout for
output.
This change fixes test-lz4-basic when run without a terminal
by specifying output filenames.
2017-03-05 23:28:25 +00:00
Przemyslaw Skibinski
d3eaf78838
remove MOREFLAGS from test-lz4c32
2017-02-16 16:30:16 +01:00
Przemyslaw Skibinski
ace22424d8
circle.yml: fixed lz4c32 target (2)
2017-02-15 23:19:30 +01:00
Przemyslaw Skibinski
0d77c85d9d
circle.yml: fixed lz4c32 target
2017-02-15 22:10:11 +01:00
Przemyslaw Skibinski
4ee9bd5c3e
improved Circle CI tests
2017-02-15 18:24:42 +01:00
Eric Siegerman
b89cac7b2e
Don't use "foo && false || true"
...
Replace it with either:
test ! -f $FILE_THAT_SHOULD_NOT_EXIST
or:
! $COMMAND_THAT_SHOULD_FAIL
as appropriate.
2017-02-14 14:17:06 -05:00
Przemyslaw Skibinski
c139eb40b0
added OpenBSD NetBSD SunOS to list of supported make install
OSes
2017-02-10 15:00:27 +01:00
Przemyslaw Skibinski
489d1618c9
added "This Makefile is validated for"
2017-01-19 16:28:08 +01:00
Przemyslaw Skibinski
d2b51c22d3
fuzzer: tests more compression levels
2016-12-28 17:47:10 +01:00
Przemyslaw Skibinski
1c80b9af4e
LZ4HC_getSearchNum
2016-12-28 15:18:19 +01:00
Przemyslaw Skibinski
c8b31263cc
added FUZ_CLEVEL_DEFAULT
2016-12-28 13:08:38 +01:00
Przemyslaw Skibinski
a3d61cf3df
improved test-lz4-opt-parser
2016-12-27 15:38:07 +01:00
Przemyslaw Skibinski
f4575f4f14
added test-lz4-opt-parser
2016-12-27 13:14:04 +01:00
Przemyslaw Skibinski
efaa9b7bc7
Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
...
# Conflicts:
# lib/Makefile
2016-12-27 10:43:07 +01:00
Przemyslaw Skibinski
ea51ad0cee
Solaris: working "make install"
2016-12-23 00:02:01 +01:00
Przemyslaw Skibinski
9b4b081c15
"make test" is now compatible with Solaris
2016-12-22 17:18:39 +01:00
Yann Collet
b41f9bb132
Merge pull request #292 from inikep/dev
...
improved POSIX
2016-12-22 11:58:29 +01:00
Przemyslaw Skibinski
f084b65383
test Large File support for Mac OS-X in 32-bits mode
2016-12-21 17:13:38 +01:00
Przemyslaw Skibinski
973bc79740
util.h and platform.h based on zstd
2016-12-21 16:10:09 +01:00
Yann Collet
7cf0bb97b2
LZ4F_compressBound(0) provides upper bound for LZ4F_flush() and LZ4F_compressEnd() [ #290 , suggested by @vtermanis]
2016-12-21 14:18:01 +01:00
Przemyslaw Skibinski
3c6ce9c665
fixed gcc 4.4 support
2016-12-21 10:39:27 +01:00
Przemyslaw Skibinski
64cbc4e1dc
improved MinGW support
2016-12-21 10:22:40 +01:00
Przemyslaw Skibinski
9546ba62d0
executables use basic types from util.h
2016-12-21 09:44:59 +01:00
Przemyslaw Skibinski
2cfef13952
executables use platform.h
2016-12-20 18:05:43 +01:00