Commit Graph

112 Commits

Author SHA1 Message Date
Yann Collet
e8f0baa3f9 added ability to skip checksum calculation when decoding LZ4 Frames 2022-07-29 21:47:34 +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
ca6e522bff
Merge pull request #1115 from lz4/lz4f_customMem
Support for Custom Memory managers
2022-07-15 18:18:17 -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
e535d6424a implemented LZ4F_createCDict_advanced() 2022-07-14 01:36:18 +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
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
4da5c4dd30
Merge pull request #1094 from alexmohr/add-uncompressed-api
frame-api: add function to insert uncomressed data
2022-07-05 15:07:36 -07:00
Alexander Mohr
42eb47d42f
uncompressed-api: allow uncompressed_update only for independent blocks
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
2022-07-05 11:56:23 +02:00
Alexander Mohr
5c7382798e
review: Fix review findings
This commit fixes the review findings

Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
2022-06-10 06:37:57 +00:00
Alexander Mohr
62f6cef564
review: Fix review findings
This commit fixes the review findings

Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
2022-06-10 06:00:38 +00:00
Alexander Mohr
4aeb5020c3
frame-api: add method to insert uncomressed data
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>
2022-06-09 17:08:01 +02:00
Yann Collet
97d60acd89 updated documentation of LZ4F_freeCompressionContext
to answer #1090
2022-06-05 11:21:28 -07:00
Yann Collet
ebfad2da84 removed ERROR_GENERIC from lz4frame.h
created a new error code in the process : LZ4F_ERROR_compressionState_uninitialized
2022-05-06 18:19:58 -07:00
Yann Collet
756693083a minor comments improvements to lz4frame 2022-01-30 21:59:56 -08:00
Dimitri Papadopoulos
4bdfb08b95
Fix typos found by codespell 2021-11-25 15:32:37 +01:00
Yann Collet
8e46846287 fix UB of lz4frame:907
now line 912
by ensuring pointer arithmetic is only performed
if there is a reason for an internal buffer to be used.
2021-05-27 22:59:22 -07:00
Yann Collet
87a80acbe7 updated license & header dates 2020-11-25 14:45:14 -08:00
Yann Collet
b7c6fc9f61 minor refactor of lz4io
for readability.
Mostly around --list capability
2020-11-13 10:57:40 -08:00
Yann Collet
27959b43ec LZ4F_decompress requires a valid dctx state
This is now explicitly documented and asserted.
fix #927
2020-11-06 20:46:35 -08:00
Yann Collet
3dd34df751 added target lz4-wlib
variant of lz4 linking to liblz4 dynamic library

requires the dynamic library to expose static-only symbols (experimental API)

Example for #888
2020-08-11 14:07:51 -07:00
Yann Collet
97654d3cd2
Merge pull request #856 from indragiek/indragiek/lz4f-visibility
Add LZ4FLIB_VISIBILITY for controlling library symbol visibility
2020-08-08 13:21:07 -07:00
Indragie Karunaratne
ae1372690d LZ4LIB_VISIBILITY -> LZ4FLIB_VISIBILITY in comment 2020-08-05 15:34:07 -06:00
Christopher Harvie
57c35511d4 fix LZ4F_compressBound when automatic flushing is enabled 2020-05-13 21:48:12 -04:00
Indragie Karunaratne
8ec5ee30be Add LZ4FLIB_VISIBILITY for controlling library symbol visibility 2020-04-26 14:51:41 -07:00
gstedman
98a86c8ef6 Add multiframe report to --list command 2019-05-15 21:13:19 +01:00
Yann Collet
af35920c81 lz4frame: initializers compatibility with C++
fix #679, reported by @degski
2019-04-19 10:23:50 -07:00
Yann Collet
21ff1a839a updated doc to underline difference between block and frame
as this is a very frequent source of confusion for new users.
2019-04-12 11:27:44 -07:00
Yann Collet
bcb26565a7 improved documentation for LZ4 dictionary compression 2019-04-11 15:20:46 -07:00
Yann Collet
9e501702bd made LZ4F_getHeaderSize() public 2019-04-09 18:10:58 -07:00
Tim Zakian
8193742251 Make LZ4F_getBlockSize public and publis in experimental section 2019-01-09 10:49:49 -08:00
Yann Collet
bf9bf80f8d updated code documentation
to clarify #589
2018-10-15 11:14:30 -07:00
Yann Collet
e07a37d712 added a test for LZ4F_compressEnd()
which actively tries to make it write out of bound.
For this scenario to be possible,
it's necessary to set dstCapacity < LZ4F_compressBound()

When a compression operation fails,
the CCtx context is left in an undefined state,
therefore compression cannot resume.
As a consequence :
- round trip tests must be aborted, since there is nothing valid to decompress
- most users avoid this situation, by ensuring that dstCapacity >= LZ4F_compressBound()

For these reasons, this use case was poorly tested up to now.
2018-10-09 14:25:18 -07:00
Yann Collet
86023f01f2 avoid final trailing comma for enum lists
as detected in #485 by @JoachimSchneider.

Refactored the c_standards tests
so that these issues get automatically detected in CI tests.
2018-09-13 14:29:41 -07:00
Yann Collet
26c42d7ad1 added comments on version numbers 2018-09-05 18:08:51 -07:00
Yann Collet
b2e56d82bf Introduced constants LZ4F_INIT_*
to simplify initialization of lz4frame.h structures.
Partially in response to #546.
2018-09-05 16:06:37 -07:00
Yann Collet
3792d00168 favorDecSpeed feature can be triggered from lz4frame
and lz4hc.
2018-04-26 15:18:44 -07:00
W. Felix Handte
2be3905fa4 Integrate lz4frame_static.h Declarations into lz4frame.h 2018-04-24 16:22:28 -04:00
Yann Collet
4785bd6a35 minor length reduction of several large lines 2018-04-18 16:49:27 -07:00
Yann Collet
b5233d3726 updated LZ4F_compressBound() documentation
to clarify it includes potentially buffered data.
2018-02-27 23:23:27 -08:00
Yann Collet
87fb7a1d03 refactored frameCompress example
to better reflect LZ4F API usage.
2018-01-31 14:33:16 -08:00
Yann Collet
4d61ebc9c8 modified formulation for LZ4F_compressBound()
previous version used an intentional overflow,
which is defined since it uses unsigned type,
but static analyzer complain about it.
2018-01-13 22:39:39 -08:00
Yann Collet
c423dc21bd updated LZ4F_decompress() documentation 2018-01-13 13:16:31 -08:00
Yann Collet
77f99d2922 restored block checksum capability at lz4frame API level 2017-08-11 17:46:52 -07:00
Yann Collet
757497ae3d implemented lz4frame decompression API 2017-08-10 16:53:57 -07:00
Yann Collet
4531637ecd support dictionary compression with independent blocks 2017-08-10 12:12:53 -07:00