From cd0663456f82b6d771e6aed01c6c4ff7f1bf4358 Mon Sep 17 00:00:00 2001 From: Cyan4973 Date: Mon, 23 Apr 2018 15:47:08 -0700 Subject: [PATCH] disable shortcut for LZ4_decompress_fast() improving speed --- lib/lz4.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/lz4.c b/lib/lz4.c index 40b2229..d794c35 100644 --- a/lib/lz4.c +++ b/lib/lz4.c @@ -1536,9 +1536,10 @@ LZ4_FORCE_INLINE int LZ4_decompress_generic( * this shortcut was tested on x86 and x64, where it improves decoding speed. * it has not yet been benchmarked on ARM, Power, mips, etc. * NOTE: The loop begins with a read, so we must have one byte left at the end. */ - if (((ip + 14 /*maxLL*/ + 2 /*offset*/ < iend) - & (op + 14 /*maxLL*/ + 18 /*maxML*/ <= oend)) - & ((token < (15<> ML_BITS; size_t const off = LZ4_readLE16(ip+ll); const BYTE* const matchPtr = op + ll - off; /* pointer underflow risk ? */ -- 2.7.4