Commit Graph

72 Commits

Author SHA1 Message Date
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
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
7a39fb8fb6 make _fast*() decoder generate a deprecation warning
updated modification
2019-04-04 12:47:36 -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
697bd904b2 fixed minor cppcheck warnings in examples 2018-09-18 16:30:31 -07:00
Yann Collet
86023f01f2 avoid final trailing comma for enum lists
as detected in #485 by @JoachimSchneider.

Refactored the c_standards tests
so that these issues get automatically detected in CI tests.
2018-09-13 14:29:41 -07:00
Yann Collet
858b6ad7f3 frameCompress : added an error detection case
check for potential input data not consumed.
2018-09-05 16:45:46 -07:00
Yann Collet
0d1ced5b0c Merge branch 'dev' into lz4f_init 2018-09-05 16:43:46 -07:00
Yann Collet
b2e56d82bf Introduced constants LZ4F_INIT_*
to simplify initialization of lz4frame.h structures.
Partially in response to #546.
2018-09-05 16:06:37 -07:00
Cedric De Brito
98c0c7cf9d Fix bug in frame decompress example
The decompression was failing as the srcEnd pointer in
decompress_file_internal was wrongly computed beyond
the end of the memory block.
We need to account for the fact that the header ("info")
was already read in the calling function ("alreadyConsumed").
2018-07-02 14:35:04 +02:00
Yann Collet
0fb3a3b199 fixed a number of minor cast warnings 2018-04-26 18:08:28 -07:00
Yann Collet
550b40849f merge lz4opt.h into lz4hc.c
Having a dedicated file for optimal parser
made sense during its creation,
it allowed Przemyslaw to work more freely on lz4opt, with less dependency on lz4hc,
moreover, the optimal parser was more complex, with its own search functions.

