Yann Collet
93cf628a08
introduce LZ4_decoderRingBufferSize()
...
fuzzer : fix and robustify ring buffer tests
2018-05-02 13:01:04 -07:00
Yann Collet
1a191b3f8d
simplify shortcut
2018-05-02 10:33:12 -07:00
Yann Collet
0114b63b40
Merge branch 'dev' into complexShortcut
2018-05-02 10:08:30 -07:00
Yann Collet
bd470ccd38
Merge pull request #521 from lz4/BD_deterministic
...
fix lz4hc -BD non-determinism
2018-04-30 20:40:34 -07:00
Cyan4973
6a7d501fed
renamed variable for clarity
...
lowLimit -> lowestMatchIndex
2018-04-30 18:56:16 -07:00
Yann Collet
8c574990a9
lz4hc changed variable
...
to reduce confusion
dictLowLimit => dictStart
2018-04-30 16:08:16 -07:00
Yann Collet
4c696613a0
clarified streaming decompression function
...
restrictions for ring buffer
2018-04-30 15:55:33 -07:00
Yann Collet
90374271c2
Merge pull request #527 from svpv/fastDec
...
lz4.c: two-stage shortcut for LZ4_decompress_generic
2018-04-30 15:32:37 -07:00
Yann Collet
c32e0319a5
Merge pull request #523 from svpv/makeV1
...
lib/Makefile: show commands with V=1
2018-04-29 08:56:44 -07:00
Yann Collet
41ad238bf9
Merge pull request #515 from svpv/refactorDec
...
lz4.c: refactor the decoding routines
2018-04-29 07:41:35 -07:00
Alexey Tourbin
45f8603aae
lz4.c: two-stage shortcut for LZ4_decompress_generic
2018-04-28 11:16:57 +03:00
Alexey Tourbin
69242a8a08
lib/Makefile: show commands with V=1
...
`make V=1` will now show the commands executed to build the library.
A similar technique is used in e.g. linux/Makefile.
The bulk of this change is produced with the following vim command:
:g!/^\t@echo\>/s/^\t@/\t\$(Q)/
2018-04-28 07:22:26 +03:00
Yann Collet
1e6ca25af3
Merge pull request #520 from felixhandte/frame-dict-nits
...
Minor Fixes to Dictionary Preparation in LZ4 Frame
2018-04-27 13:52:30 -07:00
Yann Collet
de7b274d99
Merge branch 'dev' into BD_deterministic
2018-04-27 12:59:20 -07:00
Yann Collet
19b1267d44
fix lz4hc -BD non-determinism
...
related to chain table update
2018-04-27 12:46:49 -07:00
Yann Collet
72e99c8939
lz4hc : minor editions for clarity
2018-04-27 12:28:58 -07:00
Yann Collet
47d70e755e
Merge pull request #519 from lz4/fdParser
...
Faster decoding speed
2018-04-27 11:46:29 -07:00
W. Felix Handte
fefc40fc0a
Avoid Possibly Redundant Table Clears When Loading HC Dict
2018-04-27 14:10:27 -04:00
W. Felix Handte
5076aa3e35
Remove Redundant LZ4_resetStream() Call
2018-04-27 13:59:02 -04:00
W. Felix Handte
7d11e34413
Rename LZ4F_applyCDict() -> LZ4F_initStream()
2018-04-27 13:57:10 -04:00
Yann Collet
d294dd7fc6
ensure favorDecSpeed is properly initialized
...
also :
- fix a potential malloc error
- proper use of ALLOC macro inside lz4hc
- update html API doc
2018-04-27 09:04:09 -07:00
Alexey Tourbin
d81a434c3d
lz4.c: fixed the LZ4_decompress_fast_continue case
...
The change is very similar to that of the LZ4_decompress_safe_continue
case. The only reason a make this a separate change is to ensure that
the fuzzer, after it's been enhanced, can detect the flaw in
LZ4_decompress_fast_continue, and that the change indeed fixes the flaw.
2018-04-27 15:10:12 +03:00
Yann Collet
0fb3a3b199
fixed a number of minor cast warnings
2018-04-26 18:08:28 -07:00
Yann Collet
00909b27b1
Merge pull request #518 from felixhandte/fix-517-dict-size-truncation
...
Limit Dictionary Size During LZ4F Decompression
2018-04-26 16:47:50 -07:00
Yann Collet
5c7d3812d9
fasterDecSpeed can be triggered from cli with --favor-decSpeed
2018-04-26 15:49:32 -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
0858362f28
Merge _destSize Compress Variant into LZ4_compress_generic()
2018-04-26 18:01:08 -04:00
W. Felix Handte
a2edeac201
Limit Dictionary Size During LZ4F Decompression
...
Fixes lz4/lz4#517 .
2018-04-26 17:18:40 -04:00
Yann Collet
1148173c5d
introduced ability to parse for decompression speed
...
triggered through an enum.
Now, it's still necessary to properly expose this capability
all the way up to the cli.
2018-04-26 13:01:59 -07:00
Alexey Tourbin
5603d30f81
lz4.c: fixed the LZ4_decompress_safe_continue case
...
The previous change broke decoding with a ring buffer. That's because
I didn't realize that the "double dictionary mode" was possible, i.e.
that the decoding routine can look both at the first part of the
dictionary passed as prefix and the second part passed via dictStart+dictSize.
So this change introduces the LZ4_decompress_safe_doubleDict helper,
which handles this "double dictionary" situation. (This is a bit of
a misnomer, there is only one dictionary, but I can't think of a better
name, and perhaps the designation is not all too bad.) The helper is
used only once, in LZ4_decompress_safe_continue, it should be inlined
with LZ4_FORCE_O2_GCC_PPC64LE attached to LZ4_decompress_safe_continue.
(Also, in the helper functions, I change the dictStart parameter type
to "const void*", to avoid a cast when calling helpers. In the helpers,
the upcast to "BYTE*" is still required, for compatibility with C++.)
So this fixes the case of LZ4_decompress_safe_continue, and I'm
surprised by the fact that the fuzzer is now happy and does not detect
a similar problem with LZ4_decompress_fast_continue. So before fixing
LZ4_decompress_fast_continue, the next logical step is to enhance
the fuzzer.
2018-04-26 08:23:54 +03:00
Alexey Tourbin
b4eda8d08f
lz4.c: refactor the decoding routines
...
I noticed that LZ4_decompress_generic is sometimes instantiated with
identical set of parameters, or (what's worse) with a subtly different
sets of parameters. For example, LZ4_decompress_fast_withPrefix64k is
instantiated as follows:
return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize,
full, 0, withPrefix64k, (BYTE*)dest - 64 KB, NULL, 64 KB);
while the equivalent withPrefix64k call in LZ4_decompress_usingDict_generic
passes 0 for the last argument instead of 64 KB. It turns out that there
is no difference in this case: if you change 64 KB to 0 KB in
LZ4_decompress_fast_withPrefix64k, you get the same binary code.
Moreover, because it's been clarified that LZ4_decompress_fast doesn't
check match offsets, it is now obvious that both of these fast/withPrefix64k
instantiations are simply redundant. Exactly because LZ4_decompress_fast
doesn't check offsets, it serves well with any prefixed dictionary.
There's a difference, though, with LZ4_decompress_safe_withPrefix64k.
It also passes 64 KB as the last argument, and if you change that to 0,
as in LZ4_decompress_usingDict_generic, you get a completely different
binary code. It seems that passing 0 enables offset checking:
const int checkOffset = ((safeDecode) && (dictSize < (int)(64 KB)));
However, the resulting code seems to run a bit faster. How come
enabling extra checks can make the code run faster? Curiouser and
curiouser! This needs extra study. Currently I take the view that
the dictSize should be set to non-zero when nothing else will do,
i.e. when passing the external dictionary via dictStart. Otherwise,
lowPrefix betrays just enough information about the dictionary.
* * *
Anyway, with this change, I instantiate all the necessary cases as
functions with distinctive names, which also take fewer arguments and
are therefore less error-prone. I also make the functions non-inline.
(The compiler won't inline the functions because they are used more than
once. Hence I attach LZ4_FORCE_O2_GCC_PPC64LE to the instances while
removing from the callers.) The number of instances is now is reduced
from 18 (safe+fast+partial+4*continue+4*prefix+4*dict+2*prefix64+forceExtDict)
down to 7 (safe+fast+partial+2*prefix+2*dict). The size of the code is
not the only issue here. Separate helper function are much more
amenable to profile-guided optimization: it is enough to profile only
a few basic functions, while the other less-often used functions, such
as LZ4_decompress_*_continue, will benefit automatically.
This is the list of LZ4_decompress* functions in liblz4.so, sorted by size.
Exported functions are marked with a capital T.
$ nm -S lib/liblz4.so |grep -wi T |grep LZ4_decompress |sort -k2
0000000000016260 0000000000000005 T LZ4_decompress_fast_withPrefix64k
0000000000016dc0 0000000000000025 T LZ4_decompress_fast_usingDict
0000000000016d80 0000000000000040 T LZ4_decompress_safe_usingDict
0000000000016d10 000000000000006b T LZ4_decompress_fast_continue
0000000000016c70 000000000000009f T LZ4_decompress_safe_continue
00000000000156c0 000000000000059c T LZ4_decompress_fast
0000000000014a90 00000000000005fa T LZ4_decompress_safe
0000000000015c60 00000000000005fa T LZ4_decompress_safe_withPrefix64k
0000000000002280 00000000000005fa t LZ4_decompress_safe_withSmallPrefix
0000000000015090 000000000000062f T LZ4_decompress_safe_partial
0000000000002880 00000000000008ea t LZ4_decompress_fast_extDict
0000000000016270 0000000000000993 t LZ4_decompress_safe_forceExtDict
2018-04-25 13:18:06 +03:00
W. Felix Handte
2dfc7cbe82
Change Over Includes in the Project
2018-04-24 16:22:28 -04:00
W. Felix Handte
2be3905fa4
Integrate lz4frame_static.h Declarations into lz4frame.h
2018-04-24 16:22:28 -04:00
Yann Collet
b2637ab7b2
Merge pull request #512 from lz4/HC_dict
...
In-place unmutable dictionaries for LZ4HC
2018-04-24 13:18:40 -07:00
Yann Collet
8c6ca6283d
Merge pull request #511 from lz4/decFast
...
Fixed performance issue with LZ4_decompress_fast()
2018-04-24 11:25:57 -07:00
W. Felix Handte
5ed1463bf4
Remove Debug Log Statements
2018-04-24 11:58:51 -04:00
W. Felix Handte
13271a88d7
Revert Stream Size Const to Correct Value
2018-04-24 11:55:53 -04:00
Yann Collet
092cb77597
Merge pull request #504 from baruchsiach/static-only-support
...
lib: allow to disable shared libraries
2018-04-23 23:44:04 -07:00
Cyan4973
44bff3fd3b
re-ordered parenthesis
...
to avoid mixing && and &
as suggested by @terrelln
2018-04-23 19:26:02 -07:00
Yann Collet
0c2ae72ba8
Merge pull request #507 from lz4/clangPerf
...
fixed lz4_fast clang performance
2018-04-23 15:55:56 -07:00
Cyan4973
cd0663456f
disable shortcut for LZ4_decompress_fast()
...
improving speed
2018-04-23 15:47:08 -07:00
Cyan4973
bd06fde104
fullbench compiled without assert()
...
to better reflect release speed
2018-04-23 15:42:27 -07:00
Nick Terrell
672799e814
Fix compilation error and assert.
2018-04-23 14:21:02 -07:00
Nick Terrell
bb83cad98f
Fix input size validation edge cases
...
The bug is a read up to 2 bytes past the end of the buffer.
There are three cases for this bug, one for each test case added.
* An empty input causes `token = *ip++` to read one byte too far.
* A one byte input with `(token >> ML_BITS) == RUN_MASK` causes
one extra byte to be read without validation. This could be
combined with the first bug to cause 2 extra bytes to be read.
* The case pointed out in issue #508 , where `ip == iend` at the
beginning of the loop after taking the shortcut.
Benchmarks show no regressions on clang or gcc-7 on both my mac
and devserver.
Fixes #508 .
2018-04-23 13:34:18 -07:00
Alexey Tourbin
ab06ef97bb
lz4.h: clarify the risks of using LZ4_decompress_fast()
...
The notes about "security guarantee" and "malicious inputs" seemed
a bit non-technical to me, so I took the liberty to tone them down
and instead describe the actual risks in technical terms. Namely,
the function never writes past the end of the output buffer, so
a direct hostile takeover (resulting in arbitrary code execution
soon after the return from the function) is not possible. However,
the application can crash because of reads from unmapped pages.
I also took the liberty to describe what I believe is the only sensible
usage scenario for the function: "This function is only usable if the
originalSize of uncompressed data is known in advance," etc.
2018-04-23 02:13:49 +03:00
Cyan4973
d1f21883d6
fixed incorrect comment
2018-04-21 00:11:51 -07:00
Yann Collet
a8a5dfd426
fixed clang performance in lz4_fast
...
The simple change from
`matchIndex+MAX_DISTANCE < current`
towards
`current - matchIndex > MAX_DISTANCE`
is enough to generate a 10% performance drop under clang.
Quite massive.
(I missed as my eyes were concentrated on gcc performance at that time).
The second version is more robust, because it also survives a situation where
`matchIndex > current`
due to overflows.
The first version requires matchIndex to not overflow.
Hence were added `assert()` conditions.
The only case where this can happen is with dictCtx compression,
in the case where the dictionary context is not initialized before loading the dictionary.
So it's enough to always initialize the context while loading the dictionary.
2018-04-20 18:09:51 -07:00
W. Felix Handte
ee67f25576
Change vLimit Calculation
2018-04-20 20:18:30 -04:00
W. Felix Handte
1895fa19a4
Remove Redundant Static Assert
2018-04-20 20:14:12 -04:00
W. Felix Handte
fcc99d1f31
Simpler loadDict() Reset
2018-04-20 19:37:28 -04:00
W. Felix Handte
a8cb2feffd
Tolerate Base Pointer Underflow
2018-04-20 19:37:07 -04:00
W. Felix Handte
85cac61dd8
Don't Segfault on Malloc Failure
2018-04-20 19:35:51 -04:00
W. Felix Handte
756ed402da
Sign-Extend -1 to Pointer Width
2018-04-20 17:56:26 -04:00
W. Felix Handte
86b381e40b
Fix Constant Value
2018-04-20 17:13:40 -04:00
W. Felix Handte
1d2500d44e
Handle Index Underflows Safely
2018-04-20 17:13:03 -04:00
W. Felix Handte
7874cf06b3
Consts and Asserts and Other Minor Nits
2018-04-20 15:30:08 -04:00
W. Felix Handte
3f087cf1cb
Add Comments on New Public APIs
2018-04-20 15:00:53 -04:00
W. Felix Handte
d7347f9eea
Add API for Attaching Dictionaries
2018-04-20 14:59:34 -04:00
W. Felix Handte
ca833f928f
Also Reset the Chain Table
2018-04-20 14:16:27 -04:00
W. Felix Handte
8f118cf6e9
Remove inputBuffer from Context, Work Around its Absence
2018-04-20 14:08:06 -04:00
W. Felix Handte
0064e8ebc7
Remove Commented Out Support for Match Continuation over Segment Boundary
2018-04-20 13:14:37 -04:00
W. Felix Handte
14c577d4c9
Fix Signedness of Comparison
2018-04-19 20:54:35 -04:00
W. Felix Handte
f4b13e17ea
Don't Clear the Dictionary Context Until No Longer Useful
2018-04-19 20:54:35 -04:00
W. Felix Handte
0abc23f72e
Copy DictCtx into Working Context on Inputs Larger than 4 KB
2018-04-19 20:54:35 -04:00
W. Felix Handte
b67de2a327
Force Inline on HashChain
2018-04-19 20:54:35 -04:00
W. Felix Handte
22e16d5b50
Split DictCtx-using Code Into Separate Inlining Chain
2018-04-19 20:54:35 -04:00
W. Felix Handte
0a2abacd90
Use Fast Reset in LZ4F Again
2018-04-19 20:54:35 -04:00
W. Felix Handte
61c7ceffed
Use Fast Reset API in LZ4F
2018-04-19 20:54:35 -04:00
W. Felix Handte
3591fe8ab8
Add Fast Reset Paths
2018-04-19 20:54:35 -04:00
W. Felix Handte
8db291bc1d
Remove Match Upper Bounds Check
2018-04-19 20:54:35 -04:00
W. Felix Handte
8f9a2db0e1
Fix Some Cast/Conversion Warnings
2018-04-19 20:54:35 -04:00
W. Felix Handte
221211d7d0
Fix Offset Math
2018-04-19 20:54:35 -04:00
W. Felix Handte
a1beba13f7
Reset Stream in LZ4_compress_HC
2018-04-19 20:54:35 -04:00
W. Felix Handte
bdd7af6f71
Don't Bother Clearing Chain Table for Working Contexts
2018-04-19 20:54:35 -04:00
W. Felix Handte
895e76cc20
Push Previous Compression Offsets into the Past
2018-04-19 20:54:35 -04:00
W. Felix Handte
22db704a73
Shift Dict Limit Checks out of the Loop
2018-04-19 20:54:35 -04:00
W. Felix Handte
4f7b7a8ffa
Clear Tables on Dict Load
2018-04-19 20:54:35 -04:00
W. Felix Handte
b88a0b4e88
Only Perform Dict Lookup if Attempts Remain
2018-04-19 20:54:35 -04:00
W. Felix Handte
b6c35ed642
Avoid Resetting Chain Table
2018-04-19 20:54:35 -04:00
W. Felix Handte
595ea58289
Avoid Resetting Hash Table
2018-04-19 20:54:35 -04:00
W. Felix Handte
66d217e240
Perform Lookups into the Dictionary Context
2018-04-19 20:54:35 -04:00
W. Felix Handte
6289ff4fb1
Call LZ4F_applyCDict Even on NULL CDict
2018-04-19 20:54:35 -04:00
W. Felix Handte
fdeead0b09
Set dictCtx Rather than memcpy'ing Ctx
2018-04-19 20:54:35 -04:00
W. Felix Handte
a992d11fc2
Fully Bounds Check Hash Table Reads
2018-04-19 20:54:35 -04:00
W. Felix Handte
f895b9a6c6
Add a Dictionary Context Pointer to the HC Context
2018-04-19 20:54:35 -04:00
W. Felix Handte
e75153f508
Add Debug Log Statements to HC
2018-04-19 20:54:35 -04:00
Yann Collet
62d7cdcc74
Merge pull request #503 from lz4/l120
...
minor length reduction of several large lines
2018-04-19 11:50:20 -07:00
Yann Collet
dede47f13b
Merge pull request #502 from lhacc1/dev
...
Wrap likely/unlikely macroses with #ifndef
2018-04-19 10:52:48 -07:00
Yann Collet
46058d71aa
modified indentation for consistency
2018-04-19 10:50:40 -07:00
Baruch Siach
95bde2a4ae
lib: allow to disable shared libraries
...
Just like BUILD_STATIC=no disables static libraries, BUILD_SHARED=no
disabled shared libraries. This is useful to support toolchains that do
not support shared libraries.
2018-04-19 12:28:11 +03:00
Yann Collet
4785bd6a35
minor length reduction of several large lines
2018-04-18 16:49:27 -07:00
Dmitrii Rodionov
ea6ed46fc2
Wrap likely/unlikely macroses with #ifndef
...
It prevent redefine error when project using lz4 has its own likely/unlikely
macroses.
2018-04-18 12:20:56 +03:00
Yann Collet
5ad4599c5a
fixed LZ4_compress_fast_extState_fastReset() in 32-bit mode
2018-04-17 16:47:56 -07:00
Yann Collet
88cca1723e
fix dictDelta setting error
...
wrong test
2018-04-17 16:18:37 -07:00
Yann Collet
1520642183
fix matchIndex overflow
...
can happen with dictCtx
2018-04-17 15:29:17 -07:00
Yann Collet
ce78d10c1f
Merge branch 'dev' into lowAddr
2018-04-17 12:07:22 -07:00
W. Felix Handte
aedc447804
Always Bump Offset by 64 KB in LZ4_loadDict()
...
This actually ensures the guarantee referred to in the comment in
LZ4_compress_fast_continue().
2018-04-17 14:09:00 -04:00
Yann Collet
da3b5ba6f0
fixed dictCtx compression
2018-04-16 23:59:42 -07:00
Yann Collet
444211d259
edited a few traces for debugging
2018-04-16 17:16:08 -07:00
Yann Collet
a3aeb34184
fixed minor format warnings
2018-04-16 16:54:03 -07:00
Yann Collet
e928064797
fixed gcc performance regression
2018-04-16 15:11:28 -07:00
Yann Collet
d2bcfa31f5
fixed minor unused variable warning
2018-04-13 02:45:32 -07:00
Yann Collet
c40bac31d3
added comment on variables required after _next_match
2018-04-13 02:26:14 -07:00
Yann Collet
54ec83ce1f
fixed potential ptrdiff_t overflow (32-bits mode)
...
Also removed pointer comparison, which should solve #485
2018-04-13 02:10:53 -07:00
Cyan4973
57afa36795
compatibility with gcc-4.4 string.h version
...
Someone found it would be a great idea to define there a global variable under the very generic name "index".
Cause problem with shadow warnings, so no variable can be named "index" now ...
Also : automatically update API manual
2018-04-13 01:01:54 -07:00
test4973
db9aa785c5
fixed : counting matches which overlap extDict and prefix
2018-04-12 16:12:21 -07:00
test4973
8af32ce6f7
modified a few traces for debug
2018-04-12 13:35:19 -07:00
test4973
1838803948
fixed LZ4_compress_fast_extState_fastReset()
2018-04-11 16:49:40 -07:00
test4973
b183066793
Merge branch 'dev' into lowAddr
2018-04-11 16:45:19 -07:00
W. Felix Handte
056ea63215
Fix Silly Warning (const-ness in declaration has no effect on value types!)
2018-04-11 18:42:09 -04:00
W. Felix Handte
51a56c47c0
Minor Fixes
2018-04-11 18:06:48 -04:00
W. Felix Handte
3a0c571272
Add a LZ4_STATIC_LINKING_ONLY Macro to Guard Experimental APIs
2018-04-11 18:06:10 -04:00
W. Felix Handte
afa52c9b95
Expose dictCtx Functionality in LZ4
2018-04-11 16:28:56 -04:00
W. Felix Handte
21f0c9700b
Rename _extState_noReset -> _extState_fastReset and Edit Comments
2018-04-11 15:13:01 -04:00
W. Felix Handte
c18bff933b
Remove Extraneous Assignment (clearedTable == 0)
2018-04-11 15:12:34 -04:00
W. Felix Handte
59c7d95121
Expose a Faster Stream Reset Function
2018-04-10 13:26:17 -04:00
test4973
cf2f06a6c5
fixed minor conversion warning
...
ptr diff -> U32
2018-04-09 17:08:17 -07:00
test4973
b28abb9f18
Merge branch 'dev' into lowAddr
2018-04-09 16:23:39 -07:00
W. Felix Handte
f88dc90055
Avoid Calling LZ4_prepareTable() in LZ4_compress_fast_continue()
2018-04-09 16:17:33 -04:00
W. Felix Handte
5622c276e1
Return to Allowing Early Returns in LZ4_compress_generic()
...
Or: `goto` Considered Harmful
Or: https://xkcd.com/292/
2018-04-06 19:28:08 -04:00
test4973
f9992fa37f
noticed a bug when re-using hash table
...
./fuzzer -vv -s4217 -t7518
2018-04-05 19:09:24 -07:00
test4973
f4e06e28e6
fixed byPtr mode
...
switch to byU32 when src address is < 64K
note : byPtr is still useful in 32-bits, as it's about ~10% faster
2018-04-05 18:29:42 -07:00
test4973
b4be1e0a74
fixed byPtr match search
2018-04-05 17:52:54 -07:00
test4973
f2a4d6ef37
fixed immediate match search
2018-04-05 17:16:33 -07:00
test4973
64a3e41aca
changed LZ4_compress_generic() logic
...
to use indexes (U32) instead of Ptr.
byPtr is still present.
2018-04-05 16:43:46 -07:00
test4973
6d931b6a93
fixed lz4 compression starting at small address
...
when using byU32 and byU16 modes
2018-04-05 12:40:33 -07:00
test4973
43132af808
Merge branch 'dev' into lowAddr
2018-04-04 11:38:55 -07:00
Yann Collet
8c763aa900
Merge pull request #487 from felixhandte/better-obsoletion-comment
...
Better Describe Functionality of Obsolete Streaming Functions
2018-03-21 14:52:53 -07:00
W. Felix Handte
126f18d3e0
Also Fix a Comment
2018-03-21 11:48:35 -04:00
W. Felix Handte
a3a9b80dff
Better Describe Functionality of Obsolete Streaming Functions
2018-03-21 11:39:41 -04:00
Yann Collet
863e24892d
fix comment style
2018-03-21 07:07:24 -07:00
W. Felix Handte
b0a18896fe
Move LZ4_compress_fast_extState_noReset Declaration to Unstable Section
2018-03-14 15:59:33 -04:00
W. Felix Handte
66b6fbfe6f
Restore the Other Old Streaming Functions in a Degraded Fashion
2018-03-14 15:53:10 -04:00
W. Felix Handte
c852f20c39
Switch ALLOC() to ALLOC_AND_ZERO() to Paper Over Existing Uninitialized Read
2018-03-13 17:47:34 -04:00
W. Felix Handte
995756f218
Split lz4CtxLevel into Two Fields
2018-03-13 17:45:09 -04:00
W. Felix Handte
640db34e43
Another Allocation Fail Check
2018-03-13 17:35:44 -04:00
W. Felix Handte
146e676531
Restore LZ4_sizeofStreamState, We Didn't Actually Need to Delete It
2018-03-13 15:42:03 -04:00
W. Felix Handte
2be38a7429
Rename Enums and Add Comment
2018-03-13 15:16:52 -04:00
W. Felix Handte
b8e9c77855
Whitespace Fixes
2018-03-13 13:20:37 -04:00
W. Felix Handte
5149767a1b
Add NULL Checks
2018-03-12 18:35:09 -04:00
W. Felix Handte
299f34909a
Simpler Ternary Statements
2018-03-12 18:35:09 -04:00
W. Felix Handte
f9fef255a1
Renames and Comment Fixes
2018-03-12 18:34:41 -04:00
W. Felix Handte
1df5d911aa
Hoist LZ4F Dictionary Setup into Helper LZ4F_applyCDict()
2018-03-12 16:11:55 -04:00
W. Felix Handte
3ecc1d7a5b
Minor Style Fixes
2018-03-12 16:11:44 -04:00
W. Felix Handte
e34716cc3f
Preserve currentOffset==0 When Possible
2018-03-12 14:59:28 -04:00
W. Felix Handte
5f8967b983
Specialize _extState() for Clean Ctx Rather Than Calling _safeExtState()
2018-03-12 14:58:43 -04:00
W. Felix Handte
6716325ae8
Remove Switch In Favor of Ternary Statement
2018-03-12 14:58:43 -04:00
W. Felix Handte
b4335a6585
Further Avoid a dictionary==NULL Check
2018-03-12 14:58:43 -04:00
W. Felix Handte
64bcbf400e
Optimize Dict Check Condition
2018-03-12 14:58:43 -04:00
W. Felix Handte
b78cf67c96
Move to 4KB Cut-Off
2018-03-12 14:58:43 -04:00
W. Felix Handte
00eadadbfc
Reset Table on Inputs Larger than 2KB
2018-03-12 14:58:43 -04:00
W. Felix Handte
d571d0cdba
Avoid DictSmall Checks By Strategically Bumping CurrentOffset
2018-03-12 14:58:43 -04:00
W. Felix Handte
1c4601d643
Restore DictIssue Check
2018-03-12 14:58:43 -04:00
W. Felix Handte
d6ed9a7799
Avoid dictionary == NULL Check
2018-03-12 14:58:43 -04:00
W. Felix Handte
efc419a6d4
Replace calloc() Calls With malloc() Where Possible
2018-03-12 14:58:43 -04:00
W. Felix Handte
80790c587b
Copy the Dict Table Into the Context for Large Compressions
2018-03-12 14:58:43 -04:00
W. Felix Handte
9dcd9abc14
Make LZ4F_compressFrame_usingCDict Take a Compression Context
2018-03-12 14:58:43 -04:00
W. Felix Handte
14ce912b70
Switch Current Offset to 1 Only When in External Dictionary Context Mode
2018-03-12 14:58:43 -04:00
W. Felix Handte
cea09d67a9
Hoist Table Reset One Level Up
2018-03-12 14:58:43 -04:00
W. Felix Handte
68c6bd17b8
Set Dictionary Context Pointer Rather than Copying the Context In
2018-03-12 14:58:43 -04:00
W. Felix Handte
73cc39327e
Lookup Matches in Separate Dictionary Context
2018-03-12 14:58:43 -04:00
W. Felix Handte
62cb52b341
Initialize Current Offset to 1
2018-03-12 14:58:43 -04:00
W. Felix Handte
7060bcabf0
Only Re-Alloc / Reset When Needed When Switching Between Regular and High Compression Modes
2018-03-12 14:58:43 -04:00
W. Felix Handte
b3628cb0c5
Avoid Resetting the Context When Possible
2018-03-12 14:58:43 -04:00
W. Felix Handte
aa36e118f1
Const-ify Table Arg to LZ4_getPosition(OnHash)
2018-03-12 14:58:43 -04:00
W. Felix Handte
d6a3024dbb
Add LZ4_compress_fast_safeExtState Function
2018-03-12 14:58:43 -04:00
W. Felix Handte
5709891de6
Add a Table Type Field to LZ4_stream_t
2018-03-12 14:58:43 -04:00
W. Felix Handte
6933f5ad9c
Remove Obsolete Stream Functions to Free Space in LZ4_stream_t
2018-03-12 14:58:43 -04:00
W. Felix Handte
6d156fea56
Allow Empty Dictionaries
2018-03-12 14:58:43 -04: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
860ff77909
Merge pull request #478 from lz4/mergeOpt
...
merge lz4opt.h into lz4hc.c
2018-02-26 14:06:31 -08:00
Yann Collet
39fda9a447
bumped version number to v1.8.2
...
updated NEWS was current progresses
2018-02-26 13:50:04 -08:00
Yann Collet
ba115386fa
update code comment on LZ4 streaming interface
...
notably regarding LZ4_saveDict() speed advantage,
answering #477 .
2018-02-26 13:31:18 -08:00
Yann Collet
550b40849f
merge lz4opt.h into lz4hc.c
...
Having a dedicated file for optimal parser
made sense during its creation,
it allowed Przemyslaw to work more freely on lz4opt, with less dependency on lz4hc,
moreover, the optimal parser was more complex, with its own search functions.
Since the optimal was rewritten last year, it's now a lot lighter.
It makes more sense now to integrate it directly inside lz4hc.c,
making it easier to edit (editors are a bit "lost" inside a `*.h` dependent on its #include position),
it also reduces the number of files in the project,
which fits pretty well with lz4 objectives.
(adding lz4hc requires "just" lz4hc.h and lz4hc.c).
2018-02-25 00:32:09 -08:00
Yann Collet
7173a631db
edge case : compress up to end-mflimit (12 bytes)
...
The LZ4 block format specification
states that the last match must start
at a minimum distance of 12 bytes from the end of the block.
However, out of an abundance of caution,
the reference implementation would actually stop searching matches
at 13 bytes from the end of the block.
This patch fixes this small detail.
The new version is now able to properly compress a limit case
such as `aaaaaaaabaaa\n`
as reported by Gao Xiang (@hsiangkao).
Obviously, it doesn't change a lot of things.
This is just one additional match candidate per block, with a maximum match length of 7 (since last 5 bytes must remain literals).
With default policy, blocks are 4 MB long, so it doesn't happen too often
Compressing silesia.tar at default level 1 saves 5 bytes (100930101 -> 100930096).
At max level 12, it saves a grand 16 bytes (77389871 -> 77389855).
The impact is a bit more visible when blocks are smaller, hence more numerous.
For example, compressing silesia with blocks of 64 KB (using -12 -B4D) saves 543 bytes (77304583 -> 77304040).
So the smaller the packet size, the more visible the impact.
And it happens we have a ton of scenarios with little blocks using LZ4 compression ...
And a useless "hooray" sidenote :
the patch improves the LZ4 compression record of silesia (using -12 -B7D --no-frame-crc) by 16 bytes (77270672 -> 77270656)
and the record on enwik9 by 44 bytes (371680396 -> 371680352) (previously claimed by [smallz4](http://create.stephan-brumme.com/smallz4/ ) ).
2018-02-24 11:47:53 -08:00
Yann Collet
71e16fa11a
Merge pull request #471 from lz4/fasterHC
...
Faster HC
2018-02-20 21:04:07 -08:00
Yann Collet
25b16e8a2e
added one assert()
...
suggested by @terrelln
2018-02-20 15:25:45 -08:00
Yann Collet
d74f079748
update API doc regarding double-buffer strategy
...
answering question #473
2018-02-18 11:00:33 -08:00
Yann Collet
d3a13397d9
slight hc speed benefit (~+1%)
...
by optimizing countback
2018-02-12 00:01:58 -08:00
Yann Collet
219abab74b
removed LZ4_copy8
...
better use memcpy() directly
2018-02-11 22:20:09 -08:00
Yann Collet
2b674bf02f
slightly improved hc compression speed (+~1-2%)
...
by removing bad candidates faster.
2018-02-11 02:45:36 -08:00
Yann Collet
3ad3b0f850
slightly improved decompression speed (~+1-2%)
...
by making shortcut slightly more common
2018-02-11 01:43:20 -08:00
Ben Boeckel
c4671be550
intel: do not use __attribute__((packed)) on Windows
...
On Windows, the Intel compiler is closer to MSVC rather than GCC and
does not support the GCC attribute syntax.
Fixes #468
2018-02-08 09:15:27 -05:00
Yann Collet
ea25250c99
fixed code comment as detected in #466
...
Also clarified a few API code comments
and updated associated html documentation
2018-02-07 02:21:25 -08:00
Yann Collet
20e969e579
fuzzer: added low address compression test
...
is expected to work on linux+gcc only.
2018-02-05 15:19:00 -08:00
Nick Terrell
e832a3d87a
Clarify the requirements of the LZ4 streaming API
2018-02-01 16:08:59 -08:00
Yann Collet
5fd3ac7904
Merge branch 'dev' into frameCompress
2018-01-31 17:18:57 -08:00
Yann Collet
87fb7a1d03
refactored frameCompress example
...
to better reflect LZ4F API usage.
2018-01-31 14:33:16 -08:00
Asger Hautop Drewsen
c129f480e7
Always prefer c++14 attributes if available
2018-01-31 20:24:44 +01:00
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
Nick Terrell
30e92f320c
[lz4hc] level == 0 means default, not level 1
2018-01-22 12:50:06 -08:00
Po-Chuan Hsieh
75b81bbbf0
Change file format back to ASCII (from UTF-8)
...
- Replace U+00A0 by space
- Fix build failure of archivers/py-borgbackup in FreeBSD
Reference: https://bugs.FreeBSD.org/225235
2018-01-18 03:13:05 +08:00
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
Po-Chuan Hsieh
47bf1a9f01
Fix lz4 version
2018-01-14 06:38:03 +08:00
Yann Collet
c423dc21bd
updated LZ4F_decompress() documentation
2018-01-13 13:16:31 -08:00
Yann Collet
58199f1311
Merge pull request #443 from terrelln/440
...
[lz4f] Skip memcpy() on empty dictionary
2018-01-10 19:06:21 +01:00
W. Felix Handte
ebef34fe79
Add Option to Make lz4frame_static.h Functions Visible in Shared Objects
...
In some contexts, *cough*like at facebook*cough*, dynamic linking is used in
contexts which aren't truly dynamic. That is, the guarantee is maintained that
a program will only ever execute against the library version it was compiled
to interact with.
For those situations, introduce a compile-time flag that overrides hiding
these unstable APIs in shared objects.
2018-01-08 14:46:22 -05:00
Yann Collet
0b203b04f6
Merge pull request #434 from lz4/pattern
...
conditional pattern analysis
2018-01-06 06:58:41 +01:00
Nick Terrell
c2dd686e96
[lz4f] Skip memcpy() on empty dictionary
2018-01-05 14:30:49 -08:00
Yann Collet
7d2f30c7d1
lz4opt supports _destSize
...
no longer limited to level 9
2017-12-22 12:47:59 +01:00
Yann Collet
9753ac4c91
conditional pattern analysis
...
Pattern analysis (currently limited to long ranges of identical bytes)
is actually detrimental to performance
when `nbSearches` is low.
Reason is : `nbSearches` provides a built-in protection for these cases.
The problem with patterns is that they dramatically increase the number of candidates to visit.
But with a low nbSearches, the match finder just aborts early.
In such cases, pattern analysis adds some complexity without reducing total nb of candidates.
It actually increases compression ratio a little bit, by filtering only "good" candidates,
but at a measurable speed cost, so it's not a good trade-off.
This patch makes pattern analysis optional.
It's enabled for levels 8+ only.
2017-12-22 08:07:25 +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
6bbe45e1b8
remove register
keyword
...
deprecated in newer C++ versions,
and dubious utility
2017-12-04 17:10:23 -08:00
Yann Collet
da8bed4b01
API : changed a few variables' names for clarity
...
updated relevant doc.
This patch has no impact on ABI/API, nor on binary generation.
2017-11-20 10:27:05 -08:00
Yann Collet
dac26084a9
Merge pull request #416 from lz4/newopt
...
Improve Optimal parser
2017-11-09 14:13:30 -08:00
Yann Collet
dc3ed5b6a7
added code comments
2017-11-08 17:56:20 -08:00
Yann Collet
63f6039fb3
added constant TRAILING_LITERALS
...
which is more explicit than its value `3`.
reported by @terrelln
2017-11-08 17:47:24 -08:00
Yann Collet
f93b595718
lz4opt: simplified match finder invocation to LZ4HC_FindLongerMatch()
2017-11-08 17:11:51 -08:00
Yann Collet
fa03a9d3d9
added code comments
2017-11-08 08:42:59 -08:00
Yann Collet
b07d36245a
fixed LZ4HC_reverseCountPattern()
...
for multi-bytes patterns
(which is not useful for the time being)
2017-11-07 17:58:59 -08:00
Yann Collet
897f5e9834
removed the ip++ at the beginning of block
...
The first byte used to be skipped
to avoid a infinite self-comparison.
This is no longer necessary, since init() ensures that index starts at 64K.
The first byte is also useless to search when each block is independent,
but it's no longer the case when blocks are linked.
Removing the first-byte-skip saves
about 10 bytes / MB on files compressed with -BD4 (linked blocks 64Kb),
which feels correct as each MB has 16 blocks of 64KB.
2017-11-07 17:37:31 -08:00
Yann Collet
71fd08c17d
removed legacy version of LZ4HC_InsertAndFindBestMatch()
2017-11-07 11:33:40 -08:00
Yann Collet
c49f66f2ad
ensure pattern
is a 1-byte repetition
2017-11-07 11:29:28 -08:00
Yann Collet
5512a5f1a9
removed useless (1 && ...)
condition
...
as reported by @terrelln
2017-11-07 11:22:57 -08:00
Yann Collet
7130bfe573
improved LZ4HC_reverseCountPattern() :
...
works for any repetitive pattern of length 1, 2 or 4 (but not 3!)
works for any endianess
2017-11-07 11:05:48 -08:00
Yann Collet
a004c1fbee
fixed LZ4HC_countPattern()
...
- works with byte values other than `0`
- works for any repetitive pattern of length 1, 2 or 4 (but not 3!)
- works for little and big endian systems
- preserve speed of previous implementation
2017-11-07 10:53:29 -08:00
Yann Collet
9221419c6f
added LZ4_FORCEINLINE to counter gcc regression
...
as recommended by @terrelln
2017-11-06 17:29:27 -08:00
Yann Collet
d51f046628
2-stages LZ4_count
...
separate first branch from the rest of the compare loop
to get dedicated prediction.
measured a 3-4% compression speed improvement.
2017-11-06 15:42:50 -08:00
Sylvestre Ledru
4fed595dac
Only ignore with C++17
2017-11-06 16:16:02 +01:00
Sylvestre Ledru
cca7618f09
When building with a C++ compiler, remove the 'register' keyword to silent a warning
...
For example, with clang:
lz4.c:XXX:36: error: 'register' storage class specifier is deprecated and incompatible with C++17 [-Werror,-Wdeprecated-register]
static unsigned LZ4_NbCommonBytes (register reg_t val)
^~~~~~~~~
2017-11-05 11:48:03 +01:00
Yann Collet
aa99163752
fixed minor static analyzer warning
...
dead assignment
2017-11-03 12:33:55 -07: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
a1f4a0d983
moved ctx->end handling from parsers
...
responsibility better handled one layer above (LZ4HC_compress_generic())
2017-11-03 10:48:55 -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
3b222d2d96
removes matches[] table
...
saves stack space
clearer match finder interface (no more table to fill)
2017-11-03 01:37:43 -07:00
Yann Collet
320e1d51ac
removed useless parameter from hash chain matchfinder
...
used to be present for compatibility with binary tree matchfinder
2017-11-03 01:20:30 -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
82c1aed419
improved level 11 speed
2017-11-03 00:59:05 -07:00
Yann Collet
890c0553d0
optimized skip strategy for level 12
2017-11-03 00:15:52 -07:00
Yann Collet
05d78eb817
new level 11 uses 512 attempts
2017-11-02 19:50:08 -07:00
Yann Collet
a1c5343d89
more generic skip formula
...
improving speed
2017-11-02 18:54:18 -07:00
Yann Collet
e06cb03c11
small adaptations for intermediate level 11
2017-11-02 16:25:10 -07:00
Yann Collet
4b81885800
partial search, while preserving compression ratio
...
tag interesting places
2017-11-02 15:37:18 -07:00
Yann Collet
bd992f12e4
searching match leading strictly farther does not work
...
sometimes, it's better to re-use same match but start it later,
in order to get shorter matchlength code
2017-11-02 15:05:45 -07:00
Yann Collet
8e16eb0cd1
fixed last lost bytes in maximal mode
...
even gained 2 bytes on calgary.tar...
added conditional traces `g_debuglog_enable`
2017-11-02 14:53:06 -07:00
Yann Collet
0ff4df1b94
changed strategy : opt[] path is complete after each match
...
previous strategy would leave a few "bad choices"
on the ground they would be fixed later,
but that requires passing through each position to make the fix
and cannot give the end position of the last useful match.
2017-11-02 13:44:57 -07:00
Yann Collet
cc4a109b0d
Merge pull request #415 from lz4/fasterDecodingXp
...
Faster decoding xp
2017-11-01 09:58:49 -07:00
Yann Collet
15b0d229c1
Merge branch 'dev' into btopt
2017-10-31 17:55:01 -07:00
Yann Collet
a5731d6b26
minor change, to help store forwarding
...
in a marginal case (offset==4)
2017-10-31 15:51:56 -07:00
Yann Collet
9378f76e41
extended shortcut match length to 18
2017-10-31 14:20:25 -07:00
Yann Collet
ace334a4c9
minor : coding style : use ML_MASK constant
2017-10-31 12:22:15 -07:00
Yann Collet
3f173052ae
added comments, as suggested by @terrelln
2017-10-31 11:49:57 -07:00
Yann Collet
931c5c20d0
fixed minor overflow mistake in optimal parser
...
saving 20 bytes on calgary.tar
2017-10-30 17:47:54 -07:00
Yann Collet
ab4bd93f59
fixed minor initialization warning
2017-10-30 16:10:25 -07:00
Yann Collet
e0914ff70c
more complete shortcut - passes tests
2017-10-30 16:07:15 -07:00
mikir
63a7f34fee
Separated visibility from LZ4LIB_API macro.
2017-10-30 13:44:24 +01:00
Yann Collet
a31b7058cb
small modification of lz4 decoder to shortcut common case (short branch).
2017-10-25 10:10:53 +02:00
Yann Collet
16a4337473
added hash chain with conditional length
...
not a success yet
2017-10-25 07:07:08 +02:00
Yann Collet
a12cdf00c3
lz4opt: added hash chain search
2017-10-20 17:04:29 -07:00
Yann Collet
fd6bd5107b
switched many types to int
2017-10-20 15:33:52 -07:00
Yann Collet
d813134619
removed SET_PRICE macro
2017-10-20 13:44:49 -07:00
Yann Collet
fa064c8a8c
removed one macro usage
2017-10-20 13:32:45 -07:00
Yann Collet
ee62faee08
minor refactor
...
reduce variable scope
remove one macro usage
2017-10-20 12:05:00 -07:00
Yann Collet
fc879fe170
lz4opt: refactor sequence reverse traversal
2017-10-20 11:32:15 -07:00
Yann Collet
c058753393
refactor variable matchnum
...
separate initial and iterative search
renamed nb_matches
2017-10-20 11:24:56 -07:00
Yann Collet
7bb0a617ee
simplified initial cost conditions
...
llen integrated in opt[]
2017-10-20 11:00:10 -07:00
Yann Collet
6cec68de39
added assert
2017-10-19 16:47:25 -07:00
Yann Collet
ac2ad52257
renamed last_pos into last_match_pos
2017-10-19 16:43:36 -07:00
Yann Collet
708e2cbb60
simplified early exit when single solution
2017-10-19 16:39:40 -07:00
Rei Odaira
73bcf90e51
Use the optimization level of O2 for the decompression functions on ppc64le with gcc, to avoid harmful unrolling and SIMDization with O3
2017-10-13 14:53:37 -05:00
Yann Collet
a4314829db
fused getLongerMatch and getWiderMatch
2017-10-09 01:50:28 -07:00
Yann Collet
97c18f5f0e
re-inserted last byte test in widerMatch
2017-10-09 01:44:05 -07:00
Yann Collet
bdca63ed69
early out is not better
2017-10-09 00:36:47 -07:00
Yann Collet
1ee17e4eb8
optional fuse
2017-10-09 00:31:12 -07:00
Yann Collet
b9459faeb2
improved search of rep-1 patterns
2017-10-08 23:55:42 -07:00
Yann Collet
f1fa91d6fc
insertAndFindBestMatch defers to insertAndGetWiderMatch
2017-10-08 23:40:21 -07:00
Yann Collet
87968517f9
fixed decoding block checksum in lz4frame
2017-10-04 15:24:08 -07:00
Yann Collet
f6b31bf0d0
fix #404
...
static analyzer `cppcheck` complains about a shift-by-32 on a 32 bits value,
which is an undefined behavior.
However, the flagged code path is never triggered in 32-bits mode,
(actually, it's not even generated if DCE kicks in),
the shift-by-32 is necessarily performed on a 64-bits value.
While it doesn't change anything regarding lz4 code generation, for both 32 and 64 bits mode,
(can be checked by md5sum on the generated binary),
the shift has been rewritten in a way which should please this static analyzer,
since it now pretends to shift by 16 on 32-bits cpu (note : it doesn't matter since the code will not even be generated in this case).
Note : this is a blind fix, the new code has not been tested with cppcheck, because cppcheck only works on Windows.
Other static analyzer, such as scan-build, do not trigger this false positive.
2017-09-30 10:35:55 -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
a30cba08f4
fixed a bunch of -Wcomma warnings
...
reported by @rvandermeulen (#398 )
2017-09-10 14:32:38 -07:00
Yann Collet
b500c5282e
fix #397 : decompression failed when using a combination of extDict + low memory address
...
Reported and fixed by @jscheid
Note : we are missing a test case to include it in the CI
2017-09-07 12:48:24 -07:00
Yann Collet
00418f7611
bench : made decompression speed evaluation same time as compression
...
minor : slightly modified an example do avoid disabling a gcc warning through #pragma
2017-09-07 12:12:36 -07:00
Yann Collet
ee5332438b
minor Makefile fixes
2017-09-06 17:41:44 -07:00
Yann Collet
1ad9a36cfb
updated lib/README
...
clarifications, improved wording
2017-09-06 11:22:45 -07:00
Yann Collet
3d260f3522
complementary information for #394
2017-08-30 16:09:10 -07:00
Yann Collet
e3c71584ff
clarified documentation of streaming decompression functions
...
(synchronous bufferless mode)
answering questions by @jtbandes (#394 )
2017-08-30 15:42:04 -07:00
Yann Collet
f212a10ae0
fixed FS-independent file order in /lib
...
identified by @bmwiedemann
2017-08-29 15:31:56 -07:00
Yann Collet
c4d6884cd8
build: source files sorted in a FS independent manner
...
to be more compatible with reproducible builds.
patch inspired by @bmwiedemann
2017-08-26 12:22:51 -07:00
Nick Terrell
252ce14fd2
Don't use C++11 deprecation attribute with clang
...
Clang doesn't accept a C++11 attribute following `LZ4LIB_API`.
Use the GNU attribute instead.
2017-08-24 14:06:34 -07:00
tcpan
f423d016cf
FIX: added prefix to FORCE_INLINE to prevent redefinition error during compilation when used with other libraries that define FORCE_INLINE
2017-08-24 10:14:20 -04: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
a1f3a27e9b
Merge branch 'dev' into installVars and fixed conflicts
2017-08-15 16:57:00 -07:00
Yann Collet
af9d72b7f6
Merge pull request #383 from lz4/blockChecksum
...
Block checksum
2017-08-15 16:50:04 -07:00
Yann Collet
8593ba8831
Merge pull request #380 from lz4/dictID
...
Frame Dictionary API
2017-08-15 14:12:04 -07:00
Yann Collet
aea7d521ae
better respect GNU standard Makefile conventions
...
supports lowercase directory variables
add an "Installation" section in README.md
added an INSTALL file
2017-08-14 15:13:23 -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
8d597d62d5
fixed gcc prototype warning
2017-08-10 10:28:52 -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
Alex Deymo
76ef6d0ab0
Allow to predefine FORCE_INLINE macro.
...
FORCE_INLINE macro is defined based on the compiler used. When using
gcc, it will include "__attribute__((always_inline))" forcing gcc to
always inline all the functions marked as FORCE_INLINE. However, this
can cause a performance degradation of about 15%.
This patch allows to set the FORCE_INLINE macro from the compiler
command line to either "static" or "static inline" giving allowing it
to inline functions as needed when performing optimizations.
2017-08-07 10:34:33 +02:00
Ido Rosen
8aeaf6bb3a
Fix typos preventing installation of static lib.
2017-08-01 00:48:58 -04:00
Yann Collet
6ad3a983db
fix #369
...
The bug would make the bt search read one byte in an invalid memory region,
and make a branch decision based on its value.
Impact was small (missed compression opportunity).
It only happens in -BD mode, with extDict-prefix overlapping matches.
The bt match search is supposed to work also in extDict mode.
In which case, the match ptr can point into Dict.
When the match was overlapping Dict<->Prefix,
match[matchLength] would end up outside of Dict, in an invalid memory area.
The correction ensures that in such a case,
match[matchLength] ends up at intended location, inside prefix.
2017-06-26 11:29:05 -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
89b9f026c9
made level 10 a bit faster
...
at the expense of a little bit of compression ratio.
Now speed is intermediate on calgary corpus :
25 - 12 - 8 - 3
2017-06-13 17:25:29 -07:00
Yann Collet
bfc1806605
clarified lz4frame api comment ( #350 )
2017-06-13 12:35:00 -07:00
Yann Collet
139a387d17
updated NEWS
2017-06-12 10:54:59 -07:00
Yann Collet
e60cbb5cac
added test for LZ4F_resetDecompressionContext()
2017-05-10 16:28:36 -07:00
Yann Collet
a902127613
bumped version number to 1.8.0
...
due to addition of prototype
LZ4F_resetDecompressionContext()
2017-05-10 13:27:18 -07:00
Yann Collet
b8575f2d2b
updated Makefile
...
to automatically build manual files with
make all
2017-05-10 13:26:04 -07:00
Yann Collet
fe932c4527
expose LZ4F_resetDecompressionContext()
2017-05-10 12:25:05 -07:00
Yann Collet
1efa48831e
minor readability changes
2017-05-02 12:01:13 -07:00
Yann Collet
a8dd86d93e
changed macro HEAPMODE into LZ4_HEAPMODE
...
This macro is susceptible to be triggered from user side
typically through compiler flag (-DLZ4_HEAPMODE=1).
In which case, it makes sense to prefix the macro
since we want to reduce potential side-effect on namespace.
2017-05-01 22:32:21 -07:00
Alexey Tourbin
6cf1f7d758
lz4hc.c: clamp compression levels > 12
...
I noticed that, while 'lz4 -12' works fine, 'lz4 -13' does not compress
at all.
$ cat </etc/passwd |wc -c
2565
$ lz4 -12 </etc/passwd |wc -c
1456
$ lz4 -13 </etc/passwd |wc -c
2584
Perhaps the best way to fix this is to clamp the compression level
in the LZ4HC_compress_generic routine.
2017-04-29 16:33:15 +03:00
Alexey Tourbin
f3460fc148
liz4hc.h: fix a comment: LZ4HC_MAX_CLEVEL -> LZ4HC_CLEVEL_MAX
2017-04-29 16:06:45 +03:00
Nick Terrell
0b3e807043
[LZ4F] Allow users to disable LZ4F_DEPRECATE
2017-04-26 10:03:23 -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
e2827775ee
make __packed memory access default for gcc
...
It's always as good or better then memcpy()
but depends on gcc-specific extension.
solves https://github.com/facebook/zstd/issues/620
2017-03-30 12:22:17 -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
4567d0def5
Merge pull request #340 from lz4/optlz4opt
...
lz4opt
2017-03-24 17:10:45 -07:00
Yann Collet
38362c1d65
Merge pull request #338 from ldv-alt/dev
...
Export deprecated symbols declared in lz4hc.h
2017-03-24 12:03:32 -07:00
Yann Collet
60b6d2907f
improved level 10 speed for degenerated cases
2017-03-24 11:29:35 -07:00
Yann Collet
8f8fc52fcf
Merge branch 'dev' into optlz4opt
2017-03-24 11:00:40 -07:00
Yann Collet
0863931a1c
fixed API comment for LZ4F_createCompressionContext()
...
as reported by @nh2
2017-03-24 10:34:18 -07: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
68044acfec
Merge branch 'optlz4opt' of github.com:Cyan4973/lz4 into optlz4opt
2017-03-20 09:58:00 -07:00
Yann Collet
b8bc70022b
minor refactor
2017-03-20 05:04:12 -07:00
Yann Collet
cea8f60df1
slight btopt speed improvement
...
removing a useless test
2017-03-20 02:33:02 -07:00
Yann Collet
f513020a6d
slight btopt speed improvement
...
removing a useless test
2017-03-17 18:07:53 -07:00
Yann Collet
8bd32a17b1
made SET_PRICE macro more usable
...
previous version would use argument to also change target member.
Now, only values are transferred
2017-03-17 17:42:47 -07:00
Yann Collet
118b47f3d1
improved lz4opt speed (~4%)
2017-03-17 16:53:35 -07:00
Yann Collet
eff6166eb8
minor price function optimization
2017-03-17 15:51:21 -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
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
6b2a1b3606
updated lz4 version number
2017-03-16 02:24:46 -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
Yann Collet
e945a27f9c
fix #333 : expose obsolete decoding functions
...
with deprecation warning.
notified by Chen Yufei
2017-03-14 21:21:54 -07:00
Yann Collet
b9132bedcd
Merge pull request #331 from ldv-alt/dev
...
Export only those symbols that are part of public API
2017-03-12 03:16:23 -07:00
Dmitry V. Levin
883ebdcee0
Export only those symbols that are part of public API
...
Specify -fvisibility=hidden parameter when linking the shared library
using -fPIC, assuming that gcc >= 4 is used.
This change results to unexporting of the following 42 functions:
LZ4F_getErrorCode
LZ4_XXH32
LZ4_XXH32_canonicalFromHash
LZ4_XXH32_copyState
LZ4_XXH32_createState
LZ4_XXH32_digest
LZ4_XXH32_freeState
LZ4_XXH32_hashFromCanonical
LZ4_XXH32_reset
LZ4_XXH32_update
LZ4_XXH64
LZ4_XXH64_canonicalFromHash
LZ4_XXH64_copyState
LZ4_XXH64_createState
LZ4_XXH64_digest
LZ4_XXH64_freeState
LZ4_XXH64_hashFromCanonical
LZ4_XXH64_reset
LZ4_XXH64_update
LZ4_XXH_versionNumber
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_compress_fast_force
LZ4_compress_forceExtDict
LZ4_createHC
LZ4_decompress_safe_forceExtDict
LZ4_freeHC
LZ4_resetStreamStateHC
LZ4_sizeofStreamStateHC
LZ4_slideInputBufferHC
LZ4_uncompress
LZ4_uncompress_unknownOutputSize
2017-03-10 23:35:30 +00:00
Dmitry V. Levin
25b2435885
Export deprecated symbols
...
Deprecated symbols are still a part of ABI and have to be exported,
so mark them with LZ4LIB_API attribute.
2017-03-10 23:35:30 +00:00
Dmitry V. Levin
7aeecbff71
Explicitly set visibility of public API functions when gcc is used
...
Windows builds already limit exporting of functions to those marked
with LZ4LIB_API tag. The same behaviour could be achieved on other
platforms when a relatively fresh gcc is used.
This change assigns public visibility to all symbols marked with
LZ4LIB_API tag. When the library is built in -fvisibility=hidden
mode, only these marked symbols will be exported.
2017-03-10 23:35:30 +00:00
remittor
36842ebb19
lz4hc: Fix LZ4HC_compress_hashChain for backward compatibility
2017-03-09 12:19:24 +03:00
remittor
baa155088b
lz4hc: Fix LZ4HC_compress_hashChain for full support destSize variant
2017-03-08 18:49:55 +03:00
remittor
f007153e3f
lz4hc: Add LZ4_compressHC_destSize and LZ4_compress_HC_continue_destSize
2017-03-08 11:11:15 +03:00
remittor
45b592b7ec
lz4hc: Cleanup function LZ4HC_encodeSequence
2017-03-08 00:30:54 +03:00
remittor
534f8fa5d6
lz4hc: Cleanup function LZ4HC_compress_hashChain
2017-03-07 17:11:48 +03:00
Eric Siegerman
eb51b2b8d9
Explicitly create $(DESTDIR)$(LIBDIR)/ at install time
...
This is needed on systems where it isn't the parent of
$(PKGCONFIGDIR), and so doesn't get created implicitly.
2017-02-14 22:12:26 -05:00
Yann Collet
04ec092696
updated comments on block sizes
2017-02-08 11:02:32 -08:00
Przemyslaw Skibinski
8e1fd97d16
lz4frame.h: added Introduction
2017-01-23 17:46:32 +01:00
Przemyslaw Skibinski
9071df0fa5
lz4frame.h: prepared to generate manual
2017-01-23 16:22:00 +01:00
Przemyslaw Skibinski
f9f48f8ed9
lz4.h: improved manual generation
2017-01-23 16:02:51 +01:00
Przemyslaw Skibinski
489d1618c9
added "This Makefile is validated for"
2017-01-19 16:28:08 +01:00
Yann Collet
9683a1ae87
LZ4_MEMORY_USAGE can be modified from compilation command line
2017-01-05 16:50:37 +01:00
Przemyslaw Skibinski
312d88249f
removed nextToUpdateBT
2016-12-28 15:38:59 +01:00
Przemyslaw Skibinski
3d5bb38977
clean logging
2016-12-28 15:37:12 +01:00
Przemyslaw Skibinski
1c80b9af4e
LZ4HC_getSearchNum
2016-12-28 15:18:19 +01:00
Przemyslaw Skibinski
98f9d6c726
improved logging
2016-12-28 14:04:38 +01:00
Przemyslaw Skibinski
12aae846b3
fixed table update in LZ4_loadDictHC
2016-12-28 13:19:11 +01:00
Przemyslaw Skibinski
c8b31263cc
added FUZ_CLEVEL_DEFAULT
2016-12-28 13:08:38 +01:00
Przemyslaw Skibinski
d57ff6456d
changed default PREFIX and MANDIR
2016-12-28 11:27:17 +01:00
Przemyslaw Skibinski
20381a2fce
fixed -BD compression
2016-12-27 15:31:35 +01:00
Przemyslaw Skibinski
e6536faf33
lib\Makefile: fixed INSTALL_DATA
2016-12-27 11:17:35 +01:00
Przemyslaw Skibinski
efaa9b7bc7
Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
...
# Conflicts:
# lib/Makefile
2016-12-27 10:43:07 +01:00
Przemyslaw Skibinski
b22e2bed5e
BSD: improved "make install"
2016-12-23 10:05:41 +01:00
Przemyslaw Skibinski
ea51ad0cee
Solaris: working "make install"
2016-12-23 00:02:01 +01:00
Yann Collet
19c0f21b00
updated Makefile : lz4 no longer recompiled when already up-to-date
2016-12-22 18:02:09 +01:00
Yann Collet
52cac9a973
updated a few macros names
2016-12-22 11:41:05 +01:00
Yann Collet
70526a11e0
fixed lib/clean
2016-12-21 15:33:53 +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
385cb4f539
minor update Makefile
2016-12-21 13:18:02 +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
b3ecc3e3ec
last match starts at least 12 bytes before end of block
2016-12-09 16:09:38 +01:00
Przemyslaw Skibinski
d694bf9111
faster opt compression
2016-12-09 15:20:32 +01:00
Przemyslaw Skibinski
a22e71d4a9
full binary tree update
2016-12-09 12:37:17 +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
410ba53dbc
improved LZ4HC_BinTree_GetAllMatches
2016-12-07 13:07:39 +01:00
Przemyslaw Skibinski
1833be1cf0
fixed gcc warnings
2016-12-07 12:59:05 +01:00
Przemyslaw Skibinski
f2ebf37bfe
slightly improved ratio
2016-12-07 12:49:38 +01:00
Przemyslaw Skibinski
77b051ed7b
improve code formatting
2016-12-07 12:17:24 +01:00
Przemyslaw Skibinski
e3fee94742
LZ4HC_MAX_CLEVEL = 12
2016-12-07 12:16:33 +01:00
Przemyslaw Skibinski
757ef1d5fc
removed LZ4HC_GetAllMatches
2016-12-07 11:44:17 +01:00
Przemyslaw Skibinski
cfe6a24b08
updated LZ4HC_get_price
2016-12-06 19:42:47 +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
Przemyslaw Skibinski
3f430daf7a
added lz4opt.h
2016-12-06 15:20:59 +01:00
Przemyslaw Skibinski
5ae0e789fc
Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
2016-12-06 13:44:42 +01:00
Yann Collet
5eb547a608
fix #283 : implement LZ4_versionString().
2016-12-04 20:05:36 +01:00
Yann Collet
a9a8dbf7c1
fixed minor display error when using -r
2016-11-28 04:01:02 -08:00
Yann Collet
f4c74e6fac
library release build compatible with environment variable
2016-11-22 11:52:43 -08:00
Yann Collet
7819d58787
new test case with fPIE
2016-11-22 11:18:07 -08:00
Przemyslaw Skibinski
65a542579b
updated README.md
2016-11-22 11:14:11 +01:00
Yann Collet
8b233b228d
added a few dates
2016-11-21 15:51:39 -08:00
Yann Collet
742f2b683e
added doc in code comments
2016-11-21 14:13:00 -08:00
Takayuki MATSUOKA
b4db9d7e35
Add C++14 standard [[deprecated]] attribute
...
See also
For __cplusplus predefined macro, https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
For [[deprecated]] attribute, https://isocpp.org/wiki/faq/cpp14-language#deprecated-attribute
2016-11-19 22:08:48 +09:00
Yann Collet
19df3029e2
fixed #272 (compilation fails on gcc 4.4), reported by @totaam
2016-11-18 17:56:56 -08:00
Yann Collet
a91983daa0
highly improved speed on -mx32 mode
...
Now -mx32 is fastest mode on x64 CPU
2016-11-18 17:05:06 -08:00
Yann Collet
8e1ea59ad6
attempt to fix sanitize32 package dependency
2016-11-17 18:30:46 -08:00
Yann Collet
1abecbc33c
fix 32-bits mode.
...
Large File support for Mac OS-X in 32-bits mode
Fixed potential undefined behavior
Changed makefile for 32-bits mode
2016-11-17 13:02:06 -08:00
Yann Collet
7fde7438d3
Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
2016-11-16 11:37:05 -08:00
Przemyslaw Skibinski
2dee7bdaf6
include NEWS in lz4_x64.zip and lz4_x86.zip
2016-11-16 11:06:28 +01:00
Przemyslaw Skibinski
632ab3b8d4
updated programs\README.md
2016-11-16 10:53:06 +01:00
Przemyslaw Skibinski
8b48d5e446
updated example\README.md
2016-11-16 09:53:07 +01:00
Przemyslaw Skibinski
11f6217cc2
created dll\example directory
2016-11-16 09:32:26 +01:00
Przemyslaw Skibinski
7b6a9d8638
Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
2016-11-16 09:01:45 +01:00
Przemyslaw Skibinski
2e10aab20f
MinGW doesn't require the import library at all
2016-11-16 08:59:18 +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
b44790cf98
Merge pull request #270 from inikep/dev
...
autobuild executables
2016-11-15 11:24:26 -08:00
Przemyslaw Skibinski
e583dd0566
ImageHasSafeExceptionHandlers=false
2016-11-15 16:01:38 +01:00
Przemyslaw Skibinski
eb160e1a2c
appveyor.yml: added liblz4_x86.zip
2016-11-15 14:09:36 +01:00
Przemyslaw Skibinski
45b8623afa
updated lib\dll\README.md
2016-11-15 13:49:20 +01:00
Przemyslaw Skibinski
5625cc21ea
appveyor.yml: generate DLL package
2016-11-15 13:29:33 +01:00
Przemyslaw Skibinski
c093e256d4
added files used by DLL package
2016-11-15 12:57:56 +01:00
Przemyslaw Skibinski
be471c69da
added fullbench-dll.sln that works with gcc/MinGW
2016-11-15 12:57:03 +01:00
Przemyslaw Skibinski
f71340ce1d
DLL dependencies moved to lib/dll/
2016-11-15 11:06:16 +01:00
Yann Collet
923cf4447f
bump version number
2016-11-14 18:09:31 -08:00
Yann Collet
4c5c711b7a
fixed minor conversion warning
2016-11-14 14:53:15 -08:00
Yann Collet
f094f53144
silence a minor msan warning
2016-11-14 14:38:46 -08:00
Yann Collet
0fe5c187a5
fixed minor msan warning
2016-11-14 11:34:10 -08:00
Yann Collet
fa158b4118
fixed nameless union warnings
2016-11-14 10:02:01 -08:00
Yann Collet
84af32d491
Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
2016-11-14 08:52:23 -08:00
Yann Collet
5a5ebeec15
clang and g++ tests restricted to native only on Travis CI Ubuntu v12 environment
2016-11-14 08:51:28 -08:00
Yann Collet
569897dddd
Merge pull request #269 from inikep/dev
...
Dev
2016-11-14 08:27:06 -08:00
Yann Collet
1b24cc1155
fixed conversion warnings
2016-11-14 07:10:31 -08:00
Przemyslaw Skibinski
9ad7508db0
Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
2016-11-14 11:29:11 +01:00
Yann Collet
84b97f90b8
fuzzer code refactoring
...
fix g++ conversion warning
2016-11-12 17:14:57 -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
Yann Collet
e528a82f01
Merge pull request #267 from terrelln/strict-aliasing
...
Expose internal types to remove strict aliasing
2016-11-11 16:54:51 -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
Nick Terrell
85aeb0e4bb
Expose internal types to remove strict aliasing
2016-11-11 13:00:02 -08:00
Przemyslaw Skibinski
ec6fb477b2
added visual\README.md
2016-11-11 08:57:46 +01:00
Yann Collet
4f9db1383a
updated xxhash lib
2016-11-10 18:34:49 -08:00
Nick Terrell
5b37837e6e
Fix license and remove references to zstd
2016-11-10 17:27:56 -08:00
Yann Collet
1f246a9899
Fixed #178 fullbench on small input
2016-11-10 15:31:59 -08:00
Przemyslaw Skibinski
52251d9709
Using MinGW+MSYS to create DLL
2016-11-10 18:30:59 +01:00
Przemyslaw Skibinski
72a4a84df7
udated README.md
2016-11-10 17:49:42 +01:00
Przemyslaw Skibinski
2ecce6f151
lz4.h: added Introduction section
2016-11-10 17:22:59 +01:00