| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
it's only used in byPtr mode.
This removes the need to transfer `base` ptr value.
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC (17.3 or earlier) reports the following warning
lz4\lib\lz4.c(527): warning C6385: Reading invalid data from 'v'.
Line 527 is : LZ4_memcpy(&v[4], v, 4);
But, obviously v[0..3] is always filled with meaningful value.
Therefore, this warning report is wrong.
We must revisit this issue with future version of MSVC.
|
| |
|
|\
| |
| | |
Add document for LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION
|
| | |
|
|/ |
|
|\
| |
| | |
Introduce LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
single sumtype return value
|
| |
| |
| |
| |
| | |
updated documentation, more assert(),
overflow detection in 32-bit mode
|
| |
| |
| |
| |
| |
| |
| | |
since it's now supported by decompress_unsafe().
The goal is to improve maintenability of decompress_generic()
by reducing its complexity.
|
| |
| |
| |
| |
| |
| |
| | |
designed to support specifically LZ4_decompress_fast*() variants.
The end goal is to offload this support from LZ4_decompress_generic
to improve its maintenance.
|
| | |
|
|/
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
feature request: #1051
Signed-off-by: Qi Wang <wangqi@linux.alibaba.com>
|
|
|
|
|
|
|
| |
ensure that `frametest` works fine with these values,
notably with low LZ4_MEMORY_USAGE (dict test notably)
following suggestions from @t-mat at #1016
|
|
|
|
|
| |
better name space isolation
suggested by @boris-kolpackov in #1053
|
| |
|
|
|
| |
The ARM64EC is a new Microsoft-designed ARM64 ABI that is compatible with AMD64 code. However, not all AMD64 intrinsic functions are supported. For, intrinsics that are lowered to AVX, AVX2 and AVX512 instructions are not supported, including the _tzcnt_u64. To make sure this file compiles for ARM64EC, the use of _tzcnt_u64 should be neutered.
|
|
|
|
|
|
|
|
|
|
|
| |
This makes decoding significantly faster on M1; measured on compressed source
code across 8 hardware threads, decompressing 294 MB to 1301 MB takes 513 ms
of cumulative work (2.53 GB/s) before, and 406 ms (3.2 GB/s) after this change
on M1 Pro.
There's no way to check if the target architecture is M1 specifically but the
gains are likely to be similar on recent iterations on Apple processors, and
the original performance issue was probably more specific to Qualcomm.
|
| |
|
| |
|
| |
|
|
|
|
| |
only do arithmetic if offset > 0
|
|
|
|
|
| |
ensure `dictBase` is only used
when there is an actual dictionary content.
|
|
|
|
| |
was blindly adding an offset (0) to `dictionary` which could be `NULL`.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
only include <intrin.h> on vs2005+ (#947)
remove some useless #pragma
fix a few minor Visual warnings
|
|
|
|
| |
suggested by @aqrit in #947
|
|
|
|
|
|
| |
to remain similar to stdlib's calloc().
Updated test to use c++ compiler for stricter signature check.
|
|\ |
|
| |\
| | |
| | | |
fix #874
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
coverity reported a warning regarding a memcpy() overwrite.
This is a false positive (the memory area is large enough),
but it's true that it's not trivial to determine (encompassing struct),
and it's proper anyway to only memcpy() just the right amount of data.
|
| |/ |
|
|/
|
|
|
|
|
|
|
| |
makes it possible to replace at link time
malloc, calloc and free
by user-provided functions
which must be named LZ4_malloc(), LZ4_calloc() and LZ4_free().
answer #937
|
|
|
|
|
| |
- check alignment before casting a pointer
- saveDict : don't memmove() on NULL dst
|
|\
| |
| | |
Revert "Replace "static" to "LZ4_FORCE_INLINE" for small functions"
|
| |
| |
| |
| | |
This reverts commit 0e3933edd435c54cc2e21e38f5d4ba7bf644a24e.
|
|/
|
|
|
|
|
| |
minor: identical declaration and prototypes of `LZ4HC_compress_optimal()`
also :
very minor optimization of `LZ4_memcpy_using_offset()`
|
|\
| |
| | |
More alignment tests
|
| | |
|
| |
| |
| |
| | |
across lz4.c and lz4hc.c
|
| |
| |
| |
| | |
The "static" specifier does not guarantee that the function will be inlined.
|
| |
| |
| |
| | |
There is no reason to separate these two definitions!
|
|/
|
|
| |
This problem was reproduced on MSVC 2015 (32-bit). Both functions were called using the operator "call".
|