Commit Graph

53 Commits

Author SHA1 Message Date
Asger Hautop Drewsen
865bd83e13 Ensure LZ4_DEPRECATED("...") is before LZ4LIB_API
When using clang++ with std c++14 or c++17 you would get the error "an attribute list cannot appear here" when including "lz4.h" as the visibility attribute is before the c++ attribute.
This ensures that the [[deprecated]] c++ attribute is before everything
else in the function declarations.
2018-01-31 13:33:07 +01:00
Yann Collet
55da545e7a new level 10
lz4opt is only competitive vs lz4hc level 10.
Below that level, it doesn't match the speed / compression effectiveness of regular hc parser.

This patch propose to extend lz4opt to levels 10-12.
The new level 10 tend to compress a bit better and a bit faster than previous one (mileage vary depending on file)

The only downside is that `limitedDestSize` mode is now limited to max level 9 (vs 10),
since it's only compatible with regular HC parser.
(Note : I suspect it's possible to convert lz4opt to support it too, but haven't spent time into it).
2017-12-20 14:14:01 +01:00
Yann Collet
89821ac7a1 minor comment edit 2017-11-03 11:49:56 -07:00
Yann Collet
1025546347 unified HC levels
LZ4_setCompressionLevel() can be users accross the whole range of HC levels
No more transition issue between Optimal and HC modes
2017-11-03 11:28:28 -07:00
Yann Collet
c9bbad53ff removed ctx->searchNum
nbSearches now transmitted directly as function parameter
easier to track and debug
2017-11-03 10:30:52 -07:00
Yann Collet
e2eca62046 LZ4_compress_HC_continue_destSize() now compatible with optimal parser
levels 11+
2017-11-03 02:03:19 -07:00
Yann Collet
81667a1e96 removed code and reference to binary tree match finder
reduced size of LZ4HC state
2017-11-03 01:18:12 -07:00
Yann Collet
a12cdf00c3 lz4opt: added hash chain search 2017-10-20 17:04:29 -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
139a387d17 updated NEWS 2017-06-12 10:54:59 -07:00
Alexey Tourbin
f3460fc148 liz4hc.h: fix a comment: LZ4HC_MAX_CLEVEL -> LZ4HC_CLEVEL_MAX 2017-04-29 16:06:45 +03:00
Dmitry V. Levin
dab3590fce Export deprecated symbols declared in lz4hc.h
Commit 25b2435885 exported deprecated
symbols declared in lz4.h by marking all LZ4_DEPRECATED functions with
LZ4LIB_API attribute.  This change does the same with functions declared
in lz4hc.h file, thus extending the export to lz4hc.h.

As result, the following 17 deprecated functions are exported again:

