summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* fix: various typosDominique Pelle2022-07-313-4/+4
|
* Merge pull request #1094 from alexmohr/add-uncompressed-apiYann Collet2022-07-051-23/+111
|\ | | | | frame-api: add function to insert uncomressed data
| * review: Fix review findingsAlexander Mohr2022-06-101-0/+1
| | | | | | | | | | | | This commit fixes the review findings Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
| * frame-api: add method to insert uncomressed dataAlexander Mohr2022-06-091-23/+110
| | | | | | | | | | | | | | | | new method `uncompressed_update` allows to insert blocks without compression into the lz4 stream. The usage is documented in the frameCompress example Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
* | docs: fix some typoQi Wang2022-06-063-3/+3
|/ | | | Signed-off-by: Qi Wang <wangqi@linux.alibaba.com>
* add file operation and examplesanjiahao2022-03-103-2/+241
| | | | | | operate lz4 compressed files as a general files Signed-off-by: anjiahao <anjiahao@xiaomi.com>
* Fix typos found by codespellDimitri Papadopoulos2021-11-253-3/+3
|
* Add C++ compatibility test for examples/Takayuki Matsuoka2021-09-061-0/+5
|
* Add cast operator for compatibility with C++Takayuki Matsuoka2021-09-061-2/+2
|
* examples: simple_buffer: We must explicit convert pointer after malloc in c++kmou4242021-09-041-2/+2
| | | | | | | | | | | | | Aim: To adapt C++ Compilation errors: simple_buffer.c:47:9: error: cannot initialize a variable of type 'char *' with an rvalue of type 'void *' char* compressed_data = malloc((size_t)max_dst_size); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ simple_buffer.c:76:15: error: cannot initialize a variable of type 'char *const' with an rvalue of type 'void *' char* const regen_buffer = malloc(src_size); ^ ~~~~~~~~~~~~~~~~ 2 errors generated.
* fix spellinga13460542021-08-212-4/+4
|
* Fix -Wshorten-64-to-32 warningTakayuki Matsuoka2021-05-301-1/+1
| | | | | | | | | | | | | | Fix -Wshorten-64-to-32 warning The following CI test (macOS) reports "-Wshorten-64-to-32" warning make V=1 clean test MOREFLAGS='-Werror -Wconversion -Wno-sign-conversion' ``` blockStreaming_lineByLine.c:68:54: error: implicit conversion loses integer precision: 'const size_t' (aka 'const unsigned long') to 'int' [-Werror,-Wshorten-64-to-32] lz4Stream, inpPtr, cmpBuf, inpBytes, cmpBufBytes, 1); ^~~~~~~~~~~ ```
* Fix -Wshorten-64-to-32 warningTakayuki Matsuoka2021-05-271-1/+1
|
* updated license & header datesYann Collet2020-11-251-1/+1
|
* update docYann Collet2020-11-151-1/+1
|
* Fix typos in streaming_api_basics.mdAndrew Martin2019-11-301-6/+6
|
* fixed #778Yann Collet2019-08-211-2/+2
| | | | fixed assert() when divisor == 0
* keep the "lorem ipsum" topic of the example stringYann Collet2019-07-121-1/+1
| | | | but make it compressible
* print the compression ratioHamid Zare2019-07-111-1/+2
|
* changed the input text to something more compression friendlyHamid Zare2019-07-111-1/+1
|
* Update blockStreaming_doubleBuffer.mdAmine Choukir2019-07-031-3/+3
|
* travisCI: added ASAN fuzzer testsYann Collet2019-06-291-3/+6
| | | | and fixed minor formatting warnings
* update simple_buffer exampleYann Collet2019-06-061-20/+25
| | | | there were a few tiny inaccuracies, especially in error conditions.
* Try to put some tests I made in ONE place. I also moved a test for ↵JPeterMugaas2019-04-221-47/+1
| | | | "install" in one place to try to isolate it.
* Initial commits from diff I submitted earlierJPeterMugaas2019-04-221-5/+42
|
* created LZ4_initStream()Yann Collet2019-04-052-3/+3
| | | | | | | | | | - 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*.
* make `_fast*()` decoder generate a deprecation warningYann Collet2019-04-041-0/+1
| | | | updated modification
* tried to clean another bunch of cppcheck warningsYann Collet2018-09-191-6/+7
| | | | | | | | | | | | 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.
* fixed minor cppcheck warnings in examplesYann Collet2018-09-183-17/+15
|
* avoid final trailing comma for enum listsYann Collet2018-09-131-4/+4
| | | | | | | as detected in #485 by @JoachimSchneider. Refactored the c_standards tests so that these issues get automatically detected in CI tests.
* frameCompress : added an error detection caseYann Collet2018-09-051-2/+13
| | | | check for potential input data not consumed.
* Merge branch 'dev' into lz4f_initYann Collet2018-09-051-1/+1
|\
| * Fix bug in frame decompress exampleCedric De Brito2018-07-021-1/+1
| | | | | | | | | | | | | | | | 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").
* | Introduced constants LZ4F_INIT_*Yann Collet2018-09-051-10/+11
|/ | | | | to simplify initialization of lz4frame.h structures. Partially in response to #546.
* fixed a number of minor cast warningsYann Collet2018-04-271-1/+2
|
* merge lz4opt.h into lz4hc.cYann Collet2018-02-251-1/+1
| | | | | | | | | | | | | | 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).
* modified decompression part of frameCompress.cYann Collet2018-02-011-99/+138
| | | | using same logic as prior modifications for compression part.
* refactored ressource allocation to avoid gotoYann Collet2018-02-011-23/+12
|
* examples/Makefile : changed dependency orderYann Collet2018-02-011-9/+9
| | | | static library *.a must come after source files *.c on linux
* refactored frameCompress.c example codeYann Collet2018-02-011-51/+81
| | | | | | compression function returns a struct. Also : nested structure ressources->computation to make it easier to manage multiple exit points.
* fixed read size, as noticed by @terrellnYann Collet2018-02-011-1/+1
|
* ensure proper dependencies are built for /examplesYann Collet2018-02-011-19/+25
| | | | also : use liblz4.a static lib to share compilation time
* refactored frameCompress exampleYann Collet2018-01-311-68/+82
| | | | to better reflect LZ4F API usage.
* minor updates to examplesYann Collet2017-11-257-61/+62
| | | | see https://github.com/lz4/lz4/commit/810e2ca27b3561e0f6bfa7a88e0fde6faf807064#commitcomment-25810887
* minor improvements to examplesYann Collet2017-09-112-10/+18
| | | | | cosmetic : better display added optional variable MOREFLAGS
* bench : made decompression speed evaluation same time as compressionYann Collet2017-09-071-28/+17
| | | | minor : slightly modified an example do avoid disabling a gcc warning through #pragma
* Fix: Add return statement to main functionMarkus Hennecke2017-08-241-0/+2
|
* restored block checksum capability at lz4frame API levelYann Collet2017-08-121-3/+3
|
* fixed frameCompress exampleYann Collet2017-08-091-268/+269
|
* fixed minor scan-build warningYann Collet2017-06-081-0/+1
|