Commit Graph

2868 Commits

Author SHA1 Message Date
Yann Collet
d343a36852
Merge pull request #1123 from t-mat/memfunc-macros
New macro for memcpy, memmove and memset
2022-07-31 15:28:28 +02:00
Yann Collet
6c8508323a updated LZ4 Block Format documentation
hopefully answering concerns expressed in #792
2022-07-31 14:38:45 +02:00
Takayuki Matsuoka
fa889cf6da 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.
2022-07-31 21:10:55 +09:00
Takayuki Matsuoka
5d80375ded New macro for memcpy, memmove and memset
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.
2022-07-31 20:59:09 +09:00
Yann Collet
2042692400
Merge pull request #1122 from lz4/skipCrc
Introduce ability to save cpu cycles by disabling checksum validation
2022-07-30 10:49:25 +02:00
Yann Collet
9978bb90cf fixed minor pedantic warning 2022-07-29 23:31:08 +02:00
Yann Collet
5797d57018 extend disabling checksum validation to normal lz4 CLI decompression
note : it's unlikely to improve speed, as in most cases I/O is slower than lz4 decompression,
but maybe in extreme scenarios, it might show a difference.
2022-07-29 23:21:40 +02:00
Yann Collet
0826234293 added options.skipChecksums to local fuzzer test 2022-07-29 22:32:41 +02:00
Yann Collet
8f18b4b4e6 introduced new --no-crc command
which disables both frame and block checksums.
2022-07-29 22:22:27 +02:00
Yann Collet
f01b7b5209 can select validation of CRC during benchmark
on command line, using existing long command --no-frame-crc.
Note : it's effectively more than that, since _all_ checksums are disabled.
2022-07-29 22:13:38 +02:00
Yann Collet
e8f0baa3f9 added ability to skip checksum calculation when decoding LZ4 Frames 2022-07-29 21:47:34 +02:00
Yann Collet
5c8bb8739e
Merge pull request #1121 from lz4/decBench
Implement decoder-only benchmark
2022-07-29 20:56:22 +02:00
Yann Collet
4f4d09a0d1 implement decoder-only benchmark mode
requires an LZ4 Frame as input
2022-07-29 19:22:59 +02:00
Yann Collet
cd96e3e7a5 minor refactor
to prepare bench.c for multiple decoding functions.
2022-07-29 15:24:50 +02:00
Yann Collet
df4bb410e3 updated documentation of bench unit 2022-07-29 14:51:52 +02:00
Yann Collet
598eafde2d minor : fix conversion warnings 2022-07-29 14:34:53 +02:00
Yann Collet
fb46a7fe8c
Merge pull request #1120 from lz4/test-j
`make test` can run in `-j` parallel mode
2022-07-17 13:58:16 -07:00
Yann Collet
24803605c9 add dedicated install test
per platform
2022-07-17 21:47:10 +02:00
Yann Collet
1db2e64a0d update CI make test to employ -j
for faster parallel processing
2022-07-17 21:44:32 +02:00
Yann Collet
a45597d260 test independence for parallel run
for `make -j test`.

note : test-install is no longer part of `make test`
It will have to be run on its own.
2022-07-17 17:22:33 +02:00
Yann Collet
ca6e522bff
Merge pull request #1115 from lz4/lz4f_customMem
Support for Custom Memory managers
2022-07-15 18:18:17 -07:00
Yann Collet
c26902e02a
Merge pull request #1119 from lz4/skipFrames
support skippable frames within pipe
2022-07-15 12:03:44 -07:00
Yann Collet
6784e78e00 support skippable frames within pipe
fix #977

fseek() doesn't work for pipe,
switch to "read and forget" mode in such case.
2022-07-15 19:30:53 +02:00
Yann Collet
a9a0a967cf
Merge pull request #1117 from lz4/testConsole
refactor test ensuring that make test does not depend on console status
2022-07-15 05:36:56 -07:00
Yann Collet
0bd66839ed
Merge pull request #1118 from lz4/fix_dec-part-dict
fix decompress-partial-usingDict.c
2022-07-15 05:36:46 -07:00
Yann Collet
0c620ce212
Merge pull request #1116 from lz4/standardMakeVars
Test support of Standard Makefile Variables
2022-07-15 04:15:05 -07:00
Yann Collet
35d58a5ea7 fix decompress-partial-usingDict.c
The recently added test decompress-partial-usingDict
tends to fail for unknown reasons,
more frequently under the combination for clang-9 + `-mx32`.

