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
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
15b0d229c1
Merge branch 'dev' into btopt
2017-10-31 17:55:01 -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
mikir
63a7f34fee
Separated visibility from LZ4LIB_API macro.
2017-10-30 13:44:24 +01: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