LZ4_compressHC
LZ4_compressHC2
LZ4_compressHC2_continue
LZ4_compressHC2_limitedOutput
LZ4_compressHC2_limitedOutput_continue
LZ4_compressHC2_limitedOutput_withStateHC
LZ4_compressHC2_withStateHC
LZ4_compressHC_continue
LZ4_compressHC_limitedOutput
LZ4_compressHC_limitedOutput_continue
LZ4_compressHC_limitedOutput_withStateHC
LZ4_compressHC_withStateHC
LZ4_createHC
LZ4_freeHC
LZ4_resetStreamStateHC
LZ4_sizeofStreamStateHC
LZ4_slideInputBufferHC
2017-03-24 03:12:48 +00: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
aae447fffd LZ4_compress_HC_continue_destSize() works as intended up to level 10
It's incompatible with btopt though,
so cLevel >= 11 feature much reduced performance (degraded mode)
2017-03-16 15:41:30 -07:00
Yann Collet
cd35f0d98c LZ4_compress_HC_destSize() uses LZ4HC_compress_generic() code path
Limits compression level to 10,
to remain compatible with Hash Chain.
2017-03-16 15:10:38 -07:00
Yann Collet
430b7d32b3 created LZ4_HC_STATIC_LINKING_ONLY section
where are exposed new prototypes *_destSize()
2017-03-16 02:16:24 -07:00
remittor
f007153e3f lz4hc: Add LZ4_compressHC_destSize and LZ4_compress_HC_continue_destSize 2017-03-08 11:11:15 +03:00
Przemyslaw Skibinski
312d88249f removed nextToUpdateBT 2016-12-28 15:38:59 +01:00
Yann Collet
52cac9a973 updated a few macros names 2016-12-22 11:41:05 +01:00
Przemyslaw Skibinski
4f050b68d8 tree update dependent from compression level 2016-12-09 18:17:46 +01:00
Przemyslaw Skibinski
838ed341f9 fullUpdate as a parameter 2016-12-09 17:16:35 +01:00
Przemyslaw Skibinski
fb6c98c856 slightly improved lz4opt.h 2016-12-08 15:50:45 +01:00
Przemyslaw Skibinski
8c2f23c130 fixed LZ4_STREAMHCSIZE 2016-12-07 16:24:35 +01:00
Przemyslaw Skibinski
76228f064a LZ4HC_DICTIONARY_LOGSIZE 17 2016-12-07 16:19:10 +01:00
Przemyslaw Skibinski
8bfa42e61e improved ratio 2016-12-07 15:49:45 +01:00
Przemyslaw Skibinski
1289038240 15-bit LZ4HC_HASH_LOG 2016-12-07 14:31:46 +01:00
Przemyslaw Skibinski
e3fee94742 LZ4HC_MAX_CLEVEL = 12 2016-12-07 12:16:33 +01:00
Przemyslaw Skibinski
2113ead176 17-bit LZ4HC_MAXD 2016-12-06 19:11:53 +01:00
Przemyslaw Skibinski
c1ef7a177f introduced LZ4HC_compress_hashChain 2016-12-06 15:21:28 +01:00
Yann Collet
fa158b4118 fixed nameless union warnings 2016-11-14 10:02:01 -08:00
Yann Collet
94542d8458 made lz4hc explicitly dependent on lz4 2016-11-12 15:50:29 -08:00
Yann Collet
bb97e8a6fd fixed __GNUC__ macro 2016-11-12 13:30:02 -08:00
Yann Collet
3580d96980 enabled deprecation warnings on remaining obsolete functions 2016-11-12 08:48:42 -08:00
Yann Collet
874f3e095b update code comments 2016-11-12 07:29:54 -08:00
Nick Terrell
85aeb0e4bb Expose internal types to remove strict aliasing 2016-11-11 13:00:02 -08:00
Przemyslaw Skibinski
7df658ec1b removed LZ4_DLL_EXPORT=1 (2) 2016-11-09 12:52:27 +01:00
Przemyslaw Skibinski
84cedb4632 updated links to LZ4 repository 2016-11-03 15:12:57 +01:00
Kouhei Sutou
59771f41cd Use different prefix for each file to avoid conflict 2016-09-23 10:38:44 +09:00
Kouhei Sutou
012c66536c Add LZ4LIB_API
It's based on Zstandard's ZSTDLIB_API.

See also: https://github.com/Cyan4973/lz4/issues/216#issuecomment-226245432

Deprecated functions aren't LZ4LIB_API targets. Because we don't need to
export deprecated functions from now.

There are same LZ4LIB_API definitions in each header files instead of
including a common header file because LZ4_DEPRECATED is defined so.
2016-09-23 00:39:45 +09:00
inikep
2cf32ef0f1 -b# and -e# options from zstd 2016-09-02 22:59:18 +02:00
Yann Collet
5540f4f93e stronger compilation flags 2016-06-29 20:25:10 +02:00
Yann Collet
19e585cc46 modified : some more deprecated functions from lz4hc.h generate warnings 2016-06-29 18:18:34 +02:00
Yann Collet
1c3e633c48 Added compilation flag -Wcast-qual 2015-05-06 01:58:24 +01:00
Yann Collet
e05088d0eb Updated lz4hc API 2015-05-03 20:57:21 +01:00
Takayuki MATSUOKA
3d46d4b144 Fix LZ4_DEPRECATED() in lz4hc.h 2015-04-15 14:19:17 +09:00
Takayuki MATSUOKA
d7298d2059 Replace GCC_VERSION with LZ4_GCC_VERSION 2015-04-15 06:39:04 +09:00
Takayuki MATSUOKA
ad86910b1b Add LZ4 prefix to deprecation macros
Replace the following macros:

 - "_DEPRECATE_WARNING_DEFBLOCK" to "LZ4_DEPRECATE_WARNING_DEFBLOCK"
 - "DEPRECATED" to "LZ4_DEPRECATED"
2015-04-12 17:28:53 +09:00
Yann Collet
9443f3d924 Extended obsolete warning messages to lz4hc 2015-04-11 19:12:03 +01:00
Yann Collet
be9d248851 Update lz4hc API : LZ4_compressHC_safe() 2015-04-11 12:28:09 +01:00
Yann Collet
a357f434f0 Fixed cast-align warnings on 32-bits 2015-03-25 18:06:40 +01:00