| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Add copying lz4file.h to make install
|
| | |
|
|/ |
|
|
|
|
|
|
| |
almost no change, functionally equivalent
replaced one test by an assert()
(since it should always be true)
|
|
|
|
|
|
|
| |
because ubsan complains even about intermediate pointer arithmetic results
(in a simple linear formula with 3 factors for example).
use parenthesis to make sure calculations go directly from one valid memory address to another valid memory address value.
|
|
|
|
|
| |
this formalized better the coupling between match length and match offset
which were 2 separated variables before.
|
|
|
|
|
| |
replaced by direct offset value.
this virtual pointer was only used in rare _dstSize scenario.
|
|
|
|
| |
replaced by direct offset values.
|
|
|
|
| |
instead of a virtual pointer
|
|
|
|
| |
instead of a virtual past pointer.
|
|
|
|
| |
and also on decompress_continue variants.
|
| |
|
|
|
|
|
| |
apparently, accessing the short member of a union
still requires enough space for its largest member.
|
|
|
|
| |
now, even intermediate ptr arithmetic results can be UB ??
|
|
|
|
|
|
|
| |
by making LZ4_putPosition() specific to byPtr strategy.
byU32 and byU16 use LZ4_putIndexOnHash() instead.
In both cases, it makes it irrelevant to pass` base as reference ptr.
|
|
|
|
|
| |
within `LZ4_loadDict()` function :
it's possible to only employ Indexes directly.
|
|
|
|
|
|
|
| |
benchmark dictionary mode, implemented in #808, is incorrect.
It would desynchronize compression and decompression as soon as 2+ files are dictionary compressed.
Also : slightly improved traces system, to also include __LINE__ number
|
| |
|
|
|
|
|
|
| |
Since e585a438c714652e866a59371b287f52aa4d2dc3, the BUILD_SHARED
Makefile variable only takes effect for the install target (i.e. the
shared libraries always built). This restores the original behaviour.
|
|
|
|
|
|
| |
Now it's only about LZ4F_compressFrame(),
and it's only about the Compression Context
(not the hash tables, which used to be integrated).
|
|
|
|
|
| |
it's only used in byPtr mode.
This removes the need to transfer `base` ptr value.
|
|
|
|
| |
mostly related to pointer arithmetic involving NULL ptr.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as noted by @yixiutt, the temporary buffer inside lz4frame compression
is being invalidated at end of compression,
forcing it to be re-allocated at next compression job.
This shouldn't be necessary.
This change was introduced in #236, as a way to fix #232,
but neither the issue is explained, nor why the patch fixes it.
This patch revert to previous behavior,
where temporary buffer is kept between compression calls.
This results in a net reduction of allocation workload.
Additionally, the temporary buffer should only need malloc(),
not calloc(), thus saving initialization.
This diff implements both changes.
Long fuzzer tests will be run to ensure that no sanitizer warning get triggered.
Additionally :
fixed a minor ubsan warning in LZ4F_decompress().
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Since rc.exe (the resource compiler) is legacy compiler, it truncates preprocessor symbol name length to 32 chars.
And it reports the following warning
lz4\build\VS2022\..\..\lib\lz4.h(314): warning RC4011: identifier truncated to 'LZ4_STATIC_LINKING_ONLY_DISABLE'
lz4\build\VS2022\..\..\lib\lz4.h(401): warning RC4011: identifier truncated to 'LZ4_STATIC_LINKING_ONLY_DISABLE'
This patch detects rc.exe and just skips long symbol.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
lz4frame favors the faster prefix mode
when decompressing a frame with linked blocks.
This significantly improved CLI decompression on files compressed with -BD4 setting.
On my laptop, decompressing `enwik9` went from 0.89s to 0.52s.
This improvement is only for linked blocks.
It's more visible for small block sizes.
|
| |
|
| |
|
| |
|
|\
| |
| | |
Add document for LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION is enabled
|
|/ |
|
|\
| |
| | |
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.
|
|
|
|
|
| |
on command line, using existing long command --no-frame-crc.
Note : it's effectively more than that, since _all_ checksums are disabled.
|
| |
|
|
|
|
| |
requires an LZ4 Frame as input
|
|
|
|
| |
to prepare bench.c for multiple decoding functions.
|