There is a suspicion that the test is using too much stack.
Fixing that, + adding traces, to get more information if it fails again.
2022-07-15 13:05:43 +02:00
Yann Collet
0e9ab694f2 refactor test ensuring that make test does not depend on console status
Fix #990
2022-07-15 12:13:45 +02:00
Yann Collet
684ebfd4be Test support of Standard Makefile Variables
to detect issues such as #958
2022-07-15 11:29:50 +02:00
Yann Collet
1d17532d70 simplify travis script
by removing commented tests
(now transferred to Github Actions)
2022-07-14 21:24:42 +02:00
Yann Collet
4e9c680c80 minor update of .github/workflows README 2022-07-14 21:20:51 +02:00
Yann Collet
3ddab788cc
Merge pull request #1113 from lz4/moreCompilers
Add more compiler tests
2022-07-14 01:53:56 -07:00
Yann Collet
2480d9cd8a enable -m32 & -mx32 tests on all version of clang >= 4.0
clang 3.9 fails -m32 & -mx32,
likely because it lacks the corresponding abi/library support.
Oh well, it's not that important.
Supporting all clang >= 4.0 is great enough for these tests.
2022-07-14 01:46:29 +02:00
Yann Collet
e535d6424a implemented LZ4F_createCDict_advanced() 2022-07-14 01:36:18 +02:00
Yann Collet
e17f7a2241 tested clang-12 with -m32 & -mx32 2022-07-13 21:41:25 +02:00
Yann Collet
a3c4f0d0a3 implemented LZ4F_createDecompressionContext_advanced() 2022-07-13 21:39:59 +02:00
Yann Collet
c76c9c53ac Merge branch 'dev' into lz4f_customMem 2022-07-13 20:43:37 +02:00
Yann Collet
270529e80e implemented first custom memory manager interface
for compression context only for the time being,
using LZ4F_createCompressionContext_advanced().

Added basic test in frametest.c
2022-07-13 20:23:13 +02:00
Yann Collet
331f7e29f1 restore gcc-11 tests for -m32 and -mx32 2022-07-13 18:41:17 +02:00
Yann Collet
6adf4282c2
Merge pull request #1114 from lz4/blockSize
minor : proper interface for LZ4F_getBlockSize()
2022-07-13 09:40:27 -07:00
Yann Collet
832b444266 fix stricter enum type requirements for C++ 2022-07-13 16:18:22 +02:00
Yann Collet
7deae4bd22 minor : proper interface for LZ4F_getBlockSize()
and proper documentation.
Also : updated manual
2022-07-13 15:55:56 +02:00
Yann Collet
db836b5519 declare experimental prototype for LZ4F custom Memory manager 2022-07-13 15:41:11 +02:00
Yann Collet
16ac875901
Merge pull request #1112 from lz4/removeBase
Fix #991
2022-07-13 06:01:08 -07:00
Yann Collet
47681c72ff removed ->dictBase from lz4hc state
replaced by ->dictStart
2022-07-13 13:09:05 +02:00
Yann Collet
20d4ff5361 removed ->base from lz4hc state
replaced by ->prefixStart
2022-07-13 11:48:31 +02:00
Yann Collet
f294fabef6
Merge pull request #1110 from lz4/moreCompactStates
Re-organize state's internal to be more compact
2022-07-13 01:58:01 -07:00
Yann Collet
3da483c0e6 Re-organize state's internal to be more compact
produces less padding, notably on OS400
following #1070 by @jonrumsey
2022-07-13 09:57:42 +02:00
Yann Collet
702c5b092b
Merge pull request #1109 from lz4/staticSizes
refactor interface for static state allocation
2022-07-12 14:58:35 -07:00
Yann Collet
60f8eb6f4c minor : specify min versions for library version identifiers 2022-07-12 22:33:08 +02:00