Since the optimal was rewritten last year, it's now a lot lighter.
It makes more sense now to integrate it directly inside lz4hc.c,
making it easier to edit (editors are a bit "lost" inside a `*.h` dependent on its #include position),
it also reduces the number of files in the project,
which fits pretty well with lz4 objectives.
(adding lz4hc requires "just" lz4hc.h and lz4hc.c).
2018-02-25 00:32:09 -08:00
Yann Collet
3ce289bcce modified decompression part of frameCompress.c
using same logic as prior modifications for compression part.
2018-02-01 02:48:20 -08:00
Yann Collet
25efdd80c5 refactored ressource allocation to avoid goto 2018-02-01 01:38:14 -08:00
Yann Collet
886a485845 examples/Makefile : changed dependency order
static library *.a must come after source files *.c on linux
2018-01-31 23:17:52 -08:00
Yann Collet
b515ae9c99 refactored frameCompress.c example code
compression function returns a struct.
Also : nested structure ressources->computation
to make it easier to manage multiple exit points.
2018-01-31 16:39:37 -08:00
Yann Collet
ff3c67fdb2 fixed read size, as noticed by @terrelln 2018-01-31 16:13:02 -08:00
Yann Collet
1acca240a9 ensure proper dependencies are built for /examples
also : use liblz4.a static lib to share compilation time
2018-01-31 16:11:45 -08:00
Yann Collet
87fb7a1d03 refactored frameCompress example
to better reflect LZ4F API usage.
2018-01-31 14:33:16 -08:00
Yann Collet
6c94c94d46 minor updates to examples
see 810e2ca27b (commitcomment-25810887)
2017-11-24 17:18:46 -08:00
Yann Collet
810e2ca27b minor improvements to examples
cosmetic : better display
added optional variable MOREFLAGS
2017-09-11 10:25:47 -07:00
Yann Collet
00418f7611 bench : made decompression speed evaluation same time as compression
minor : slightly modified an example do avoid disabling a gcc warning through #pragma
2017-09-07 12:12:36 -07:00
Markus Hennecke
2ff723b9ae Fix: Add return statement to main function 2017-08-24 14:31:45 +02:00
Yann Collet
77f99d2922 restored block checksum capability at lz4frame API level 2017-08-11 17:46:52 -07:00
Yann Collet
1d1737aaf2 fixed frameCompress example 2017-08-09 12:29:38 -07:00
Yann Collet
0beaa356f2 fixed minor scan-build warning 2017-06-08 15:04:55 -07:00
Yann Collet
775e63ee01 refactored simple_buffer.c example (#363) 2017-06-08 12:51:56 -07:00
Yann Collet
cc21115cb4 minor warning fix 2016-11-21 19:26:49 -08:00
Yann Collet
8875e7dbb5 fix minor analyzer warning 2016-11-21 16:42:23 -08:00
Yann Collet
ba7a85b463 fixed minor analyzer warning 2016-11-21 15:44:25 -08:00
Yann Collet
2fe3aa9854 added examples to make all 2016-11-21 15:00:50 -08:00
Nick Terrell
7aad356ffd Add frame decompression example 2016-11-11 11:37:12 -08:00
Nick Terrell
94917c9a04 Add dictionary random access example 2016-11-09 17:39:56 -08:00
Yann Collet
67500142c1 Clarified license (#115, #244) 2016-11-01 19:14:04 -07:00
Georg Sauthoff
681d5010d5 use gnu c99 to get both c99 and POSIX
when compiling with gcc

fixes fileno() implicitly defined on Linx and compile error on Solaris 10
2016-08-27 15:24:50 +02:00
Ben Wiederhake
cec38d1b74 Correctly reference self (github, not googlecode) 2016-07-08 00:45:33 +02:00
Julius Werner
4fcb2e17fb Remove whitespace from ends of lines
I'm trying to import LZ4 code into a project with strict linting
requirements. This will make that easier.

Signed-off-by: Julius Werner <jwerner@chromium.org>
2016-02-12 22:49:52 -08:00
KyleJHarper
7aa004377c Forgot to make clean before commiting. Removing binary. 2015-10-30 00:40:11 -05:00
KyleJHarper
7f96babc4b Several changes to address a few concerns from Yann. See Google Group LZ4c topic 'Reusing compression/decompression resources' for details. 2015-10-29 21:47:13 -05:00
KyleJHarper
d1be164e49 Added a note about why char* is used. Also removed a binary that wasn't supposed to be in there. 2015-10-28 21:10:01 -05:00
KyleJHarper
0d25185671 Finished the two example files. Decided to avoid adding anything to lz4.c/h to expose LZ4_compress_generic(). 2015-10-28 20:54:51 -05:00
KyleJHarper
02be6631be Took out the basics and placed them into basics.c. Added decompression and a wrapper for the generic call. I will likely break this file up into 2 examples before submission. 2015-10-26 01:38:14 -05:00
KyleJHarper
67b3a24707 Final tests and reporting are done. As expected there isn't much to be gained by jumping the chain. In most of my tests I did see a moderate performance gain when invoking LZ4_compress_generic() directly with normal text. This could very easily be an edge case. Either way it's interesting and worth sharing. 2015-10-23 01:52:23 -05:00
KyleJHarper
bdd9143e02 Didn't add my file for some reason. Odd. 2015-10-22 03:57:56 -05:00
KyleJHarper
73dd936b9d Wrote the skeleton of the performance test. Need to finish tests for the rest of the call stack and then my own copy of generic(). 2015-10-22 03:57:21 -05:00
Yann Collet
15603d9566 Added static analyzer test in Visual 2015-06-28 18:58:16 -08:00
Yann Collet
7273da38ba minor example clarification 2015-06-28 02:34:12 -08:00
Yann Collet
3d9adf7afc Merge pull request #122 from keszybz/master
New example using frame api as DLL - redirect from #118
2015-06-25 17:45:13 -07:00
Zbigniew Jędrzejewski-Szmek
3bcf68ff35 Use lz4 binary to check output 2015-06-17 23:45:15 -04:00