Commit Graph

83 Commits

Author SHA1 Message Date
Yann Collet
5e7780d2d8 lz4frame : removed some intermediate stage from LZ4F_decompress()
ensure some strange jump cases are not possible
(they were already not possible, but static analyzer couldn't understand it).
2018-01-14 00:15:07 -08:00
Yann Collet
18b4c66d25 ensure a ptr is non-null
with an assert()
to help static analyzer understanding this condition.
2018-01-13 22:47:46 -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
Nick Terrell
c2dd686e96 [lz4f] Skip memcpy() on empty dictionary 2018-01-05 14:30:49 -08:00
Yann Collet
89821ac7a1 minor comment edit 2017-11-03 11:49:56 -07:00
Yann Collet
87968517f9 fixed decoding block checksum in lz4frame 2017-10-04 15:24:08 -07:00
Yann Collet
ceb868f442 minor lz4frame code refactor
try to improve code readability.
minor optimization on condition to preserve history.
2017-09-23 15:06:24 -07:00
W. Felix Handte
77f7245ea7 Fix Segfault When Copying Dict
dctx must have been initialized before we can copy the dictionary in.
2017-09-22 13:20:49 -07:00
Yann Collet
c10863b98e fix : asan error in dctx, due to increased maximum frame header size, reported by Craig Young 2017-08-17 10:55:30 -07: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
Yann Collet
d8aafe2c52 dictionary compression correctly uses compression level
Not obvious : copying the state was copying cdict's compression level
2017-08-10 00:48:19 -07:00
Yann Collet
ca2fb166ab fixed C++ conversion warnings 2017-08-09 18:22:26 -07:00
Yann Collet
bf8daa2fd5 fixed uninitialization error in lz4frame 2017-08-09 18:00:48 -07:00
Yann Collet
31f2cdf4d2 implemented dictionary compression in lz4frame
note : only compression API is implemented and tested
still to do : decompression API
2017-08-09 16:51:19 -07:00
Yann Collet
a82dadfbae added dictID inside LZ4F_frameInfo_t
Compressor can set dictID on LZ4F_compressBegin()
Decompressor can retrieve it using LZ4F_getFrameInfo()
2017-08-08 17:43:11 -07:00
Chocobo1
a4ec7fa7b7 Fix gcc7 Wimplicit-fallthrough warnings
For the default Wimplicit-fallthrough=3 level,
the comment should start with "fall*"
2017-06-19 13:57:35 +08:00
Yann Collet
e60cbb5cac added test for LZ4F_resetDecompressionContext() 2017-05-10 16:28:36 -07:00
Yann Collet
fe932c4527 expose LZ4F_resetDecompressionContext() 2017-05-10 12:25:05 -07:00
Yann Collet
e2c9b19122 lz4frame : Added negative compression levels 2017-04-09 01:41:36 -07:00
Yann Collet
7eecd32c07 ensure lz4f_cctx internal buffer size remain valid in case of malloc error 2017-04-09 01:11:39 -07:00
Yann Collet
e169edac05 lz4frame : control lz4 context creation success 2017-04-08 18:27:31 -07:00
Yann Collet
6226d52eab fixed minor Visual warning 2017-03-29 14:18:10 -07:00
Yann Collet
b88df6b1b0 Improved comments on LZ4F_getFrameInfo()
and added LZ4F_resetCompressionContext()
2017-03-29 12:51:08 -07:00
Yann Collet
f0a7651fce Safer LZ4_getFrameInfo()
LZ4_getFrameInfo() is now guaranteed to keep dctx state clean,
even in case of failure.
2017-03-28 17:10:01 -07:00
Yann Collet
0d073d4d28 added extern C for lz4.h static section
should make the file more compatible with C++ compiler, such as Visual or g++
2017-03-17 15:11:09 -07:00
Yann Collet
52cac9a973 updated a few macros names 2016-12-22 11:41:05 +01:00
Yann Collet
7cf0bb97b2 LZ4F_compressBound(0) provides upper bound for LZ4F_flush() and LZ4F_compressEnd() [#290, suggested by @vtermanis] 2016-12-21 14:18:01 +01:00
Yann Collet
7cecc7b089 fixed a limit case scenario 2016-11-15 17:51:29 -08:00
Yann Collet
d2be69b144 fixed minor coverity warnings 2016-11-15 14:46:57 -08:00
Yann Collet
3580d96980 enabled deprecation warnings on remaining obsolete functions 2016-11-12 08:48:42 -08:00
Yann Collet
3d456bdf2a fixed conversion warnings 2016-11-11 15:40:58 -08:00
Yann Collet
bf6dda69e6 updated frametest 2016-11-11 15:11:56 -08:00
Przemyslaw Skibinski
773ae50b47 DLL exports only functions defined in liblz4.def 2016-11-09 16:07:28 +01:00
Przemyslaw Skibinski
fe5148417f introduced LZ4_COMPILED_AS_DLL 2016-11-09 11:45:55 +01:00
Przemyslaw Skibinski
0a22bf7d6e err0r(LZ4F_errorCodes code) uses ptrdiff_t 2016-11-08 11:47:03 +01:00
Yann Collet
4c6610709e minor code refactoring 2016-11-03 20:32:51 -07:00
Yann Collet
eda8c4eb1c fix #198 : no longer requires to restart streaming decompression from where it stopped.
It permits relocating remaining data into another memory space.
Still, the same content must be presented.
2016-11-03 18:46:07 -07:00
Yann Collet
4791cda04a fixed strict warnings 2016-11-03 17:31:41 -07:00
Yann Collet
258a5e7fa4 updated comments 2016-11-03 17:14:25 -07:00
Przemyslaw Skibinski
84cedb4632 updated links to LZ4 repository 2016-11-03 15:12:57 +01:00
Yann Collet
8eae1320c2 Merge pull request #236 from inikep/dev
fix bug #232 at https://github.com/Cyan4973/lz4/issues/232
2016-09-06 16:49:34 +02:00
Yann Collet
33993542af removed test artefacts 2016-09-06 16:46:52 +02:00
inikep
3eb143fffa fix bug #232 at https://github.com/Cyan4973/lz4/issues/232 2016-09-06 10:36:16 +02:00
inikep
2cf32ef0f1 -b# and -e# options from zstd 2016-09-02 22:59:18 +02:00
Yann Collet
2ac9ecec68 Fixed #157 : LZ4F_getFrameInfo() fails on valid null-content frame 2016-08-11 14:55:39 +02:00
Yann Collet
91cce757f5 Updated xxhash library to v0.6.1 2016-06-29 21:48:27 +02:00
Yann Collet
dfabec2d18 Fixed a few minor visual analyzer warnings 2015-06-29 00:31:41 -08:00
Yann Collet
1c3e633c48 Added compilation flag -Wcast-qual 2015-05-06 01:58:24 +01:00