summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add LZ4_FREESTANDINGTakayuki Matsuoka2022-08-072-1/+26
|
* Merge pull request #1124 from t-mat/compile-time-purge-memalloc-funcYann Collet2022-08-052-1/+15
|\ | | | | Introduce LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION
| * Fix : Internal memory allocation macro namesTakayuki Matsuoka2022-07-311-6/+3
| |
| * Introduce LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATIONTakayuki Matsuoka2022-07-312-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset introduces new compile time switch macro LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION which removes the following functions when it's defined. ``` // lz4.c LZ4_createStream LZ4_freeStream LZ4_createStreamDecode LZ4_freeStreamDecode LZ4_create // legacy // lz4hc.c LZ4_createStreamHC(void) LZ4_freeStreamHC LZ4_createHC // legacy LZ4_freeHC // legacy ``` These functions uses dynamic memory allocation functions such as malloc() and free(). It'll be useful for freestanding environment which doesn't have these allocation functions. Since this change breaks API, this macro is only valid with lz4 as a static linked object.
* | simplify read_variable_length()Yann Collet2022-08-031-26/+24
| | | | | | | | single sumtype return value
* | refactor read_variable_length()Yann Collet2022-08-021-19/+29
| | | | | | | | | | updated documentation, more assert(), overflow detection in 32-bit mode
* | remove support of decompress_fast*() from decompress_generic()Yann Collet2022-08-021-92/+43
| | | | | | | | | | | | | | since it's now supported by decompress_unsafe(). The goal is to improve maintenability of decompress_generic() by reducing its complexity.
* | introduce LZ4_decompress_unsafe_generic()Yann Collet2022-08-021-18/+158
| | | | | | | | | | | | | | designed to support specifically LZ4_decompress_fast*() variants. The end goal is to offload this support from LZ4_decompress_generic to improve its maintenance.
* | fix: various typosDominique Pelle2022-07-313-3/+3
| |
* | New macro for memcpy, memmove and memsetTakayuki Matsuoka2022-07-312-13/+26
|/ | | | | | | | This changeset introduces the following external macros. - Add new macro LZ4_memset() which enables to inject external function as memset(). - Similar macro LZ4_memmove() for memmove(). - In same manner, LZ4_memcpy() also can be overriden by external macro.
* can select validation of CRC during benchmarkYann Collet2022-07-291-4/+4
| | | | | on command line, using existing long command --no-frame-crc. Note : it's effectively more than that, since _all_ checksums are disabled.
* added ability to skip checksum calculation when decoding LZ4 FramesYann Collet2022-07-292-11/+21
|
* implement decoder-only benchmark modeYann Collet2022-07-292-7/+7
| | | | requires an LZ4 Frame as input
* minor refactorYann Collet2022-07-292-37/+53
| | | | to prepare bench.c for multiple decoding functions.
* Merge pull request #1115 from lz4/lz4f_customMemYann Collet2022-07-162-91/+201
|\ | | | | Support for Custom Memory managers
| * implemented LZ4F_createCDict_advanced()Yann Collet2022-07-132-40/+55
| |
| * implemented LZ4F_createDecompressionContext_advanced()Yann Collet2022-07-132-17/+30
| |
| * Merge branch 'dev' into lz4f_customMemYann Collet2022-07-132-6/+11
| |\
| * | implemented first custom memory manager interfaceYann Collet2022-07-132-81/+139
| | | | | | | | | | | | | | | | | | | | | for compression context only for the time being, using LZ4F_createCompressionContext_advanced(). Added basic test in frametest.c
| * | declare experimental prototype for LZ4F custom Memory managerYann Collet2022-07-131-0/+23
| | |
* | | support skippable frames within pipeYann Collet2022-07-152-2/+2
| |/ |/| | | | | | | | | | | fix #977 fseek() doesn't work for pipe, switch to "read and forget" mode in such case.
* | fix stricter enum type requirements for C++Yann Collet2022-07-131-4/+4
| |
* | minor : proper interface for LZ4F_getBlockSize()Yann Collet2022-07-132-2/+6
|/ | | | | and proper documentation. Also : updated manual
* removed ->dictBase from lz4hc stateYann Collet2022-07-132-27/+34
| | | | replaced by ->dictStart
* removed ->base from lz4hc stateYann Collet2022-07-132-67/+68
| | | | replaced by ->prefixStart
* Re-organize state's internal to be more compactYann Collet2022-07-131-4/+5
| | | | | produces less padding, notably on OS400 following #1070 by @jonrumsey
* minor : specify min versions for library version identifiersYann Collet2022-07-122-45/+26
|
* clarify static sizes of states for static allocationYann Collet2022-07-124-72/+33
|
* Merge pull request #1104 from jonrumsey/os400-build-fixYann Collet2022-07-112-3/+47
|\ | | | | Change definitions of LZ4_xxxSIZE defines for OS400
| * Change definitions of LZ4_STREAMSIZE, LZ4_STREAMDECODESIZE and ↵jonrumsey2022-07-112-3/+47
| | | | | | | | | | | | LZ4_STREAMHCSIZE to factor in OS400 pointer length and structure alignment rules Update the length values on platforms where pointers are 16-bytes, factor in implicit compiler padding to ensure proper alignment of members and overall structure lengths
* | minor refactor : simplify LZ4F_makeBlockYann Collet2022-07-111-27/+20
|/ | | | one less argument
* Merge pull request #1094 from alexmohr/add-uncompressed-apiYann Collet2022-07-052-19/+122
|\ | | | | frame-api: add function to insert uncomressed data
| * review: fix findingsAlexander Mohr2022-07-052-13/+1
| | | | | | | | | | | | | | | | | | * replace assert with test for LZ4F_uncompressedUpdate * update documentation to incldue correct docstring * remove unecessary entry point * remove compress_linked_block_mode from fuzzing test Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
| * uncompressed-api: allow uncompressed_update only for independent blocksAlexander Mohr2022-07-055-151/+84
| | | | | | | | Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
| * lz4frame: correct start and size after flushAlexander Mohr2022-07-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | when the block mode changes a flush is executed, to prevent mixing compressed and uncompressed data. Prior to this commit dstStart, dstPtr, dstCapacity where not updated to include the offset from bytesWritten. For inputs > blockSize this meant the flushed data was overwritten. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
| * meson: fix meson buildAlexander Mohr2022-06-111-1/+1
| | | | | | | | add static dependency to examples
| * dict-size: make lz4 context constAlexander Mohr2022-06-114-6/+6
| | | | | | | | | | change the context to const to make clear that the context is not modified
| * lz4frame: fix different linkage errorAlexander Mohr2022-06-111-1/+1
| | | | | | | | Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
| * fuzz-test: add fuzz test for uncompressed apiAlexander Mohr2022-06-111-2/+1
| | | | | | | | | | | | add a fuzzing test for uncompressed frame api Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
| * review: Fix review findingsAlexander Mohr2022-06-101-16/+17
| | | | | | | | | | | | This commit fixes the review findings Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
| * review: Fix review findingsAlexander Mohr2022-06-106-15/+52
| | | | | | | | | | | | 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-096-72/+214
| | | | | | | | | | | | | | | | 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>
* | updated dll READMEYann Collet2022-07-041-9/+9
| |
* | silence a useless MSVC warningYann Collet2022-07-041-0/+1
| |
* | API: add `LZ4_decompress_safe_partial_usingDict` APIQi Wang2022-06-072-1/+49
| | | | | | | | | | | | feature request: #1051 Signed-off-by: Qi Wang <wangqi@linux.alibaba.com>
* | updated documentation of LZ4F_freeCompressionContextYann Collet2022-06-051-4/+7
|/ | | | to answer #1090
* introduced FORWARD_IF_ERROR()Yann Collet2022-05-101-48/+49
| | | | | | and removed prefix from RETURN_ERROR(_IF) to improve brevity as it's just a local macro (no bleeding in user's namespace).
* introduced macro LZ4F_RETURN_ERROR_IFYann Collet2022-05-071-32/+23
|
* introduced macro LZ4F_RETURN_ERRORYann Collet2022-05-071-37/+39
|
* removed ERROR_GENERIC from lz4frame.hYann Collet2022-05-072-3/+4
| | | | created a new error code in the process : LZ4F_ERROR_compressionState_uninitialized