| 1 |
|
| /* |
| 2 |
|
| LZ4 - Fast LZ compression algorithm |
| 3 |
|
| Copyright (c) Yann Collet. All rights reserved. |
| 4 |
|
| |
| 5 |
|
| BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) |
| 6 |
|
| |
| 7 |
|
| Redistribution and use in source and binary forms, with or without |
| 8 |
|
| modification, are permitted provided that the following conditions are |
| 9 |
|
| met: |
| 10 |
|
| |
| 11 |
|
| * Redistributions of source code must retain the above copyright |
| 12 |
|
| notice, this list of conditions and the following disclaimer. |
| 13 |
|
| * Redistributions in binary form must reproduce the above |
| 14 |
|
| copyright notice, this list of conditions and the following disclaimer |
| 15 |
|
| in the documentation and/or other materials provided with the |
| 16 |
|
| distribution. |
| 17 |
|
| |
| 18 |
|
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 19 |
|
| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 20 |
|
| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 21 |
|
| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 |
|
| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 |
|
| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 |
|
| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 |
|
| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 |
|
| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 |
|
| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 |
|
| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 |
|
| |
| 30 |
|
| You can contact the author at : |
| 31 |
|
| - LZ4 homepage : http://www.lz4.org |
| 32 |
|
| - LZ4 source repository : https://github.com/lz4/lz4 |
| 33 |
|
| */ |
| 34 |
|
| |
| 35 |
|
| /*-************************************ |
| 36 |
|
| * Tuning parameters |
| 37 |
|
| **************************************/ |
| 38 |
|
| /* |
| 39 |
|
| * LZ4_HEAPMODE : |
| 40 |
|
| * Select how stateless compression functions like `LZ4_compress_default()` |
| 41 |
|
| * allocate memory for their hash table, |
| 42 |
|
| * in memory stack (0:default, fastest), or in memory heap (1:requires malloc()). |
| 43 |
|
| */ |
| 44 |
|
| #ifndef LZ4_HEAPMODE |
| 45 |
|
| # define LZ4_HEAPMODE 0 |
| 46 |
|
| #endif |
| 47 |
|
| |
| 48 |
|
| |
| 49 |
|
| /*-************************************ |
| 50 |
|
| * CPU Feature Detection |
| 51 |
|
| **************************************/ |
| 52 |
|
| /* LZ4_FORCE_MEMORY_ACCESS |
| 53 |
|
| * By default, access to unaligned memory is controlled by `memcpy()`, which is safe and portable. |
| 54 |
|
| * Unfortunately, on some target/compiler combinations, the generated assembly is sub-optimal. |
| 55 |
|
| * The below switch allow to select different access method for improved performance. |
| 56 |
|
| * Method 0 (default) : use `memcpy()`. Safe and portable. |
| 57 |
|
| * Method 1 : `__packed` statement. It depends on compiler extension (ie, not portable). |
| 58 |
|
| * This method is safe if your compiler supports it, and *generally* as fast or faster than `memcpy`. |
| 59 |
|
| * Method 2 : direct access. This method is portable but violate C standard. |
| 60 |
|
| * It can generate buggy code on targets which assembly generation depends on alignment. |
| 61 |
|
| * But in some circumstances, it's the only known way to get the most performance (ie GCC + ARMv6) |
| 62 |
|
| * See https://fastcompression.blogspot.fr/2015/08/accessing-unaligned-memory.html for details. |
| 63 |
|
| * Prefer these methods in priority order (0 > 1 > 2) |
| 64 |
|
| */ |
| 65 |
|
| #ifndef LZ4_FORCE_MEMORY_ACCESS /* can be defined externally */ |
| 66 |
|
| # if defined(__GNUC__) && \ |
| 67 |
|
| ( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) \ |
| 68 |
|
| || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) \ |
| 69 |
|
| || (defined(__riscv) && defined(__riscv_zicclsm)) ) |
| 70 |
|
| # define LZ4_FORCE_MEMORY_ACCESS 2 |
| 71 |
|
| # elif (defined(__INTEL_COMPILER) && !defined(_WIN32)) || defined(__GNUC__) || defined(_MSC_VER) |
| 72 |
|
| # define LZ4_FORCE_MEMORY_ACCESS 1 |
| 73 |
|
| # endif |
| 74 |
|
| #endif |
| 75 |
|
| |
| 76 |
|
| /* |
| 77 |
|
| * LZ4_FORCE_SW_BITCOUNT |
| 78 |
|
| * Define this parameter if your target system or compiler does not support hardware bit count |
| 79 |
|
| */ |
| 80 |
|
| #if defined(_MSC_VER) && defined(_WIN32_WCE) /* Visual Studio for WinCE doesn't support Hardware bit count */ |
| 81 |
|
| # undef LZ4_FORCE_SW_BITCOUNT /* avoid double def */ |
| 82 |
|
| # define LZ4_FORCE_SW_BITCOUNT |
| 83 |
|
| #endif |
| 84 |
|
| |
| 85 |
|
| |
| 86 |
|
| |
| 87 |
|
| /*-************************************ |
| 88 |
|
| * Dependency |
| 89 |
|
| **************************************/ |
| 90 |
|
| /* |
| 91 |
|
| * LZ4_SRC_INCLUDED: |
| 92 |
|
| * Amalgamation flag, whether lz4.c is included |
| 93 |
|
| */ |
| 94 |
|
| #ifndef LZ4_SRC_INCLUDED |
| 95 |
|
| # define LZ4_SRC_INCLUDED 1 |
| 96 |
|
| #endif |
| 97 |
|
| |
| 98 |
|
| #ifndef LZ4_DISABLE_DEPRECATE_WARNINGS |
| 99 |
|
| # define LZ4_DISABLE_DEPRECATE_WARNINGS /* due to LZ4_decompress_safe_withPrefix64k */ |
| 100 |
|
| #endif |
| 101 |
|
| |
| 102 |
|
| #ifndef LZ4_STATIC_LINKING_ONLY |
| 103 |
|
| # define LZ4_STATIC_LINKING_ONLY |
| 104 |
|
| #endif |
| 105 |
|
| #include "lz4.h" |
| 106 |
|
| /* see also "memory routines" below */ |
| 107 |
|
| |
| 108 |
|
| |
| 109 |
|
| /*-************************************ |
| 110 |
|
| * Compiler Options |
| 111 |
|
| **************************************/ |
| 112 |
|
| #if defined(_MSC_VER) && (_MSC_VER >= 1400) /* Visual Studio 2005+ */ |
| 113 |
|
| # include <intrin.h> /* only present in VS2005+ */ |
| 114 |
|
| # pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ |
| 115 |
|
| # pragma warning(disable : 6237) /* disable: C6237: conditional expression is always 0 */ |
| 116 |
|
| # pragma warning(disable : 6239) /* disable: C6239: (<non-zero constant> && <expression>) always evaluates to the result of <expression> */ |
| 117 |
|
| # pragma warning(disable : 6240) /* disable: C6240: (<expression> && <non-zero constant>) always evaluates to the result of <expression> */ |
| 118 |
|
| # pragma warning(disable : 6326) /* disable: C6326: Potential comparison of a constant with another constant */ |
| 119 |
|
| #endif /* _MSC_VER */ |
| 120 |
|
| |
| 121 |
|
| #ifndef LZ4_FORCE_INLINE |
| 122 |
|
| # if defined (_MSC_VER) && !defined (__clang__) /* MSVC */ |
| 123 |
|
| # define LZ4_FORCE_INLINE static __forceinline |
| 124 |
|
| # else |
| 125 |
|
| # if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ |
| 126 |
|
| # if defined (__GNUC__) || defined (__clang__) |
| 127 |
|
| # define LZ4_FORCE_INLINE static inline __attribute__((always_inline)) |
| 128 |
|
| # else |
| 129 |
|
| # define LZ4_FORCE_INLINE static inline |
| 130 |
|
| # endif |
| 131 |
|
| # else |
| 132 |
|
| # define LZ4_FORCE_INLINE static |
| 133 |
|
| # endif /* __STDC_VERSION__ */ |
| 134 |
|
| # endif /* _MSC_VER */ |
| 135 |
|
| #endif /* LZ4_FORCE_INLINE */ |
| 136 |
|
| |
| 137 |
|
| /* LZ4_FORCE_NOINLINE : keeps a rarely used function out of its callers' hot loops */ |
| 138 |
|
| #ifndef LZ4_FORCE_NOINLINE |
| 139 |
|
| # if defined(_MSC_VER) |
| 140 |
|
| # define LZ4_FORCE_NOINLINE static __declspec(noinline) |
| 141 |
|
| # elif defined(__GNUC__) || defined(__clang__) |
| 142 |
|
| # define LZ4_FORCE_NOINLINE static __attribute__((noinline)) |
| 143 |
|
| # else |
| 144 |
|
| # define LZ4_FORCE_NOINLINE static |
| 145 |
|
| # endif |
| 146 |
|
| #endif |
| 147 |
|
| |
| 148 |
|
| /* LZ4_FORCE_O2 and LZ4_FORCE_INLINE |
| 149 |
|
| * gcc on ppc64le generates an unrolled SIMDized loop for LZ4_wildCopy8, |
| 150 |
|
| * together with a simple 8-byte copy loop as a fall-back path. |
| 151 |
|
| * However, this optimization hurts the decompression speed by >30%, |
| 152 |
|
| * because the execution does not go to the optimized loop |
| 153 |
|
| * for typical compressible data, and all of the preamble checks |
| 154 |
|
| * before going to the fall-back path become useless overhead. |
| 155 |
|
| * This optimization happens only with the -O3 flag, and -O2 generates |
| 156 |
|
| * a simple 8-byte copy loop. |
| 157 |
|
| * With gcc on ppc64le, all of the LZ4_decompress_* and LZ4_wildCopy8 |
| 158 |
|
| * functions are annotated with __attribute__((optimize("O2"))), |
| 159 |
|
| * and also LZ4_wildCopy8 is forcibly inlined, so that the O2 attribute |
| 160 |
|
| * of LZ4_wildCopy8 does not affect the compression speed. |
| 161 |
|
| */ |
| 162 |
|
| #if defined(__PPC64__) && defined(__LITTLE_ENDIAN__) && defined(__GNUC__) && !defined(__clang__) |
| 163 |
|
| # define LZ4_FORCE_O2 __attribute__((optimize("O2"))) |
| 164 |
|
| # undef LZ4_FORCE_INLINE |
| 165 |
|
| # define LZ4_FORCE_INLINE static __inline __attribute__((optimize("O2"),always_inline)) |
| 166 |
|
| #else |
| 167 |
|
| # define LZ4_FORCE_O2 |
| 168 |
|
| #endif |
| 169 |
|
| |
| 170 |
|
| #if (defined(__GNUC__) && (__GNUC__ >= 3)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) || defined(__clang__) |
| 171 |
|
| # define expect(expr,value) (__builtin_expect ((expr),(value)) ) |
| 172 |
|
| #else |
| 173 |
|
| # define expect(expr,value) (expr) |
| 174 |
|
| #endif |
| 175 |
|
| |
| 176 |
|
| #ifndef likely |
| 177 |
|
| #define likely(expr) expect((expr) != 0, 1) |
| 178 |
|
| #endif |
| 179 |
|
| #ifndef unlikely |
| 180 |
|
| #define unlikely(expr) expect((expr) != 0, 0) |
| 181 |
|
| #endif |
| 182 |
|
| |
| 183 |
|
| /* Should the alignment test prove unreliable, for some reason, |
| 184 |
|
| * it can be disabled by setting LZ4_ALIGN_TEST to 0 */ |
| 185 |
|
| #ifndef LZ4_ALIGN_TEST /* can be externally provided */ |
| 186 |
|
| # define LZ4_ALIGN_TEST 1 |
| 187 |
|
| #endif |
| 188 |
|
| |
| 189 |
|
| |
| 190 |
|
| /*-************************************ |
| 191 |
|
| * Memory routines |
| 192 |
|
| **************************************/ |
| 193 |
|
| |
| 194 |
|
| /*! LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION : |
| 195 |
|
| * Disable relatively high-level LZ4/HC functions that use dynamic memory |
| 196 |
|
| * allocation functions (malloc(), calloc(), free()). |
| 197 |
|
| * |
| 198 |
|
| * Note that this is a compile-time switch. And since it disables |
| 199 |
|
| * public/stable LZ4 v1 API functions, we don't recommend using this |
| 200 |
|
| * symbol to generate a library for distribution. |
| 201 |
|
| * |
| 202 |
|
| * The following public functions are removed when this symbol is defined. |
| 203 |
|
| * - lz4 : LZ4_createStream, LZ4_freeStream, |
| 204 |
|
| * LZ4_createStreamDecode, LZ4_freeStreamDecode, LZ4_create (deprecated) |
| 205 |
|
| * - lz4hc : LZ4_createStreamHC, LZ4_freeStreamHC, |
| 206 |
|
| * LZ4_createHC (deprecated), LZ4_freeHC (deprecated) |
| 207 |
|
| * - lz4frame, lz4file : All LZ4F_* functions |
| 208 |
|
| */ |
| 209 |
|
| #if defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) |
| 210 |
|
| # define ALLOC(s) lz4_error_memory_allocation_is_disabled |
| 211 |
|
| # define ALLOC_AND_ZERO(s) lz4_error_memory_allocation_is_disabled |
| 212 |
|
| # define FREEMEM(p) lz4_error_memory_allocation_is_disabled |
| 213 |
|
| #elif defined(LZ4_USER_MEMORY_FUNCTIONS) |
| 214 |
|
| /* memory management functions can be customized by user project. |
| 215 |
|
| * Below functions must exist somewhere in the Project |
| 216 |
|
| * and be available at link time. */ |
| 217 |
|
| void* LZ4_malloc(size_t s); |
| 218 |
|
| void* LZ4_calloc(size_t n, size_t s); |
| 219 |
|
| void LZ4_free(void* p); |
| 220 |
|
| # define ALLOC(s) LZ4_malloc(s) |
| 221 |
|
| # define ALLOC_AND_ZERO(s) LZ4_calloc(1,s) |
| 222 |
|
| # define FREEMEM(p) LZ4_free(p) |
| 223 |
|
| #else |
| 224 |
|
| # include <stdlib.h> /* malloc, calloc, free */ |
| 225 |
|
| # define ALLOC(s) malloc(s) |
| 226 |
|
| # define ALLOC_AND_ZERO(s) calloc(1,s) |
| 227 |
|
| # define FREEMEM(p) free(p) |
| 228 |
|
| #endif |
| 229 |
|
| |
| 230 |
|
| #if ! LZ4_FREESTANDING |
| 231 |
|
| # include <string.h> /* memset, memcpy */ |
| 232 |
|
| #endif |
| 233 |
|
| #if !defined(LZ4_memset) |
| 234 |
|
| # define LZ4_memset(p,v,s) memset((p),(v),(s)) |
| 235 |
|
| #endif |
| 236 |
|
| #define MEM_INIT(p,v,s) LZ4_memset((p),(v),(s)) |
| 237 |
|
| |
| 238 |
|
| |
| 239 |
|
| /*-************************************ |
| 240 |
|
| * Common Constants |
| 241 |
|
| **************************************/ |
| 242 |
|
| #define MINMATCH 4 |
| 243 |
|
| |
| 244 |
|
| #define WILDCOPYLENGTH 8 |
| 245 |
|
| #define LASTLITERALS 5 /* see ../doc/lz4_Block_format.md#parsing-restrictions */ |
| 246 |
|
| #define MFLIMIT 12 /* see ../doc/lz4_Block_format.md#parsing-restrictions */ |
| 247 |
|
| #define MATCH_SAFEGUARD_DISTANCE ((2*WILDCOPYLENGTH) - MINMATCH) /* ensure it's possible to write 2 x wildcopyLength without overflowing output buffer */ |
| 248 |
|
| #define FASTLOOP_SAFE_DISTANCE 64 |
| 249 |
|
| static const int LZ4_minLength = (MFLIMIT+1); |
| 250 |
|
| |
| 251 |
|
| #define KB *(1 <<10) |
| 252 |
|
| #define MB *(1 <<20) |
| 253 |
|
| #define GB *(1U<<30) |
| 254 |
|
| |
| 255 |
|
| #define LZ4_DISTANCE_ABSOLUTE_MAX 65535 |
| 256 |
|
| #if (LZ4_DISTANCE_MAX > LZ4_DISTANCE_ABSOLUTE_MAX) /* max supported by LZ4 format */ |
| 257 |
|
| # error "LZ4_DISTANCE_MAX is too big : must be <= 65535" |
| 258 |
|
| #endif |
| 259 |
|
| |
| 260 |
|
| #define ML_BITS 4 |
| 261 |
|
| #define ML_MASK ((1U<<ML_BITS)-1) |
| 262 |
|
| #define RUN_BITS (8-ML_BITS) |
| 263 |
|
| #define RUN_MASK ((1U<<RUN_BITS)-1) |
| 264 |
|
| |
| 265 |
|
| |
| 266 |
|
| /*-************************************ |
| 267 |
|
| * Error detection |
| 268 |
|
| **************************************/ |
| 269 |
|
| #if defined(LZ4_DEBUG) && (LZ4_DEBUG>=1) |
| 270 |
|
| # include <assert.h> |
| 271 |
|
| #else |
| 272 |
|
| # ifndef assert |
| 273 |
|
| # define assert(condition) ((void)0) |
| 274 |
|
| # endif |
| 275 |
|
| #endif |
| 276 |
|
| |
| 277 |
|
| #define LZ4_STATIC_ASSERT(c) { enum { LZ4_static_assert = 1/(int)(!!(c)) }; } /* use after variable declarations */ |
| 278 |
|
| |
| 279 |
|
| #if defined(LZ4_DEBUG) && (LZ4_DEBUG>=2) |
| 280 |
|
| # include <stdio.h> |
| 281 |
|
| static int g_debuglog_enable = 1; |
| 282 |
|
| # define DEBUGLOG(l, ...) { \ |
| 283 |
|
| if ((g_debuglog_enable) && (l<=LZ4_DEBUG)) { \ |
| 284 |
|
| fprintf(stderr, __FILE__ " %i: ", __LINE__); \ |
| 285 |
|
| fprintf(stderr, __VA_ARGS__); \ |
| 286 |
|
| fprintf(stderr, " \n"); \ |
| 287 |
|
| } } |
| 288 |
|
| #else |
| 289 |
|
| # define DEBUGLOG(l, ...) {} /* disabled */ |
| 290 |
|
| #endif |
| 291 |
|
| |
| 292 |
0 |
| static int LZ4_isAligned(const void* ptr, size_t alignment) |
| 293 |
|
| { |
| 294 |
0 |
| return ((size_t)ptr & (alignment -1)) == 0; |
| 295 |
|
| } |
| 296 |
|
| |
| 297 |
|
| |
| 298 |
|
| /*-************************************ |
| 299 |
|
| * Types |
| 300 |
|
| **************************************/ |
| 301 |
|
| #include <limits.h> |
| 302 |
|
| #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) |
| 303 |
|
| # include <stdint.h> |
| 304 |
|
| typedef unsigned char BYTE; /*uint8_t not necessarily blessed to alias arbitrary type*/ |
| 305 |
|
| typedef uint16_t U16; |
| 306 |
|
| typedef uint32_t U32; |
| 307 |
|
| typedef int32_t S32; |
| 308 |
|
| typedef uint64_t U64; |
| 309 |
|
| typedef uintptr_t uptrval; |
| 310 |
|
| #else |
| 311 |
|
| # if UINT_MAX != 4294967295UL |
| 312 |
|
| # error "LZ4 code (when not C++ or C99) assumes that sizeof(int) == 4" |
| 313 |
|
| # endif |
| 314 |
|
| typedef unsigned char BYTE; |
| 315 |
|
| typedef unsigned short U16; |
| 316 |
|
| typedef unsigned int U32; |
| 317 |
|
| typedef signed int S32; |
| 318 |
|
| typedef unsigned long long U64; |
| 319 |
|
| typedef size_t uptrval; /* generally true, except OpenVMS-64 */ |
| 320 |
|
| #endif |
| 321 |
|
| |
| 322 |
|
| #if defined(__x86_64__) |
| 323 |
|
| typedef U64 reg_t; /* 64-bits in x32 mode */ |
| 324 |
|
| #else |
| 325 |
|
| typedef size_t reg_t; /* 32-bits in x32 mode */ |
| 326 |
|
| #endif |
| 327 |
|
| |
| 328 |
|
| typedef enum { |
| 329 |
|
| notLimited = 0, |
| 330 |
|
| limitedOutput = 1, |
| 331 |
|
| fillOutput = 2 |
| 332 |
|
| } limitedOutput_directive; |
| 333 |
|
| |
| 334 |
|
| |
| 335 |
|
| /*-************************************ |
| 336 |
|
| * Reading and writing into memory |
| 337 |
|
| **************************************/ |
| 338 |
|
| |
| 339 |
|
| /** |
| 340 |
|
| * LZ4 relies on memcpy with a constant size being inlined. In freestanding |
| 341 |
|
| * environments, the compiler can't assume the implementation of memcpy() is |
| 342 |
|
| * standard compliant, so it can't apply its specialized memcpy() inlining |
| 343 |
|
| * logic. When possible, use __builtin_memcpy() to tell the compiler to analyze |
| 344 |
|
| * memcpy() as if it were standard compliant, so it can inline it in freestanding |
| 345 |
|
| * environments. This is needed when decompressing the Linux Kernel, for example. |
| 346 |
|
| */ |
| 347 |
|
| #if !defined(LZ4_memcpy) |
| 348 |
|
| # if defined(__GNUC__) && (__GNUC__ >= 4) |
| 349 |
|
| # define LZ4_memcpy(dst, src, size) __builtin_memcpy(dst, src, size) |
| 350 |
|
| # else |
| 351 |
|
| # define LZ4_memcpy(dst, src, size) memcpy(dst, src, size) |
| 352 |
|
| # endif |
| 353 |
|
| #endif |
| 354 |
|
| |
| 355 |
|
| #if !defined(LZ4_memmove) |
| 356 |
|
| # if defined(__GNUC__) && (__GNUC__ >= 4) |
| 357 |
|
| # define LZ4_memmove __builtin_memmove |
| 358 |
|
| # else |
| 359 |
|
| # define LZ4_memmove memmove |
| 360 |
|
| # endif |
| 361 |
|
| #endif |
| 362 |
|
| |
| 363 |
0 |
| static unsigned LZ4_isLittleEndian(void) |
| 364 |
|
| { |
| 365 |
0 |
| const union { U32 u; BYTE c[4]; } one = { 1 }; /* don't use static : performance detrimental */ |
| 366 |
0 |
| return one.c[0]; |
| 367 |
|
| } |
| 368 |
|
| |
| 369 |
|
| #if defined(__GNUC__) || defined(__INTEL_COMPILER) |
| 370 |
|
| #define LZ4_PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__)) |
| 371 |
|
| #elif defined(_MSC_VER) |
| 372 |
|
| #define LZ4_PACK( __Declaration__ ) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop)) |
| 373 |
|
| #endif |
| 374 |
|
| |
| 375 |
|
| #if defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS==2) |
| 376 |
|
| /* lie to the compiler about data alignment; use with caution */ |
| 377 |
|
| |
| 378 |
|
| static U16 LZ4_read16(const void* memPtr) { return *(const U16*) memPtr; } |
| 379 |
|
| static U32 LZ4_read32(const void* memPtr) { return *(const U32*) memPtr; } |
| 380 |
|
| static reg_t LZ4_read_ARCH(const void* memPtr) { return *(const reg_t*) memPtr; } |
| 381 |
|
| |
| 382 |
|
| static void LZ4_write16(void* memPtr, U16 value) { *(U16*)memPtr = value; } |
| 383 |
|
| static void LZ4_write32(void* memPtr, U32 value) { *(U32*)memPtr = value; } |
| 384 |
|
| |
| 385 |
|
| #elif defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS==1) |
| 386 |
|
| |
| 387 |
|
| /* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */ |
| 388 |
|
| /* currently only defined for gcc and icc */ |
| 389 |
|
| LZ4_PACK(typedef struct { U16 u16; }) LZ4_unalign16; |
| 390 |
|
| LZ4_PACK(typedef struct { U32 u32; }) LZ4_unalign32; |
| 391 |
|
| LZ4_PACK(typedef struct { reg_t uArch; }) LZ4_unalignST; |
| 392 |
|
| |
| 393 |
0 |
| static U16 LZ4_read16(const void* ptr) { return ((const LZ4_unalign16*)ptr)->u16; } |
| 394 |
0 |
| static U32 LZ4_read32(const void* ptr) { return ((const LZ4_unalign32*)ptr)->u32; } |
| 395 |
0 |
| static reg_t LZ4_read_ARCH(const void* ptr) { return ((const LZ4_unalignST*)ptr)->uArch; } |
| 396 |
|
| |
| 397 |
0 |
| static void LZ4_write16(void* memPtr, U16 value) { ((LZ4_unalign16*)memPtr)->u16 = value; } |
| 398 |
0 |
| static void LZ4_write32(void* memPtr, U32 value) { ((LZ4_unalign32*)memPtr)->u32 = value; } |
| 399 |
|
| |
| 400 |
|
| #else /* safe and portable access using memcpy() */ |
| 401 |
|
| |
| 402 |
|
| static U16 LZ4_read16(const void* memPtr) |
| 403 |
|
| { |
| 404 |
|
| U16 val; LZ4_memcpy(&val, memPtr, sizeof(val)); return val; |
| 405 |
|
| } |
| 406 |
|
| |
| 407 |
|
| static U32 LZ4_read32(const void* memPtr) |
| 408 |
|
| { |
| 409 |
|
| U32 val; LZ4_memcpy(&val, memPtr, sizeof(val)); return val; |
| 410 |
|
| } |
| 411 |
|
| |
| 412 |
|
| static reg_t LZ4_read_ARCH(const void* memPtr) |
| 413 |
|
| { |
| 414 |
|
| reg_t val; LZ4_memcpy(&val, memPtr, sizeof(val)); return val; |
| 415 |
|
| } |
| 416 |
|
| |
| 417 |
|
| static void LZ4_write16(void* memPtr, U16 value) |
| 418 |
|
| { |
| 419 |
|
| LZ4_memcpy(memPtr, &value, sizeof(value)); |
| 420 |
|
| } |
| 421 |
|
| |
| 422 |
|
| static void LZ4_write32(void* memPtr, U32 value) |
| 423 |
|
| { |
| 424 |
|
| LZ4_memcpy(memPtr, &value, sizeof(value)); |
| 425 |
|
| } |
| 426 |
|
| |
| 427 |
|
| #endif /* LZ4_FORCE_MEMORY_ACCESS */ |
| 428 |
|
| |
| 429 |
|
| |
| 430 |
0 |
| static U16 LZ4_readLE16(const void* memPtr) |
| 431 |
|
| { |
| 432 |
0 |
▶ | if (LZ4_isLittleEndian()) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
|
| 433 |
0 |
| return LZ4_read16(memPtr); |
| 434 |
|
| } else { |
| 435 |
0 |
| const BYTE* p = (const BYTE*)memPtr; |
| 436 |
0 |
| return (U16)((U16)p[0] | (p[1]<<8)); |
| 437 |
|
| } |
| 438 |
|
| } |
| 439 |
|
| |
| 440 |
|
| #ifdef LZ4_STATIC_LINKING_ONLY_ENDIANNESS_INDEPENDENT_OUTPUT |
| 441 |
|
| static U32 LZ4_readLE32(const void* memPtr) |
| 442 |
|
| { |
| 443 |
|
| if (LZ4_isLittleEndian()) { |
| 444 |
|
| return LZ4_read32(memPtr); |
| 445 |
|
| } else { |
| 446 |
|
| const BYTE* p = (const BYTE*)memPtr; |
| 447 |
|
| return (U32)p[0] | (p[1]<<8) | (p[2]<<16) | (p[3]<<24); |
| 448 |
|
| } |
| 449 |
|
| } |
| 450 |
|
| #endif |
| 451 |
|
| |
| 452 |
0 |
| static void LZ4_writeLE16(void* memPtr, U16 value) |
| 453 |
|
| { |
| 454 |
0 |
▶ | if (LZ4_isLittleEndian()) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
|
| 455 |
0 |
| LZ4_write16(memPtr, value); |
| 456 |
|
| } else { |
| 457 |
0 |
| BYTE* p = (BYTE*)memPtr; |
| 458 |
0 |
| p[0] = (BYTE) value; |
| 459 |
0 |
| p[1] = (BYTE)(value>>8); |
| 460 |
|
| } |
| 461 |
0 |
| } |
| 462 |
|
| |
| 463 |
|
| /* customized variant of memcpy, which can overwrite up to 8 bytes beyond dstEnd */ |
| 464 |
|
| LZ4_FORCE_INLINE |
| 465 |
|
| void LZ4_wildCopy8(void* dstPtr, const void* srcPtr, void* dstEnd) |
| 466 |
|
| { |
| 467 |
0 |
| BYTE* d = (BYTE*)dstPtr; |
| 468 |
0 |
| const BYTE* s = (const BYTE*)srcPtr; |
| 469 |
0 |
| BYTE* const e = (BYTE*)dstEnd; |
| 470 |
|
| |
| 471 |
0 |
▶ | do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
Branch: 44 branches
| Branch | True | False | Total |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,8); d+=8; s+=8; } while (d<e); |
0 |
0 |
0 |
|
| 472 |
0 |
| } |
| 473 |
|
| |
| 474 |
|
| static const unsigned inc32table[8] = {0, 1, 2, 1, 0, 4, 4, 4}; |
| 475 |
|
| static const int dec64table[8] = {0, 0, 0, -1, -4, 1, 2, 3}; |
| 476 |
|
| |
| 477 |
|
| |
| 478 |
|
| #ifndef LZ4_FAST_DEC_LOOP |
| 479 |
|
| # if defined __i386__ || defined _M_IX86 || defined __x86_64__ || defined _M_X64 |
| 480 |
|
| # define LZ4_FAST_DEC_LOOP 1 |
| 481 |
|
| # elif defined(__aarch64__) |
| 482 |
|
| # define LZ4_FAST_DEC_LOOP 1 |
| 483 |
|
| # elif defined(__PPC64__) |
| 484 |
|
| # define LZ4_FAST_DEC_LOOP 1 |
| 485 |
|
| # elif defined(__riscv) && (__riscv_xlen == 64) && defined(__riscv_misaligned_fast) |
| 486 |
|
| # define LZ4_FAST_DEC_LOOP 1 /* otherwise, unaligned memcpy() become byte copies, defeating the fast loop */ |
| 487 |
|
| # else |
| 488 |
|
| # define LZ4_FAST_DEC_LOOP 0 |
| 489 |
|
| # endif |
| 490 |
|
| #endif |
| 491 |
|
| |
| 492 |
|
| /* LZ4_memcpy_using_offset_base() : |
| 493 |
|
| * copy a match of length >= MINMATCH (srcPtr + offset == dstPtr, overlap allowed), |
| 494 |
|
| * can overwrite up to 12 bytes beyond dstEnd */ |
| 495 |
|
| LZ4_FORCE_INLINE void |
| 496 |
|
| LZ4_memcpy_using_offset_base(BYTE* dstPtr, const BYTE* srcPtr, BYTE* dstEnd, const size_t offset) |
| 497 |
|
| { |
| 498 |
0 |
| assert(srcPtr + offset == dstPtr); |
| 499 |
0 |
▶ | if (unlikely(offset < 8)) { |
Branch: 18 branches
| Branch | True | False | Total |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
| if (unlikely(offset < 8)) { |
0 |
0 |
0 |
|
| 500 |
0 |
| LZ4_write32(dstPtr, 0); /* silence an msan warning when offset==0 */ |
| 501 |
0 |
| dstPtr[0] = srcPtr[0]; |
| 502 |
0 |
| dstPtr[1] = srcPtr[1]; |
| 503 |
0 |
| dstPtr[2] = srcPtr[2]; |
| 504 |
0 |
| dstPtr[3] = srcPtr[3]; |
| 505 |
0 |
| srcPtr += inc32table[offset]; |
| 506 |
0 |
| LZ4_memcpy(dstPtr+4, srcPtr, 4); |
| 507 |
0 |
| srcPtr -= dec64table[offset]; |
| 508 |
|
| } else { |
| 509 |
0 |
| LZ4_memcpy(dstPtr, srcPtr, 8); |
| 510 |
0 |
| srcPtr += 8; |
| 511 |
|
| } |
| 512 |
0 |
| dstPtr += 8; |
| 513 |
|
| |
| 514 |
|
| /* srcPtr is now at least 8 bytes behind dstPtr */ |
| 515 |
0 |
| LZ4_memcpy(dstPtr, srcPtr, 8); |
| 516 |
0 |
▶ | if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
Branch: 18 branches
| Branch | True | False | Total |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
| if (dstEnd > dstPtr + 8) { LZ4_wildCopy8(dstPtr + 8, srcPtr + 8, dstEnd); } |
0 |
0 |
0 |
|
| 517 |
0 |
| } |
| 518 |
|
| |
| 519 |
|
| |
| 520 |
|
| #if LZ4_FAST_DEC_LOOP |
| 521 |
|
| |
| 522 |
|
| /* LZ4_wildCopy64 is faster on aarch64, x86-64 and ppc64, but not on 32-bit x86. |
| 523 |
|
| * On wasm, it depends on the host cpu (faster on Apple silicon, slower on x86-64) : |
| 524 |
|
| * it's not enabled by default, but can be, with LZ4_FAST_DEC_LOOP, from the build command */ |
| 525 |
|
| #ifndef LZ4_WILDCOPY64 |
| 526 |
|
| # if defined(__aarch64__) || defined(__x86_64__) || defined(_M_X64) || defined(__PPC64__) |
| 527 |
|
| # define LZ4_WILDCOPY64 1 |
| 528 |
|
| # else |
| 529 |
|
| # define LZ4_WILDCOPY64 0 |
| 530 |
|
| # endif |
| 531 |
|
| #endif |
| 532 |
|
| |
| 533 |
|
| #if LZ4_WILDCOPY64 |
| 534 |
|
| /* customized variant of memcpy, which can overwrite up to 64 bytes beyond dstEnd */ |
| 535 |
|
| LZ4_FORCE_INLINE void |
| 536 |
|
| LZ4_wildCopy64(void* dstPtr, const void* srcPtr, void* dstEnd) |
| 537 |
|
| { |
| 538 |
0 |
| BYTE* d = (BYTE*)dstPtr; |
| 539 |
0 |
| const BYTE* s = (const BYTE*)srcPtr; |
| 540 |
0 |
| BYTE* const e = (BYTE*)dstEnd; |
| 541 |
|
| |
| 542 |
0 |
▶ | do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
Branch: 18 branches
| Branch | True | False | Total |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e); |
0 |
0 |
0 |
|
| 543 |
0 |
| } |
| 544 |
|
| #endif |
| 545 |
|
| |
| 546 |
|
| /* customized variant of memcpy, which can overwrite up to 32 bytes beyond dstEnd |
| 547 |
|
| * this version copies two times 16 bytes (instead of one time 32 bytes) |
| 548 |
|
| * because it must be compatible with offsets >= 16. */ |
| 549 |
|
| LZ4_FORCE_INLINE void |
| 550 |
|
| LZ4_wildCopy32(void* dstPtr, const void* srcPtr, void* dstEnd) |
| 551 |
|
| { |
| 552 |
0 |
| BYTE* d = (BYTE*)dstPtr; |
| 553 |
0 |
| const BYTE* s = (const BYTE*)srcPtr; |
| 554 |
0 |
| BYTE* const e = (BYTE*)dstEnd; |
| 555 |
|
| |
| 556 |
0 |
▶ | do { LZ4_memcpy(d,s,16); LZ4_memcpy(d+16,s+16,16); d+=32; s+=32; } while (d<e); |
Branch: 9 branches
| Branch | True | False | Total |
| do { LZ4_memcpy(d,s,16); LZ4_memcpy(d+16,s+16,16); d+=32; s+=32; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,16); LZ4_memcpy(d+16,s+16,16); d+=32; s+=32; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,16); LZ4_memcpy(d+16,s+16,16); d+=32; s+=32; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,16); LZ4_memcpy(d+16,s+16,16); d+=32; s+=32; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,16); LZ4_memcpy(d+16,s+16,16); d+=32; s+=32; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,16); LZ4_memcpy(d+16,s+16,16); d+=32; s+=32; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,16); LZ4_memcpy(d+16,s+16,16); d+=32; s+=32; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,16); LZ4_memcpy(d+16,s+16,16); d+=32; s+=32; } while (d<e); |
0 |
0 |
0 |
| do { LZ4_memcpy(d,s,16); LZ4_memcpy(d+16,s+16,16); d+=32; s+=32; } while (d<e); |
0 |
0 |
0 |
|
| 557 |
0 |
| } |
| 558 |
|
| |
| 559 |
|
| /* LZ4_memcpy_using_offset() presumes : |
| 560 |
|
| * - dstEnd >= dstPtr + MINMATCH |
| 561 |
|
| * - there is at least 12 bytes available to write after dstEnd */ |
| 562 |
|
| LZ4_FORCE_INLINE void |
| 563 |
|
| LZ4_memcpy_using_offset(BYTE* dstPtr, const BYTE* srcPtr, BYTE* dstEnd, const size_t offset) |
| 564 |
|
| { |
| 565 |
|
| BYTE v[8]; |
| 566 |
|
| |
| 567 |
0 |
▶ | assert(dstEnd >= dstPtr + MINMATCH); |
Branch: 9 branches
| Branch | True | False | Total |
| assert(dstEnd >= dstPtr + MINMATCH); |
0 |
0 |
0 |
| assert(dstEnd >= dstPtr + MINMATCH); |
0 |
0 |
0 |
| assert(dstEnd >= dstPtr + MINMATCH); |
0 |
0 |
0 |
| assert(dstEnd >= dstPtr + MINMATCH); |
0 |
0 |
0 |
| assert(dstEnd >= dstPtr + MINMATCH); |
0 |
0 |
0 |
| assert(dstEnd >= dstPtr + MINMATCH); |
0 |
0 |
0 |
| assert(dstEnd >= dstPtr + MINMATCH); |
0 |
0 |
0 |
| assert(dstEnd >= dstPtr + MINMATCH); |
0 |
0 |
0 |
| assert(dstEnd >= dstPtr + MINMATCH); |
0 |
0 |
0 |
|
| 568 |
|
| |
| 569 |
0 |
| switch(offset) { |
| 570 |
0 |
| case 1: |
| 571 |
0 |
| MEM_INIT(v, *srcPtr, 8); |
| 572 |
0 |
| break; |
| 573 |
0 |
| case 2: |
| 574 |
0 |
| LZ4_memcpy(v, srcPtr, 2); |
| 575 |
0 |
| LZ4_memcpy(&v[2], srcPtr, 2); |
| 576 |
|
| #if defined(_MSC_VER) && (_MSC_VER <= 1937) /* MSVC 2022 ver 17.7 or earlier */ |
| 577 |
|
| # pragma warning(push) |
| 578 |
|
| # pragma warning(disable : 6385) /* warning C6385: Reading invalid data from 'v'. */ |
| 579 |
|
| #endif |
| 580 |
0 |
| LZ4_memcpy(&v[4], v, 4); |
| 581 |
|
| #if defined(_MSC_VER) && (_MSC_VER <= 1937) /* MSVC 2022 ver 17.7 or earlier */ |
| 582 |
|
| # pragma warning(pop) |
| 583 |
|
| #endif |
| 584 |
0 |
| break; |
| 585 |
0 |
| case 4: |
| 586 |
0 |
| LZ4_memcpy(v, srcPtr, 4); |
| 587 |
0 |
| LZ4_memcpy(&v[4], srcPtr, 4); |
| 588 |
0 |
| break; |
| 589 |
0 |
▶ | default: |
Branch: 9 branches
| Branch | True | False | Total |
| default: |
0 |
0 |
0 |
| default: |
0 |
0 |
0 |
| default: |
0 |
0 |
0 |
| default: |
0 |
0 |
0 |
| default: |
0 |
0 |
0 |
| default: |
0 |
0 |
0 |
| default: |
0 |
0 |
0 |
| default: |
0 |
0 |
0 |
| default: |
0 |
0 |
0 |
|
| 590 |
|
| LZ4_memcpy_using_offset_base(dstPtr, srcPtr, dstEnd, offset); |
| 591 |
0 |
| return; |
| 592 |
|
| } |
| 593 |
|
| |
| 594 |
0 |
| LZ4_memcpy(dstPtr, v, 8); |
| 595 |
0 |
| dstPtr += 8; |
| 596 |
0 |
▶ | while (dstPtr < dstEnd) { |
Branch: 9 branches
| Branch | True | False | Total |
| while (dstPtr < dstEnd) { |
0 |
0 |
0 |
| while (dstPtr < dstEnd) { |
0 |
0 |
0 |
| while (dstPtr < dstEnd) { |
0 |
0 |
0 |
| while (dstPtr < dstEnd) { |
0 |
0 |
0 |
| while (dstPtr < dstEnd) { |
0 |
0 |
0 |
| while (dstPtr < dstEnd) { |
0 |
0 |
0 |
| while (dstPtr < dstEnd) { |
0 |
0 |
0 |
| while (dstPtr < dstEnd) { |
0 |
0 |
0 |
| while (dstPtr < dstEnd) { |
0 |
0 |
0 |
|
| 597 |
0 |
| LZ4_memcpy(dstPtr, v, 8); |
| 598 |
0 |
| dstPtr += 8; |
| 599 |
|
| } |
| 600 |
|
| } |
| 601 |
|
| #endif |
| 602 |
|
| |
| 603 |
|
| |
| 604 |
|
| /*-************************************ |
| 605 |
|
| * Common functions |
| 606 |
|
| **************************************/ |
| 607 |
0 |
| static unsigned LZ4_NbCommonBytes (reg_t val) |
| 608 |
|
| { |
| 609 |
0 |
▶ | assert(val != 0); |
Branch: 1 branch
| Branch | True | False | Total |
| assert(val != 0); |
0 |
0 |
0 |
|
| 610 |
0 |
▶ | if (LZ4_isLittleEndian()) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
|
| 611 |
|
| if (sizeof(val) == 8) { |
| 612 |
|
| # if defined(_MSC_VER) && (_MSC_VER >= 1800) && (defined(_M_AMD64) && !defined(_M_ARM64EC)) && !defined(LZ4_FORCE_SW_BITCOUNT) |
| 613 |
|
| /*-************************************************************************************************* |
| 614 |
|
| * ARM64EC is a Microsoft-designed ARM64 ABI compatible with AMD64 applications on ARM64 Windows 11. |
| 615 |
|
| * The ARM64EC ABI does not support AVX/AVX2/AVX512 instructions, nor their relevant intrinsics |
| 616 |
|
| * including _tzcnt_u64. Therefore, we need to neuter the _tzcnt_u64 code path for ARM64EC. |
| 617 |
|
| ****************************************************************************************************/ |
| 618 |
|
| # if defined(__clang__) && (__clang_major__ < 10) |
| 619 |
|
| /* Avoid undefined clang-cl intrinsics issue. |
| 620 |
|
| * See https://github.com/lz4/lz4/pull/1017 for details. */ |
| 621 |
|
| return (unsigned)__builtin_ia32_tzcnt_u64(val) >> 3; |
| 622 |
|
| # else |
| 623 |
|
| /* x64 CPUS without BMI support interpret `TZCNT` as `REP BSF` */ |
| 624 |
|
| return (unsigned)_tzcnt_u64(val) >> 3; |
| 625 |
|
| # endif |
| 626 |
|
| # elif defined(_MSC_VER) && defined(_WIN64) && !defined(LZ4_FORCE_SW_BITCOUNT) |
| 627 |
|
| unsigned long r = 0; |
| 628 |
|
| _BitScanForward64(&r, (U64)val); |
| 629 |
|
| return (unsigned)r >> 3; |
| 630 |
|
| # elif (defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 3) || \ |
| 631 |
|
| ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))))) && \ |
| 632 |
|
| !defined(LZ4_FORCE_SW_BITCOUNT) |
| 633 |
0 |
| return (unsigned)__builtin_ctzll((U64)val) >> 3; |
| 634 |
|
| # else |
| 635 |
|
| const U64 m = 0x0101010101010101ULL; |
| 636 |
|
| val ^= val - 1; |
| 637 |
|
| return (unsigned)(((U64)((val & (m - 1)) * m)) >> 56); |
| 638 |
|
| # endif |
| 639 |
|
| } else /* 32 bits */ { |
| 640 |
|
| # if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(LZ4_FORCE_SW_BITCOUNT) |
| 641 |
|
| unsigned long r; |
| 642 |
|
| _BitScanForward(&r, (U32)val); |
| 643 |
|
| return (unsigned)r >> 3; |
| 644 |
|
| # elif (defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 3) || \ |
| 645 |
|
| ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))))) && \ |
| 646 |
|
| !defined(__TINYC__) && !defined(LZ4_FORCE_SW_BITCOUNT) |
| 647 |
|
| return (unsigned)__builtin_ctz((U32)val) >> 3; |
| 648 |
|
| # else |
| 649 |
|
| const U32 m = 0x01010101; |
| 650 |
|
| return (unsigned)((((val - 1) ^ val) & (m - 1)) * m) >> 24; |
| 651 |
|
| # endif |
| 652 |
|
| } |
| 653 |
|
| } else /* Big Endian CPU */ { |
| 654 |
|
| if (sizeof(val)==8) { |
| 655 |
|
| # if (defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 3) || \ |
| 656 |
|
| ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))))) && \ |
| 657 |
|
| !defined(__TINYC__) && !defined(LZ4_FORCE_SW_BITCOUNT) |
| 658 |
0 |
| return (unsigned)__builtin_clzll((U64)val) >> 3; |
| 659 |
|
| # else |
| 660 |
|
| #if 1 |
| 661 |
|
| /* this method is probably faster, |
| 662 |
|
| * but adds a 128 bytes lookup table */ |
| 663 |
|
| static const unsigned char ctz7_tab[128] = { |
| 664 |
|
| 7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, |
| 665 |
|
| 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, |
| 666 |
|
| 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, |
| 667 |
|
| 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, |
| 668 |
|
| 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, |
| 669 |
|
| 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, |
| 670 |
|
| 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, |
| 671 |
|
| 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, |
| 672 |
|
| }; |
| 673 |
|
| U64 const mask = 0x0101010101010101ULL; |
| 674 |
|
| U64 const t = (((val >> 8) - mask) | val) & mask; |
| 675 |
|
| return ctz7_tab[(t * 0x0080402010080402ULL) >> 57]; |
| 676 |
|
| #else |
| 677 |
|
| /* this method doesn't consume memory space like the previous one, |
| 678 |
|
| * but it contains several branches, |
| 679 |
|
| * that may end up slowing execution */ |
| 680 |
|
| static const U32 by32 = sizeof(val)*4; /* 32 on 64 bits (goal), 16 on 32 bits. |
| 681 |
|
| Just to avoid some static analyzer complaining about shift by 32 on 32-bits target. |
| 682 |
|
| Note that this code path is never triggered in 32-bits mode. */ |
| 683 |
|
| unsigned r; |
| 684 |
|
| if (!(val>>by32)) { r=4; } else { r=0; val>>=by32; } |
| 685 |
|
| if (!(val>>16)) { r+=2; val>>=8; } else { val>>=24; } |
| 686 |
|
| r += (!val); |
| 687 |
|
| return r; |
| 688 |
|
| #endif |
| 689 |
|
| # endif |
| 690 |
|
| } else /* 32 bits */ { |
| 691 |
|
| # if (defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 3) || \ |
| 692 |
|
| ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))))) && \ |
| 693 |
|
| !defined(LZ4_FORCE_SW_BITCOUNT) |
| 694 |
|
| return (unsigned)__builtin_clz((U32)val) >> 3; |
| 695 |
|
| # else |
| 696 |
|
| val >>= 8; |
| 697 |
|
| val = ((((val + 0x00FFFF00) | 0x00FFFFFF) + val) | |
| 698 |
|
| (val + 0x00FF0000)) >> 24; |
| 699 |
|
| return (unsigned)val ^ 3; |
| 700 |
|
| # endif |
| 701 |
|
| } |
| 702 |
|
| } |
| 703 |
|
| } |
| 704 |
|
| |
| 705 |
|
| |
| 706 |
|
| #define STEPSIZE sizeof(reg_t) |
| 707 |
|
| LZ4_FORCE_INLINE |
| 708 |
|
| unsigned LZ4_count(const BYTE* pIn, const BYTE* pMatch, const BYTE* pInLimit) |
| 709 |
|
| { |
| 710 |
0 |
| const BYTE* const pStart = pIn; |
| 711 |
|
| |
| 712 |
0 |
▶ | if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
Branch: 16 branches
| Branch | True | False | Total |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| if (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
|
| 713 |
0 |
| reg_t const diff = LZ4_read_ARCH(pMatch) ^ LZ4_read_ARCH(pIn); |
| 714 |
0 |
| if (!diff) { |
| 715 |
0 |
| pIn+=STEPSIZE; pMatch+=STEPSIZE; |
| 716 |
|
| } else { |
| 717 |
0 |
| return LZ4_NbCommonBytes(diff); |
| 718 |
|
| } } |
| 719 |
|
| |
| 720 |
0 |
▶ | while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
Branch: 49 branches
| Branch | True | False | Total |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
| while (likely(pIn < pInLimit-(STEPSIZE-1))) { |
0 |
0 |
0 |
|
| 721 |
0 |
| reg_t const diff = LZ4_read_ARCH(pMatch) ^ LZ4_read_ARCH(pIn); |
| 722 |
0 |
▶ | if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
Branch: 49 branches
| Branch | True | False | Total |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
| if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } |
0 |
0 |
0 |
|
| 723 |
0 |
| pIn += LZ4_NbCommonBytes(diff); |
| 724 |
0 |
| return (unsigned)(pIn - pStart); |
| 725 |
|
| } |
| 726 |
|
| |
| 727 |
0 |
▶ | if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
Branch: 98 branches
| Branch | True | False | Total |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
| if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } |
0 |
0 |
0 |
|
| 728 |
0 |
▶ | if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
Branch: 98 branches
| Branch | True | False | Total |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
| if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } |
0 |
0 |
0 |
|
| 729 |
0 |
▶ | if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
Branch: 98 branches
| Branch | True | False | Total |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
| if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; |
0 |
0 |
0 |
|
| 730 |
0 |
| return (unsigned)(pIn - pStart); |
| 731 |
|
| } |
| 732 |
|
| |
| 733 |
|
| |
| 734 |
|
| #ifndef LZ4_COMMONDEFS_ONLY |
| 735 |
|
| /*-************************************ |
| 736 |
|
| * Local Constants |
| 737 |
|
| **************************************/ |
| 738 |
|
| static const int LZ4_64Klimit = ((64 KB) + (MFLIMIT-1)); |
| 739 |
|
| static const U32 LZ4_skipTrigger = 6; /* Increase this value ==> compression run slower on incompressible data */ |
| 740 |
|
| |
| 741 |
|
| |
| 742 |
|
| /*-************************************ |
| 743 |
|
| * Local Structures and types |
| 744 |
|
| **************************************/ |
| 745 |
|
| typedef enum { clearedTable = 0, byPtr, byU32, byU16 } tableType_t; |
| 746 |
|
| |
| 747 |
|
| /** |
| 748 |
|
| * This enum distinguishes several different modes of accessing previous |
| 749 |
|
| * content in the stream. |
| 750 |
|
| * |
| 751 |
|
| * - noDict : There is no preceding content. |
| 752 |
|
| * - withPrefix64k : Table entries up to ctx->dictSize before the current blob |
| 753 |
|
| * blob being compressed are valid and refer to the preceding |
| 754 |
|
| * content (of length ctx->dictSize), which is available |
| 755 |
|
| * contiguously preceding in memory the content currently |
| 756 |
|
| * being compressed. |
| 757 |
|
| * - usingExtDict : Like withPrefix64k, but the preceding content is somewhere |
| 758 |
|
| * else in memory, starting at ctx->dictionary with length |
| 759 |
|
| * ctx->dictSize. |
| 760 |
|
| * - usingDictCtx : Everything concerning the preceding content is |
| 761 |
|
| * in a separate context, pointed to by ctx->dictCtx. |
| 762 |
|
| * ctx->dictionary, ctx->dictSize, and table entries |
| 763 |
|
| * in the current context that refer to positions |
| 764 |
|
| * preceding the beginning of the current compression are |
| 765 |
|
| * ignored. Instead, ctx->dictCtx->dictionary and ctx->dictCtx |
| 766 |
|
| * ->dictSize describe the location and size of the preceding |
| 767 |
|
| * content, and matches are found by looking in the ctx |
| 768 |
|
| * ->dictCtx->hashTable. |
| 769 |
|
| */ |
| 770 |
|
| typedef enum { noDict = 0, withPrefix64k, usingExtDict, usingDictCtx } dict_directive; |
| 771 |
|
| typedef enum { noDictIssue = 0, dictSmall } dictIssue_directive; |
| 772 |
|
| |
| 773 |
|
| |
| 774 |
|
| /*-************************************ |
| 775 |
|
| * Local Utils |
| 776 |
|
| **************************************/ |
| 777 |
0 |
| int LZ4_versionNumber (void) { return LZ4_VERSION_NUMBER; } |
| 778 |
0 |
| const char* LZ4_versionString(void) { return LZ4_VERSION_STRING; } |
| 779 |
0 |
▶ | int LZ4_compressBound(int isize) { return LZ4_COMPRESSBOUND(isize); } |
Branch: 1 branch
| Branch | True | False | Total |
| int LZ4_compressBound(int isize) { return LZ4_COMPRESSBOUND(isize); } |
0 |
0 |
0 |
|
| 780 |
0 |
| int LZ4_sizeofState(void) { return sizeof(LZ4_stream_t); } |
| 781 |
|
| |
| 782 |
|
| |
| 783 |
|
| /*-**************************************** |
| 784 |
|
| * Internal Definitions, used only in Tests |
| 785 |
|
| *******************************************/ |
| 786 |
|
| #if defined (__cplusplus) |
| 787 |
|
| extern "C" { |
| 788 |
|
| #endif |
| 789 |
|
| |
| 790 |
|
| int LZ4_compress_forceExtDict (LZ4_stream_t* LZ4_dict, const char* source, char* dest, int srcSize); |
| 791 |
|
| |
| 792 |
|
| int LZ4_decompress_safe_forceExtDict(const char* source, char* dest, |
| 793 |
|
| int compressedSize, int maxOutputSize, |
| 794 |
|
| const void* dictStart, size_t dictSize); |
| 795 |
|
| int LZ4_decompress_safe_partial_forceExtDict(const char* source, char* dest, |
| 796 |
|
| int compressedSize, int targetOutputSize, int dstCapacity, |
| 797 |
|
| const void* dictStart, size_t dictSize); |
| 798 |
|
| #if defined (__cplusplus) |
| 799 |
|
| } |
| 800 |
|
| #endif |
| 801 |
|
| |
| 802 |
|
| |
| 803 |
|
| /*-**************************************** |
| 804 |
|
| * Obsolete functions, removed from lz4.h (v1.11.0) |
| 805 |
|
| * still exported, for programs linked to previous versions |
| 806 |
|
| *******************************************/ |
| 807 |
|
| #if defined (__cplusplus) |
| 808 |
|
| extern "C" { |
| 809 |
|
| #endif |
| 810 |
|
| |
| 811 |
|
| LZ4LIB_API int LZ4_compress (const char* src, char* dest, int srcSize); |
| 812 |
|
| LZ4LIB_API int LZ4_compress_limitedOutput (const char* src, char* dest, int srcSize, int maxOutputSize); |
| 813 |
|
| LZ4LIB_API int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize); |
| 814 |
|
| LZ4LIB_API int LZ4_compress_limitedOutput_withState (void* state, const char* source, char* dest, int inputSize, int maxOutputSize); |
| 815 |
|
| LZ4LIB_API int LZ4_compress_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize); |
| 816 |
|
| LZ4LIB_API int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize, int maxOutputSize); |
| 817 |
|
| LZ4LIB_API int LZ4_uncompress (const char* source, char* dest, int outputSize); |
| 818 |
|
| LZ4LIB_API int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize); |
| 819 |
|
| LZ4LIB_API void* LZ4_create (char* inputBuffer); |
| 820 |
|
| LZ4LIB_API int LZ4_sizeofStreamState(void); |
| 821 |
|
| LZ4LIB_API int LZ4_resetStreamState(void* state, char* inputBuffer); |
| 822 |
|
| LZ4LIB_API char* LZ4_slideInputBuffer (void* state); |
| 823 |
|
| LZ4LIB_API int LZ4_decompress_safe_withPrefix64k (const char* src, char* dst, int compressedSize, int maxDstSize); |
| 824 |
|
| LZ4LIB_API int LZ4_decompress_fast_withPrefix64k (const char* src, char* dst, int originalSize); |
| 825 |
|
| |
| 826 |
|
| #if defined (__cplusplus) |
| 827 |
|
| } |
| 828 |
|
| #endif |
| 829 |
|
| |
| 830 |
|
| /*-****************************** |
| 831 |
|
| * Compression functions |
| 832 |
|
| ********************************/ |
| 833 |
|
| LZ4_FORCE_INLINE U32 LZ4_hash4(U32 sequence, tableType_t const tableType) |
| 834 |
|
| { |
| 835 |
0 |
▶ | const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
Branch: 168 branches
| Branch | True | False | Total |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
|
| 836 |
0 |
| return ((sequence * 2654435761U) >> ((MINMATCH*8)-hashLog)); |
| 837 |
|
| } |
| 838 |
|
| |
| 839 |
|
| LZ4_FORCE_INLINE U32 LZ4_hash5(U64 sequence, tableType_t const tableType) |
| 840 |
|
| { |
| 841 |
0 |
▶ | const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
Branch: 168 branches
| Branch | True | False | Total |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
| const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; |
0 |
0 |
0 |
|
| 842 |
0 |
▶ | if (LZ4_isLittleEndian()) { |
Branch: 168 branches
| Branch | True | False | Total |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
| if (LZ4_isLittleEndian()) { |
0 |
0 |
0 |
|
| 843 |
0 |
| const U64 prime5bytes = 889523592379ULL; |
| 844 |
0 |
| return (U32)(((sequence << 24) * prime5bytes) >> (64 - hashLog)); |
| 845 |
|
| } else { |
| 846 |
0 |
| const U64 prime8bytes = 11400714785074694791ULL; |
| 847 |
0 |
| return (U32)(((sequence >> 24) * prime8bytes) >> (64 - hashLog)); |
| 848 |
|
| } |
| 849 |
|
| } |
| 850 |
|
| |
| 851 |
|
| LZ4_FORCE_INLINE U32 LZ4_hashPosition(const void* const p, tableType_t const tableType) |
| 852 |
|
| { |
| 853 |
0 |
▶ | if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
Branch: 83 branches
| Branch | True | False | Total |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
| if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); |
0 |
0 |
0 |
|
| 854 |
|
| |
| 855 |
|
| #ifdef LZ4_STATIC_LINKING_ONLY_ENDIANNESS_INDEPENDENT_OUTPUT |
| 856 |
|
| return LZ4_hash4(LZ4_readLE32(p), tableType); |
| 857 |
|
| #else |
| 858 |
0 |
| return LZ4_hash4(LZ4_read32(p), tableType); |
| 859 |
|
| #endif |
| 860 |
|
| } |
| 861 |
|
| |
| 862 |
|
| LZ4_FORCE_INLINE void LZ4_clearHash(U32 h, void* tableBase, tableType_t const tableType) |
| 863 |
|
| { |
| 864 |
0 |
| switch (tableType) |
| 865 |
|
| { |
| 866 |
0 |
| default: /* fallthrough */ |
| 867 |
0 |
| case clearedTable: { /* illegal! */ assert(0); return; } |
| 868 |
0 |
| case byPtr: { const BYTE** hashTable = (const BYTE**)tableBase; hashTable[h] = NULL; return; } |
| 869 |
0 |
| case byU32: { U32* hashTable = (U32*) tableBase; hashTable[h] = 0; return; } |
| 870 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; hashTable[h] = 0; return; } |
| 871 |
|
| } |
| 872 |
|
| } |
| 873 |
|
| |
| 874 |
|
| LZ4_FORCE_INLINE void LZ4_putIndexOnHash(U32 idx, U32 h, void* tableBase, tableType_t const tableType) |
| 875 |
|
| { |
| 876 |
0 |
| switch (tableType) |
| 877 |
|
| { |
| 878 |
0 |
| default: /* fallthrough */ |
| 879 |
|
| case clearedTable: /* fallthrough */ |
| 880 |
0 |
| case byPtr: { /* illegal! */ assert(0); return; } |
| 881 |
0 |
| case byU32: { U32* hashTable = (U32*) tableBase; hashTable[h] = idx; return; } |
| 882 |
0 |
▶ | case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
Branch: 70 branches
| Branch | True | False | Total |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
| case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } |
0 |
0 |
0 |
|
| 883 |
|
| } |
| 884 |
|
| } |
| 885 |
|
| |
| 886 |
|
| /* LZ4_putPositionOnHash() : only used in byPtr mode */ |
| 887 |
|
| LZ4_FORCE_INLINE void LZ4_putPositionOnHash(const BYTE* p, U32 h, |
| 888 |
|
| void* tableBase, tableType_t const tableType) |
| 889 |
|
| { |
| 890 |
0 |
| const BYTE** const hashTable = (const BYTE**)tableBase; |
| 891 |
0 |
| assert(tableType == byPtr); (void)tableType; |
| 892 |
0 |
| hashTable[h] = p; |
| 893 |
0 |
| } |
| 894 |
|
| |
| 895 |
|
| /* LZ4_putPosition() : |
| 896 |
|
| * register position p : by pointer (byPtr), or by index relative to base (byU32, byU16) */ |
| 897 |
|
| LZ4_FORCE_INLINE void LZ4_putPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* base) |
| 898 |
|
| { |
| 899 |
0 |
| U32 const h = LZ4_hashPosition(p, tableType); |
| 900 |
0 |
▶ | if (tableType == byPtr) { |
Branch: 17 branches
| Branch | True | False | Total |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
|
| 901 |
|
| LZ4_putPositionOnHash(p, h, tableBase, byPtr); |
| 902 |
|
| } else { |
| 903 |
0 |
| LZ4_putIndexOnHash((U32)(p - base), h, tableBase, tableType); |
| 904 |
|
| } |
| 905 |
0 |
| } |
| 906 |
|
| |
| 907 |
|
| /* LZ4_getIndexOnHash() : |
| 908 |
|
| * Index of match position registered in hash table. |
| 909 |
|
| * hash position must be calculated by using base+index, or dictBase+index. |
| 910 |
|
| * Assumption 1 : only valid if tableType == byU32 or byU16. |
| 911 |
|
| * Assumption 2 : h is presumed valid (within limits of hash table) |
| 912 |
|
| */ |
| 913 |
|
| LZ4_FORCE_INLINE U32 LZ4_getIndexOnHash(U32 h, const void* tableBase, tableType_t tableType) |
| 914 |
|
| { |
| 915 |
|
| LZ4_STATIC_ASSERT(LZ4_MEMORY_USAGE > 2); |
| 916 |
0 |
| if (tableType == byU32) { |
| 917 |
0 |
| const U32* const hashTable = (const U32*) tableBase; |
| 918 |
0 |
▶ | assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
Branch: 91 branches
| Branch | True | False | Total |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-2))); |
0 |
0 |
0 |
|
| 919 |
0 |
| return hashTable[h]; |
| 920 |
|
| } |
| 921 |
0 |
▶ | if (tableType == byU16) { |
Branch: 91 branches
| Branch | True | False | Total |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
| if (tableType == byU16) { |
0 |
0 |
0 |
|
| 922 |
0 |
| const U16* const hashTable = (const U16*) tableBase; |
| 923 |
0 |
▶ | assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
Branch: 91 branches
| Branch | True | False | Total |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
| assert(h < (1U << (LZ4_MEMORY_USAGE-1))); |
0 |
0 |
0 |
|
| 924 |
0 |
| return hashTable[h]; |
| 925 |
|
| } |
| 926 |
0 |
| assert(0); return 0; /* forbidden case */ |
| 927 |
|
| } |
| 928 |
|
| |
| 929 |
0 |
| static const BYTE* LZ4_getPositionOnHash(U32 h, const void* tableBase, tableType_t tableType) |
| 930 |
|
| { |
| 931 |
0 |
▶ | assert(tableType == byPtr); (void)tableType; |
Branch: 1 branch
| Branch | True | False | Total |
| assert(tableType == byPtr); (void)tableType; |
0 |
0 |
0 |
|
| 932 |
0 |
| { const BYTE* const* hashTable = (const BYTE* const*) tableBase; return hashTable[h]; } |
| 933 |
|
| } |
| 934 |
|
| |
| 935 |
|
| /* beyond this input size (1 KB by default), |
| 936 |
|
| * clearing the table is faster than rejecting its stale entries */ |
| 937 |
|
| #define LZ4_CLEAR_TABLE_THRESHOLD (LZ4_HASHTABLESIZE / 16) |
| 938 |
|
| |
| 939 |
|
| LZ4_FORCE_INLINE void |
| 940 |
|
| LZ4_prepareTable(LZ4_stream_t_internal* const cctx, |
| 941 |
|
| const int inputSize, |
| 942 |
|
| const tableType_t tableType) { |
| 943 |
|
| /* If the table hasn't been used, it's guaranteed to be zeroed out, and is |
| 944 |
|
| * therefore safe to use no matter what mode we're in. Otherwise, we figure |
| 945 |
|
| * out if it's safe to leave as is or whether it needs to be reset. |
| 946 |
|
| */ |
| 947 |
0 |
▶ | if ((tableType_t)cctx->tableType != clearedTable) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ((tableType_t)cctx->tableType != clearedTable) { |
0 |
0 |
0 |
|
| 948 |
0 |
▶ | assert(inputSize >= 0); |
Branch: 5 branches
| Branch | True | False | Total |
| assert(inputSize >= 0); |
0 |
0 |
0 |
| assert(inputSize >= 0); |
0 |
0 |
0 |
| assert(inputSize >= 0); |
0 |
0 |
0 |
| assert(inputSize >= 0); |
0 |
0 |
0 |
| assert(inputSize >= 0); |
0 |
0 |
0 |
|
| 949 |
0 |
▶ | if ((tableType_t)cctx->tableType != tableType |
Branch: 6 branches
| Branch | True | False | Total |
| if ((tableType_t)cctx->tableType != tableType |
0 |
0 |
0 |
| if ((tableType_t)cctx->tableType != tableType |
0 |
0 |
0 |
| if ((tableType_t)cctx->tableType != tableType |
0 |
0 |
0 |
| if ((tableType_t)cctx->tableType != tableType |
0 |
0 |
0 |
| if ((tableType_t)cctx->tableType != tableType |
0 |
0 |
0 |
| if ((tableType_t)cctx->tableType != tableType |
0 |
0 |
0 |
|
| 950 |
0 |
▶ | || ((tableType == byU16) && cctx->currentOffset + (unsigned)inputSize >= 0xFFFFU) |
Branch: 6 branches
| Branch | True | False | Total |
| || ((tableType == byU16) && cctx->currentOffset + (unsigned)inputSize >= 0xFFFFU) |
0 |
0 |
0 |
| || ((tableType == byU16) && cctx->currentOffset + (unsigned)inputSize >= 0xFFFFU) |
0 |
0 |
0 |
| || ((tableType == byU16) && cctx->currentOffset + (unsigned)inputSize >= 0xFFFFU) |
0 |
0 |
0 |
| || ((tableType == byU16) && cctx->currentOffset + (unsigned)inputSize >= 0xFFFFU) |
0 |
0 |
0 |
| || ((tableType == byU16) && cctx->currentOffset + (unsigned)inputSize >= 0xFFFFU) |
0 |
0 |
0 |
| || ((tableType == byU16) && cctx->currentOffset + (unsigned)inputSize >= 0xFFFFU) |
0 |
0 |
0 |
|
| 951 |
0 |
▶ | || ((tableType == byU32) && cctx->currentOffset > 1 GB) |
Branch: 6 branches
| Branch | True | False | Total |
| || ((tableType == byU32) && cctx->currentOffset > 1 GB) |
0 |
0 |
0 |
| || ((tableType == byU32) && cctx->currentOffset > 1 GB) |
0 |
0 |
0 |
| || ((tableType == byU32) && cctx->currentOffset > 1 GB) |
0 |
0 |
0 |
| || ((tableType == byU32) && cctx->currentOffset > 1 GB) |
0 |
0 |
0 |
| || ((tableType == byU32) && cctx->currentOffset > 1 GB) |
0 |
0 |
0 |
| || ((tableType == byU32) && cctx->currentOffset > 1 GB) |
0 |
0 |
0 |
|
| 952 |
0 |
▶ | || tableType == byPtr |
Branch: 2 branches
| Branch | True | False | Total |
| || tableType == byPtr |
0 |
0 |
0 |
| || tableType == byPtr |
0 |
0 |
0 |
|
| 953 |
0 |
▶ | || inputSize >= LZ4_CLEAR_TABLE_THRESHOLD) |
Branch: 5 branches
| Branch | True | False | Total |
| || inputSize >= LZ4_CLEAR_TABLE_THRESHOLD) |
0 |
0 |
0 |
| || inputSize >= LZ4_CLEAR_TABLE_THRESHOLD) |
0 |
0 |
0 |
| || inputSize >= LZ4_CLEAR_TABLE_THRESHOLD) |
0 |
0 |
0 |
| || inputSize >= LZ4_CLEAR_TABLE_THRESHOLD) |
0 |
0 |
0 |
| || inputSize >= LZ4_CLEAR_TABLE_THRESHOLD) |
0 |
0 |
0 |
|
| 954 |
|
| { |
| 955 |
|
| DEBUGLOG(4, "LZ4_prepareTable: Resetting table in %p", (void*)cctx); |
| 956 |
0 |
| MEM_INIT(cctx->hashTable, 0, LZ4_HASHTABLESIZE); |
| 957 |
0 |
| cctx->currentOffset = 0; |
| 958 |
0 |
| cctx->tableType = (U32)clearedTable; |
| 959 |
|
| } else { |
| 960 |
|
| DEBUGLOG(4, "LZ4_prepareTable: Re-use hash table (no reset)"); |
| 961 |
|
| } |
| 962 |
|
| } |
| 963 |
|
| |
| 964 |
|
| /* Adding a gap, so all previous entries are > LZ4_DISTANCE_MAX back, |
| 965 |
|
| * is faster than compressing without a gap. |
| 966 |
|
| * However, compressing with currentOffset == 0 is faster still, |
| 967 |
|
| * so we preserve that case. |
| 968 |
|
| */ |
| 969 |
0 |
▶ | if (cctx->currentOffset != 0 && tableType == byU32) { |
Branch: 6 branches
| Branch | True | False | Total |
| if (cctx->currentOffset != 0 && tableType == byU32) { |
0 |
0 |
0 |
| if (cctx->currentOffset != 0 && tableType == byU32) { |
0 |
0 |
0 |
| if (cctx->currentOffset != 0 && tableType == byU32) { |
0 |
0 |
0 |
| if (cctx->currentOffset != 0 && tableType == byU32) { |
0 |
0 |
0 |
| if (cctx->currentOffset != 0 && tableType == byU32) { |
0 |
0 |
0 |
| if (cctx->currentOffset != 0 && tableType == byU32) { |
0 |
0 |
0 |
|
| 970 |
|
| DEBUGLOG(5, "LZ4_prepareTable: adding 64KB to currentOffset"); |
| 971 |
0 |
| cctx->currentOffset += 64 KB; |
| 972 |
|
| } |
| 973 |
|
| |
| 974 |
|
| /* Finally, clear history */ |
| 975 |
0 |
| cctx->dictCtx = NULL; |
| 976 |
0 |
| cctx->dictionary = NULL; |
| 977 |
0 |
| cctx->dictSize = 0; |
| 978 |
0 |
| } |
| 979 |
|
| |
| 980 |
|
| /* LZ4_match8() : the 8 bytes at p and q are equal */ |
| 981 |
|
| LZ4_FORCE_INLINE int LZ4_match8(const void* p, const void* q) |
| 982 |
|
| { |
| 983 |
0 |
| if (sizeof(reg_t) == 8) return LZ4_read_ARCH(p) == LZ4_read_ARCH(q); |
| 984 |
|
| return (LZ4_read32(p) == LZ4_read32(q)) |
| 985 |
|
| && (LZ4_read32((const BYTE*)p + 4) == LZ4_read32((const BYTE*)q + 4)); |
| 986 |
|
| } |
| 987 |
|
| |
| 988 |
|
| /* state of an extDict compression which resumes in prefix mode (see LZ4_compress_generic()) */ |
| 989 |
|
| typedef struct { |
| 990 |
|
| const BYTE* ip; /* end of a match : resumes at the test of the next position */ |
| 991 |
|
| BYTE* op; |
| 992 |
|
| U32 startIndex; |
| 993 |
|
| } LZ4_resume_t; |
| 994 |
|
| |
| 995 |
|
| /** LZ4_compress_generic_validated() : |
| 996 |
|
| * inlined, to ensure branches are decided at compilation time. |
| 997 |
|
| * The following conditions are presumed already validated: |
| 998 |
|
| * - source != NULL |
| 999 |
|
| * - inputSize > 0 |
| 1000 |
|
| */ |
| 1001 |
|
| LZ4_FORCE_INLINE int LZ4_compress_generic_validated( |
| 1002 |
|
| LZ4_stream_t_internal* const cctx, |
| 1003 |
|
| const char* const source, |
| 1004 |
|
| char* const dest, |
| 1005 |
|
| const int inputSize, |
| 1006 |
|
| int* inputConsumed, /* only written when outputDirective == fillOutput */ |
| 1007 |
|
| const int maxOutputSize, |
| 1008 |
|
| const limitedOutput_directive outputDirective, |
| 1009 |
|
| const tableType_t tableType, |
| 1010 |
|
| const dict_directive dictDirective, |
| 1011 |
|
| const dictIssue_directive dictIssue, |
| 1012 |
|
| const int acceleration, |
| 1013 |
|
| LZ4_resume_t* const suspend, /* usingExtDict : stops when the dictionary is out of reach, saving its state */ |
| 1014 |
|
| const LZ4_resume_t* const resume) /* withPrefix64k : resumes such a compression */ |
| 1015 |
|
| { |
| 1016 |
|
| int result; |
| 1017 |
0 |
| const BYTE* ip = resume ? resume->ip : (const BYTE*)source; |
| 1018 |
|
| |
| 1019 |
0 |
▶ | U32 const startIndex = resume ? resume->startIndex : cctx->currentOffset; |
Branch: 1 branch
| Branch | True | False | Total |
| U32 const startIndex = resume ? resume->startIndex : cctx->currentOffset; |
0 |
0 |
0 |
|
| 1020 |
0 |
| const BYTE* base = (const BYTE*)source - startIndex; |
| 1021 |
|
| const BYTE* lowLimit; |
| 1022 |
|
| |
| 1023 |
0 |
| const LZ4_stream_t_internal* dictCtx = (const LZ4_stream_t_internal*) cctx->dictCtx; |
| 1024 |
0 |
| const BYTE* const dictionary = |
| 1025 |
0 |
▶ | dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; |
Branch: 13 branches
| Branch | True | False | Total |
| dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; |
0 |
0 |
0 |
|
| 1026 |
0 |
| const U32 dictSize = |
| 1027 |
0 |
▶ | dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; |
Branch: 13 branches
| Branch | True | False | Total |
| dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; |
0 |
0 |
0 |
| dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; |
0 |
0 |
0 |
|
| 1028 |
0 |
| const U32 dictDelta = |
| 1029 |
0 |
▶ | (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ |
Branch: 13 branches
| Branch | True | False | Total |
| (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ |
0 |
0 |
0 |
| (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ |
0 |
0 |
0 |
| (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ |
0 |
0 |
0 |
| (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ |
0 |
0 |
0 |
| (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ |
0 |
0 |
0 |
| (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ |
0 |
0 |
0 |
| (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ |
0 |
0 |
0 |
| (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ |
0 |
0 |
0 |
| (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ |
0 |
0 |
0 |
| (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ |
0 |
0 |
0 |
| (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ |
0 |
0 |
0 |
| (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ |
0 |
0 |
0 |
| (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ |
0 |
0 |
0 |
|
| 1030 |
|
| |
| 1031 |
0 |
▶ | int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
Branch: 26 branches
| Branch | True | False | Total |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
| int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); |
0 |
0 |
0 |
|
| 1032 |
0 |
| U32 const prefixIdxLimit = startIndex - dictSize; /* used when dictDirective == dictSmall */ |
| 1033 |
0 |
▶ | const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
Branch: 17 branches
| Branch | True | False | Total |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
| const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; |
0 |
0 |
0 |
|
| 1034 |
0 |
▶ | const BYTE* anchor = resume ? resume->ip : (const BYTE*)source; |
Branch: 1 branch
| Branch | True | False | Total |
| const BYTE* anchor = resume ? resume->ip : (const BYTE*)source; |
0 |
0 |
0 |
|
| 1035 |
0 |
| const BYTE* const iend = (const BYTE*)source + inputSize; |
| 1036 |
|
| const BYTE* mflimitPlusOne; /* set after the size check : would precede a small input */ |
| 1037 |
|
| const BYTE* matchlimit; |
| 1038 |
|
| const BYTE* seqLimit; /* suspend : mflimitPlusOne, or earlier, where the dictionary gets out of reach */ |
| 1039 |
|
| |
| 1040 |
|
| /* the dictCtx currentOffset is indexed on the start of the dictionary, |
| 1041 |
|
| * while a dictionary in the current context precedes the currentOffset */ |
| 1042 |
0 |
▶ | const BYTE* dictBase = (dictionary == NULL) ? NULL : |
Branch: 17 branches
| Branch | True | False | Total |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
| const BYTE* dictBase = (dictionary == NULL) ? NULL : |
0 |
0 |
0 |
|
| 1043 |
|
| (dictDirective == usingDictCtx) ? |
| 1044 |
0 |
▶ | dictionary + dictSize - dictCtx->currentOffset : |
Branch: 13 branches
| Branch | True | False | Total |
| dictionary + dictSize - dictCtx->currentOffset : |
0 |
0 |
0 |
| dictionary + dictSize - dictCtx->currentOffset : |
0 |
0 |
0 |
| dictionary + dictSize - dictCtx->currentOffset : |
0 |
0 |
0 |
| dictionary + dictSize - dictCtx->currentOffset : |
0 |
0 |
0 |
| dictionary + dictSize - dictCtx->currentOffset : |
0 |
0 |
0 |
| dictionary + dictSize - dictCtx->currentOffset : |
0 |
0 |
0 |
| dictionary + dictSize - dictCtx->currentOffset : |
0 |
0 |
0 |
| dictionary + dictSize - dictCtx->currentOffset : |
0 |
0 |
0 |
| dictionary + dictSize - dictCtx->currentOffset : |
0 |
0 |
0 |
| dictionary + dictSize - dictCtx->currentOffset : |
0 |
0 |
0 |
| dictionary + dictSize - dictCtx->currentOffset : |
0 |
0 |
0 |
| dictionary + dictSize - dictCtx->currentOffset : |
0 |
0 |
0 |
| dictionary + dictSize - dictCtx->currentOffset : |
0 |
0 |
0 |
|
| 1045 |
0 |
| dictionary + dictSize - startIndex; |
| 1046 |
|
| |
| 1047 |
0 |
▶ | BYTE* op = resume ? resume->op : (BYTE*)dest; |
Branch: 1 branch
| Branch | True | False | Total |
| BYTE* op = resume ? resume->op : (BYTE*)dest; |
0 |
0 |
0 |
|
| 1048 |
0 |
| BYTE* const olimit = (BYTE*)dest + maxOutputSize; |
| 1049 |
|
| |
| 1050 |
0 |
| U32 offset = 0; |
| 1051 |
|
| U32 forwardH; |
| 1052 |
0 |
| const BYTE* filledIp = NULL; /* fillOutput only ; set by catch up (resume : never with fillOutput) */ |
| 1053 |
|
| |
| 1054 |
|
| DEBUGLOG(5, "LZ4_compress_generic_validated: srcSize=%i, tableType=%u", inputSize, tableType); |
| 1055 |
0 |
▶ | assert(ip != NULL); |
Branch: 17 branches
| Branch | True | False | Total |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
| assert(ip != NULL); |
0 |
0 |
0 |
|
| 1056 |
0 |
▶ | if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
Branch: 32 branches
| Branch | True | False | Total |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
| if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) */ |
0 |
0 |
0 |
|
| 1057 |
0 |
▶ | if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
Branch: 29 branches
| Branch | True | False | Total |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
| if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ |
0 |
0 |
0 |
|
| 1058 |
|
| /* If init conditions are not met, we don't have to mark stream |
| 1059 |
|
| * as having dirty context, since no action was taken yet */ |
| 1060 |
0 |
▶ | if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
Branch: 32 branches
| Branch | True | False | Total |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
| if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ |
0 |
0 |
0 |
|
| 1061 |
0 |
▶ | assert(acceleration >= 1); |
Branch: 17 branches
| Branch | True | False | Total |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
| assert(acceleration >= 1); |
0 |
0 |
0 |
|
| 1062 |
|
| |
| 1063 |
|
| /* resume : candidates are within source (see LZ4_compress_generic()) */ |
| 1064 |
0 |
▶ | lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
Branch: 14 branches
| Branch | True | False | Total |
| lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
0 |
0 |
0 |
| lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
0 |
0 |
0 |
| lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
0 |
0 |
0 |
| lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
0 |
0 |
0 |
| lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
0 |
0 |
0 |
| lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
0 |
0 |
0 |
| lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
0 |
0 |
0 |
| lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
0 |
0 |
0 |
| lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
0 |
0 |
0 |
| lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
0 |
0 |
0 |
| lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
0 |
0 |
0 |
| lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
0 |
0 |
0 |
| lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
0 |
0 |
0 |
| lowLimit = (const BYTE*)source - ((dictDirective == withPrefix64k) && !resume ? dictSize : 0); |
0 |
0 |
0 |
|
| 1065 |
|
| |
| 1066 |
0 |
▶ | if (!resume) { /* resume : context state already updated */ |
Branch: 1 branch
| Branch | True | False | Total |
| if (!resume) { /* resume : context state already updated */ |
0 |
0 |
0 |
|
| 1067 |
|
| /* Update context state */ |
| 1068 |
0 |
▶ | if (dictDirective == usingDictCtx) { |
Branch: 13 branches
| Branch | True | False | Total |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
|
| 1069 |
|
| /* Subsequent linked blocks can't use the dictionary. */ |
| 1070 |
|
| /* Instead, they use the block we just compressed. */ |
| 1071 |
0 |
| cctx->dictCtx = NULL; |
| 1072 |
0 |
| cctx->dictSize = (U32)inputSize; |
| 1073 |
|
| } else { |
| 1074 |
0 |
| cctx->dictSize += (U32)inputSize; |
| 1075 |
|
| } |
| 1076 |
0 |
| cctx->currentOffset += (U32)inputSize; |
| 1077 |
0 |
| cctx->tableType = (U32)tableType; |
| 1078 |
|
| |
| 1079 |
0 |
▶ | if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
Branch: 17 branches
| Branch | True | False | Total |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
| if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ |
0 |
0 |
0 |
|
| 1080 |
|
| } |
| 1081 |
0 |
| mflimitPlusOne = iend - MFLIMIT + 1; |
| 1082 |
0 |
| matchlimit = iend - LASTLITERALS; |
| 1083 |
0 |
| seqLimit = mflimitPlusOne; |
| 1084 |
0 |
▶ | if ((suspend != NULL) && (inputSize > LZ4_DISTANCE_MAX + MFLIMIT - 1)) /* source + LZ4_DISTANCE_MAX < mflimitPlusOne */ |
Branch: 3 branches
| Branch | True | False | Total |
| if ((suspend != NULL) && (inputSize > LZ4_DISTANCE_MAX + MFLIMIT - 1)) /* source + LZ4_DISTANCE_MAX < mflimitPlusOne */ |
0 |
0 |
0 |
| if ((suspend != NULL) && (inputSize > LZ4_DISTANCE_MAX + MFLIMIT - 1)) /* source + LZ4_DISTANCE_MAX < mflimitPlusOne */ |
0 |
0 |
0 |
| if ((suspend != NULL) && (inputSize > LZ4_DISTANCE_MAX + MFLIMIT - 1)) /* source + LZ4_DISTANCE_MAX < mflimitPlusOne */ |
0 |
0 |
0 |
|
| 1085 |
0 |
| seqLimit = (const BYTE*)source + LZ4_DISTANCE_MAX; |
| 1086 |
|
| |
| 1087 |
0 |
▶ | if (resume) goto _resume; |
Branch: 1 branch
| Branch | True | False | Total |
| if (resume) goto _resume; |
0 |
0 |
0 |
|
| 1088 |
|
| |
| 1089 |
|
| /* First Byte */ |
| 1090 |
0 |
▶ | LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
Branch: 17 branches
| Branch | True | False | Total |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
| LZ4_putPosition(ip, cctx->hashTable, tableType, base); |
0 |
0 |
0 |
|
| 1091 |
0 |
▶ | ip++; forwardH = LZ4_hashPosition(ip, tableType); |
Branch: 17 branches
| Branch | True | False | Total |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
| ip++; forwardH = LZ4_hashPosition(ip, tableType); |
0 |
0 |
0 |
|
| 1092 |
|
| |
| 1093 |
|
| /* Main Loop */ |
| 1094 |
0 |
| for ( ; ; ) { |
| 1095 |
|
| const BYTE* match; |
| 1096 |
|
| BYTE* token; |
| 1097 |
|
| |
| 1098 |
|
| /* Find a match */ |
| 1099 |
0 |
▶ | if (tableType == byPtr) { |
Branch: 16 branches
| Branch | True | False | Total |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
|
| 1100 |
0 |
| const BYTE* forwardIp = ip; |
| 1101 |
0 |
| int step = 1; |
| 1102 |
0 |
| int searchMatchNb = acceleration << LZ4_skipTrigger; |
| 1103 |
|
| do { |
| 1104 |
0 |
| U32 const h = forwardH; |
| 1105 |
0 |
| ip = forwardIp; |
| 1106 |
0 |
| forwardIp += step; |
| 1107 |
0 |
| step = (searchMatchNb++ >> LZ4_skipTrigger); |
| 1108 |
|
| |
| 1109 |
0 |
▶ | if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
Branch: 16 branches
| Branch | True | False | Total |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
|
| 1110 |
0 |
▶ | assert(ip < mflimitPlusOne); |
Branch: 16 branches
| Branch | True | False | Total |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
|
| 1111 |
|
| |
| 1112 |
0 |
| match = LZ4_getPositionOnHash(h, cctx->hashTable, tableType); |
| 1113 |
0 |
| forwardH = LZ4_hashPosition(forwardIp, tableType); |
| 1114 |
0 |
▶ | LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
Branch: 16 branches
| Branch | True | False | Total |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
|
| 1115 |
|
| |
| 1116 |
0 |
| } while ( (match+LZ4_DISTANCE_MAX < ip) |
| 1117 |
0 |
▶ | || (LZ4_read32(match) != LZ4_read32(ip)) ); |
Branch: 32 branches
| Branch | True | False | Total |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
| || (LZ4_read32(match) != LZ4_read32(ip)) ); |
0 |
0 |
0 |
|
| 1118 |
|
| |
| 1119 |
|
| } else { /* byU32, byU16 */ |
| 1120 |
|
| |
| 1121 |
0 |
| const BYTE* forwardIp = ip; |
| 1122 |
0 |
| int step = 1; |
| 1123 |
0 |
| int searchMatchNb = acceleration << LZ4_skipTrigger; |
| 1124 |
0 |
| do { |
| 1125 |
0 |
| U32 const h = forwardH; |
| 1126 |
0 |
| U32 const current = (U32)(forwardIp - base); |
| 1127 |
0 |
▶ | U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
Branch: 17 branches
| Branch | True | False | Total |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
|
| 1128 |
0 |
▶ | assert(matchIndex <= current); |
Branch: 17 branches
| Branch | True | False | Total |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
| assert(matchIndex <= current); |
0 |
0 |
0 |
|
| 1129 |
0 |
▶ | assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
Branch: 17 branches
| Branch | True | False | Total |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
| assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); |
0 |
0 |
0 |
|
| 1130 |
0 |
| ip = forwardIp; |
| 1131 |
0 |
| forwardIp += step; |
| 1132 |
0 |
| step = (searchMatchNb++ >> LZ4_skipTrigger); |
| 1133 |
|
| |
| 1134 |
0 |
▶ | if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
Branch: 17 branches
| Branch | True | False | Total |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
| if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; |
0 |
0 |
0 |
|
| 1135 |
0 |
▶ | assert(ip < mflimitPlusOne); |
Branch: 17 branches
| Branch | True | False | Total |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
| assert(ip < mflimitPlusOne); |
0 |
0 |
0 |
|
| 1136 |
|
| |
| 1137 |
0 |
▶ | if (dictDirective == usingDictCtx) { |
Branch: 13 branches
| Branch | True | False | Total |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) { |
0 |
0 |
0 |
|
| 1138 |
0 |
▶ | if (matchIndex < startIndex) { |
Branch: 13 branches
| Branch | True | False | Total |
| if (matchIndex < startIndex) { |
0 |
0 |
0 |
| if (matchIndex < startIndex) { |
0 |
0 |
0 |
| if (matchIndex < startIndex) { |
0 |
0 |
0 |
| if (matchIndex < startIndex) { |
0 |
0 |
0 |
| if (matchIndex < startIndex) { |
0 |
0 |
0 |
| if (matchIndex < startIndex) { |
0 |
0 |
0 |
| if (matchIndex < startIndex) { |
0 |
0 |
0 |
| if (matchIndex < startIndex) { |
0 |
0 |
0 |
| if (matchIndex < startIndex) { |
0 |
0 |
0 |
| if (matchIndex < startIndex) { |
0 |
0 |
0 |
| if (matchIndex < startIndex) { |
0 |
0 |
0 |
| if (matchIndex < startIndex) { |
0 |
0 |
0 |
| if (matchIndex < startIndex) { |
0 |
0 |
0 |
|
| 1139 |
|
| /* there was no match, try the dictionary */ |
| 1140 |
0 |
▶ | assert(tableType == byU32); |
Branch: 13 branches
| Branch | True | False | Total |
| assert(tableType == byU32); |
0 |
0 |
0 |
| assert(tableType == byU32); |
0 |
0 |
0 |
| assert(tableType == byU32); |
0 |
0 |
0 |
| assert(tableType == byU32); |
0 |
0 |
0 |
| assert(tableType == byU32); |
0 |
0 |
0 |
| assert(tableType == byU32); |
0 |
0 |
0 |
| assert(tableType == byU32); |
0 |
0 |
0 |
| assert(tableType == byU32); |
0 |
0 |
0 |
| assert(tableType == byU32); |
0 |
0 |
0 |
| assert(tableType == byU32); |
0 |
0 |
0 |
| assert(tableType == byU32); |
0 |
0 |
0 |
| assert(tableType == byU32); |
0 |
0 |
0 |
| assert(tableType == byU32); |
0 |
0 |
0 |
|
| 1141 |
0 |
▶ | matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); |
Branch: 13 branches
| Branch | True | False | Total |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); |
0 |
0 |
0 |
|
| 1142 |
0 |
| match = dictBase + matchIndex; |
| 1143 |
0 |
| matchIndex += dictDelta; /* make dictCtx index comparable with current context */ |
| 1144 |
0 |
| lowLimit = dictionary; |
| 1145 |
|
| } else { |
| 1146 |
0 |
| match = base + matchIndex; |
| 1147 |
0 |
| lowLimit = (const BYTE*)source; |
| 1148 |
|
| } |
| 1149 |
0 |
▶ | } else if (dictDirective == usingExtDict) { |
Branch: 13 branches
| Branch | True | False | Total |
| } else if (dictDirective == usingExtDict) { |
0 |
0 |
0 |
| } else if (dictDirective == usingExtDict) { |
0 |
0 |
0 |
| } else if (dictDirective == usingExtDict) { |
0 |
0 |
0 |
| } else if (dictDirective == usingExtDict) { |
0 |
0 |
0 |
| } else if (dictDirective == usingExtDict) { |
0 |
0 |
0 |
| } else if (dictDirective == usingExtDict) { |
0 |
0 |
0 |
| } else if (dictDirective == usingExtDict) { |
0 |
0 |
0 |
| } else if (dictDirective == usingExtDict) { |
0 |
0 |
0 |
| } else if (dictDirective == usingExtDict) { |
0 |
0 |
0 |
| } else if (dictDirective == usingExtDict) { |
0 |
0 |
0 |
| } else if (dictDirective == usingExtDict) { |
0 |
0 |
0 |
| } else if (dictDirective == usingExtDict) { |
0 |
0 |
0 |
| } else if (dictDirective == usingExtDict) { |
0 |
0 |
0 |
|
| 1150 |
|
| /* select without branch : dictionary and prefix candidates alternate unpredictably. |
| 1151 |
|
| * relative to dictEnd or source, within their buffers (base can be NULL) */ |
| 1152 |
0 |
| ptrdiff_t const relIdx = (ptrdiff_t)matchIndex - (ptrdiff_t)startIndex; /* < 0 : within dictionary */ |
| 1153 |
0 |
▶ | match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
Branch: 16 branches
| Branch | True | False | Total |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
|
| 1154 |
|
| } else { /* single continuous memory segment */ |
| 1155 |
0 |
▶ | match = base + matchIndex; |
Branch: 1 branch
| Branch | True | False | Total |
| match = base + matchIndex; |
0 |
0 |
0 |
|
| 1156 |
|
| } |
| 1157 |
0 |
| forwardH = LZ4_hashPosition(forwardIp, tableType); |
| 1158 |
0 |
| LZ4_putIndexOnHash(current, h, cctx->hashTable, tableType); |
| 1159 |
|
| |
| 1160 |
|
| DEBUGLOG(7, "candidate at pos=%u (offset=%u \n", matchIndex, current - matchIndex); |
| 1161 |
0 |
▶ | if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
Branch: 26 branches
| Branch | True | False | Total |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
| if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ |
0 |
0 |
0 |
|
| 1162 |
0 |
▶ | assert(matchIndex < current); |
Branch: 17 branches
| Branch | True | False | Total |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
|
| 1163 |
|
| /* noDict : the candidate is within input, so it is compared before checking its distance : |
| 1164 |
|
| * this order is faster (better branch prediction) */ |
| 1165 |
0 |
▶ | assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
Branch: 26 branches
| Branch | True | False | Total |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
| assert((dictDirective != noDict) || (match >= (const BYTE*)source)); |
0 |
0 |
0 |
|
| 1166 |
0 |
▶ | if ( (dictDirective != noDict) |
Branch: 13 branches
| Branch | True | False | Total |
| if ( (dictDirective != noDict) |
0 |
0 |
0 |
| if ( (dictDirective != noDict) |
0 |
0 |
0 |
| if ( (dictDirective != noDict) |
0 |
0 |
0 |
| if ( (dictDirective != noDict) |
0 |
0 |
0 |
| if ( (dictDirective != noDict) |
0 |
0 |
0 |
| if ( (dictDirective != noDict) |
0 |
0 |
0 |
| if ( (dictDirective != noDict) |
0 |
0 |
0 |
| if ( (dictDirective != noDict) |
0 |
0 |
0 |
| if ( (dictDirective != noDict) |
0 |
0 |
0 |
| if ( (dictDirective != noDict) |
0 |
0 |
0 |
| if ( (dictDirective != noDict) |
0 |
0 |
0 |
| if ( (dictDirective != noDict) |
0 |
0 |
0 |
| if ( (dictDirective != noDict) |
0 |
0 |
0 |
|
| 1167 |
0 |
▶ | && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
Branch: 16 branches
| Branch | True | False | Total |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
|
| 1168 |
0 |
▶ | && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
Branch: 17 branches
| Branch | True | False | Total |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
|
| 1169 |
0 |
| continue; |
| 1170 |
|
| } /* too far */ |
| 1171 |
|
| |
| 1172 |
0 |
▶ | if (LZ4_read32(match) == LZ4_read32(ip)) { |
Branch: 17 branches
| Branch | True | False | Total |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
| if (LZ4_read32(match) == LZ4_read32(ip)) { |
0 |
0 |
0 |
|
| 1173 |
0 |
▶ | if ( (dictDirective == noDict) |
Branch: 13 branches
| Branch | True | False | Total |
| if ( (dictDirective == noDict) |
0 |
0 |
0 |
| if ( (dictDirective == noDict) |
0 |
0 |
0 |
| if ( (dictDirective == noDict) |
0 |
0 |
0 |
| if ( (dictDirective == noDict) |
0 |
0 |
0 |
| if ( (dictDirective == noDict) |
0 |
0 |
0 |
| if ( (dictDirective == noDict) |
0 |
0 |
0 |
| if ( (dictDirective == noDict) |
0 |
0 |
0 |
| if ( (dictDirective == noDict) |
0 |
0 |
0 |
| if ( (dictDirective == noDict) |
0 |
0 |
0 |
| if ( (dictDirective == noDict) |
0 |
0 |
0 |
| if ( (dictDirective == noDict) |
0 |
0 |
0 |
| if ( (dictDirective == noDict) |
0 |
0 |
0 |
| if ( (dictDirective == noDict) |
0 |
0 |
0 |
|
| 1174 |
0 |
▶ | && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
Branch: 13 branches
| Branch | True | False | Total |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
| && ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) |
0 |
0 |
0 |
|
| 1175 |
0 |
▶ | && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
Branch: 13 branches
| Branch | True | False | Total |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
| && (matchIndex+LZ4_DISTANCE_MAX < current)) { |
0 |
0 |
0 |
|
| 1176 |
0 |
| continue; |
| 1177 |
|
| } /* too far */ |
| 1178 |
0 |
▶ | assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
Branch: 17 branches
| Branch | True | False | Total |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
| assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ |
0 |
0 |
0 |
|
| 1179 |
0 |
▶ | if (maybe_extMem) offset = current - matchIndex; |
Branch: 17 branches
| Branch | True | False | Total |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
|
| 1180 |
0 |
▶ | if (dictDirective == usingExtDict) /* lowLimit : only needed once a match is found */ |
Branch: 13 branches
| Branch | True | False | Total |
| if (dictDirective == usingExtDict) /* lowLimit : only needed once a match is found */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) /* lowLimit : only needed once a match is found */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) /* lowLimit : only needed once a match is found */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) /* lowLimit : only needed once a match is found */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) /* lowLimit : only needed once a match is found */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) /* lowLimit : only needed once a match is found */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) /* lowLimit : only needed once a match is found */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) /* lowLimit : only needed once a match is found */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) /* lowLimit : only needed once a match is found */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) /* lowLimit : only needed once a match is found */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) /* lowLimit : only needed once a match is found */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) /* lowLimit : only needed once a match is found */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) /* lowLimit : only needed once a match is found */ |
0 |
0 |
0 |
|
| 1181 |
0 |
▶ | lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
Branch: 16 branches
| Branch | True | False | Total |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; |
0 |
0 |
0 |
|
| 1182 |
0 |
| break; /* match found */ |
| 1183 |
|
| } |
| 1184 |
|
| |
| 1185 |
|
| } while(1); |
| 1186 |
|
| } |
| 1187 |
|
| |
| 1188 |
|
| /* Catch up */ |
| 1189 |
0 |
| filledIp = ip; |
| 1190 |
0 |
▶ | assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
Branch: 17 branches
| Branch | True | False | Total |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
| assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */ |
0 |
0 |
0 |
|
| 1191 |
0 |
▶ | if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
Branch: 34 branches
| Branch | True | False | Total |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
| if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { |
0 |
0 |
0 |
|
| 1192 |
0 |
▶ | do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
Branch: 34 branches
| Branch | True | False | Total |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
| do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))); |
0 |
0 |
0 |
|
| 1193 |
|
| } |
| 1194 |
|
| |
| 1195 |
|
| /* Encode Literals */ |
| 1196 |
0 |
| { unsigned const litLength = (unsigned)(ip - anchor); |
| 1197 |
0 |
| token = op++; |
| 1198 |
0 |
▶ | if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
Branch: 16 branches
| Branch | True | False | Total |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ |
0 |
0 |
0 |
|
| 1199 |
0 |
▶ | (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
Branch: 17 branches
| Branch | True | False | Total |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { |
0 |
0 |
0 |
|
| 1200 |
0 |
| return 0; /* cannot compress within `dst` budget. Stored indexes in hash table are nonetheless fine */ |
| 1201 |
|
| } |
| 1202 |
0 |
▶ | if ((outputDirective == fillOutput) && |
Branch: 16 branches
| Branch | True | False | Total |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
|
| 1203 |
0 |
▶ | (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
Branch: 16 branches
| Branch | True | False | Total |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
| (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { |
0 |
0 |
0 |
|
| 1204 |
0 |
| op--; |
| 1205 |
0 |
| goto _last_literals; |
| 1206 |
|
| } |
| 1207 |
0 |
▶ | if (litLength >= RUN_MASK) { |
Branch: 17 branches
| Branch | True | False | Total |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
| if (litLength >= RUN_MASK) { |
0 |
0 |
0 |
|
| 1208 |
0 |
| unsigned len = litLength - RUN_MASK; |
| 1209 |
0 |
| *token = (RUN_MASK<<ML_BITS); |
| 1210 |
0 |
▶ | for(; len >= 255 ; len-=255) *op++ = 255; |
Branch: 17 branches
| Branch | True | False | Total |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; len >= 255 ; len-=255) *op++ = 255; |
0 |
0 |
0 |
|
| 1211 |
0 |
| *op++ = (BYTE)len; |
| 1212 |
|
| } |
| 1213 |
0 |
| else *token = (BYTE)(litLength<<ML_BITS); |
| 1214 |
|
| |
| 1215 |
|
| /* Copy Literals */ |
| 1216 |
0 |
| LZ4_wildCopy8(op, anchor, op+litLength); |
| 1217 |
0 |
| op+=litLength; |
| 1218 |
|
| DEBUGLOG(6, "seq.start:%i, literals=%u, match.start:%i", |
| 1219 |
|
| (int)(anchor-(const BYTE*)source), litLength, (int)(ip-(const BYTE*)source)); |
| 1220 |
|
| } |
| 1221 |
|
| |
| 1222 |
0 |
| _next_match: |
| 1223 |
|
| /* at this stage, the following variables must be correctly set : |
| 1224 |
|
| * - ip : at start of LZ operation |
| 1225 |
|
| * - match : at start of previous pattern occurrence; can be within current prefix, or within extDict |
| 1226 |
|
| * - offset : if maybe_ext_memSegment==1 (constant) |
| 1227 |
|
| * - lowLimit : must be == dictionary to mean "match is within extDict"; must be == source otherwise |
| 1228 |
|
| * - token and *token : position to write 4-bits for match length; higher 4-bits for literal length supposed already written |
| 1229 |
|
| */ |
| 1230 |
|
| |
| 1231 |
0 |
▶ | if ((outputDirective == fillOutput) && |
Branch: 16 branches
| Branch | True | False | Total |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
| if ((outputDirective == fillOutput) && |
0 |
0 |
0 |
|
| 1232 |
0 |
▶ | (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
Branch: 16 branches
| Branch | True | False | Total |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
| (op + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit)) { |
0 |
0 |
0 |
|
| 1233 |
|
| /* the match was too close to the end, rewind and go to last literals */ |
| 1234 |
0 |
| op = token; |
| 1235 |
0 |
| goto _last_literals; |
| 1236 |
|
| } |
| 1237 |
|
| |
| 1238 |
|
| /* Encode Offset */ |
| 1239 |
0 |
▶ | if (maybe_extMem) { /* static test */ |
Branch: 17 branches
| Branch | True | False | Total |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
| if (maybe_extMem) { /* static test */ |
0 |
0 |
0 |
|
| 1240 |
|
| DEBUGLOG(6, " with offset=%u (ext if > %i)", offset, (int)(ip - (const BYTE*)source)); |
| 1241 |
0 |
▶ | assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
Branch: 34 branches
| Branch | True | False | Total |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
| assert(offset <= LZ4_DISTANCE_MAX && offset > 0); |
0 |
0 |
0 |
|
| 1242 |
0 |
| LZ4_writeLE16(op, (U16)offset); op+=2; |
| 1243 |
|
| } else { |
| 1244 |
|
| DEBUGLOG(6, " with offset=%u (same segment)", (U32)(ip - match)); |
| 1245 |
0 |
▶ | assert(ip-match <= LZ4_DISTANCE_MAX); |
Branch: 17 branches
| Branch | True | False | Total |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
| assert(ip-match <= LZ4_DISTANCE_MAX); |
0 |
0 |
0 |
|
| 1246 |
0 |
| LZ4_writeLE16(op, (U16)(ip - match)); op+=2; |
| 1247 |
|
| } |
| 1248 |
|
| |
| 1249 |
|
| /* Encode MatchLength */ |
| 1250 |
|
| { unsigned matchCode; |
| 1251 |
|
| |
| 1252 |
0 |
▶ | if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
Branch: 26 branches
| Branch | True | False | Total |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
| if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) |
0 |
0 |
0 |
|
| 1253 |
0 |
▶ | && (lowLimit==dictionary) /* match within extDict */ ) { |
Branch: 16 branches
| Branch | True | False | Total |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
| && (lowLimit==dictionary) /* match within extDict */ ) { |
0 |
0 |
0 |
|
| 1254 |
0 |
| const BYTE* limit = ip + (dictEnd-match); |
| 1255 |
0 |
▶ | assert(dictEnd > match); |
Branch: 16 branches
| Branch | True | False | Total |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
| assert(dictEnd > match); |
0 |
0 |
0 |
|
| 1256 |
0 |
▶ | if (limit > matchlimit) limit = matchlimit; |
Branch: 16 branches
| Branch | True | False | Total |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
| if (limit > matchlimit) limit = matchlimit; |
0 |
0 |
0 |
|
| 1257 |
0 |
▶ | matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
Branch: 16 branches
| Branch | True | False | Total |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); |
0 |
0 |
0 |
|
| 1258 |
0 |
| ip += (size_t)matchCode + MINMATCH; |
| 1259 |
0 |
▶ | if (ip==limit) { |
Branch: 16 branches
| Branch | True | False | Total |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
| if (ip==limit) { |
0 |
0 |
0 |
|
| 1260 |
0 |
| unsigned const more = LZ4_count(limit, (const BYTE*)source, matchlimit); |
| 1261 |
0 |
| matchCode += more; |
| 1262 |
0 |
| ip += more; |
| 1263 |
|
| } |
| 1264 |
|
| DEBUGLOG(6, " with matchLength=%u starting in extDict", matchCode+MINMATCH); |
| 1265 |
|
| } else { |
| 1266 |
0 |
▶ | matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
Branch: 17 branches
| Branch | True | False | Total |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
| matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); |
0 |
0 |
0 |
|
| 1267 |
0 |
| ip += (size_t)matchCode + MINMATCH; |
| 1268 |
|
| DEBUGLOG(6, " with matchLength=%u", matchCode+MINMATCH); |
| 1269 |
|
| } |
| 1270 |
|
| |
| 1271 |
0 |
▶ | if ((outputDirective) && /* Check output buffer overflow */ |
Branch: 16 branches
| Branch | True | False | Total |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ((outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
|
| 1272 |
0 |
▶ | (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
Branch: 17 branches
| Branch | True | False | Total |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
| (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { |
0 |
0 |
0 |
|
| 1273 |
0 |
▶ | if (outputDirective == fillOutput) { |
Branch: 16 branches
| Branch | True | False | Total |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
|
| 1274 |
|
| /* Match description too long : reduce it */ |
| 1275 |
0 |
| U32 newMatchCode = 15 /* in token */ - 1 /* to avoid needing a zero byte */ + ((U32)(olimit - op) - 1 - LASTLITERALS) * 255; |
| 1276 |
0 |
| ip -= matchCode - newMatchCode; |
| 1277 |
0 |
▶ | assert(newMatchCode < matchCode); |
Branch: 16 branches
| Branch | True | False | Total |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
| assert(newMatchCode < matchCode); |
0 |
0 |
0 |
|
| 1278 |
0 |
| matchCode = newMatchCode; |
| 1279 |
0 |
▶ | if (unlikely(ip <= filledIp)) { |
Branch: 16 branches
| Branch | True | False | Total |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
| if (unlikely(ip <= filledIp)) { |
0 |
0 |
0 |
|
| 1280 |
|
| /* We have already filled up to filledIp so if ip ends up less than filledIp |
| 1281 |
|
| * we have positions in the hash table beyond the current position. This is |
| 1282 |
|
| * a problem if we reuse the hash table. So we have to remove these positions |
| 1283 |
|
| * from the hash table. |
| 1284 |
|
| */ |
| 1285 |
|
| const BYTE* ptr; |
| 1286 |
|
| DEBUGLOG(5, "Clearing %u positions", (U32)(filledIp - ip)); |
| 1287 |
0 |
▶ | for (ptr = ip; ptr <= filledIp; ++ptr) { |
Branch: 16 branches
| Branch | True | False | Total |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
| for (ptr = ip; ptr <= filledIp; ++ptr) { |
0 |
0 |
0 |
|
| 1288 |
0 |
| U32 const h = LZ4_hashPosition(ptr, tableType); |
| 1289 |
0 |
| LZ4_clearHash(h, cctx->hashTable, tableType); |
| 1290 |
|
| } |
| 1291 |
|
| } |
| 1292 |
|
| } else { |
| 1293 |
0 |
▶ | assert(outputDirective == limitedOutput); |
Branch: 16 branches
| Branch | True | False | Total |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
|
| 1294 |
0 |
| return 0; /* cannot compress within `dst` budget. Stored indexes in hash table are nonetheless fine */ |
| 1295 |
|
| } |
| 1296 |
|
| } |
| 1297 |
0 |
▶ | if (matchCode >= ML_MASK) { |
Branch: 17 branches
| Branch | True | False | Total |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
| if (matchCode >= ML_MASK) { |
0 |
0 |
0 |
|
| 1298 |
0 |
| *token += ML_MASK; |
| 1299 |
0 |
| matchCode -= ML_MASK; |
| 1300 |
0 |
| LZ4_write32(op, 0xFFFFFFFF); |
| 1301 |
0 |
▶ | while (matchCode >= 4*255) { |
Branch: 17 branches
| Branch | True | False | Total |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
| while (matchCode >= 4*255) { |
0 |
0 |
0 |
|
| 1302 |
0 |
| op+=4; |
| 1303 |
0 |
| LZ4_write32(op, 0xFFFFFFFF); |
| 1304 |
0 |
| matchCode -= 4*255; |
| 1305 |
|
| } |
| 1306 |
0 |
| op += matchCode / 255; |
| 1307 |
0 |
| *op++ = (BYTE)(matchCode % 255); |
| 1308 |
|
| } else |
| 1309 |
0 |
| *token += (BYTE)(matchCode); |
| 1310 |
|
| } |
| 1311 |
|
| /* Ensure we have enough space for the last literals. */ |
| 1312 |
0 |
▶ | assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
Branch: 32 branches
| Branch | True | False | Total |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
| assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); |
0 |
0 |
0 |
|
| 1313 |
|
| |
| 1314 |
0 |
| anchor = ip; |
| 1315 |
|
| |
| 1316 |
|
| /* Test end of chunk */ |
| 1317 |
0 |
▶ | if (ip >= seqLimit) { |
Branch: 17 branches
| Branch | True | False | Total |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
| if (ip >= seqLimit) { |
0 |
0 |
0 |
|
| 1318 |
0 |
▶ | if ((suspend == NULL) || (ip >= mflimitPlusOne)) break; |
Branch: 3 branches
| Branch | True | False | Total |
| if ((suspend == NULL) || (ip >= mflimitPlusOne)) break; |
0 |
0 |
0 |
| if ((suspend == NULL) || (ip >= mflimitPlusOne)) break; |
0 |
0 |
0 |
| if ((suspend == NULL) || (ip >= mflimitPlusOne)) break; |
0 |
0 |
0 |
|
| 1319 |
|
| /* extDict : from ip, all candidates (and catch up) are beyond reach of the dictionary : |
| 1320 |
|
| * stop, to resume in prefix mode, which is faster */ |
| 1321 |
0 |
| suspend->ip = ip; |
| 1322 |
0 |
| suspend->op = op; |
| 1323 |
0 |
| suspend->startIndex = startIndex; |
| 1324 |
0 |
| return 0; |
| 1325 |
|
| } |
| 1326 |
|
| |
| 1327 |
0 |
| _resume: |
| 1328 |
|
| /* Fill table, and test next position. |
| 1329 |
|
| * First, the position after the previous occurrence of ip-1, if it matches 8+ bytes : |
| 1330 |
|
| * it breaks chains of short matches, which the table alone can produce on periodic data. */ |
| 1331 |
0 |
▶ | if (tableType == byPtr) { |
Branch: 16 branches
| Branch | True | False | Total |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
| if (tableType == byPtr) { |
0 |
0 |
0 |
|
| 1332 |
|
| |
| 1333 |
0 |
▶ | U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
Branch: 16 branches
| Branch | True | False | Total |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
|
| 1334 |
0 |
| const BYTE* const prev = LZ4_getPositionOnHash(hPrev, cctx->hashTable, tableType); |
| 1335 |
0 |
| U32 const h = LZ4_hashPosition(ip, tableType); |
| 1336 |
0 |
▶ | LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
Branch: 16 branches
| Branch | True | False | Total |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip-1, hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
|
| 1337 |
0 |
| match = LZ4_getPositionOnHash(h, cctx->hashTable, tableType); |
| 1338 |
0 |
▶ | if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
Branch: 32 branches
| Branch | True | False | Total |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
| if ((prev+1+LZ4_DISTANCE_MAX >= ip) && LZ4_match8(prev+1, ip)) match = prev+1; |
0 |
0 |
0 |
|
| 1339 |
0 |
▶ | LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
Branch: 16 branches
| Branch | True | False | Total |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); |
0 |
0 |
0 |
|
| 1340 |
0 |
▶ | if ( (match+LZ4_DISTANCE_MAX >= ip) |
Branch: 16 branches
| Branch | True | False | Total |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
| if ( (match+LZ4_DISTANCE_MAX >= ip) |
0 |
0 |
0 |
|
| 1341 |
0 |
▶ | && (LZ4_read32(match) == LZ4_read32(ip)) ) |
Branch: 16 branches
| Branch | True | False | Total |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) |
0 |
0 |
0 |
|
| 1342 |
0 |
| { token=op++; *token=0; goto _next_match; } |
| 1343 |
|
| |
| 1344 |
|
| } else { /* byU32, byU16 */ |
| 1345 |
|
| |
| 1346 |
0 |
| U32 const h = LZ4_hashPosition(ip, tableType); |
| 1347 |
0 |
| U32 const current = (U32)(ip-base); |
| 1348 |
0 |
▶ | U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
Branch: 17 branches
| Branch | True | False | Total |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
| U32 const hPrev = LZ4_hashPosition(ip-1, tableType); |
0 |
0 |
0 |
|
| 1349 |
0 |
▶ | U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
Branch: 17 branches
| Branch | True | False | Total |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
| U32 prevIndex = LZ4_getIndexOnHash(hPrev, cctx->hashTable, tableType); |
0 |
0 |
0 |
|
| 1350 |
|
| U32 matchIndex; |
| 1351 |
0 |
| LZ4_putIndexOnHash(current-1, hPrev, cctx->hashTable, tableType); |
| 1352 |
0 |
▶ | if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
Branch: 26 branches
| Branch | True | False | Total |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (prevIndex < startIndex)) { |
0 |
0 |
0 |
|
| 1353 |
|
| /* no occurrence in the current context : try the dictionary */ |
| 1354 |
0 |
▶ | prevIndex = LZ4_getIndexOnHash(hPrev, dictCtx->hashTable, byU32) + dictDelta; |
Branch: 13 branches
| Branch | True | False | Total |
| prevIndex = LZ4_getIndexOnHash(hPrev, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| prevIndex = LZ4_getIndexOnHash(hPrev, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| prevIndex = LZ4_getIndexOnHash(hPrev, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| prevIndex = LZ4_getIndexOnHash(hPrev, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| prevIndex = LZ4_getIndexOnHash(hPrev, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| prevIndex = LZ4_getIndexOnHash(hPrev, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| prevIndex = LZ4_getIndexOnHash(hPrev, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| prevIndex = LZ4_getIndexOnHash(hPrev, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| prevIndex = LZ4_getIndexOnHash(hPrev, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| prevIndex = LZ4_getIndexOnHash(hPrev, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| prevIndex = LZ4_getIndexOnHash(hPrev, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| prevIndex = LZ4_getIndexOnHash(hPrev, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| prevIndex = LZ4_getIndexOnHash(hPrev, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
|
| 1355 |
|
| } |
| 1356 |
|
| { /* used table (small block, see LZ4_prepareTable()) : a stale entry yields the candidate of an empty slot |
| 1357 |
|
| * of a cleared table (0), the position after the first one : the output doesn't depend on the table's history */ |
| 1358 |
0 |
▶ | int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
Branch: 26 branches
| Branch | True | False | Total |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
| int const usedTable = (dictDirective == noDict) && (dictIssue == dictSmall); |
0 |
0 |
0 |
|
| 1359 |
0 |
▶ | U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
Branch: 34 branches
| Branch | True | False | Total |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
| U32 const ctxIndex = ((usedTable && (prevIndex < startIndex)) ? startIndex : prevIndex) + 1; |
0 |
0 |
0 |
|
| 1360 |
0 |
▶ | int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
Branch: 42 branches
| Branch | True | False | Total |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
| int const inDict = (dictDirective == usingExtDict || dictDirective == usingDictCtx) && (ctxIndex < startIndex); |
0 |
0 |
0 |
|
| 1361 |
0 |
▶ | if ( ((dictIssue==dictSmall) ? (ctxIndex >= prefixIdxLimit) : 1) |
Branch: 13 branches
| Branch | True | False | Total |
| if ( ((dictIssue==dictSmall) ? (ctxIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (ctxIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (ctxIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (ctxIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (ctxIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (ctxIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (ctxIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (ctxIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (ctxIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (ctxIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (ctxIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (ctxIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (ctxIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
|
| 1362 |
0 |
▶ | && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
Branch: 46 branches
| Branch | True | False | Total |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (ctxIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
|
| 1363 |
0 |
▶ | && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
Branch: 34 branches
| Branch | True | False | Total |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
| && (!inDict || (ctxIndex + 8 <= startIndex)) /* the 8 compared bytes are within the dictionary */ |
0 |
0 |
0 |
|
| 1364 |
0 |
▶ | && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
Branch: 34 branches
| Branch | True | False | Total |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
| && LZ4_match8(inDict ? dictBase + (ctxIndex - dictDelta) : base + ctxIndex, ip) ) { |
0 |
0 |
0 |
|
| 1365 |
0 |
| matchIndex = ctxIndex; |
| 1366 |
|
| } else { |
| 1367 |
0 |
▶ | matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
Branch: 17 branches
| Branch | True | False | Total |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); |
0 |
0 |
0 |
|
| 1368 |
0 |
▶ | if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
Branch: 26 branches
| Branch | True | False | Total |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
| if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) |
0 |
0 |
0 |
|
| 1369 |
0 |
▶ | matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32) + dictDelta; |
Branch: 13 branches
| Branch | True | False | Total |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
| matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32) + dictDelta; |
0 |
0 |
0 |
|
| 1370 |
|
| } |
| 1371 |
|
| } |
| 1372 |
0 |
▶ | assert(matchIndex < current); |
Branch: 17 branches
| Branch | True | False | Total |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
|
| 1373 |
0 |
▶ | if (dictDirective == usingExtDict) { /* select without branch */ |
Branch: 13 branches
| Branch | True | False | Total |
| if (dictDirective == usingExtDict) { /* select without branch */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) { /* select without branch */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) { /* select without branch */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) { /* select without branch */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) { /* select without branch */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) { /* select without branch */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) { /* select without branch */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) { /* select without branch */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) { /* select without branch */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) { /* select without branch */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) { /* select without branch */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) { /* select without branch */ |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) { /* select without branch */ |
0 |
0 |
0 |
|
| 1374 |
0 |
| ptrdiff_t const relIdx = (ptrdiff_t)matchIndex - (ptrdiff_t)startIndex; /* < 0 : within dictionary */ |
| 1375 |
0 |
▶ | match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
Branch: 16 branches
| Branch | True | False | Total |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
| match = ((relIdx < 0) ? dictEnd : (const BYTE*)source) + relIdx; |
0 |
0 |
0 |
|
| 1376 |
0 |
▶ | } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
Branch: 26 branches
| Branch | True | False | Total |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
| } else if ((dictDirective == usingDictCtx) && (matchIndex < startIndex)) { |
0 |
0 |
0 |
|
| 1377 |
0 |
| match = dictBase + (matchIndex - dictDelta); |
| 1378 |
0 |
| lowLimit = dictionary; /* required for match length counter */ |
| 1379 |
|
| } else { |
| 1380 |
0 |
| match = base + matchIndex; |
| 1381 |
0 |
▶ | if (dictDirective == usingDictCtx) |
Branch: 13 branches
| Branch | True | False | Total |
| if (dictDirective == usingDictCtx) |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) |
0 |
0 |
0 |
| if (dictDirective == usingDictCtx) |
0 |
0 |
0 |
|
| 1382 |
0 |
| lowLimit = (const BYTE*)source; /* required for match length counter */ |
| 1383 |
|
| } |
| 1384 |
0 |
| LZ4_putIndexOnHash(current, h, cctx->hashTable, tableType); |
| 1385 |
0 |
▶ | assert(matchIndex < current); |
Branch: 17 branches
| Branch | True | False | Total |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
| assert(matchIndex < current); |
0 |
0 |
0 |
|
| 1386 |
0 |
▶ | if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) |
Branch: 13 branches
| Branch | True | False | Total |
| if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
| if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) |
0 |
0 |
0 |
|
| 1387 |
0 |
▶ | && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
Branch: 46 branches
| Branch | True | False | Total |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
| && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) |
0 |
0 |
0 |
|
| 1388 |
0 |
▶ | && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
Branch: 17 branches
| Branch | True | False | Total |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
| && (LZ4_read32(match) == LZ4_read32(ip)) ) { |
0 |
0 |
0 |
|
| 1389 |
0 |
| token=op++; |
| 1390 |
0 |
| *token=0; |
| 1391 |
0 |
▶ | if (maybe_extMem) offset = current - matchIndex; |
Branch: 17 branches
| Branch | True | False | Total |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
| if (maybe_extMem) offset = current - matchIndex; |
0 |
0 |
0 |
|
| 1392 |
0 |
▶ | if (dictDirective == usingExtDict) |
Branch: 13 branches
| Branch | True | False | Total |
| if (dictDirective == usingExtDict) |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) |
0 |
0 |
0 |
| if (dictDirective == usingExtDict) |
0 |
0 |
0 |
|
| 1393 |
0 |
▶ | lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
Branch: 16 branches
| Branch | True | False | Total |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
| lowLimit = (matchIndex < startIndex) ? dictionary : (const BYTE*)source; /* required for match length counter */ |
0 |
0 |
0 |
|
| 1394 |
|
| DEBUGLOG(6, "seq.start:%i, literals=%u, match.start:%i", |
| 1395 |
|
| (int)(anchor-(const BYTE*)source), 0, (int)(ip-(const BYTE*)source)); |
| 1396 |
0 |
| goto _next_match; |
| 1397 |
|
| } |
| 1398 |
|
| } |
| 1399 |
|
| |
| 1400 |
|
| /* Prepare next loop */ |
| 1401 |
0 |
▶ | forwardH = LZ4_hashPosition(++ip, tableType); |
Branch: 17 branches
| Branch | True | False | Total |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
| forwardH = LZ4_hashPosition(++ip, tableType); |
0 |
0 |
0 |
|
| 1402 |
|
| |
| 1403 |
|
| } |
| 1404 |
|
| |
| 1405 |
0 |
| _last_literals: |
| 1406 |
|
| /* Encode Last Literals */ |
| 1407 |
0 |
| { size_t lastRun = (size_t)(iend - anchor); |
| 1408 |
0 |
▶ | if ( (outputDirective) && /* Check output buffer overflow */ |
Branch: 16 branches
| Branch | True | False | Total |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
| if ( (outputDirective) && /* Check output buffer overflow */ |
0 |
0 |
0 |
|
| 1409 |
0 |
▶ | (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
Branch: 17 branches
| Branch | True | False | Total |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
| (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { |
0 |
0 |
0 |
|
| 1410 |
0 |
▶ | if (outputDirective == fillOutput) { |
Branch: 16 branches
| Branch | True | False | Total |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
|
| 1411 |
|
| /* adapt lastRun to fill 'dst' */ |
| 1412 |
0 |
▶ | assert(olimit >= op); |
Branch: 16 branches
| Branch | True | False | Total |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
| assert(olimit >= op); |
0 |
0 |
0 |
|
| 1413 |
0 |
| lastRun = (size_t)(olimit-op) - 1/*token*/; |
| 1414 |
0 |
| lastRun -= (lastRun + 256 - RUN_MASK) / 256; /*additional length tokens*/ |
| 1415 |
|
| } else { |
| 1416 |
0 |
▶ | assert(outputDirective == limitedOutput); |
Branch: 16 branches
| Branch | True | False | Total |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
| assert(outputDirective == limitedOutput); |
0 |
0 |
0 |
|
| 1417 |
0 |
| return 0; /* cannot compress within `dst` budget. Stored indexes in hash table are nonetheless fine */ |
| 1418 |
|
| } |
| 1419 |
|
| } |
| 1420 |
|
| DEBUGLOG(6, "Final literal run : %i literals", (int)lastRun); |
| 1421 |
0 |
▶ | if (lastRun >= RUN_MASK) { |
Branch: 17 branches
| Branch | True | False | Total |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
| if (lastRun >= RUN_MASK) { |
0 |
0 |
0 |
|
| 1422 |
0 |
| size_t accumulator = lastRun - RUN_MASK; |
| 1423 |
0 |
| *op++ = RUN_MASK << ML_BITS; |
| 1424 |
0 |
▶ | for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
Branch: 17 branches
| Branch | True | False | Total |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
| for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; |
0 |
0 |
0 |
|
| 1425 |
0 |
| *op++ = (BYTE) accumulator; |
| 1426 |
|
| } else { |
| 1427 |
0 |
| *op++ = (BYTE)(lastRun<<ML_BITS); |
| 1428 |
|
| } |
| 1429 |
0 |
| LZ4_memcpy(op, anchor, lastRun); |
| 1430 |
0 |
| ip = anchor + lastRun; |
| 1431 |
0 |
| op += lastRun; |
| 1432 |
|
| } |
| 1433 |
|
| |
| 1434 |
0 |
▶ | if (outputDirective == fillOutput) { |
Branch: 16 branches
| Branch | True | False | Total |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
|
| 1435 |
0 |
| *inputConsumed = (int) (((const char*)ip)-source); |
| 1436 |
|
| } |
| 1437 |
0 |
| result = (int)(((char*)op) - dest); |
| 1438 |
0 |
▶ | assert(result > 0); |
Branch: 17 branches
| Branch | True | False | Total |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
| assert(result > 0); |
0 |
0 |
0 |
|
| 1439 |
|
| DEBUGLOG(5, "LZ4_compress_generic: compressed %i bytes into %i bytes", inputSize, result); |
| 1440 |
0 |
| return result; |
| 1441 |
|
| } |
| 1442 |
|
| |
| 1443 |
|
| /* second part of an extDict compression, in prefix mode (see LZ4_compress_generic()). |
| 1444 |
|
| * not inlined : a single instance serves all invocations */ |
| 1445 |
0 |
▶ | LZ4_FORCE_NOINLINE int LZ4_compress_resumeWithPrefix(LZ4_stream_t_internal* cctx, |
Branch: 1 branch
| Branch | True | False | Total |
| LZ4_FORCE_NOINLINE int LZ4_compress_resumeWithPrefix(LZ4_stream_t_internal* cctx, |
0 |
0 |
0 |
|
| 1446 |
|
| const char* src, char* dst, int srcSize, int dstCapacity, int acceleration, |
| 1447 |
|
| const LZ4_resume_t* state) |
| 1448 |
|
| { |
| 1449 |
0 |
| return LZ4_compress_generic_validated(cctx, src, dst, srcSize, NULL, dstCapacity, limitedOutput, |
| 1450 |
|
| byU32, withPrefix64k, noDictIssue, acceleration, NULL, state); |
| 1451 |
|
| } |
| 1452 |
|
| |
| 1453 |
|
| /** LZ4_compress_generic() : |
| 1454 |
|
| * inlined, to ensure branches are decided at compilation time; |
| 1455 |
|
| * takes care of src == (NULL, 0) |
| 1456 |
|
| * and forward the rest to LZ4_compress_generic_validated */ |
| 1457 |
|
| LZ4_FORCE_INLINE int LZ4_compress_generic( |
| 1458 |
|
| LZ4_stream_t_internal* const cctx, |
| 1459 |
|
| const char* const src, |
| 1460 |
|
| char* const dst, |
| 1461 |
|
| const int srcSize, |
| 1462 |
|
| int *inputConsumed, /* only written when outputDirective == fillOutput */ |
| 1463 |
|
| const int dstCapacity, |
| 1464 |
|
| const limitedOutput_directive outputDirective, |
| 1465 |
|
| const tableType_t tableType, |
| 1466 |
|
| const dict_directive dictDirective, |
| 1467 |
|
| const dictIssue_directive dictIssue, |
| 1468 |
|
| const int acceleration) |
| 1469 |
|
| { |
| 1470 |
|
| DEBUGLOG(5, "LZ4_compress_generic: srcSize=%i, dstCapacity=%i", |
| 1471 |
|
| srcSize, dstCapacity); |
| 1472 |
|
| |
| 1473 |
0 |
▶ | if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ |
Branch: 13 branches
| Branch | True | False | Total |
| if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ |
0 |
0 |
0 |
| if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ |
0 |
0 |
0 |
| if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ |
0 |
0 |
0 |
| if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ |
0 |
0 |
0 |
| if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ |
0 |
0 |
0 |
| if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ |
0 |
0 |
0 |
| if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ |
0 |
0 |
0 |
| if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ |
0 |
0 |
0 |
| if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ |
0 |
0 |
0 |
| if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ |
0 |
0 |
0 |
| if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ |
0 |
0 |
0 |
| if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ |
0 |
0 |
0 |
| if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ |
0 |
0 |
0 |
|
| 1474 |
0 |
▶ | if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
Branch: 16 branches
| Branch | True | False | Total |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
| if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ |
0 |
0 |
0 |
|
| 1475 |
0 |
▶ | if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
Branch: 20 branches
| Branch | True | False | Total |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
| if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ |
0 |
0 |
0 |
|
| 1476 |
|
| DEBUGLOG(5, "Generating an empty block"); |
| 1477 |
0 |
▶ | assert(outputDirective == notLimited || dstCapacity >= 1); |
Branch: 20 branches
| Branch | True | False | Total |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
| assert(outputDirective == notLimited || dstCapacity >= 1); |
0 |
0 |
0 |
|
| 1478 |
0 |
▶ | assert(dst != NULL); |
Branch: 16 branches
| Branch | True | False | Total |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
| assert(dst != NULL); |
0 |
0 |
0 |
|
| 1479 |
0 |
| dst[0] = 0; |
| 1480 |
0 |
▶ | if (outputDirective == fillOutput) { |
Branch: 6 branches
| Branch | True | False | Total |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
| if (outputDirective == fillOutput) { |
0 |
0 |
0 |
|
| 1481 |
0 |
▶ | assert (inputConsumed != NULL); |
Branch: 8 branches
| Branch | True | False | Total |
| assert (inputConsumed != NULL); |
0 |
0 |
0 |
| assert (inputConsumed != NULL); |
0 |
0 |
0 |
| assert (inputConsumed != NULL); |
0 |
0 |
0 |
| assert (inputConsumed != NULL); |
0 |
0 |
0 |
| assert (inputConsumed != NULL); |
0 |
0 |
0 |
| assert (inputConsumed != NULL); |
0 |
0 |
0 |
| assert (inputConsumed != NULL); |
0 |
0 |
0 |
| assert (inputConsumed != NULL); |
0 |
0 |
0 |
|
| 1482 |
0 |
| *inputConsumed = 0; |
| 1483 |
|
| } |
| 1484 |
0 |
| return 1; |
| 1485 |
|
| } |
| 1486 |
0 |
▶ | assert(src != NULL); |
Branch: 16 branches
| Branch | True | False | Total |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
| assert(src != NULL); |
0 |
0 |
0 |
|
| 1487 |
|
| |
| 1488 |
|
| if ((dictDirective == usingExtDict) && (dictIssue == noDictIssue)) { |
| 1489 |
|
| /* beyond LZ4_DISTANCE_MAX, the dictionary is out of reach : the rest of the input is compressed in prefix mode */ |
| 1490 |
|
| LZ4_resume_t state; |
| 1491 |
|
| int result; |
| 1492 |
0 |
▶ | assert(tableType == byU32); |
Branch: 2 branches
| Branch | True | False | Total |
| assert(tableType == byU32); |
0 |
0 |
0 |
| assert(tableType == byU32); |
0 |
0 |
0 |
|
| 1493 |
|
| assert(outputDirective != fillOutput); |
| 1494 |
0 |
| state.ip = NULL; |
| 1495 |
0 |
| result = LZ4_compress_generic_validated(cctx, src, dst, srcSize, inputConsumed, dstCapacity, outputDirective, |
| 1496 |
|
| tableType, usingExtDict, noDictIssue, acceleration, &state, NULL); |
| 1497 |
0 |
▶ | if (state.ip == NULL) return result; /* completed (or failed) in extDict mode */ |
Branch: 3 branches
| Branch | True | False | Total |
| if (state.ip == NULL) return result; /* completed (or failed) in extDict mode */ |
0 |
0 |
0 |
| if (state.ip == NULL) return result; /* completed (or failed) in extDict mode */ |
0 |
0 |
0 |
| if (state.ip == NULL) return result; /* completed (or failed) in extDict mode */ |
0 |
0 |
0 |
|
| 1498 |
|
| /* notLimited : dst is presumed large enough for LZ4_compressBound() */ |
| 1499 |
0 |
| return LZ4_compress_resumeWithPrefix(cctx, src, dst, srcSize, |
| 1500 |
0 |
▶ | (outputDirective == notLimited) ? LZ4_COMPRESSBOUND(srcSize) : dstCapacity, |
Branch: 1 branch
| Branch | True | False | Total |
| (outputDirective == notLimited) ? LZ4_COMPRESSBOUND(srcSize) : dstCapacity, |
0 |
0 |
0 |
|
| 1501 |
|
| acceleration, &state); |
| 1502 |
|
| } |
| 1503 |
|
| |
| 1504 |
0 |
| return LZ4_compress_generic_validated(cctx, src, dst, srcSize, |
| 1505 |
|
| inputConsumed, /* only written into if outputDirective == fillOutput */ |
| 1506 |
|
| dstCapacity, outputDirective, |
| 1507 |
|
| tableType, dictDirective, dictIssue, acceleration, NULL, NULL); |
| 1508 |
|
| } |
| 1509 |
|
| |
| 1510 |
|
| |
| 1511 |
|
| /* values < 1 select the default, values > LZ4_ACCELERATION_MAX are capped */ |
| 1512 |
0 |
| static int LZ4_clampAcceleration(int acceleration) |
| 1513 |
|
| { |
| 1514 |
0 |
▶ | if (acceleration < 1) return LZ4_ACCELERATION_DEFAULT; |
Branch: 1 branch
| Branch | True | False | Total |
| if (acceleration < 1) return LZ4_ACCELERATION_DEFAULT; |
0 |
0 |
0 |
|
| 1515 |
0 |
▶ | if (acceleration > LZ4_ACCELERATION_MAX) return LZ4_ACCELERATION_MAX; |
Branch: 1 branch
| Branch | True | False | Total |
| if (acceleration > LZ4_ACCELERATION_MAX) return LZ4_ACCELERATION_MAX; |
0 |
0 |
0 |
|
| 1516 |
0 |
| return acceleration; |
| 1517 |
|
| } |
| 1518 |
|
| |
| 1519 |
|
| /* table type for inputs too large for byU16. |
| 1520 |
|
| * byPtr (32-bit only) requires src > LZ4_DISTANCE_MAX, |
| 1521 |
|
| * so that empty (NULL) entries are always beyond the maximum distance */ |
| 1522 |
0 |
| static tableType_t LZ4_largeInputTableType(const char* src) |
| 1523 |
|
| { |
| 1524 |
|
| (void)src; /* unused on 64-bit systems */ |
| 1525 |
0 |
| return ((sizeof(void*)==4) && ((uptrval)src > LZ4_DISTANCE_MAX)) ? byPtr : byU32; |
| 1526 |
|
| } |
| 1527 |
|
| |
| 1528 |
|
| /* outputDirective must be a compile-time constant */ |
| 1529 |
|
| LZ4_FORCE_INLINE int LZ4_compress_fastReset_generic( |
| 1530 |
|
| LZ4_stream_t_internal* const ctx, |
| 1531 |
|
| const char* const src, |
| 1532 |
|
| char* const dst, |
| 1533 |
|
| const int srcSize, |
| 1534 |
|
| const int dstCapacity, |
| 1535 |
|
| const limitedOutput_directive outputDirective, |
| 1536 |
|
| const int acceleration) |
| 1537 |
|
| { |
| 1538 |
0 |
▶ | if (srcSize < LZ4_64Klimit) { |
Branch: 2 branches
| Branch | True | False | Total |
| if (srcSize < LZ4_64Klimit) { |
0 |
0 |
0 |
| if (srcSize < LZ4_64Klimit) { |
0 |
0 |
0 |
|
| 1539 |
|
| LZ4_prepareTable(ctx, srcSize, byU16); |
| 1540 |
0 |
▶ | if (ctx->currentOffset) { /* table re-used : stale entries must be rejected */ |
Branch: 2 branches
| Branch | True | False | Total |
| if (ctx->currentOffset) { /* table re-used : stale entries must be rejected */ |
0 |
0 |
0 |
| if (ctx->currentOffset) { /* table re-used : stale entries must be rejected */ |
0 |
0 |
0 |
|
| 1541 |
0 |
| return LZ4_compress_generic(ctx, src, dst, srcSize, NULL, dstCapacity, outputDirective, byU16, noDict, dictSmall, acceleration); |
| 1542 |
|
| } else { |
| 1543 |
0 |
| return LZ4_compress_generic(ctx, src, dst, srcSize, NULL, dstCapacity, outputDirective, byU16, noDict, noDictIssue, acceleration); |
| 1544 |
|
| } |
| 1545 |
|
| } else { |
| 1546 |
0 |
| const tableType_t tableType = LZ4_largeInputTableType(src); |
| 1547 |
|
| LZ4_prepareTable(ctx, srcSize, tableType); |
| 1548 |
0 |
| return LZ4_compress_generic(ctx, src, dst, srcSize, NULL, dstCapacity, outputDirective, tableType, noDict, noDictIssue, acceleration); |
| 1549 |
|
| } |
| 1550 |
|
| } |
| 1551 |
|
| |
| 1552 |
0 |
| int LZ4_compress_fast_extState(void* state, const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration) |
| 1553 |
|
| { |
| 1554 |
|
| /* a freshly initialized state is valid for _fastReset() */ |
| 1555 |
0 |
| LZ4_stream_t* const s = LZ4_initStream(state, sizeof(LZ4_stream_t)); |
| 1556 |
0 |
▶ | assert(s != NULL); |
Branch: 1 branch
| Branch | True | False | Total |
| assert(s != NULL); |
0 |
0 |
0 |
|
| 1557 |
0 |
| return LZ4_compress_fast_extState_fastReset(s, source, dest, inputSize, maxOutputSize, acceleration); |
| 1558 |
|
| } |
| 1559 |
|
| |
| 1560 |
|
| /** |
| 1561 |
|
| * LZ4_compress_fast_extState_fastReset() : |
| 1562 |
|
| * A variant of LZ4_compress_fast_extState(). |
| 1563 |
|
| * |
| 1564 |
|
| * Using this variant avoids an expensive initialization step. It is only safe |
| 1565 |
|
| * to call if the state buffer is known to be correctly initialized already |
| 1566 |
|
| * (see comment in lz4.h on LZ4_resetStream_fast() for a definition of |
| 1567 |
|
| * "correctly initialized"). |
| 1568 |
|
| */ |
| 1569 |
0 |
| int LZ4_compress_fast_extState_fastReset(void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration) |
| 1570 |
|
| { |
| 1571 |
0 |
| LZ4_stream_t_internal* const ctx = &((LZ4_stream_t*)state)->internal_donotuse; |
| 1572 |
0 |
| acceleration = LZ4_clampAcceleration(acceleration); |
| 1573 |
0 |
▶ | assert(ctx != NULL); |
Branch: 1 branch
| Branch | True | False | Total |
| assert(ctx != NULL); |
0 |
0 |
0 |
|
| 1574 |
|
| |
| 1575 |
0 |
▶ | if (dstCapacity >= LZ4_compressBound(srcSize)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (dstCapacity >= LZ4_compressBound(srcSize)) { |
0 |
0 |
0 |
|
| 1576 |
0 |
| return LZ4_compress_fastReset_generic(ctx, src, dst, srcSize, 0, notLimited, acceleration); |
| 1577 |
|
| } else { |
| 1578 |
0 |
| return LZ4_compress_fastReset_generic(ctx, src, dst, srcSize, dstCapacity, limitedOutput, acceleration); |
| 1579 |
|
| } |
| 1580 |
|
| } |
| 1581 |
|
| |
| 1582 |
|
| |
| 1583 |
0 |
| int LZ4_compress_fast(const char* src, char* dest, int srcSize, int dstCapacity, int acceleration) |
| 1584 |
|
| { |
| 1585 |
|
| int result; |
| 1586 |
|
| #if (LZ4_HEAPMODE) |
| 1587 |
|
| LZ4_stream_t* const ctxPtr = (LZ4_stream_t*)ALLOC(sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ |
| 1588 |
|
| if (ctxPtr == NULL) return 0; |
| 1589 |
|
| #else |
| 1590 |
|
| LZ4_stream_t ctx; |
| 1591 |
0 |
| LZ4_stream_t* const ctxPtr = &ctx; |
| 1592 |
|
| #endif |
| 1593 |
0 |
| result = LZ4_compress_fast_extState(ctxPtr, src, dest, srcSize, dstCapacity, acceleration); |
| 1594 |
|
| |
| 1595 |
|
| #if (LZ4_HEAPMODE) |
| 1596 |
|
| FREEMEM(ctxPtr); |
| 1597 |
|
| #endif |
| 1598 |
0 |
| return result; |
| 1599 |
|
| } |
| 1600 |
|
| |
| 1601 |
|
| |
| 1602 |
0 |
| int LZ4_compress_default(const char* src, char* dst, int srcSize, int dstCapacity) |
| 1603 |
|
| { |
| 1604 |
0 |
| return LZ4_compress_fast(src, dst, srcSize, dstCapacity, 1); |
| 1605 |
|
| } |
| 1606 |
|
| |
| 1607 |
|
| |
| 1608 |
|
| /* Note!: This function leaves the stream in an unclean/broken state! |
| 1609 |
|
| * It is not safe to subsequently use the same state with a _fastReset() or |
| 1610 |
|
| * _continue() call without resetting it. */ |
| 1611 |
0 |
| static int LZ4_compress_destSize_extState_internal(LZ4_stream_t* state, const char* src, char* dst, int* srcSizePtr, int targetDstSize, int acceleration) |
| 1612 |
|
| { |
| 1613 |
0 |
| void* const s = LZ4_initStream(state, sizeof (*state)); |
| 1614 |
0 |
▶ | assert(s != NULL); (void)s; |
Branch: 1 branch
| Branch | True | False | Total |
| assert(s != NULL); (void)s; |
0 |
0 |
0 |
|
| 1615 |
0 |
| acceleration = LZ4_clampAcceleration(acceleration); |
| 1616 |
|
| |
| 1617 |
0 |
▶ | if (targetDstSize >= LZ4_compressBound(*srcSizePtr)) { /* compression success is guaranteed */ |
Branch: 1 branch
| Branch | True | False | Total |
| if (targetDstSize >= LZ4_compressBound(*srcSizePtr)) { /* compression success is guaranteed */ |
0 |
0 |
0 |
|
| 1618 |
0 |
| return LZ4_compress_fast_extState_fastReset(state, src, dst, *srcSizePtr, targetDstSize, acceleration); |
| 1619 |
|
| } else { |
| 1620 |
0 |
▶ | if (*srcSizePtr < LZ4_64Klimit) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (*srcSizePtr < LZ4_64Klimit) { |
0 |
0 |
0 |
|
| 1621 |
0 |
▶ | return LZ4_compress_generic(&state->internal_donotuse, src, dst, *srcSizePtr, srcSizePtr, targetDstSize, fillOutput, byU16, noDict, noDictIssue, acceleration); |
Branch: 1 branch
| Branch | True | False | Total |
| return LZ4_compress_generic(&state->internal_donotuse, src, dst, *srcSizePtr, srcSizePtr, targetDstSize, fillOutput, byU16, noDict, noDictIssue, acceleration); |
0 |
0 |
0 |
|
| 1622 |
|
| } else { |
| 1623 |
0 |
▶ | return LZ4_compress_generic(&state->internal_donotuse, src, dst, *srcSizePtr, srcSizePtr, targetDstSize, fillOutput, LZ4_largeInputTableType(src), noDict, noDictIssue, acceleration); |
Branch: 1 branch
| Branch | True | False | Total |
| return LZ4_compress_generic(&state->internal_donotuse, src, dst, *srcSizePtr, srcSizePtr, targetDstSize, fillOutput, LZ4_largeInputTableType(src), noDict, noDictIssue, acceleration); |
0 |
0 |
0 |
|
| 1624 |
|
| } } |
| 1625 |
|
| } |
| 1626 |
|
| |
| 1627 |
0 |
| int LZ4_compress_destSize_extState(void* state, const char* src, char* dst, int* srcSizePtr, int targetDstSize, int acceleration) |
| 1628 |
|
| { |
| 1629 |
0 |
| int const r = LZ4_compress_destSize_extState_internal((LZ4_stream_t*)state, src, dst, srcSizePtr, targetDstSize, acceleration); |
| 1630 |
|
| /* clean the state on exit */ |
| 1631 |
0 |
| LZ4_initStream(state, sizeof (LZ4_stream_t)); |
| 1632 |
0 |
| return r; |
| 1633 |
|
| } |
| 1634 |
|
| |
| 1635 |
|
| |
| 1636 |
0 |
| int LZ4_compress_destSize(const char* src, char* dst, int* srcSizePtr, int targetDstSize) |
| 1637 |
|
| { |
| 1638 |
|
| int result; |
| 1639 |
|
| #if (LZ4_HEAPMODE) |
| 1640 |
|
| LZ4_stream_t* const ctx = (LZ4_stream_t*)ALLOC(sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ |
| 1641 |
|
| if (ctx == NULL) return 0; |
| 1642 |
|
| #else |
| 1643 |
|
| LZ4_stream_t ctxBody; |
| 1644 |
0 |
| LZ4_stream_t* const ctx = &ctxBody; |
| 1645 |
|
| #endif |
| 1646 |
0 |
| result = LZ4_compress_destSize_extState_internal(ctx, src, dst, srcSizePtr, targetDstSize, 1); |
| 1647 |
|
| |
| 1648 |
|
| #if (LZ4_HEAPMODE) |
| 1649 |
|
| FREEMEM(ctx); |
| 1650 |
|
| #endif |
| 1651 |
0 |
| return result; |
| 1652 |
|
| } |
| 1653 |
|
| |
| 1654 |
|
| |
| 1655 |
|
| |
| 1656 |
|
| /*-****************************** |
| 1657 |
|
| * Streaming functions |
| 1658 |
|
| ********************************/ |
| 1659 |
|
| |
| 1660 |
|
| #if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) |
| 1661 |
0 |
| LZ4_stream_t* LZ4_createStream(void) |
| 1662 |
|
| { |
| 1663 |
0 |
| LZ4_stream_t* const lz4s = (LZ4_stream_t*)ALLOC(sizeof(LZ4_stream_t)); |
| 1664 |
|
| LZ4_STATIC_ASSERT(sizeof(LZ4_stream_t) >= sizeof(LZ4_stream_t_internal)); |
| 1665 |
|
| DEBUGLOG(4, "LZ4_createStream %p", (void*)lz4s); |
| 1666 |
0 |
▶ | if (lz4s == NULL) return NULL; |
Branch: 1 branch
| Branch | True | False | Total |
| if (lz4s == NULL) return NULL; |
0 |
0 |
0 |
|
| 1667 |
0 |
| LZ4_initStream(lz4s, sizeof(*lz4s)); |
| 1668 |
0 |
| return lz4s; |
| 1669 |
|
| } |
| 1670 |
|
| #endif |
| 1671 |
|
| |
| 1672 |
0 |
| static size_t LZ4_stream_t_alignment(void) |
| 1673 |
|
| { |
| 1674 |
|
| #if LZ4_ALIGN_TEST |
| 1675 |
|
| typedef struct { char c; LZ4_stream_t t; } t_a; |
| 1676 |
0 |
| return sizeof(t_a) - sizeof(LZ4_stream_t); |
| 1677 |
|
| #else |
| 1678 |
|
| return 1; /* effectively disabled */ |
| 1679 |
|
| #endif |
| 1680 |
|
| } |
| 1681 |
|
| |
| 1682 |
0 |
| LZ4_stream_t* LZ4_initStream (void* buffer, size_t size) |
| 1683 |
|
| { |
| 1684 |
|
| DEBUGLOG(5, "LZ4_initStream"); |
| 1685 |
0 |
▶ | if (buffer == NULL) { return NULL; } |
Branch: 1 branch
| Branch | True | False | Total |
| if (buffer == NULL) { return NULL; } |
0 |
0 |
0 |
|
| 1686 |
0 |
▶ | if (size < sizeof(LZ4_stream_t)) { return NULL; } |
Branch: 1 branch
| Branch | True | False | Total |
| if (size < sizeof(LZ4_stream_t)) { return NULL; } |
0 |
0 |
0 |
|
| 1687 |
0 |
▶ | if (!LZ4_isAligned(buffer, LZ4_stream_t_alignment())) return NULL; |
Branch: 1 branch
| Branch | True | False | Total |
| if (!LZ4_isAligned(buffer, LZ4_stream_t_alignment())) return NULL; |
0 |
0 |
0 |
|
| 1688 |
0 |
| MEM_INIT(buffer, 0, sizeof(LZ4_stream_t_internal)); |
| 1689 |
0 |
| return (LZ4_stream_t*)buffer; |
| 1690 |
|
| } |
| 1691 |
|
| |
| 1692 |
|
| /* resetStream is now deprecated, |
| 1693 |
|
| * prefer initStream() which is more general */ |
| 1694 |
0 |
| void LZ4_resetStream (LZ4_stream_t* LZ4_stream) |
| 1695 |
|
| { |
| 1696 |
|
| DEBUGLOG(5, "LZ4_resetStream (ctx:%p)", (void*)LZ4_stream); |
| 1697 |
0 |
| MEM_INIT(LZ4_stream, 0, sizeof(LZ4_stream_t_internal)); |
| 1698 |
0 |
| } |
| 1699 |
|
| |
| 1700 |
0 |
| void LZ4_resetStream_fast(LZ4_stream_t* ctx) { |
| 1701 |
0 |
▶ | LZ4_prepareTable(&(ctx->internal_donotuse), 0, byU32); |
Branch: 1 branch
| Branch | True | False | Total |
| LZ4_prepareTable(&(ctx->internal_donotuse), 0, byU32); |
0 |
0 |
0 |
|
| 1702 |
0 |
| } |
| 1703 |
|
| |
| 1704 |
|
| #if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) |
| 1705 |
0 |
| int LZ4_freeStream (LZ4_stream_t* LZ4_stream) |
| 1706 |
|
| { |
| 1707 |
0 |
▶ | if (!LZ4_stream) return 0; /* support free on NULL */ |
Branch: 1 branch
| Branch | True | False | Total |
| if (!LZ4_stream) return 0; /* support free on NULL */ |
0 |
0 |
0 |
|
| 1708 |
|
| DEBUGLOG(5, "LZ4_freeStream %p", (void*)LZ4_stream); |
| 1709 |
0 |
| FREEMEM(LZ4_stream); |
| 1710 |
0 |
| return (0); |
| 1711 |
|
| } |
| 1712 |
|
| #endif |
| 1713 |
|
| |
| 1714 |
|
| |
| 1715 |
|
| typedef enum { _ld_fast, _ld_slow } LoadDict_mode_e; |
| 1716 |
|
| #define HASH_UNIT sizeof(reg_t) |
| 1717 |
0 |
| static int LZ4_loadDict_internal(LZ4_stream_t* LZ4_dict, |
| 1718 |
|
| const char* dictionary, int dictSize, |
| 1719 |
|
| LoadDict_mode_e _ld) |
| 1720 |
|
| { |
| 1721 |
0 |
| LZ4_stream_t_internal* const dict = &LZ4_dict->internal_donotuse; |
| 1722 |
0 |
| const tableType_t tableType = byU32; |
| 1723 |
0 |
| const BYTE* p = (const BYTE*)dictionary; |
| 1724 |
0 |
| const BYTE* const dictEnd = p + dictSize; |
| 1725 |
|
| U32 idx32; |
| 1726 |
|
| |
| 1727 |
|
| DEBUGLOG(4, "LZ4_loadDict (%i bytes from %p into %p)", dictSize, (void*)dictionary, (void*)LZ4_dict); |
| 1728 |
|
| |
| 1729 |
|
| /* It's necessary to reset the context, |
| 1730 |
|
| * and not just continue it with prepareTable() |
| 1731 |
|
| * to avoid any risk of generating overflowing matchIndex |
| 1732 |
|
| * when compressing using this dictionary */ |
| 1733 |
0 |
| LZ4_resetStream(LZ4_dict); |
| 1734 |
|
| |
| 1735 |
|
| /* We always increment the offset by 64 KB, since, if the dict is longer, |
| 1736 |
|
| * we truncate it to the last 64k, and if it's shorter, we still want to |
| 1737 |
|
| * advance by a whole window length so we can provide the guarantee that |
| 1738 |
|
| * there are only valid offsets in the window, which allows an optimization |
| 1739 |
|
| * in LZ4_compress_fast_continue() where it uses noDictIssue even when the |
| 1740 |
|
| * dictionary isn't a full 64k. */ |
| 1741 |
0 |
| dict->currentOffset += 64 KB; |
| 1742 |
|
| /* no longer a cleared table : LZ4_prepareTable() must check it, |
| 1743 |
|
| * even when the dictionary is too small to be used */ |
| 1744 |
0 |
| dict->tableType = (U32)tableType; |
| 1745 |
|
| |
| 1746 |
0 |
▶ | if (dictSize < (int)HASH_UNIT) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictSize < (int)HASH_UNIT) { |
0 |
0 |
0 |
|
| 1747 |
0 |
| return 0; |
| 1748 |
|
| } |
| 1749 |
|
| |
| 1750 |
0 |
▶ | if ((dictEnd - p) > 64 KB) p = dictEnd - 64 KB; |
Branch: 1 branch
| Branch | True | False | Total |
| if ((dictEnd - p) > 64 KB) p = dictEnd - 64 KB; |
0 |
0 |
0 |
|
| 1751 |
0 |
| dict->dictionary = p; |
| 1752 |
0 |
| dict->dictSize = (U32)(dictEnd - p); |
| 1753 |
0 |
| idx32 = dict->currentOffset - dict->dictSize; |
| 1754 |
|
| |
| 1755 |
0 |
▶ | while (p <= dictEnd-HASH_UNIT) { |
Branch: 1 branch
| Branch | True | False | Total |
| while (p <= dictEnd-HASH_UNIT) { |
0 |
0 |
0 |
|
| 1756 |
0 |
| U32 const h = LZ4_hashPosition(p, tableType); |
| 1757 |
|
| /* Note: overwriting => favors positions end of dictionary */ |
| 1758 |
0 |
| LZ4_putIndexOnHash(idx32, h, dict->hashTable, tableType); |
| 1759 |
0 |
| p+=3; idx32+=3; |
| 1760 |
|
| } |
| 1761 |
|
| |
| 1762 |
0 |
▶ | if (_ld == _ld_slow) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (_ld == _ld_slow) { |
0 |
0 |
0 |
|
| 1763 |
|
| /* Fill hash table with additional references, to improve compression capability */ |
| 1764 |
0 |
| p = dict->dictionary; |
| 1765 |
0 |
| idx32 = dict->currentOffset - dict->dictSize; |
| 1766 |
0 |
▶ | while (p <= dictEnd-HASH_UNIT) { |
Branch: 1 branch
| Branch | True | False | Total |
| while (p <= dictEnd-HASH_UNIT) { |
0 |
0 |
0 |
|
| 1767 |
0 |
| U32 const h = LZ4_hashPosition(p, tableType); |
| 1768 |
0 |
| U32 const limit = dict->currentOffset - 64 KB; |
| 1769 |
0 |
▶ | if (LZ4_getIndexOnHash(h, dict->hashTable, tableType) <= limit) { |
Branch: 2 branches
| Branch | True | False | Total |
| if (LZ4_getIndexOnHash(h, dict->hashTable, tableType) <= limit) { |
0 |
0 |
0 |
| if (LZ4_getIndexOnHash(h, dict->hashTable, tableType) <= limit) { |
0 |
0 |
0 |
|
| 1770 |
|
| /* Note: not overwriting => favors positions beginning of dictionary */ |
| 1771 |
0 |
| LZ4_putIndexOnHash(idx32, h, dict->hashTable, tableType); |
| 1772 |
|
| } |
| 1773 |
0 |
| p++; idx32++; |
| 1774 |
|
| } |
| 1775 |
|
| } |
| 1776 |
|
| |
| 1777 |
0 |
| return (int)dict->dictSize; |
| 1778 |
|
| } |
| 1779 |
|
| |
| 1780 |
0 |
| int LZ4_loadDict(LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize) |
| 1781 |
|
| { |
| 1782 |
0 |
| return LZ4_loadDict_internal(LZ4_dict, dictionary, dictSize, _ld_fast); |
| 1783 |
|
| } |
| 1784 |
|
| |
| 1785 |
0 |
| int LZ4_loadDictSlow(LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize) |
| 1786 |
|
| { |
| 1787 |
0 |
| return LZ4_loadDict_internal(LZ4_dict, dictionary, dictSize, _ld_slow); |
| 1788 |
|
| } |
| 1789 |
|
| |
| 1790 |
0 |
| void LZ4_attach_dictionary(LZ4_stream_t* workingStream, const LZ4_stream_t* dictionaryStream) |
| 1791 |
|
| { |
| 1792 |
0 |
▶ | const LZ4_stream_t_internal* dictCtx = (dictionaryStream == NULL) ? NULL : |
Branch: 1 branch
| Branch | True | False | Total |
| const LZ4_stream_t_internal* dictCtx = (dictionaryStream == NULL) ? NULL : |
0 |
0 |
0 |
|
| 1793 |
|
| &(dictionaryStream->internal_donotuse); |
| 1794 |
|
| |
| 1795 |
|
| DEBUGLOG(4, "LZ4_attach_dictionary (%p, %p, size %u)", |
| 1796 |
|
| (void*)workingStream, (void*)dictionaryStream, |
| 1797 |
|
| dictCtx != NULL ? dictCtx->dictSize : 0); |
| 1798 |
|
| |
| 1799 |
0 |
▶ | if (dictCtx != NULL) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictCtx != NULL) { |
0 |
0 |
0 |
|
| 1800 |
|
| /* If the current offset is zero, we will never look in the |
| 1801 |
|
| * external dictionary context, since there is no value a table |
| 1802 |
|
| * entry can take that indicate a miss. In that case, we need |
| 1803 |
|
| * to bump the offset to something non-zero. |
| 1804 |
|
| */ |
| 1805 |
0 |
▶ | if (workingStream->internal_donotuse.currentOffset == 0) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (workingStream->internal_donotuse.currentOffset == 0) { |
0 |
0 |
0 |
|
| 1806 |
0 |
| workingStream->internal_donotuse.currentOffset = 64 KB; |
| 1807 |
|
| /* no longer a cleared table : LZ4_prepareTable() must check it */ |
| 1808 |
0 |
| workingStream->internal_donotuse.tableType = (U32)byU32; |
| 1809 |
|
| } |
| 1810 |
|
| |
| 1811 |
|
| /* Don't actually attach an empty dictionary. |
| 1812 |
|
| */ |
| 1813 |
0 |
▶ | if (dictCtx->dictSize == 0) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictCtx->dictSize == 0) { |
0 |
0 |
0 |
|
| 1814 |
0 |
| dictCtx = NULL; |
| 1815 |
|
| } |
| 1816 |
|
| } |
| 1817 |
0 |
| workingStream->internal_donotuse.dictCtx = dictCtx; |
| 1818 |
0 |
| } |
| 1819 |
|
| |
| 1820 |
|
| |
| 1821 |
0 |
| static void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, int nextSize) |
| 1822 |
|
| { |
| 1823 |
0 |
▶ | assert(nextSize >= 0); |
Branch: 1 branch
| Branch | True | False | Total |
| assert(nextSize >= 0); |
0 |
0 |
0 |
|
| 1824 |
0 |
▶ | if (LZ4_dict->currentOffset + (unsigned)nextSize > 0x80000000) { /* potential ptrdiff_t overflow (32-bits mode) */ |
Branch: 1 branch
| Branch | True | False | Total |
| if (LZ4_dict->currentOffset + (unsigned)nextSize > 0x80000000) { /* potential ptrdiff_t overflow (32-bits mode) */ |
0 |
0 |
0 |
|
| 1825 |
|
| /* rescale hash table */ |
| 1826 |
0 |
| U32 const delta = LZ4_dict->currentOffset - 64 KB; |
| 1827 |
0 |
| const BYTE* dictEnd = LZ4_dict->dictionary + LZ4_dict->dictSize; |
| 1828 |
|
| int i; |
| 1829 |
|
| DEBUGLOG(4, "LZ4_renormDictT"); |
| 1830 |
0 |
▶ | for (i=0; i<LZ4_HASH_SIZE_U32; i++) { |
Branch: 1 branch
| Branch | True | False | Total |
| for (i=0; i<LZ4_HASH_SIZE_U32; i++) { |
0 |
0 |
0 |
|
| 1831 |
0 |
▶ | if (LZ4_dict->hashTable[i] < delta) LZ4_dict->hashTable[i]=0; |
Branch: 1 branch
| Branch | True | False | Total |
| if (LZ4_dict->hashTable[i] < delta) LZ4_dict->hashTable[i]=0; |
0 |
0 |
0 |
|
| 1832 |
0 |
| else LZ4_dict->hashTable[i] -= delta; |
| 1833 |
|
| } |
| 1834 |
0 |
| LZ4_dict->currentOffset = 64 KB; |
| 1835 |
0 |
▶ | if (LZ4_dict->dictSize > 64 KB) LZ4_dict->dictSize = 64 KB; |
Branch: 1 branch
| Branch | True | False | Total |
| if (LZ4_dict->dictSize > 64 KB) LZ4_dict->dictSize = 64 KB; |
0 |
0 |
0 |
|
| 1836 |
0 |
| LZ4_dict->dictionary = dictEnd - LZ4_dict->dictSize; |
| 1837 |
|
| } |
| 1838 |
0 |
| } |
| 1839 |
|
| |
| 1840 |
|
| |
| 1841 |
|
| /* The history covers neither the full window (64 KB) nor all positions since the start of indexes : |
| 1842 |
|
| * the table may contain stale entries, from before the history, which must be rejected (dictSmall). */ |
| 1843 |
0 |
| static int LZ4_isDictSmall(const LZ4_stream_t_internal* streamPtr) |
| 1844 |
|
| { |
| 1845 |
0 |
▶ | return (streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset); |
Branch: 2 branches
| Branch | True | False | Total |
| return (streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset); |
0 |
0 |
0 |
| return (streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset); |
0 |
0 |
0 |
|
| 1846 |
|
| } |
| 1847 |
|
| |
| 1848 |
|
| /* from this input size (2 KB by default, at most 4 KB), |
| 1849 |
|
| * copying the tables of an attached dictionary is faster than looking into both tables. |
| 1850 |
|
| * The copy cost follows the table size. */ |
| 1851 |
|
| #define LZ4_DICTCTX_COPY_THRESHOLD ((LZ4_HASHTABLESIZE / 8 < 4 KB) ? (LZ4_HASHTABLESIZE / 8) : 4 KB) |
| 1852 |
|
| |
| 1853 |
|
| |
| 1854 |
0 |
| int LZ4_compress_fast_continue (LZ4_stream_t* LZ4_stream, |
| 1855 |
|
| const char* source, char* dest, |
| 1856 |
|
| int inputSize, int maxOutputSize, |
| 1857 |
|
| int acceleration) |
| 1858 |
|
| { |
| 1859 |
0 |
| const tableType_t tableType = byU32; |
| 1860 |
0 |
| LZ4_stream_t_internal* const streamPtr = &LZ4_stream->internal_donotuse; |
| 1861 |
0 |
▶ | const char* dictEnd = streamPtr->dictSize ? (const char*)streamPtr->dictionary + streamPtr->dictSize : NULL; |
Branch: 1 branch
| Branch | True | False | Total |
| const char* dictEnd = streamPtr->dictSize ? (const char*)streamPtr->dictionary + streamPtr->dictSize : NULL; |
0 |
0 |
0 |
|
| 1862 |
|
| |
| 1863 |
|
| DEBUGLOG(5, "LZ4_compress_fast_continue (inputSize=%i, dictSize=%u)", inputSize, streamPtr->dictSize); |
| 1864 |
|
| |
| 1865 |
|
| /* new stream (no history) : clear the table beyond LZ4_CLEAR_TABLE_THRESHOLD */ |
| 1866 |
0 |
▶ | if ((streamPtr->dictSize == 0) && (streamPtr->dictCtx == NULL) && (inputSize >= LZ4_CLEAR_TABLE_THRESHOLD)) |
Branch: 3 branches
| Branch | True | False | Total |
| if ((streamPtr->dictSize == 0) && (streamPtr->dictCtx == NULL) && (inputSize >= LZ4_CLEAR_TABLE_THRESHOLD)) |
0 |
0 |
0 |
| if ((streamPtr->dictSize == 0) && (streamPtr->dictCtx == NULL) && (inputSize >= LZ4_CLEAR_TABLE_THRESHOLD)) |
0 |
0 |
0 |
| if ((streamPtr->dictSize == 0) && (streamPtr->dictCtx == NULL) && (inputSize >= LZ4_CLEAR_TABLE_THRESHOLD)) |
0 |
0 |
0 |
|
| 1867 |
|
| LZ4_prepareTable(streamPtr, inputSize, byU32); |
| 1868 |
|
| |
| 1869 |
0 |
| LZ4_renormDictT(streamPtr, inputSize); /* fix index overflow */ |
| 1870 |
0 |
| acceleration = LZ4_clampAcceleration(acceleration); |
| 1871 |
|
| |
| 1872 |
|
| /* invalidate tiny dictionaries */ |
| 1873 |
0 |
▶ | if ( (streamPtr->dictSize < 4) /* tiny dictionary : not enough for a hash */ |
Branch: 1 branch
| Branch | True | False | Total |
| if ( (streamPtr->dictSize < 4) /* tiny dictionary : not enough for a hash */ |
0 |
0 |
0 |
|
| 1874 |
0 |
▶ | && (dictEnd != source) /* prefix mode */ |
Branch: 1 branch
| Branch | True | False | Total |
| && (dictEnd != source) /* prefix mode */ |
0 |
0 |
0 |
|
| 1875 |
0 |
▶ | && (inputSize > 0) /* tolerance : don't lose history, in case next invocation would use prefix mode */ |
Branch: 1 branch
| Branch | True | False | Total |
| && (inputSize > 0) /* tolerance : don't lose history, in case next invocation would use prefix mode */ |
0 |
0 |
0 |
|
| 1876 |
0 |
▶ | && (streamPtr->dictCtx == NULL) /* usingDictCtx */ |
Branch: 1 branch
| Branch | True | False | Total |
| && (streamPtr->dictCtx == NULL) /* usingDictCtx */ |
0 |
0 |
0 |
|
| 1877 |
|
| ) { |
| 1878 |
|
| DEBUGLOG(5, "LZ4_compress_fast_continue: dictSize(%u) at addr:%p is too small", streamPtr->dictSize, (void*)streamPtr->dictionary); |
| 1879 |
|
| /* remove dictionary existence from history, to employ faster prefix mode */ |
| 1880 |
0 |
| streamPtr->dictSize = 0; |
| 1881 |
0 |
| streamPtr->dictionary = (const BYTE*)source; |
| 1882 |
0 |
| dictEnd = source; |
| 1883 |
|
| } |
| 1884 |
|
| |
| 1885 |
|
| /* Check overlapping input/dictionary space */ |
| 1886 |
0 |
| { const char* const sourceEnd = source + inputSize; |
| 1887 |
0 |
▶ | if ((sourceEnd > (const char*)streamPtr->dictionary) && (source < dictEnd)) { |
Branch: 2 branches
| Branch | True | False | Total |
| if ((sourceEnd > (const char*)streamPtr->dictionary) && (source < dictEnd)) { |
0 |
0 |
0 |
| if ((sourceEnd > (const char*)streamPtr->dictionary) && (source < dictEnd)) { |
0 |
0 |
0 |
|
| 1888 |
|
| /* only the part of the dictionary beyond input remains */ |
| 1889 |
0 |
▶ | streamPtr->dictSize = (sourceEnd < dictEnd) ? (U32)(dictEnd - sourceEnd) : 0; |
Branch: 1 branch
| Branch | True | False | Total |
| streamPtr->dictSize = (sourceEnd < dictEnd) ? (U32)(dictEnd - sourceEnd) : 0; |
0 |
0 |
0 |
|
| 1890 |
0 |
▶ | if (streamPtr->dictSize > 64 KB) streamPtr->dictSize = 64 KB; |
Branch: 1 branch
| Branch | True | False | Total |
| if (streamPtr->dictSize > 64 KB) streamPtr->dictSize = 64 KB; |
0 |
0 |
0 |
|
| 1891 |
0 |
▶ | if (streamPtr->dictSize < 4) streamPtr->dictSize = 0; |
Branch: 1 branch
| Branch | True | False | Total |
| if (streamPtr->dictSize < 4) streamPtr->dictSize = 0; |
0 |
0 |
0 |
|
| 1892 |
0 |
| streamPtr->dictionary = (const BYTE*)dictEnd - streamPtr->dictSize; |
| 1893 |
|
| } |
| 1894 |
|
| } |
| 1895 |
|
| |
| 1896 |
|
| /* prefix mode : source data follows dictionary */ |
| 1897 |
0 |
▶ | if (dictEnd == source) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictEnd == source) { |
0 |
0 |
0 |
|
| 1898 |
0 |
▶ | if (LZ4_isDictSmall(streamPtr)) |
Branch: 1 branch
| Branch | True | False | Total |
| if (LZ4_isDictSmall(streamPtr)) |
0 |
0 |
0 |
|
| 1899 |
0 |
| return LZ4_compress_generic(streamPtr, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, tableType, withPrefix64k, dictSmall, acceleration); |
| 1900 |
|
| else |
| 1901 |
0 |
| return LZ4_compress_generic(streamPtr, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, tableType, withPrefix64k, noDictIssue, acceleration); |
| 1902 |
|
| } |
| 1903 |
|
| |
| 1904 |
|
| /* external dictionary mode */ |
| 1905 |
|
| { int result; |
| 1906 |
0 |
▶ | if (streamPtr->dictCtx) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (streamPtr->dictCtx) { |
0 |
0 |
0 |
|
| 1907 |
|
| /* We depend here on the fact that dictCtx'es (produced by |
| 1908 |
|
| * LZ4_loadDict) guarantee that their tables contain no references |
| 1909 |
|
| * to offsets between dictCtx->currentOffset - 64 KB and |
| 1910 |
|
| * dictCtx->currentOffset - dictCtx->dictSize. This makes it safe |
| 1911 |
|
| * to use noDictIssue even when the dict isn't a full 64 KB. |
| 1912 |
|
| */ |
| 1913 |
0 |
▶ | if (inputSize >= LZ4_DICTCTX_COPY_THRESHOLD) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (inputSize >= LZ4_DICTCTX_COPY_THRESHOLD) { |
0 |
0 |
0 |
|
| 1914 |
|
| /* For compressing large blobs, it is faster to pay the setup |
| 1915 |
|
| * cost to copy the dictionary's tables into the active context, |
| 1916 |
|
| * so that the compression loop is only looking into one table. |
| 1917 |
|
| */ |
| 1918 |
0 |
▶ | LZ4_memcpy(streamPtr, streamPtr->dictCtx, sizeof(*streamPtr)); |
Branch: 1 branch
| Branch | True | False | Total |
| LZ4_memcpy(streamPtr, streamPtr->dictCtx, sizeof(*streamPtr)); |
0 |
0 |
0 |
|
| 1919 |
0 |
| result = LZ4_compress_generic(streamPtr, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, tableType, usingExtDict, noDictIssue, acceleration); |
| 1920 |
|
| } else { |
| 1921 |
0 |
| result = LZ4_compress_generic(streamPtr, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, tableType, usingDictCtx, noDictIssue, acceleration); |
| 1922 |
|
| } |
| 1923 |
|
| } else { /* external dictionary in the current context */ |
| 1924 |
0 |
▶ | if (LZ4_isDictSmall(streamPtr)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (LZ4_isDictSmall(streamPtr)) { |
0 |
0 |
0 |
|
| 1925 |
0 |
| result = LZ4_compress_generic(streamPtr, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, tableType, usingExtDict, dictSmall, acceleration); |
| 1926 |
|
| } else { |
| 1927 |
0 |
| result = LZ4_compress_generic(streamPtr, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, tableType, usingExtDict, noDictIssue, acceleration); |
| 1928 |
|
| } |
| 1929 |
|
| } |
| 1930 |
0 |
| streamPtr->dictionary = (const BYTE*)source; |
| 1931 |
0 |
| streamPtr->dictSize = (U32)inputSize; |
| 1932 |
0 |
| return result; |
| 1933 |
|
| } |
| 1934 |
|
| } |
| 1935 |
|
| |
| 1936 |
|
| |
| 1937 |
|
| /* Hidden debug function, to force-test external dictionary mode */ |
| 1938 |
0 |
| int LZ4_compress_forceExtDict (LZ4_stream_t* LZ4_dict, const char* source, char* dest, int srcSize) |
| 1939 |
|
| { |
| 1940 |
0 |
| LZ4_stream_t_internal* const streamPtr = &LZ4_dict->internal_donotuse; |
| 1941 |
|
| int result; |
| 1942 |
|
| |
| 1943 |
0 |
| LZ4_renormDictT(streamPtr, srcSize); |
| 1944 |
|
| |
| 1945 |
0 |
▶ | if (LZ4_isDictSmall(streamPtr)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (LZ4_isDictSmall(streamPtr)) { |
0 |
0 |
0 |
|
| 1946 |
0 |
| result = LZ4_compress_generic(streamPtr, source, dest, srcSize, NULL, 0, notLimited, byU32, usingExtDict, dictSmall, 1); |
| 1947 |
|
| } else { |
| 1948 |
0 |
| result = LZ4_compress_generic(streamPtr, source, dest, srcSize, NULL, 0, notLimited, byU32, usingExtDict, noDictIssue, 1); |
| 1949 |
|
| } |
| 1950 |
|
| |
| 1951 |
0 |
| streamPtr->dictionary = (const BYTE*)source; |
| 1952 |
0 |
| streamPtr->dictSize = (U32)srcSize; |
| 1953 |
|
| |
| 1954 |
0 |
| return result; |
| 1955 |
|
| } |
| 1956 |
|
| |
| 1957 |
|
| |
| 1958 |
|
| /*! LZ4_saveDict() : |
| 1959 |
|
| * If previously compressed data block is not guaranteed to remain available at its memory location, |
| 1960 |
|
| * save it into a safer place (char* safeBuffer). |
| 1961 |
|
| * Note : no need to call LZ4_loadDict() afterwards, dictionary is immediately usable, |
| 1962 |
|
| * one can therefore call LZ4_compress_fast_continue() right after. |
| 1963 |
|
| * @return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error. |
| 1964 |
|
| */ |
| 1965 |
0 |
| int LZ4_saveDict (LZ4_stream_t* LZ4_dict, char* safeBuffer, int dictSize) |
| 1966 |
|
| { |
| 1967 |
0 |
| LZ4_stream_t_internal* const dict = &LZ4_dict->internal_donotuse; |
| 1968 |
|
| |
| 1969 |
|
| DEBUGLOG(5, "LZ4_saveDict : dictSize=%i, safeBuffer=%p", dictSize, (void*)safeBuffer); |
| 1970 |
|
| |
| 1971 |
0 |
▶ | if (dictSize < 0) dictSize = 0; /* invalid : save nothing, like LZ4_saveDictHC() */ |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictSize < 0) dictSize = 0; /* invalid : save nothing, like LZ4_saveDictHC() */ |
0 |
0 |
0 |
|
| 1972 |
0 |
▶ | if ((U32)dictSize > 64 KB) { dictSize = 64 KB; } /* useless to define a dictionary > 64 KB */ |
Branch: 1 branch
| Branch | True | False | Total |
| if ((U32)dictSize > 64 KB) { dictSize = 64 KB; } /* useless to define a dictionary > 64 KB */ |
0 |
0 |
0 |
|
| 1973 |
0 |
▶ | if ((U32)dictSize > dict->dictSize) { dictSize = (int)dict->dictSize; } |
Branch: 1 branch
| Branch | True | False | Total |
| if ((U32)dictSize > dict->dictSize) { dictSize = (int)dict->dictSize; } |
0 |
0 |
0 |
|
| 1974 |
|
| |
| 1975 |
0 |
▶ | if (safeBuffer == NULL) assert(dictSize == 0); |
Branch: 2 branches
| Branch | True | False | Total |
| if (safeBuffer == NULL) assert(dictSize == 0); |
0 |
0 |
0 |
| if (safeBuffer == NULL) assert(dictSize == 0); |
0 |
0 |
0 |
|
| 1976 |
0 |
▶ | if (dictSize > 0) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictSize > 0) { |
0 |
0 |
0 |
|
| 1977 |
0 |
| const BYTE* const previousDictEnd = dict->dictionary + dict->dictSize; |
| 1978 |
0 |
▶ | assert(dict->dictionary); |
Branch: 1 branch
| Branch | True | False | Total |
| assert(dict->dictionary); |
0 |
0 |
0 |
|
| 1979 |
0 |
| LZ4_memmove(safeBuffer, previousDictEnd - dictSize, (size_t)dictSize); |
| 1980 |
|
| } |
| 1981 |
|
| |
| 1982 |
0 |
| dict->dictionary = (const BYTE*)safeBuffer; |
| 1983 |
0 |
| dict->dictSize = (U32)dictSize; |
| 1984 |
|
| |
| 1985 |
0 |
| return dictSize; |
| 1986 |
|
| } |
| 1987 |
|
| |
| 1988 |
|
| |
| 1989 |
|
| |
| 1990 |
|
| /*-******************************* |
| 1991 |
|
| * Decompression functions |
| 1992 |
|
| ********************************/ |
| 1993 |
|
| |
| 1994 |
|
| typedef enum { decode_full_block = 0, partial_decode = 1 } earlyEnd_directive; |
| 1995 |
|
| |
| 1996 |
|
| #undef MIN |
| 1997 |
|
| #define MIN(a,b) ( (a) < (b) ? (a) : (b) ) |
| 1998 |
|
| |
| 1999 |
|
| |
| 2000 |
|
| /* variant for decompress_unsafe() |
| 2001 |
|
| * does not know end of input |
| 2002 |
|
| * presumes input is well formed |
| 2003 |
|
| * note : will consume at least one byte */ |
| 2004 |
0 |
| static size_t read_long_length_no_check(const BYTE** pp) |
| 2005 |
|
| { |
| 2006 |
0 |
| size_t b, l = 0; |
| 2007 |
0 |
▶ | do { b = **pp; (*pp)++; l += b; } while (b==255); |
Branch: 1 branch
| Branch | True | False | Total |
| do { b = **pp; (*pp)++; l += b; } while (b==255); |
0 |
0 |
0 |
|
| 2008 |
|
| DEBUGLOG(6, "read_long_length_no_check: +length=%zu using %zu input bytes", l, l/255 + 1) |
| 2009 |
0 |
| return l; |
| 2010 |
|
| } |
| 2011 |
|
| |
| 2012 |
|
| /* core decoder variant for LZ4_decompress_fast*() |
| 2013 |
|
| * for legacy support only : these entry points are deprecated. |
| 2014 |
|
| * - Presumes input is correctly formed (no defense vs malformed inputs) |
| 2015 |
|
| * - Does not know input size (presume input buffer is "large enough") |
| 2016 |
|
| * - Decompress a full block (only) |
| 2017 |
|
| * @return : nb of bytes read from input. |
| 2018 |
|
| * Note : this variant is not optimized for speed, just for maintenance. |
| 2019 |
|
| * the goal is to remove support of decompress_fast*() variants by v2.0 |
| 2020 |
|
| **/ |
| 2021 |
|
| LZ4_FORCE_INLINE int |
| 2022 |
|
| LZ4_decompress_unsafe_generic( |
| 2023 |
|
| const BYTE* const istart, |
| 2024 |
|
| BYTE* const ostart, |
| 2025 |
|
| int decompressedSize, |
| 2026 |
|
| |
| 2027 |
|
| size_t prefixSize, |
| 2028 |
|
| const BYTE* const dictStart, /* only if dict==usingExtDict */ |
| 2029 |
|
| const size_t dictSize /* note: =0 if dictStart==NULL */ |
| 2030 |
|
| ) |
| 2031 |
|
| { |
| 2032 |
0 |
| const BYTE* ip = istart; |
| 2033 |
0 |
| BYTE* op = (BYTE*)ostart; |
| 2034 |
|
| BYTE* oend; |
| 2035 |
0 |
| const BYTE* const prefixStart = ostart - prefixSize; |
| 2036 |
|
| |
| 2037 |
|
| DEBUGLOG(5, "LZ4_decompress_unsafe_generic"); |
| 2038 |
0 |
▶ | if (dictStart == NULL) assert(dictSize == 0); |
Branch: 2 branches
| Branch | True | False | Total |
| if (dictStart == NULL) assert(dictSize == 0); |
0 |
0 |
0 |
| if (dictStart == NULL) assert(dictSize == 0); |
0 |
0 |
0 |
|
| 2039 |
0 |
▶ | if (decompressedSize < 0) return -1; |
Branch: 5 branches
| Branch | True | False | Total |
| if (decompressedSize < 0) return -1; |
0 |
0 |
0 |
| if (decompressedSize < 0) return -1; |
0 |
0 |
0 |
| if (decompressedSize < 0) return -1; |
0 |
0 |
0 |
| if (decompressedSize < 0) return -1; |
0 |
0 |
0 |
| if (decompressedSize < 0) return -1; |
0 |
0 |
0 |
|
| 2040 |
0 |
| oend = ostart + decompressedSize; |
| 2041 |
|
| |
| 2042 |
0 |
| while (1) { |
| 2043 |
|
| /* start new sequence */ |
| 2044 |
0 |
| unsigned token = *ip++; |
| 2045 |
|
| |
| 2046 |
|
| /* literals */ |
| 2047 |
0 |
| { size_t ll = token >> ML_BITS; |
| 2048 |
0 |
▶ | if (ll==15) { |
Branch: 5 branches
| Branch | True | False | Total |
| if (ll==15) { |
0 |
0 |
0 |
| if (ll==15) { |
0 |
0 |
0 |
| if (ll==15) { |
0 |
0 |
0 |
| if (ll==15) { |
0 |
0 |
0 |
| if (ll==15) { |
0 |
0 |
0 |
|
| 2049 |
|
| /* long literal length */ |
| 2050 |
0 |
| ll += read_long_length_no_check(&ip); |
| 2051 |
|
| } |
| 2052 |
0 |
▶ | if ((size_t)(oend-op) < ll) return -1; /* output buffer overflow */ |
Branch: 5 branches
| Branch | True | False | Total |
| if ((size_t)(oend-op) < ll) return -1; /* output buffer overflow */ |
0 |
0 |
0 |
| if ((size_t)(oend-op) < ll) return -1; /* output buffer overflow */ |
0 |
0 |
0 |
| if ((size_t)(oend-op) < ll) return -1; /* output buffer overflow */ |
0 |
0 |
0 |
| if ((size_t)(oend-op) < ll) return -1; /* output buffer overflow */ |
0 |
0 |
0 |
| if ((size_t)(oend-op) < ll) return -1; /* output buffer overflow */ |
0 |
0 |
0 |
|
| 2053 |
0 |
| LZ4_memmove(op, ip, ll); /* support in-place decompression */ |
| 2054 |
0 |
| op += ll; |
| 2055 |
0 |
| ip += ll; |
| 2056 |
0 |
▶ | if ((size_t)(oend-op) < MFLIMIT) { |
Branch: 5 branches
| Branch | True | False | Total |
| if ((size_t)(oend-op) < MFLIMIT) { |
0 |
0 |
0 |
| if ((size_t)(oend-op) < MFLIMIT) { |
0 |
0 |
0 |
| if ((size_t)(oend-op) < MFLIMIT) { |
0 |
0 |
0 |
| if ((size_t)(oend-op) < MFLIMIT) { |
0 |
0 |
0 |
| if ((size_t)(oend-op) < MFLIMIT) { |
0 |
0 |
0 |
|
| 2057 |
0 |
▶ | if (op==oend) break; /* end of block */ |
Branch: 5 branches
| Branch | True | False | Total |
| if (op==oend) break; /* end of block */ |
0 |
0 |
0 |
| if (op==oend) break; /* end of block */ |
0 |
0 |
0 |
| if (op==oend) break; /* end of block */ |
0 |
0 |
0 |
| if (op==oend) break; /* end of block */ |
0 |
0 |
0 |
| if (op==oend) break; /* end of block */ |
0 |
0 |
0 |
|
| 2058 |
|
| DEBUGLOG(5, "invalid: literals end at distance %zi from end of block", oend-op); |
| 2059 |
|
| /* incorrect end of block : |
| 2060 |
|
| * last match must start at least MFLIMIT==12 bytes before end of output block */ |
| 2061 |
0 |
| return -1; |
| 2062 |
|
| } } |
| 2063 |
|
| |
| 2064 |
|
| /* match */ |
| 2065 |
0 |
| { size_t ml = token & 15; |
| 2066 |
0 |
| size_t const offset = LZ4_readLE16(ip); |
| 2067 |
0 |
| ip+=2; |
| 2068 |
|
| |
| 2069 |
0 |
| if (ml==15) { |
| 2070 |
|
| /* long literal length */ |
| 2071 |
0 |
| ml += read_long_length_no_check(&ip); |
| 2072 |
|
| } |
| 2073 |
0 |
| ml += MINMATCH; |
| 2074 |
|
| |
| 2075 |
0 |
▶ | if ((size_t)(oend-op) < ml) return -1; /* output buffer overflow */ |
Branch: 5 branches
| Branch | True | False | Total |
| if ((size_t)(oend-op) < ml) return -1; /* output buffer overflow */ |
0 |
0 |
0 |
| if ((size_t)(oend-op) < ml) return -1; /* output buffer overflow */ |
0 |
0 |
0 |
| if ((size_t)(oend-op) < ml) return -1; /* output buffer overflow */ |
0 |
0 |
0 |
| if ((size_t)(oend-op) < ml) return -1; /* output buffer overflow */ |
0 |
0 |
0 |
| if ((size_t)(oend-op) < ml) return -1; /* output buffer overflow */ |
0 |
0 |
0 |
|
| 2076 |
|
| |
| 2077 |
0 |
| { const BYTE* match = op - offset; |
| 2078 |
|
| |
| 2079 |
|
| /* out of range */ |
| 2080 |
0 |
▶ | if (offset > (size_t)(op - prefixStart) + dictSize) { |
Branch: 5 branches
| Branch | True | False | Total |
| if (offset > (size_t)(op - prefixStart) + dictSize) { |
0 |
0 |
0 |
| if (offset > (size_t)(op - prefixStart) + dictSize) { |
0 |
0 |
0 |
| if (offset > (size_t)(op - prefixStart) + dictSize) { |
0 |
0 |
0 |
| if (offset > (size_t)(op - prefixStart) + dictSize) { |
0 |
0 |
0 |
| if (offset > (size_t)(op - prefixStart) + dictSize) { |
0 |
0 |
0 |
|
| 2081 |
|
| DEBUGLOG(6, "offset out of range"); |
| 2082 |
0 |
| return -1; |
| 2083 |
|
| } |
| 2084 |
|
| |
| 2085 |
|
| /* check special case : extDict */ |
| 2086 |
0 |
▶ | if (offset > (size_t)(op - prefixStart)) { |
Branch: 5 branches
| Branch | True | False | Total |
| if (offset > (size_t)(op - prefixStart)) { |
0 |
0 |
0 |
| if (offset > (size_t)(op - prefixStart)) { |
0 |
0 |
0 |
| if (offset > (size_t)(op - prefixStart)) { |
0 |
0 |
0 |
| if (offset > (size_t)(op - prefixStart)) { |
0 |
0 |
0 |
| if (offset > (size_t)(op - prefixStart)) { |
0 |
0 |
0 |
|
| 2087 |
|
| /* extDict scenario */ |
| 2088 |
0 |
| const BYTE* const dictEnd = dictStart + dictSize; |
| 2089 |
0 |
| const BYTE* extMatch = dictEnd - (offset - (size_t)(op-prefixStart)); |
| 2090 |
0 |
| size_t const extml = (size_t)(dictEnd - extMatch); |
| 2091 |
0 |
▶ | if (extml > ml) { |
Branch: 5 branches
| Branch | True | False | Total |
| if (extml > ml) { |
0 |
0 |
0 |
| if (extml > ml) { |
0 |
0 |
0 |
| if (extml > ml) { |
0 |
0 |
0 |
| if (extml > ml) { |
0 |
0 |
0 |
| if (extml > ml) { |
0 |
0 |
0 |
|
| 2092 |
|
| /* match entirely within extDict */ |
| 2093 |
0 |
| LZ4_memmove(op, extMatch, ml); |
| 2094 |
0 |
| op += ml; |
| 2095 |
0 |
| ml = 0; |
| 2096 |
|
| } else { |
| 2097 |
|
| /* match split between extDict & prefix */ |
| 2098 |
0 |
| LZ4_memmove(op, extMatch, extml); |
| 2099 |
0 |
| op += extml; |
| 2100 |
0 |
| ml -= extml; |
| 2101 |
|
| } |
| 2102 |
0 |
| match = prefixStart; |
| 2103 |
|
| } |
| 2104 |
|
| |
| 2105 |
|
| /* match copy - slow variant, supporting overlap copy */ |
| 2106 |
|
| { size_t u; |
| 2107 |
0 |
▶ | for (u=0; u<ml; u++) { |
Branch: 5 branches
| Branch | True | False | Total |
| for (u=0; u<ml; u++) { |
0 |
0 |
0 |
| for (u=0; u<ml; u++) { |
0 |
0 |
0 |
| for (u=0; u<ml; u++) { |
0 |
0 |
0 |
| for (u=0; u<ml; u++) { |
0 |
0 |
0 |
| for (u=0; u<ml; u++) { |
0 |
0 |
0 |
|
| 2108 |
0 |
| op[u] = match[u]; |
| 2109 |
|
| } } } |
| 2110 |
0 |
| op += ml; |
| 2111 |
0 |
▶ | if ((size_t)(oend-op) < LASTLITERALS) { |
Branch: 5 branches
| Branch | True | False | Total |
| if ((size_t)(oend-op) < LASTLITERALS) { |
0 |
0 |
0 |
| if ((size_t)(oend-op) < LASTLITERALS) { |
0 |
0 |
0 |
| if ((size_t)(oend-op) < LASTLITERALS) { |
0 |
0 |
0 |
| if ((size_t)(oend-op) < LASTLITERALS) { |
0 |
0 |
0 |
| if ((size_t)(oend-op) < LASTLITERALS) { |
0 |
0 |
0 |
|
| 2112 |
|
| DEBUGLOG(5, "invalid: match ends at distance %zi from end of block", oend-op); |
| 2113 |
|
| /* incorrect end of block : |
| 2114 |
|
| * last match must stop at least LASTLITERALS==5 bytes before end of output block */ |
| 2115 |
0 |
| return -1; |
| 2116 |
|
| } |
| 2117 |
|
| } /* match */ |
| 2118 |
|
| } /* main loop */ |
| 2119 |
0 |
| return (int)(ip - istart); |
| 2120 |
|
| } |
| 2121 |
|
| |
| 2122 |
|
| |
| 2123 |
|
| /* Read the variable-length literal or match length. |
| 2124 |
|
| * |
| 2125 |
|
| * @ipPtr : pointer to input pointer, will be advanced |
| 2126 |
|
| * @ilimit : read is forbidden beyond this position (must be within input buffer) |
| 2127 |
|
| **/ |
| 2128 |
|
| typedef size_t Rvl_t; |
| 2129 |
|
| static const Rvl_t rvl_error = (Rvl_t)(-1); |
| 2130 |
|
| LZ4_FORCE_INLINE Rvl_t |
| 2131 |
|
| read_variable_length(const BYTE** ipPtr, const BYTE* ilimit) |
| 2132 |
|
| { |
| 2133 |
0 |
| Rvl_t s, length = 0; |
| 2134 |
0 |
| assert(ipPtr != NULL); |
| 2135 |
0 |
▶ | assert(*ipPtr != NULL); |
Branch: 36 branches
| Branch | True | False | Total |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
| assert(*ipPtr != NULL); |
0 |
0 |
0 |
|
| 2136 |
0 |
▶ | assert(ilimit != NULL); |
Branch: 36 branches
| Branch | True | False | Total |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
| assert(ilimit != NULL); |
0 |
0 |
0 |
|
| 2137 |
0 |
▶ | if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
Branch: 36 branches
| Branch | True | False | Total |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
|
| 2138 |
0 |
| return rvl_error; |
| 2139 |
|
| } |
| 2140 |
0 |
| s = **ipPtr; |
| 2141 |
0 |
| (*ipPtr)++; |
| 2142 |
0 |
| length += s; |
| 2143 |
0 |
▶ | if (likely(s != 255)) return length; |
Branch: 36 branches
| Branch | True | False | Total |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
| if (likely(s != 255)) return length; |
0 |
0 |
0 |
|
| 2144 |
|
| do { |
| 2145 |
0 |
▶ | if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
Branch: 36 branches
| Branch | True | False | Total |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
| if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */ |
0 |
0 |
0 |
|
| 2146 |
0 |
| return rvl_error; |
| 2147 |
|
| } |
| 2148 |
0 |
| s = **ipPtr; |
| 2149 |
0 |
| (*ipPtr)++; |
| 2150 |
0 |
| length += s; |
| 2151 |
|
| /* accumulator overflow detection (32-bit mode only) */ |
| 2152 |
|
| if ((sizeof(length) < 8) && unlikely(length > ((Rvl_t)(-1)/2)) ) { |
| 2153 |
|
| return rvl_error; |
| 2154 |
|
| } |
| 2155 |
0 |
▶ | } while (s == 255); |
Branch: 36 branches
| Branch | True | False | Total |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
| } while (s == 255); |
0 |
0 |
0 |
|
| 2156 |
|
| |
| 2157 |
0 |
| return length; |
| 2158 |
|
| } |
| 2159 |
|
| |
| 2160 |
|
| /* LZ4_copyMatchExact() : |
| 2161 |
|
| * copy a match of length bytes from match to op (match < op, overlap allowed), |
| 2162 |
|
| * writing nothing beyond op+length. Invalid offset 0 (match == op) produces 0 bytes. |
| 2163 |
|
| * Not inlined : rarely used, its memcpy() calls would burden the decoder's hot loops. |
| 2164 |
|
| * @return : output position after the match */ |
| 2165 |
|
| LZ4_FORCE_NOINLINE BYTE* |
| 2166 |
0 |
| LZ4_copyMatchExact(BYTE* op, const BYTE* match, size_t length) |
| 2167 |
|
| { |
| 2168 |
0 |
▶ | if (unlikely(match == op)) { /* invalid offset 0 : clear the match segment, see doc/lz4_Block_format.md */ |
Branch: 1 branch
| Branch | True | False | Total |
| if (unlikely(match == op)) { /* invalid offset 0 : clear the match segment, see doc/lz4_Block_format.md */ |
0 |
0 |
0 |
|
| 2169 |
0 |
| MEM_INIT(op, 0, length); |
| 2170 |
0 |
| return op + length; |
| 2171 |
|
| } |
| 2172 |
|
| /* bytes from match to op repeat with period (op-match) : |
| 2173 |
|
| * copy all of them, so the distance doubles at each round. |
| 2174 |
|
| * Beyond 2 KB, keep the distance : larger copies of just written data are slower */ |
| 2175 |
0 |
▶ | while (length > (size_t)(op - match)) { |
Branch: 1 branch
| Branch | True | False | Total |
| while (length > (size_t)(op - match)) { |
0 |
0 |
0 |
|
| 2176 |
0 |
| size_t const available = (size_t)(op - match); |
| 2177 |
0 |
| LZ4_memcpy(op, match, available); |
| 2178 |
0 |
| op += available; |
| 2179 |
0 |
| length -= available; |
| 2180 |
0 |
▶ | if (available >= 2048) match += available; |
Branch: 1 branch
| Branch | True | False | Total |
| if (available >= 2048) match += available; |
0 |
0 |
0 |
|
| 2181 |
|
| } |
| 2182 |
0 |
| LZ4_memcpy(op, match, length); |
| 2183 |
0 |
| return op + length; |
| 2184 |
|
| } |
| 2185 |
|
| |
| 2186 |
|
| /* LZ4_copyExtDictMatch() : |
| 2187 |
|
| * copy a match starting within the external dictionary (match < lowPrefix), |
| 2188 |
|
| * possibly stretching into the current block. |
| 2189 |
|
| * @return : output position after the match */ |
| 2190 |
|
| LZ4_FORCE_INLINE BYTE* |
| 2191 |
|
| LZ4_copyExtDictMatch(BYTE* op, const BYTE* match, size_t length, |
| 2192 |
|
| const BYTE* lowPrefix, const BYTE* dictEnd) |
| 2193 |
|
| { |
| 2194 |
0 |
▶ | if (length <= (size_t)(lowPrefix-match)) { |
Branch: 18 branches
| Branch | True | False | Total |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
| if (length <= (size_t)(lowPrefix-match)) { |
0 |
0 |
0 |
|
| 2195 |
|
| /* match fits entirely within external dictionary : just copy */ |
| 2196 |
0 |
| LZ4_memmove(op, dictEnd - (lowPrefix-match), length); |
| 2197 |
0 |
| return op + length; |
| 2198 |
|
| } else { |
| 2199 |
|
| /* match stretches into both external dictionary and current block */ |
| 2200 |
0 |
| size_t const copySize = (size_t)(lowPrefix - match); |
| 2201 |
0 |
| LZ4_memcpy(op, dictEnd - copySize, copySize); |
| 2202 |
0 |
| return LZ4_copyMatchExact(op + copySize, lowPrefix, length - copySize); |
| 2203 |
|
| } |
| 2204 |
|
| } |
| 2205 |
|
| |
| 2206 |
|
| /*! LZ4_decompress_generic() : |
| 2207 |
|
| * This generic decompression function covers all use cases. |
| 2208 |
|
| * It shall be instantiated several times, using different sets of directives. |
| 2209 |
|
| * Note that it is important for performance that this function really get inlined, |
| 2210 |
|
| * in order to remove useless branches during compilation optimization. |
| 2211 |
|
| */ |
| 2212 |
|
| LZ4_FORCE_INLINE int |
| 2213 |
|
| LZ4_decompress_generic( |
| 2214 |
|
| const char* const src, |
| 2215 |
|
| char* const dst, |
| 2216 |
|
| int srcSize, |
| 2217 |
|
| int outputSize, /* dstCapacity, or MIN(targetOutputSize, dstCapacity) when partialDecoding */ |
| 2218 |
|
| |
| 2219 |
|
| earlyEnd_directive partialDecoding, /* full, partial */ |
| 2220 |
|
| dict_directive dict, /* noDict, withPrefix64k, usingExtDict */ |
| 2221 |
|
| const BYTE* const lowPrefix, /* always <= dst, == dst when no prefix */ |
| 2222 |
|
| const BYTE* const dictStart, /* only if dict==usingExtDict */ |
| 2223 |
|
| const size_t dictSize /* note : = 0 if noDict */ |
| 2224 |
|
| ) |
| 2225 |
|
| { |
| 2226 |
0 |
▶ | if ((src == NULL) || (outputSize < 0)) { return -1; } |
Branch: 9 branches
| Branch | True | False | Total |
| if ((src == NULL) || (outputSize < 0)) { return -1; } |
0 |
0 |
0 |
| if ((src == NULL) || (outputSize < 0)) { return -1; } |
0 |
0 |
0 |
| if ((src == NULL) || (outputSize < 0)) { return -1; } |
0 |
0 |
0 |
| if ((src == NULL) || (outputSize < 0)) { return -1; } |
0 |
0 |
0 |
| if ((src == NULL) || (outputSize < 0)) { return -1; } |
0 |
0 |
0 |
| if ((src == NULL) || (outputSize < 0)) { return -1; } |
0 |
0 |
0 |
| if ((src == NULL) || (outputSize < 0)) { return -1; } |
0 |
0 |
0 |
| if ((src == NULL) || (outputSize < 0)) { return -1; } |
0 |
0 |
0 |
| if ((src == NULL) || (outputSize < 0)) { return -1; } |
0 |
0 |
0 |
|
| 2227 |
|
| |
| 2228 |
0 |
| { const BYTE* ip = (const BYTE*) src; |
| 2229 |
0 |
| const BYTE* const iend = ip + srcSize; |
| 2230 |
|
| |
| 2231 |
0 |
| BYTE* op = (BYTE*) dst; |
| 2232 |
0 |
| BYTE* const oend = op + outputSize; |
| 2233 |
|
| |
| 2234 |
0 |
▶ | const BYTE* const dictEnd = (dictStart == NULL) ? NULL : dictStart + dictSize; |
Branch: 3 branches
| Branch | True | False | Total |
| const BYTE* const dictEnd = (dictStart == NULL) ? NULL : dictStart + dictSize; |
0 |
0 |
0 |
| const BYTE* const dictEnd = (dictStart == NULL) ? NULL : dictStart + dictSize; |
0 |
0 |
0 |
| const BYTE* const dictEnd = (dictStart == NULL) ? NULL : dictStart + dictSize; |
0 |
0 |
0 |
|
| 2235 |
|
| |
| 2236 |
|
| /* withPrefix64k : offset <= 65535 can't reach beyond the 64 KB prefix */ |
| 2237 |
0 |
▶ | const int checkOffset = (dict != withPrefix64k) && (dictSize < (int)(64 KB)); |
Branch: 12 branches
| Branch | True | False | Total |
| const int checkOffset = (dict != withPrefix64k) && (dictSize < (int)(64 KB)); |
0 |
0 |
0 |
| const int checkOffset = (dict != withPrefix64k) && (dictSize < (int)(64 KB)); |
0 |
0 |
0 |
| const int checkOffset = (dict != withPrefix64k) && (dictSize < (int)(64 KB)); |
0 |
0 |
0 |
| const int checkOffset = (dict != withPrefix64k) && (dictSize < (int)(64 KB)); |
0 |
0 |
0 |
| const int checkOffset = (dict != withPrefix64k) && (dictSize < (int)(64 KB)); |
0 |
0 |
0 |
| const int checkOffset = (dict != withPrefix64k) && (dictSize < (int)(64 KB)); |
0 |
0 |
0 |
| const int checkOffset = (dict != withPrefix64k) && (dictSize < (int)(64 KB)); |
0 |
0 |
0 |
| const int checkOffset = (dict != withPrefix64k) && (dictSize < (int)(64 KB)); |
0 |
0 |
0 |
| const int checkOffset = (dict != withPrefix64k) && (dictSize < (int)(64 KB)); |
0 |
0 |
0 |
| const int checkOffset = (dict != withPrefix64k) && (dictSize < (int)(64 KB)); |
0 |
0 |
0 |
| const int checkOffset = (dict != withPrefix64k) && (dictSize < (int)(64 KB)); |
0 |
0 |
0 |
| const int checkOffset = (dict != withPrefix64k) && (dictSize < (int)(64 KB)); |
0 |
0 |
0 |
|
| 2238 |
|
| |
| 2239 |
|
| |
| 2240 |
|
| /* Set up the "end" pointers for the shortcut. */ |
| 2241 |
0 |
| const BYTE* const shortiend = iend - 14 /*maxLL*/ - 2 /*offset*/; |
| 2242 |
0 |
| const BYTE* const shortoend = oend - 14 /*maxLL*/ - 18 /*maxML*/; |
| 2243 |
|
| |
| 2244 |
|
| /* shared by both loops : the fast loop can hand over a decoded match (safe_match_copy) */ |
| 2245 |
|
| const BYTE* match; |
| 2246 |
|
| size_t offset; |
| 2247 |
|
| size_t ml; /* match length */ |
| 2248 |
|
| |
| 2249 |
|
| |
| 2250 |
|
| DEBUGLOG(5, "LZ4_decompress_generic (srcSize:%i, dstSize:%i)", srcSize, outputSize); |
| 2251 |
|
| |
| 2252 |
|
| /* Special cases */ |
| 2253 |
0 |
▶ | assert(lowPrefix <= op); |
Branch: 9 branches
| Branch | True | False | Total |
| assert(lowPrefix <= op); |
0 |
0 |
0 |
| assert(lowPrefix <= op); |
0 |
0 |
0 |
| assert(lowPrefix <= op); |
0 |
0 |
0 |
| assert(lowPrefix <= op); |
0 |
0 |
0 |
| assert(lowPrefix <= op); |
0 |
0 |
0 |
| assert(lowPrefix <= op); |
0 |
0 |
0 |
| assert(lowPrefix <= op); |
0 |
0 |
0 |
| assert(lowPrefix <= op); |
0 |
0 |
0 |
| assert(lowPrefix <= op); |
0 |
0 |
0 |
|
| 2254 |
0 |
▶ | if (unlikely(outputSize==0)) { |
Branch: 9 branches
| Branch | True | False | Total |
| if (unlikely(outputSize==0)) { |
0 |
0 |
0 |
| if (unlikely(outputSize==0)) { |
0 |
0 |
0 |
| if (unlikely(outputSize==0)) { |
0 |
0 |
0 |
| if (unlikely(outputSize==0)) { |
0 |
0 |
0 |
| if (unlikely(outputSize==0)) { |
0 |
0 |
0 |
| if (unlikely(outputSize==0)) { |
0 |
0 |
0 |
| if (unlikely(outputSize==0)) { |
0 |
0 |
0 |
| if (unlikely(outputSize==0)) { |
0 |
0 |
0 |
| if (unlikely(outputSize==0)) { |
0 |
0 |
0 |
|
| 2255 |
|
| /* Empty output buffer */ |
| 2256 |
0 |
▶ | if (partialDecoding) return 0; |
Branch: 9 branches
| Branch | True | False | Total |
| if (partialDecoding) return 0; |
0 |
0 |
0 |
| if (partialDecoding) return 0; |
0 |
0 |
0 |
| if (partialDecoding) return 0; |
0 |
0 |
0 |
| if (partialDecoding) return 0; |
0 |
0 |
0 |
| if (partialDecoding) return 0; |
0 |
0 |
0 |
| if (partialDecoding) return 0; |
0 |
0 |
0 |
| if (partialDecoding) return 0; |
0 |
0 |
0 |
| if (partialDecoding) return 0; |
0 |
0 |
0 |
| if (partialDecoding) return 0; |
0 |
0 |
0 |
|
| 2257 |
0 |
▶ | if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
Branch: 18 branches
| Branch | True | False | Total |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
| if ((srcSize==1) && (*ip==0)) return 0; /* empty block */ |
0 |
0 |
0 |
|
| 2258 |
0 |
▶ | return (srcSize > 1) ? -2 : -1; /* -2 : output buffer too small */ |
Branch: 9 branches
| Branch | True | False | Total |
| return (srcSize > 1) ? -2 : -1; /* -2 : output buffer too small */ |
0 |
0 |
0 |
| return (srcSize > 1) ? -2 : -1; /* -2 : output buffer too small */ |
0 |
0 |
0 |
| return (srcSize > 1) ? -2 : -1; /* -2 : output buffer too small */ |
0 |
0 |
0 |
| return (srcSize > 1) ? -2 : -1; /* -2 : output buffer too small */ |
0 |
0 |
0 |
| return (srcSize > 1) ? -2 : -1; /* -2 : output buffer too small */ |
0 |
0 |
0 |
| return (srcSize > 1) ? -2 : -1; /* -2 : output buffer too small */ |
0 |
0 |
0 |
| return (srcSize > 1) ? -2 : -1; /* -2 : output buffer too small */ |
0 |
0 |
0 |
| return (srcSize > 1) ? -2 : -1; /* -2 : output buffer too small */ |
0 |
0 |
0 |
| return (srcSize > 1) ? -2 : -1; /* -2 : output buffer too small */ |
0 |
0 |
0 |
|
| 2259 |
|
| } |
| 2260 |
0 |
▶ | if (unlikely(srcSize<=0)) { return -1; } |
Branch: 9 branches
| Branch | True | False | Total |
| if (unlikely(srcSize<=0)) { return -1; } |
0 |
0 |
0 |
| if (unlikely(srcSize<=0)) { return -1; } |
0 |
0 |
0 |
| if (unlikely(srcSize<=0)) { return -1; } |
0 |
0 |
0 |
| if (unlikely(srcSize<=0)) { return -1; } |
0 |
0 |
0 |
| if (unlikely(srcSize<=0)) { return -1; } |
0 |
0 |
0 |
| if (unlikely(srcSize<=0)) { return -1; } |
0 |
0 |
0 |
| if (unlikely(srcSize<=0)) { return -1; } |
0 |
0 |
0 |
| if (unlikely(srcSize<=0)) { return -1; } |
0 |
0 |
0 |
| if (unlikely(srcSize<=0)) { return -1; } |
0 |
0 |
0 |
|
| 2261 |
|
| |
| 2262 |
|
| /* LZ4_FAST_DEC_LOOP: |
| 2263 |
|
| * designed for modern OoO performance cpus, |
| 2264 |
|
| * where copying reliably 32-bytes is preferable to an unpredictable branch. |
| 2265 |
|
| * note : fast loop may show a regression for some client arm chips. */ |
| 2266 |
|
| #if LZ4_FAST_DEC_LOOP |
| 2267 |
0 |
▶ | if ((oend - op) < FASTLOOP_SAFE_DISTANCE) { |
Branch: 9 branches
| Branch | True | False | Total |
| if ((oend - op) < FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if ((oend - op) < FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if ((oend - op) < FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if ((oend - op) < FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if ((oend - op) < FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if ((oend - op) < FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if ((oend - op) < FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if ((oend - op) < FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if ((oend - op) < FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
|
| 2268 |
|
| DEBUGLOG(6, "move to safe decode loop"); |
| 2269 |
0 |
| goto safe_decode; |
| 2270 |
|
| } |
| 2271 |
|
| /* Ring buffer restarting at its beginning : the oldest referenced history (max distance behind op) |
| 2272 |
|
| * lies in the external dictionary, ahead of op, always at the same distance. |
| 2273 |
|
| * Rings sized with the former LZ4_DECODER_RING_BUFFER_SIZE() (margin 14, up to v1.10.0) |
| 2274 |
|
| * still work, but leave as little as 16 bytes : |
| 2275 |
|
| * the fast loop's wide copies could overwrite it, the safe loop's can't. */ |
| 2276 |
0 |
▶ | if ( (dict==usingExtDict) |
Branch: 9 branches
| Branch | True | False | Total |
| if ( (dict==usingExtDict) |
0 |
0 |
0 |
| if ( (dict==usingExtDict) |
0 |
0 |
0 |
| if ( (dict==usingExtDict) |
0 |
0 |
0 |
| if ( (dict==usingExtDict) |
0 |
0 |
0 |
| if ( (dict==usingExtDict) |
0 |
0 |
0 |
| if ( (dict==usingExtDict) |
0 |
0 |
0 |
| if ( (dict==usingExtDict) |
0 |
0 |
0 |
| if ( (dict==usingExtDict) |
0 |
0 |
0 |
| if ( (dict==usingExtDict) |
0 |
0 |
0 |
|
| 2277 |
0 |
▶ | && ((uptrval)dictEnd - (uptrval)lowPrefix - LZ4_DISTANCE_ABSOLUTE_MAX < FASTLOOP_SAFE_DISTANCE) ) { |
Branch: 9 branches
| Branch | True | False | Total |
| && ((uptrval)dictEnd - (uptrval)lowPrefix - LZ4_DISTANCE_ABSOLUTE_MAX < FASTLOOP_SAFE_DISTANCE) ) { |
0 |
0 |
0 |
| && ((uptrval)dictEnd - (uptrval)lowPrefix - LZ4_DISTANCE_ABSOLUTE_MAX < FASTLOOP_SAFE_DISTANCE) ) { |
0 |
0 |
0 |
| && ((uptrval)dictEnd - (uptrval)lowPrefix - LZ4_DISTANCE_ABSOLUTE_MAX < FASTLOOP_SAFE_DISTANCE) ) { |
0 |
0 |
0 |
| && ((uptrval)dictEnd - (uptrval)lowPrefix - LZ4_DISTANCE_ABSOLUTE_MAX < FASTLOOP_SAFE_DISTANCE) ) { |
0 |
0 |
0 |
| && ((uptrval)dictEnd - (uptrval)lowPrefix - LZ4_DISTANCE_ABSOLUTE_MAX < FASTLOOP_SAFE_DISTANCE) ) { |
0 |
0 |
0 |
| && ((uptrval)dictEnd - (uptrval)lowPrefix - LZ4_DISTANCE_ABSOLUTE_MAX < FASTLOOP_SAFE_DISTANCE) ) { |
0 |
0 |
0 |
| && ((uptrval)dictEnd - (uptrval)lowPrefix - LZ4_DISTANCE_ABSOLUTE_MAX < FASTLOOP_SAFE_DISTANCE) ) { |
0 |
0 |
0 |
| && ((uptrval)dictEnd - (uptrval)lowPrefix - LZ4_DISTANCE_ABSOLUTE_MAX < FASTLOOP_SAFE_DISTANCE) ) { |
0 |
0 |
0 |
| && ((uptrval)dictEnd - (uptrval)lowPrefix - LZ4_DISTANCE_ABSOLUTE_MAX < FASTLOOP_SAFE_DISTANCE) ) { |
0 |
0 |
0 |
|
| 2278 |
|
| DEBUGLOG(6, "history just ahead : move to safe decode loop"); |
| 2279 |
0 |
| goto safe_decode; |
| 2280 |
|
| } |
| 2281 |
|
| |
| 2282 |
|
| /* Fast loop : decode sequences as long as output < oend-FASTLOOP_SAFE_DISTANCE, |
| 2283 |
|
| * and input is not too close to iend. |
| 2284 |
|
| * It hands over to the safe loop either at a sequence start (break), |
| 2285 |
|
| * or once a match is fully decoded (goto safe_match_copy). */ |
| 2286 |
|
| DEBUGLOG(6, "using fast decode loop"); |
| 2287 |
0 |
| while (1) { |
| 2288 |
|
| unsigned token; |
| 2289 |
|
| size_t ll; /* literal length */ |
| 2290 |
|
| BYTE* cpy; |
| 2291 |
|
| /* Main fastloop assertion: We can always wildcopy FASTLOOP_SAFE_DISTANCE */ |
| 2292 |
0 |
▶ | assert(oend - op >= FASTLOOP_SAFE_DISTANCE); |
Branch: 9 branches
| Branch | True | False | Total |
| assert(oend - op >= FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(oend - op >= FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(oend - op >= FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(oend - op >= FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(oend - op >= FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(oend - op >= FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(oend - op >= FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(oend - op >= FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(oend - op >= FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
|
| 2293 |
0 |
▶ | assert(ip < iend); |
Branch: 9 branches
| Branch | True | False | Total |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
|
| 2294 |
0 |
| token = *ip++; |
| 2295 |
0 |
| ll = token >> ML_BITS; |
| 2296 |
|
| DEBUGLOG(7, "blockPos%6u: litLength token = %u", (unsigned)(op-(BYTE*)dst), (unsigned)ll); |
| 2297 |
|
| |
| 2298 |
|
| /* too close to input end : the safe loop restarts this sequence */ |
| 2299 |
0 |
▶ | if (ip > iend-(16 + 1/*max lit + offset + nextToken*/)) { ip--; break; } |
Branch: 9 branches
| Branch | True | False | Total |
| if (ip > iend-(16 + 1/*max lit + offset + nextToken*/)) { ip--; break; } |
0 |
0 |
0 |
| if (ip > iend-(16 + 1/*max lit + offset + nextToken*/)) { ip--; break; } |
0 |
0 |
0 |
| if (ip > iend-(16 + 1/*max lit + offset + nextToken*/)) { ip--; break; } |
0 |
0 |
0 |
| if (ip > iend-(16 + 1/*max lit + offset + nextToken*/)) { ip--; break; } |
0 |
0 |
0 |
| if (ip > iend-(16 + 1/*max lit + offset + nextToken*/)) { ip--; break; } |
0 |
0 |
0 |
| if (ip > iend-(16 + 1/*max lit + offset + nextToken*/)) { ip--; break; } |
0 |
0 |
0 |
| if (ip > iend-(16 + 1/*max lit + offset + nextToken*/)) { ip--; break; } |
0 |
0 |
0 |
| if (ip > iend-(16 + 1/*max lit + offset + nextToken*/)) { ip--; break; } |
0 |
0 |
0 |
| if (ip > iend-(16 + 1/*max lit + offset + nextToken*/)) { ip--; break; } |
0 |
0 |
0 |
|
| 2300 |
|
| |
| 2301 |
|
| /* decode literal length */ |
| 2302 |
0 |
▶ | if (ll == RUN_MASK) { |
Branch: 9 branches
| Branch | True | False | Total |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
|
| 2303 |
|
| /* literal length >= RUN_MASK means >= RUN_MASK literal bytes follow the extension bytes, |
| 2304 |
|
| * so extension bytes cannot reach the last RUN_MASK bytes of input */ |
| 2305 |
0 |
| const BYTE* const tokenPos = ip-1; |
| 2306 |
0 |
▶ | size_t const addl = read_variable_length(&ip, iend - RUN_MASK); |
Branch: 9 branches
| Branch | True | False | Total |
| size_t const addl = read_variable_length(&ip, iend - RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - RUN_MASK); |
0 |
0 |
0 |
|
| 2307 |
0 |
▶ | if (addl == rvl_error) { |
Branch: 9 branches
| Branch | True | False | Total |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
|
| 2308 |
|
| DEBUGLOG(6, "error reading long literal length"); |
| 2309 |
0 |
| goto _output_error; |
| 2310 |
|
| } |
| 2311 |
0 |
| ll += addl; |
| 2312 |
0 |
▶ | if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
Branch: 9 branches
| Branch | True | False | Total |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
|
| 2313 |
0 |
▶ | if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
Branch: 9 branches
| Branch | True | False | Total |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
|
| 2314 |
|
| |
| 2315 |
|
| /* copy literals, unless too close to the end for a wild copy : |
| 2316 |
|
| * nothing is written yet, so the safe loop can restart this sequence */ |
| 2317 |
0 |
| cpy = op+ll; |
| 2318 |
|
| LZ4_STATIC_ASSERT(MFLIMIT >= WILDCOPYLENGTH); |
| 2319 |
|
| #if LZ4_WILDCOPY64 |
| 2320 |
0 |
▶ | if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
Branch: 18 branches
| Branch | True | False | Total |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
| if ((cpy>oend-64) || (ip+ll>iend-64)) { ip = tokenPos; break; } |
0 |
0 |
0 |
|
| 2321 |
0 |
| LZ4_wildCopy64(op, ip, cpy); |
| 2322 |
|
| #else |
| 2323 |
|
| if ((cpy>oend-32) || (ip+ll>iend-32)) { ip = tokenPos; break; } |
| 2324 |
|
| LZ4_wildCopy32(op, ip, cpy); |
| 2325 |
|
| #endif |
| 2326 |
0 |
| ip += ll; op = cpy; |
| 2327 |
|
| } else { |
| 2328 |
|
| DEBUGLOG(7, "copy %u bytes in a 16-bytes stripe", (unsigned)ll); |
| 2329 |
|
| /* Literals can only be <= 14, but hope compilers optimize better when copy by a register size */ |
| 2330 |
0 |
| LZ4_memcpy(op, ip, 16); |
| 2331 |
0 |
| ip += ll; op += ll; |
| 2332 |
|
| } |
| 2333 |
|
| |
| 2334 |
|
| /* get offset */ |
| 2335 |
0 |
| offset = LZ4_readLE16(ip); ip+=2; |
| 2336 |
|
| DEBUGLOG(6, "blockPos%6u: offset = %u", (unsigned)(op-(BYTE*)dst), (unsigned)offset); |
| 2337 |
0 |
| match = op - offset; |
| 2338 |
0 |
▶ | assert(match <= op); /* overflow check */ |
Branch: 9 branches
| Branch | True | False | Total |
| assert(match <= op); /* overflow check */ |
0 |
0 |
0 |
| assert(match <= op); /* overflow check */ |
0 |
0 |
0 |
| assert(match <= op); /* overflow check */ |
0 |
0 |
0 |
| assert(match <= op); /* overflow check */ |
0 |
0 |
0 |
| assert(match <= op); /* overflow check */ |
0 |
0 |
0 |
| assert(match <= op); /* overflow check */ |
0 |
0 |
0 |
| assert(match <= op); /* overflow check */ |
0 |
0 |
0 |
| assert(match <= op); /* overflow check */ |
0 |
0 |
0 |
| assert(match <= op); /* overflow check */ |
0 |
0 |
0 |
|
| 2339 |
|
| |
| 2340 |
|
| /* get matchlength */ |
| 2341 |
0 |
| ml = token & ML_MASK; |
| 2342 |
|
| DEBUGLOG(7, " match length token = %u (len==%u)", (unsigned)ml, (unsigned)ml+MINMATCH); |
| 2343 |
|
| |
| 2344 |
0 |
▶ | if (ml == ML_MASK) { |
Branch: 9 branches
| Branch | True | False | Total |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
|
| 2345 |
|
| /* after match length extension bytes, at least 1 token + LASTLITERALS literals must remain */ |
| 2346 |
0 |
▶ | size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
Branch: 9 branches
| Branch | True | False | Total |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
|
| 2347 |
0 |
▶ | if (addl == rvl_error) { |
Branch: 9 branches
| Branch | True | False | Total |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
| if (addl == rvl_error) { |
0 |
0 |
0 |
|
| 2348 |
|
| DEBUGLOG(5, "error reading long match length"); |
| 2349 |
0 |
| goto _output_error; |
| 2350 |
|
| } |
| 2351 |
0 |
| ml += addl; |
| 2352 |
|
| DEBUGLOG(7, " long match length == %u", (unsigned)ml + MINMATCH); |
| 2353 |
0 |
▶ | if (unlikely((uptrval)(op)+ml<(uptrval)op)) { goto _output_error; } /* overflow detection */ |
Branch: 9 branches
| Branch | True | False | Total |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
|
| 2354 |
|
| } |
| 2355 |
0 |
| ml += MINMATCH; |
| 2356 |
|
| |
| 2357 |
0 |
▶ | if (op + ml >= oend - FASTLOOP_SAFE_DISTANCE) { |
Branch: 9 branches
| Branch | True | False | Total |
| if (op + ml >= oend - FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if (op + ml >= oend - FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if (op + ml >= oend - FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if (op + ml >= oend - FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if (op + ml >= oend - FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if (op + ml >= oend - FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if (op + ml >= oend - FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if (op + ml >= oend - FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
| if (op + ml >= oend - FASTLOOP_SAFE_DISTANCE) { |
0 |
0 |
0 |
|
| 2358 |
|
| DEBUGLOG(7, "moving to safe_match_copy (ml==%u)", (unsigned)ml); |
| 2359 |
0 |
| goto safe_match_copy; |
| 2360 |
|
| } |
| 2361 |
|
| |
| 2362 |
|
| /* match length from token only (<= 18), no overlap, within prefix : copy 18 bytes */ |
| 2363 |
0 |
▶ | if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
Branch: 18 branches
| Branch | True | False | Total |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
| if ( ((token & ML_MASK) != ML_MASK) && (offset >= 8) |
0 |
0 |
0 |
|
| 2364 |
0 |
▶ | && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
Branch: 18 branches
| Branch | True | False | Total |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
| && ((dict == withPrefix64k) || (match >= lowPrefix)) ) { |
0 |
0 |
0 |
|
| 2365 |
0 |
▶ | assert(match >= lowPrefix); |
Branch: 9 branches
| Branch | True | False | Total |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
|
| 2366 |
0 |
▶ | assert(match <= op); |
Branch: 9 branches
| Branch | True | False | Total |
| assert(match <= op); |
0 |
0 |
0 |
| assert(match <= op); |
0 |
0 |
0 |
| assert(match <= op); |
0 |
0 |
0 |
| assert(match <= op); |
0 |
0 |
0 |
| assert(match <= op); |
0 |
0 |
0 |
| assert(match <= op); |
0 |
0 |
0 |
| assert(match <= op); |
0 |
0 |
0 |
| assert(match <= op); |
0 |
0 |
0 |
| assert(match <= op); |
0 |
0 |
0 |
|
| 2367 |
0 |
▶ | assert(op + 18 <= oend); |
Branch: 9 branches
| Branch | True | False | Total |
| assert(op + 18 <= oend); |
0 |
0 |
0 |
| assert(op + 18 <= oend); |
0 |
0 |
0 |
| assert(op + 18 <= oend); |
0 |
0 |
0 |
| assert(op + 18 <= oend); |
0 |
0 |
0 |
| assert(op + 18 <= oend); |
0 |
0 |
0 |
| assert(op + 18 <= oend); |
0 |
0 |
0 |
| assert(op + 18 <= oend); |
0 |
0 |
0 |
| assert(op + 18 <= oend); |
0 |
0 |
0 |
| assert(op + 18 <= oend); |
0 |
0 |
0 |
|
| 2368 |
0 |
| LZ4_memcpy(op, match, 8); |
| 2369 |
0 |
| LZ4_memcpy(op+8, match+8, 8); |
| 2370 |
0 |
| LZ4_memcpy(op+16, match+16, 2); |
| 2371 |
0 |
| op += ml; |
| 2372 |
0 |
| continue; |
| 2373 |
|
| } |
| 2374 |
|
| |
| 2375 |
|
| /* match ends far from oend : no end-of-block condition to check */ |
| 2376 |
0 |
▶ | assert(op + ml < oend - FASTLOOP_SAFE_DISTANCE); |
Branch: 9 branches
| Branch | True | False | Total |
| assert(op + ml < oend - FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(op + ml < oend - FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(op + ml < oend - FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(op + ml < oend - FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(op + ml < oend - FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(op + ml < oend - FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(op + ml < oend - FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(op + ml < oend - FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
| assert(op + ml < oend - FASTLOOP_SAFE_DISTANCE); |
0 |
0 |
0 |
|
| 2377 |
|
| |
| 2378 |
0 |
▶ | if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
Branch: 18 branches
| Branch | True | False | Total |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
| if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { |
0 |
0 |
0 |
|
| 2379 |
|
| DEBUGLOG(5, "Error : pos=%zi, offset=%zi => outside buffers", op-lowPrefix, op-match); |
| 2380 |
0 |
| goto _offset_error; |
| 2381 |
|
| } |
| 2382 |
|
| /* match starting within external dictionary */ |
| 2383 |
0 |
▶ | if ((dict==usingExtDict) && (match < lowPrefix)) { |
Branch: 18 branches
| Branch | True | False | Total |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
|
| 2384 |
0 |
▶ | assert(dictEnd != NULL); |
Branch: 9 branches
| Branch | True | False | Total |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
|
| 2385 |
0 |
| op = LZ4_copyExtDictMatch(op, match, ml, lowPrefix, dictEnd); |
| 2386 |
0 |
| continue; |
| 2387 |
|
| } |
| 2388 |
|
| |
| 2389 |
|
| /* copy match within block */ |
| 2390 |
0 |
| cpy = op + ml; |
| 2391 |
|
| |
| 2392 |
0 |
▶ | assert((op <= oend) && (oend-op >= 64)); |
Branch: 18 branches
| Branch | True | False | Total |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
| assert((op <= oend) && (oend-op >= 64)); |
0 |
0 |
0 |
|
| 2393 |
0 |
▶ | if (unlikely(offset<16)) { |
Branch: 9 branches
| Branch | True | False | Total |
| if (unlikely(offset<16)) { |
0 |
0 |
0 |
| if (unlikely(offset<16)) { |
0 |
0 |
0 |
| if (unlikely(offset<16)) { |
0 |
0 |
0 |
| if (unlikely(offset<16)) { |
0 |
0 |
0 |
| if (unlikely(offset<16)) { |
0 |
0 |
0 |
| if (unlikely(offset<16)) { |
0 |
0 |
0 |
| if (unlikely(offset<16)) { |
0 |
0 |
0 |
| if (unlikely(offset<16)) { |
0 |
0 |
0 |
| if (unlikely(offset<16)) { |
0 |
0 |
0 |
|
| 2394 |
|
| LZ4_memcpy_using_offset(op, match, cpy, offset); |
| 2395 |
|
| #if LZ4_WILDCOPY64 |
| 2396 |
0 |
▶ | } else if (offset >= 64) { |
Branch: 9 branches
| Branch | True | False | Total |
| } else if (offset >= 64) { |
0 |
0 |
0 |
| } else if (offset >= 64) { |
0 |
0 |
0 |
| } else if (offset >= 64) { |
0 |
0 |
0 |
| } else if (offset >= 64) { |
0 |
0 |
0 |
| } else if (offset >= 64) { |
0 |
0 |
0 |
| } else if (offset >= 64) { |
0 |
0 |
0 |
| } else if (offset >= 64) { |
0 |
0 |
0 |
| } else if (offset >= 64) { |
0 |
0 |
0 |
| } else if (offset >= 64) { |
0 |
0 |
0 |
|
| 2397 |
|
| LZ4_wildCopy64(op, match, cpy); |
| 2398 |
|
| #endif |
| 2399 |
|
| } else { |
| 2400 |
|
| LZ4_wildCopy32(op, match, cpy); |
| 2401 |
|
| } |
| 2402 |
|
| |
| 2403 |
0 |
| op = cpy; /* wildcopy correction */ |
| 2404 |
|
| } |
| 2405 |
0 |
| safe_decode: |
| 2406 |
|
| #endif |
| 2407 |
|
| |
| 2408 |
|
| /* Safe loop : decode remaining sequences, without writing beyond oend nor reading beyond iend. |
| 2409 |
|
| * With LZ4_FAST_DEC_LOOP, that's the end of the block (or a block too small for the fast loop), |
| 2410 |
|
| * entered at a sequence start, or at safe_match_copy with a decoded match. |
| 2411 |
|
| * Without it, that's the whole block. */ |
| 2412 |
|
| DEBUGLOG(6, "using safe decode loop"); |
| 2413 |
0 |
| while (1) { |
| 2414 |
|
| unsigned token; |
| 2415 |
|
| size_t ll; /* literal length */ |
| 2416 |
|
| BYTE* cpy; |
| 2417 |
0 |
▶ | assert(ip < iend); |
Branch: 9 branches
| Branch | True | False | Total |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
| assert(ip < iend); |
0 |
0 |
0 |
|
| 2418 |
0 |
| token = *ip++; |
| 2419 |
0 |
| ll = token >> ML_BITS; |
| 2420 |
|
| DEBUGLOG(7, "blockPos%6u: litLength token = %u", (unsigned)(op-(BYTE*)dst), (unsigned)ll); |
| 2421 |
|
| |
| 2422 |
|
| /* A two-stage shortcut for the most common case: |
| 2423 |
|
| * 1) If the literal length is 0..14, and there is enough space, |
| 2424 |
|
| * enter the shortcut and copy 16 bytes on behalf of the literals. |
| 2425 |
|
| * 2) Further if the match length is 4..18, copy 18 bytes in a similar |
| 2426 |
|
| * manner; but we ensure that there's enough space in the output for |
| 2427 |
|
| * those 18 bytes earlier, upon entering the shortcut (in other words, |
| 2428 |
|
| * there is a combined check for both stages). |
| 2429 |
|
| */ |
| 2430 |
0 |
▶ | if ( (ll != RUN_MASK) |
Branch: 9 branches
| Branch | True | False | Total |
| if ( (ll != RUN_MASK) |
0 |
0 |
0 |
| if ( (ll != RUN_MASK) |
0 |
0 |
0 |
| if ( (ll != RUN_MASK) |
0 |
0 |
0 |
| if ( (ll != RUN_MASK) |
0 |
0 |
0 |
| if ( (ll != RUN_MASK) |
0 |
0 |
0 |
| if ( (ll != RUN_MASK) |
0 |
0 |
0 |
| if ( (ll != RUN_MASK) |
0 |
0 |
0 |
| if ( (ll != RUN_MASK) |
0 |
0 |
0 |
| if ( (ll != RUN_MASK) |
0 |
0 |
0 |
|
| 2431 |
|
| /* strictly "less than" on input, to re-enter the loop with at least one byte */ |
| 2432 |
0 |
▶ | && likely((ip < shortiend) & (op <= shortoend)) ) { |
Branch: 9 branches
| Branch | True | False | Total |
| && likely((ip < shortiend) & (op <= shortoend)) ) { |
0 |
0 |
0 |
| && likely((ip < shortiend) & (op <= shortoend)) ) { |
0 |
0 |
0 |
| && likely((ip < shortiend) & (op <= shortoend)) ) { |
0 |
0 |
0 |
| && likely((ip < shortiend) & (op <= shortoend)) ) { |
0 |
0 |
0 |
| && likely((ip < shortiend) & (op <= shortoend)) ) { |
0 |
0 |
0 |
| && likely((ip < shortiend) & (op <= shortoend)) ) { |
0 |
0 |
0 |
| && likely((ip < shortiend) & (op <= shortoend)) ) { |
0 |
0 |
0 |
| && likely((ip < shortiend) & (op <= shortoend)) ) { |
0 |
0 |
0 |
| && likely((ip < shortiend) & (op <= shortoend)) ) { |
0 |
0 |
0 |
|
| 2433 |
|
| /* Copy the literals */ |
| 2434 |
0 |
| LZ4_memcpy(op, ip, 16); |
| 2435 |
0 |
| op += ll; ip += ll; |
| 2436 |
|
| |
| 2437 |
|
| /* The second stage: prepare for match copying, decode full info. |
| 2438 |
|
| * If it doesn't work out, the info won't be wasted. */ |
| 2439 |
0 |
| offset = LZ4_readLE16(ip); ip += 2; |
| 2440 |
0 |
| match = op - offset; |
| 2441 |
0 |
▶ | assert(match <= op); /* check overflow */ |
Branch: 9 branches
| Branch | True | False | Total |
| assert(match <= op); /* check overflow */ |
0 |
0 |
0 |
| assert(match <= op); /* check overflow */ |
0 |
0 |
0 |
| assert(match <= op); /* check overflow */ |
0 |
0 |
0 |
| assert(match <= op); /* check overflow */ |
0 |
0 |
0 |
| assert(match <= op); /* check overflow */ |
0 |
0 |
0 |
| assert(match <= op); /* check overflow */ |
0 |
0 |
0 |
| assert(match <= op); /* check overflow */ |
0 |
0 |
0 |
| assert(match <= op); /* check overflow */ |
0 |
0 |
0 |
| assert(match <= op); /* check overflow */ |
0 |
0 |
0 |
|
| 2442 |
0 |
| ml = token & ML_MASK; |
| 2443 |
|
| DEBUGLOG(7, "blockPos%6u: matchLength token = %u (len=%u)", (unsigned)(op-(BYTE*)dst), (unsigned)ml, (unsigned)ml + 4); |
| 2444 |
|
| |
| 2445 |
|
| /* Do not deal with overlapping matches. */ |
| 2446 |
0 |
▶ | if ( (ml != ML_MASK) |
Branch: 9 branches
| Branch | True | False | Total |
| if ( (ml != ML_MASK) |
0 |
0 |
0 |
| if ( (ml != ML_MASK) |
0 |
0 |
0 |
| if ( (ml != ML_MASK) |
0 |
0 |
0 |
| if ( (ml != ML_MASK) |
0 |
0 |
0 |
| if ( (ml != ML_MASK) |
0 |
0 |
0 |
| if ( (ml != ML_MASK) |
0 |
0 |
0 |
| if ( (ml != ML_MASK) |
0 |
0 |
0 |
| if ( (ml != ML_MASK) |
0 |
0 |
0 |
| if ( (ml != ML_MASK) |
0 |
0 |
0 |
|
| 2447 |
0 |
▶ | && (offset >= 8) |
Branch: 9 branches
| Branch | True | False | Total |
| && (offset >= 8) |
0 |
0 |
0 |
| && (offset >= 8) |
0 |
0 |
0 |
| && (offset >= 8) |
0 |
0 |
0 |
| && (offset >= 8) |
0 |
0 |
0 |
| && (offset >= 8) |
0 |
0 |
0 |
| && (offset >= 8) |
0 |
0 |
0 |
| && (offset >= 8) |
0 |
0 |
0 |
| && (offset >= 8) |
0 |
0 |
0 |
| && (offset >= 8) |
0 |
0 |
0 |
|
| 2448 |
0 |
▶ | && (dict==withPrefix64k || match >= lowPrefix) ) { |
Branch: 18 branches
| Branch | True | False | Total |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
| && (dict==withPrefix64k || match >= lowPrefix) ) { |
0 |
0 |
0 |
|
| 2449 |
|
| /* Copy the match. */ |
| 2450 |
0 |
| LZ4_memcpy(op + 0, match + 0, 8); |
| 2451 |
0 |
| LZ4_memcpy(op + 8, match + 8, 8); |
| 2452 |
0 |
| LZ4_memcpy(op +16, match +16, 2); |
| 2453 |
0 |
| op += ml + MINMATCH; |
| 2454 |
|
| /* Both stages worked, load the next token. */ |
| 2455 |
0 |
| continue; |
| 2456 |
|
| } |
| 2457 |
|
| /* The second stage didn't work out, but the info is ready for the match copy below. */ |
| 2458 |
|
| } else { |
| 2459 |
|
| /* decode literal length */ |
| 2460 |
0 |
▶ | if (ll == RUN_MASK) { |
Branch: 9 branches
| Branch | True | False | Total |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
| if (ll == RUN_MASK) { |
0 |
0 |
0 |
|
| 2461 |
|
| /* literal length >= RUN_MASK means >= RUN_MASK literal bytes follow the extension bytes, |
| 2462 |
|
| * so extension bytes cannot reach the last RUN_MASK bytes of input */ |
| 2463 |
0 |
▶ | size_t const addl = read_variable_length(&ip, iend-RUN_MASK); |
Branch: 9 branches
| Branch | True | False | Total |
| size_t const addl = read_variable_length(&ip, iend-RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend-RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend-RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend-RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend-RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend-RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend-RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend-RUN_MASK); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend-RUN_MASK); |
0 |
0 |
0 |
|
| 2464 |
0 |
▶ | if (addl == rvl_error) { goto _output_error; } |
Branch: 9 branches
| Branch | True | False | Total |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
|
| 2465 |
0 |
| ll += addl; |
| 2466 |
0 |
▶ | if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
Branch: 9 branches
| Branch | True | False | Total |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ll<(uptrval)(op))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
|
| 2467 |
0 |
▶ | if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
Branch: 9 branches
| Branch | True | False | Total |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(ip)+ll<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ |
0 |
0 |
0 |
|
| 2468 |
|
| } |
| 2469 |
|
| |
| 2470 |
|
| /* copy literals */ |
| 2471 |
0 |
| cpy = op+ll; |
| 2472 |
|
| LZ4_STATIC_ASSERT(MFLIMIT >= WILDCOPYLENGTH); |
| 2473 |
0 |
▶ | if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
Branch: 18 branches
| Branch | True | False | Total |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
| if ((cpy>oend-MFLIMIT) || (ip+ll>iend-(2+1+LASTLITERALS))) { |
0 |
0 |
0 |
|
| 2474 |
|
| /* close to input or output end : these must be the last literals of the block, |
| 2475 |
|
| * except with partialDecoding, which can also stop within them */ |
| 2476 |
0 |
▶ | if (partialDecoding) { |
Branch: 9 branches
| Branch | True | False | Total |
| if (partialDecoding) { |
0 |
0 |
0 |
| if (partialDecoding) { |
0 |
0 |
0 |
| if (partialDecoding) { |
0 |
0 |
0 |
| if (partialDecoding) { |
0 |
0 |
0 |
| if (partialDecoding) { |
0 |
0 |
0 |
| if (partialDecoding) { |
0 |
0 |
0 |
| if (partialDecoding) { |
0 |
0 |
0 |
| if (partialDecoding) { |
0 |
0 |
0 |
| if (partialDecoding) { |
0 |
0 |
0 |
|
| 2477 |
|
| /* stop at input end, or when output is full */ |
| 2478 |
0 |
| ll = MIN(ll, (size_t)(iend-ip)); |
| 2479 |
0 |
| ll = MIN(ll, (size_t)(oend-op)); |
| 2480 |
0 |
▶ | } else if ((ip+ll != iend) || (cpy > oend)) { |
Branch: 18 branches
| Branch | True | False | Total |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
| } else if ((ip+ll != iend) || (cpy > oend)) { |
0 |
0 |
0 |
|
| 2481 |
|
| /* last literals must end exactly at input end, within output */ |
| 2482 |
|
| DEBUGLOG(5, "invalid last literals : they end at iend%+zi and oend%+zi", (ip+ll)-iend, cpy-oend); |
| 2483 |
0 |
▶ | if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
Branch: 18 branches
| Branch | True | False | Total |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
| if ((ip+ll <= iend) && (cpy > oend-MFLIMIT)) goto _dst_too_small; /* output full, input left */ |
0 |
0 |
0 |
|
| 2484 |
0 |
| goto _output_error; |
| 2485 |
|
| } |
| 2486 |
0 |
| LZ4_memmove(op, ip, ll); /* supports overlapping memory regions, for in-place decompression scenarios */ |
| 2487 |
0 |
| ip += ll; |
| 2488 |
0 |
| op += ll; |
| 2489 |
|
| /* end of block, unless partialDecoding can go on : output not full, input left for a match */ |
| 2490 |
0 |
▶ | if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
Branch: 27 branches
| Branch | True | False | Total |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
| if (!partialDecoding || (op == oend) || (ip >= (iend-2))) { |
0 |
0 |
0 |
|
| 2491 |
|
| break; |
| 2492 |
|
| } |
| 2493 |
|
| } else { |
| 2494 |
0 |
| LZ4_wildCopy8(op, ip, cpy); /* can overwrite up to 8 bytes beyond cpy */ |
| 2495 |
0 |
| ip += ll; op = cpy; |
| 2496 |
|
| } |
| 2497 |
|
| |
| 2498 |
|
| /* get offset */ |
| 2499 |
0 |
| offset = LZ4_readLE16(ip); ip+=2; |
| 2500 |
0 |
| match = op - offset; |
| 2501 |
|
| |
| 2502 |
|
| /* get matchlength */ |
| 2503 |
0 |
| ml = token & ML_MASK; |
| 2504 |
|
| DEBUGLOG(7, "blockPos%6u: matchLength token = %u", (unsigned)(op-(BYTE*)dst), (unsigned)ml); |
| 2505 |
|
| } |
| 2506 |
|
| |
| 2507 |
|
| /* literals copied, offset decoded, ml == match length token */ |
| 2508 |
0 |
▶ | if (ml == ML_MASK) { |
Branch: 9 branches
| Branch | True | False | Total |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
| if (ml == ML_MASK) { |
0 |
0 |
0 |
|
| 2509 |
|
| /* after match length extension bytes, at least 1 token + LASTLITERALS literals must remain */ |
| 2510 |
0 |
▶ | size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
Branch: 9 branches
| Branch | True | False | Total |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
| size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS)); |
0 |
0 |
0 |
|
| 2511 |
0 |
▶ | if (addl == rvl_error) { goto _output_error; } |
Branch: 9 branches
| Branch | True | False | Total |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
| if (addl == rvl_error) { goto _output_error; } |
0 |
0 |
0 |
|
| 2512 |
0 |
| ml += addl; |
| 2513 |
0 |
▶ | if (unlikely((uptrval)(op)+ml<(uptrval)op)) goto _output_error; /* overflow detection */ |
Branch: 9 branches
| Branch | True | False | Total |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) goto _output_error; /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) goto _output_error; /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) goto _output_error; /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) goto _output_error; /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) goto _output_error; /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) goto _output_error; /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) goto _output_error; /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) goto _output_error; /* overflow detection */ |
0 |
0 |
0 |
| if (unlikely((uptrval)(op)+ml<(uptrval)op)) goto _output_error; /* overflow detection */ |
0 |
0 |
0 |
|
| 2514 |
|
| } |
| 2515 |
0 |
| ml += MINMATCH; |
| 2516 |
|
| |
| 2517 |
|
| #if LZ4_FAST_DEC_LOOP |
| 2518 |
0 |
| safe_match_copy: |
| 2519 |
|
| #endif |
| 2520 |
|
| /* literals copied, match fully decoded (ml includes MINMATCH), offset not validated yet */ |
| 2521 |
0 |
▶ | if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
Branch: 18 branches
| Branch | True | False | Total |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
| if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _offset_error; /* Error : offset outside buffers */ |
0 |
0 |
0 |
|
| 2522 |
|
| |
| 2523 |
|
| /* end of block : the last LASTLITERALS bytes must be literals */ |
| 2524 |
0 |
▶ | assert(op <= oend); |
Branch: 9 branches
| Branch | True | False | Total |
| assert(op <= oend); |
0 |
0 |
0 |
| assert(op <= oend); |
0 |
0 |
0 |
| assert(op <= oend); |
0 |
0 |
0 |
| assert(op <= oend); |
0 |
0 |
0 |
| assert(op <= oend); |
0 |
0 |
0 |
| assert(op <= oend); |
0 |
0 |
0 |
| assert(op <= oend); |
0 |
0 |
0 |
| assert(op <= oend); |
0 |
0 |
0 |
| assert(op <= oend); |
0 |
0 |
0 |
|
| 2525 |
0 |
▶ | if (unlikely(op+ml > oend-LASTLITERALS)) { |
Branch: 9 branches
| Branch | True | False | Total |
| if (unlikely(op+ml > oend-LASTLITERALS)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-LASTLITERALS)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-LASTLITERALS)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-LASTLITERALS)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-LASTLITERALS)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-LASTLITERALS)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-LASTLITERALS)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-LASTLITERALS)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-LASTLITERALS)) { |
0 |
0 |
0 |
|
| 2526 |
0 |
▶ | if (partialDecoding) ml = MIN(ml, (size_t)(oend-op)); /* partialDecoding : may end anywhere */ |
Branch: 9 branches
| Branch | True | False | Total |
| if (partialDecoding) ml = MIN(ml, (size_t)(oend-op)); /* partialDecoding : may end anywhere */ |
0 |
0 |
0 |
| if (partialDecoding) ml = MIN(ml, (size_t)(oend-op)); /* partialDecoding : may end anywhere */ |
0 |
0 |
0 |
| if (partialDecoding) ml = MIN(ml, (size_t)(oend-op)); /* partialDecoding : may end anywhere */ |
0 |
0 |
0 |
| if (partialDecoding) ml = MIN(ml, (size_t)(oend-op)); /* partialDecoding : may end anywhere */ |
0 |
0 |
0 |
| if (partialDecoding) ml = MIN(ml, (size_t)(oend-op)); /* partialDecoding : may end anywhere */ |
0 |
0 |
0 |
| if (partialDecoding) ml = MIN(ml, (size_t)(oend-op)); /* partialDecoding : may end anywhere */ |
0 |
0 |
0 |
| if (partialDecoding) ml = MIN(ml, (size_t)(oend-op)); /* partialDecoding : may end anywhere */ |
0 |
0 |
0 |
| if (partialDecoding) ml = MIN(ml, (size_t)(oend-op)); /* partialDecoding : may end anywhere */ |
0 |
0 |
0 |
| if (partialDecoding) ml = MIN(ml, (size_t)(oend-op)); /* partialDecoding : may end anywhere */ |
0 |
0 |
0 |
|
| 2527 |
0 |
| else goto _dst_too_small; |
| 2528 |
|
| } |
| 2529 |
|
| |
| 2530 |
|
| /* match starting within external dictionary */ |
| 2531 |
0 |
▶ | if ((dict==usingExtDict) && (match < lowPrefix)) { |
Branch: 18 branches
| Branch | True | False | Total |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
| if ((dict==usingExtDict) && (match < lowPrefix)) { |
0 |
0 |
0 |
|
| 2532 |
0 |
▶ | assert(dictEnd != NULL); |
Branch: 9 branches
| Branch | True | False | Total |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
| assert(dictEnd != NULL); |
0 |
0 |
0 |
|
| 2533 |
0 |
| op = LZ4_copyExtDictMatch(op, match, ml, lowPrefix, dictEnd); |
| 2534 |
0 |
| continue; |
| 2535 |
|
| } |
| 2536 |
0 |
▶ | assert(match >= lowPrefix); |
Branch: 9 branches
| Branch | True | False | Total |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
| assert(match >= lowPrefix); |
0 |
0 |
0 |
|
| 2537 |
|
| |
| 2538 |
|
| /* close to block end : no wild copy */ |
| 2539 |
0 |
▶ | if (unlikely(op+ml > oend-MATCH_SAFEGUARD_DISTANCE)) { |
Branch: 9 branches
| Branch | True | False | Total |
| if (unlikely(op+ml > oend-MATCH_SAFEGUARD_DISTANCE)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-MATCH_SAFEGUARD_DISTANCE)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-MATCH_SAFEGUARD_DISTANCE)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-MATCH_SAFEGUARD_DISTANCE)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-MATCH_SAFEGUARD_DISTANCE)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-MATCH_SAFEGUARD_DISTANCE)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-MATCH_SAFEGUARD_DISTANCE)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-MATCH_SAFEGUARD_DISTANCE)) { |
0 |
0 |
0 |
| if (unlikely(op+ml > oend-MATCH_SAFEGUARD_DISTANCE)) { |
0 |
0 |
0 |
|
| 2540 |
0 |
| op = LZ4_copyMatchExact(op, match, ml); |
| 2541 |
0 |
▶ | if (op == oend) { break; } /* partialDecoding : output buffer full */ |
Branch: 9 branches
| Branch | True | False | Total |
| if (op == oend) { break; } /* partialDecoding : output buffer full */ |
0 |
0 |
0 |
| if (op == oend) { break; } /* partialDecoding : output buffer full */ |
0 |
0 |
0 |
| if (op == oend) { break; } /* partialDecoding : output buffer full */ |
0 |
0 |
0 |
| if (op == oend) { break; } /* partialDecoding : output buffer full */ |
0 |
0 |
0 |
| if (op == oend) { break; } /* partialDecoding : output buffer full */ |
0 |
0 |
0 |
| if (op == oend) { break; } /* partialDecoding : output buffer full */ |
0 |
0 |
0 |
| if (op == oend) { break; } /* partialDecoding : output buffer full */ |
0 |
0 |
0 |
| if (op == oend) { break; } /* partialDecoding : output buffer full */ |
0 |
0 |
0 |
| if (op == oend) { break; } /* partialDecoding : output buffer full */ |
0 |
0 |
0 |
|
| 2542 |
0 |
| continue; |
| 2543 |
|
| } |
| 2544 |
|
| |
| 2545 |
|
| /* copy match within block */ |
| 2546 |
0 |
▶ | cpy = op + ml; |
Branch: 9 branches
| Branch | True | False | Total |
| cpy = op + ml; |
0 |
0 |
0 |
| cpy = op + ml; |
0 |
0 |
0 |
| cpy = op + ml; |
0 |
0 |
0 |
| cpy = op + ml; |
0 |
0 |
0 |
| cpy = op + ml; |
0 |
0 |
0 |
| cpy = op + ml; |
0 |
0 |
0 |
| cpy = op + ml; |
0 |
0 |
0 |
| cpy = op + ml; |
0 |
0 |
0 |
| cpy = op + ml; |
0 |
0 |
0 |
|
| 2547 |
|
| LZ4_memcpy_using_offset_base(op, match, cpy, offset); |
| 2548 |
0 |
| op = cpy; /* wildcopy correction */ |
| 2549 |
|
| } |
| 2550 |
|
| |
| 2551 |
|
| /* end of decoding */ |
| 2552 |
|
| DEBUGLOG(5, "decoded %i bytes", (int) (((char*)op)-dst)); |
| 2553 |
0 |
| return (int) (((char*)op)-dst); /* Nb of output bytes decoded */ |
| 2554 |
|
| |
| 2555 |
|
| /* errors : see LZ4_decompress_safe() in lz4.h */ |
| 2556 |
0 |
| _output_error: |
| 2557 |
0 |
| return -1; |
| 2558 |
0 |
| _dst_too_small: |
| 2559 |
0 |
| return -2; |
| 2560 |
0 |
| _offset_error: |
| 2561 |
0 |
| return -3; |
| 2562 |
|
| } |
| 2563 |
|
| } |
| 2564 |
|
| |
| 2565 |
|
| |
| 2566 |
|
| /*===== Instantiate the API decoding functions. =====*/ |
| 2567 |
|
| |
| 2568 |
|
| LZ4_FORCE_O2 |
| 2569 |
0 |
▶ | int LZ4_decompress_safe(const char* source, char* dest, int compressedSize, int maxDecompressedSize) |
Branch: 1 branch
| Branch | True | False | Total |
| int LZ4_decompress_safe(const char* source, char* dest, int compressedSize, int maxDecompressedSize) |
0 |
0 |
0 |
|
| 2570 |
|
| { |
| 2571 |
0 |
| return LZ4_decompress_generic(source, dest, compressedSize, maxDecompressedSize, |
| 2572 |
|
| decode_full_block, noDict, |
| 2573 |
|
| (BYTE*)dest, NULL, 0); |
| 2574 |
|
| } |
| 2575 |
|
| |
| 2576 |
|
| LZ4_FORCE_O2 |
| 2577 |
0 |
| int LZ4_decompress_safe_partial(const char* src, char* dst, int compressedSize, int targetOutputSize, int dstCapacity) |
| 2578 |
|
| { |
| 2579 |
0 |
▶ | dstCapacity = MIN(targetOutputSize, dstCapacity); |
Branch: 1 branch
| Branch | True | False | Total |
| dstCapacity = MIN(targetOutputSize, dstCapacity); |
0 |
0 |
0 |
|
| 2580 |
0 |
| return LZ4_decompress_generic(src, dst, compressedSize, dstCapacity, |
| 2581 |
|
| partial_decode, |
| 2582 |
|
| noDict, (BYTE*)dst, NULL, 0); |
| 2583 |
|
| } |
| 2584 |
|
| |
| 2585 |
|
| LZ4_FORCE_O2 |
| 2586 |
0 |
| int LZ4_decompress_fast(const char* source, char* dest, int originalSize) |
| 2587 |
|
| { |
| 2588 |
|
| DEBUGLOG(5, "LZ4_decompress_fast"); |
| 2589 |
0 |
| return LZ4_decompress_unsafe_generic( |
| 2590 |
|
| (const BYTE*)source, (BYTE*)dest, originalSize, |
| 2591 |
|
| 0, NULL, 0); |
| 2592 |
|
| } |
| 2593 |
|
| |
| 2594 |
|
| /*===== Instantiate a few more decoding cases, used more than once. =====*/ |
| 2595 |
|
| |
| 2596 |
|
| LZ4_FORCE_O2 /* Exported, an obsolete API function. */ |
| 2597 |
0 |
| int LZ4_decompress_safe_withPrefix64k(const char* source, char* dest, int compressedSize, int maxOutputSize) |
| 2598 |
|
| { |
| 2599 |
0 |
▶ | return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, |
Branch: 1 branch
| Branch | True | False | Total |
| return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, |
0 |
0 |
0 |
|
| 2600 |
|
| decode_full_block, withPrefix64k, |
| 2601 |
|
| (BYTE*)dest - 64 KB, NULL, 0); |
| 2602 |
|
| } |
| 2603 |
|
| |
| 2604 |
|
| LZ4_FORCE_O2 |
| 2605 |
0 |
| static int LZ4_decompress_safe_partial_withPrefix64k(const char* source, char* dest, int compressedSize, int targetOutputSize, int dstCapacity) |
| 2606 |
|
| { |
| 2607 |
0 |
| dstCapacity = MIN(targetOutputSize, dstCapacity); |
| 2608 |
0 |
▶ | return LZ4_decompress_generic(source, dest, compressedSize, dstCapacity, |
Branch: 1 branch
| Branch | True | False | Total |
| return LZ4_decompress_generic(source, dest, compressedSize, dstCapacity, |
0 |
0 |
0 |
|
| 2609 |
|
| partial_decode, withPrefix64k, |
| 2610 |
|
| (BYTE*)dest - 64 KB, NULL, 0); |
| 2611 |
|
| } |
| 2612 |
|
| |
| 2613 |
|
| /* Another obsolete API function, paired with the previous one. */ |
| 2614 |
0 |
| int LZ4_decompress_fast_withPrefix64k(const char* source, char* dest, int originalSize) |
| 2615 |
|
| { |
| 2616 |
0 |
| return LZ4_decompress_unsafe_generic( |
| 2617 |
|
| (const BYTE*)source, (BYTE*)dest, originalSize, |
| 2618 |
|
| 64 KB, NULL, 0); |
| 2619 |
|
| } |
| 2620 |
|
| |
| 2621 |
|
| LZ4_FORCE_O2 |
| 2622 |
0 |
| static int LZ4_decompress_safe_withSmallPrefix(const char* source, char* dest, int compressedSize, int maxOutputSize, |
| 2623 |
|
| size_t prefixSize) |
| 2624 |
|
| { |
| 2625 |
0 |
| return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, |
| 2626 |
|
| decode_full_block, noDict, |
| 2627 |
0 |
▶ | (BYTE*)dest-prefixSize, NULL, 0); |
Branch: 1 branch
| Branch | True | False | Total |
| (BYTE*)dest-prefixSize, NULL, 0); |
0 |
0 |
0 |
|
| 2628 |
|
| } |
| 2629 |
|
| |
| 2630 |
|
| LZ4_FORCE_O2 |
| 2631 |
0 |
| static int LZ4_decompress_safe_partial_withSmallPrefix(const char* source, char* dest, int compressedSize, int targetOutputSize, int dstCapacity, |
| 2632 |
|
| size_t prefixSize) |
| 2633 |
|
| { |
| 2634 |
0 |
| dstCapacity = MIN(targetOutputSize, dstCapacity); |
| 2635 |
0 |
| return LZ4_decompress_generic(source, dest, compressedSize, dstCapacity, |
| 2636 |
|
| partial_decode, noDict, |
| 2637 |
0 |
▶ | (BYTE*)dest-prefixSize, NULL, 0); |
Branch: 1 branch
| Branch | True | False | Total |
| (BYTE*)dest-prefixSize, NULL, 0); |
0 |
0 |
0 |
|
| 2638 |
|
| } |
| 2639 |
|
| |
| 2640 |
|
| LZ4_FORCE_O2 |
| 2641 |
0 |
▶ | int LZ4_decompress_safe_forceExtDict(const char* source, char* dest, |
Branch: 1 branch
| Branch | True | False | Total |
| int LZ4_decompress_safe_forceExtDict(const char* source, char* dest, |
0 |
0 |
0 |
|
| 2642 |
|
| int compressedSize, int maxOutputSize, |
| 2643 |
|
| const void* dictStart, size_t dictSize) |
| 2644 |
|
| { |
| 2645 |
|
| DEBUGLOG(5, "LZ4_decompress_safe_forceExtDict"); |
| 2646 |
0 |
| return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, |
| 2647 |
|
| decode_full_block, usingExtDict, |
| 2648 |
|
| (BYTE*)dest, (const BYTE*)dictStart, dictSize); |
| 2649 |
|
| } |
| 2650 |
|
| |
| 2651 |
|
| LZ4_FORCE_O2 |
| 2652 |
0 |
| int LZ4_decompress_safe_partial_forceExtDict(const char* source, char* dest, |
| 2653 |
|
| int compressedSize, int targetOutputSize, int dstCapacity, |
| 2654 |
|
| const void* dictStart, size_t dictSize) |
| 2655 |
|
| { |
| 2656 |
0 |
▶ | dstCapacity = MIN(targetOutputSize, dstCapacity); |
Branch: 1 branch
| Branch | True | False | Total |
| dstCapacity = MIN(targetOutputSize, dstCapacity); |
0 |
0 |
0 |
|
| 2657 |
0 |
| return LZ4_decompress_generic(source, dest, compressedSize, dstCapacity, |
| 2658 |
|
| partial_decode, usingExtDict, |
| 2659 |
|
| (BYTE*)dest, (const BYTE*)dictStart, dictSize); |
| 2660 |
|
| } |
| 2661 |
|
| |
| 2662 |
|
| LZ4_FORCE_O2 |
| 2663 |
0 |
▶ | static int LZ4_decompress_fast_extDict(const char* source, char* dest, int originalSize, |
Branch: 1 branch
| Branch | True | False | Total |
| static int LZ4_decompress_fast_extDict(const char* source, char* dest, int originalSize, |
0 |
0 |
0 |
|
| 2664 |
|
| const void* dictStart, size_t dictSize) |
| 2665 |
|
| { |
| 2666 |
0 |
| return LZ4_decompress_unsafe_generic( |
| 2667 |
|
| (const BYTE*)source, (BYTE*)dest, originalSize, |
| 2668 |
|
| 0, (const BYTE*)dictStart, dictSize); |
| 2669 |
|
| } |
| 2670 |
|
| |
| 2671 |
|
| /* The "double dictionary" mode, for use with e.g. ring buffers: the first part |
| 2672 |
|
| * of the dictionary is passed as prefix, and the second via dictStart + dictSize. |
| 2673 |
|
| * These routines are used only once, in LZ4_decompress_*_continue(). |
| 2674 |
|
| */ |
| 2675 |
|
| LZ4_FORCE_INLINE |
| 2676 |
|
| int LZ4_decompress_safe_doubleDict(const char* source, char* dest, int compressedSize, int maxOutputSize, |
| 2677 |
|
| size_t prefixSize, const void* dictStart, size_t dictSize) |
| 2678 |
|
| { |
| 2679 |
0 |
| return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, |
| 2680 |
|
| decode_full_block, usingExtDict, |
| 2681 |
0 |
| (BYTE*)dest-prefixSize, (const BYTE*)dictStart, dictSize); |
| 2682 |
|
| } |
| 2683 |
|
| |
| 2684 |
|
| /*===== streaming decompression functions =====*/ |
| 2685 |
|
| |
| 2686 |
|
| #if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) |
| 2687 |
0 |
| LZ4_streamDecode_t* LZ4_createStreamDecode(void) |
| 2688 |
|
| { |
| 2689 |
|
| LZ4_STATIC_ASSERT(sizeof(LZ4_streamDecode_t) >= sizeof(LZ4_streamDecode_t_internal)); |
| 2690 |
0 |
| return (LZ4_streamDecode_t*) ALLOC_AND_ZERO(sizeof(LZ4_streamDecode_t)); |
| 2691 |
|
| } |
| 2692 |
|
| |
| 2693 |
0 |
| int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream) |
| 2694 |
|
| { |
| 2695 |
0 |
▶ | if (LZ4_stream == NULL) { return 0; } /* support free on NULL */ |
Branch: 1 branch
| Branch | True | False | Total |
| if (LZ4_stream == NULL) { return 0; } /* support free on NULL */ |
0 |
0 |
0 |
|
| 2696 |
0 |
| FREEMEM(LZ4_stream); |
| 2697 |
0 |
| return 0; |
| 2698 |
|
| } |
| 2699 |
|
| #endif |
| 2700 |
|
| |
| 2701 |
|
| /*! LZ4_setStreamDecode() : |
| 2702 |
|
| * Use this function to instruct where to find the dictionary. |
| 2703 |
|
| * This function is not necessary if previous data is still available where it was decoded. |
| 2704 |
|
| * Loading a size of 0 is allowed (same effect as no dictionary). |
| 2705 |
|
| * @return : 1 if OK, 0 if error |
| 2706 |
|
| */ |
| 2707 |
0 |
| int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize) |
| 2708 |
|
| { |
| 2709 |
0 |
| LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; |
| 2710 |
0 |
▶ | if (dictSize < 0) return 0; |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictSize < 0) return 0; |
0 |
0 |
0 |
|
| 2711 |
0 |
| lz4sd->prefixSize = (size_t)dictSize; |
| 2712 |
0 |
▶ | if (dictSize) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictSize) { |
0 |
0 |
0 |
|
| 2713 |
0 |
▶ | assert(dictionary != NULL); |
Branch: 1 branch
| Branch | True | False | Total |
| assert(dictionary != NULL); |
0 |
0 |
0 |
|
| 2714 |
0 |
| lz4sd->prefixEnd = (const BYTE*) dictionary + dictSize; |
| 2715 |
|
| } else { |
| 2716 |
0 |
| lz4sd->prefixEnd = (const BYTE*) dictionary; |
| 2717 |
|
| } |
| 2718 |
0 |
| lz4sd->externalDict = NULL; |
| 2719 |
0 |
| lz4sd->extDictSize = 0; |
| 2720 |
0 |
| return 1; |
| 2721 |
|
| } |
| 2722 |
|
| |
| 2723 |
|
| /*! LZ4_decoderRingBufferSize() : |
| 2724 |
|
| * when setting a ring buffer for streaming decompression (optional scenario), |
| 2725 |
|
| * provides the minimum size of this ring buffer |
| 2726 |
|
| * to be compatible with any source respecting maxBlockSize condition. |
| 2727 |
|
| * Note : in a ring buffer scenario, |
| 2728 |
|
| * blocks are presumed decompressed next to each other. |
| 2729 |
|
| * When not enough space remains for next block (remainingSize < maxBlockSize), |
| 2730 |
|
| * decoding resumes from beginning of ring buffer. |
| 2731 |
|
| * @return : minimum ring buffer size, |
| 2732 |
|
| * or 0 if there is an error (invalid maxBlockSize). |
| 2733 |
|
| */ |
| 2734 |
0 |
| int LZ4_decoderRingBufferSize(int maxBlockSize) |
| 2735 |
|
| { |
| 2736 |
|
| /* the margin must cover the widest write beyond a copy of the safe loop (16 bytes), minus 2 : |
| 2737 |
|
| * LZ4_decompress_generic() avoids the fast loop when history is closer than FASTLOOP_SAFE_DISTANCE, |
| 2738 |
|
| * which the current margin (64) never is. The former margin (14) remains valid. */ |
| 2739 |
|
| LZ4_STATIC_ASSERT(LZ4_DECODER_RING_BUFFER_SIZE(0) - 65536 >= 16 - 2); |
| 2740 |
0 |
▶ | if (maxBlockSize < 0) return 0; |
Branch: 1 branch
| Branch | True | False | Total |
| if (maxBlockSize < 0) return 0; |
0 |
0 |
0 |
|
| 2741 |
0 |
▶ | if (maxBlockSize > LZ4_MAX_INPUT_SIZE) return 0; |
Branch: 1 branch
| Branch | True | False | Total |
| if (maxBlockSize > LZ4_MAX_INPUT_SIZE) return 0; |
0 |
0 |
0 |
|
| 2742 |
0 |
▶ | if (maxBlockSize < 16) maxBlockSize = 16; |
Branch: 1 branch
| Branch | True | False | Total |
| if (maxBlockSize < 16) maxBlockSize = 16; |
0 |
0 |
0 |
|
| 2743 |
0 |
| return LZ4_DECODER_RING_BUFFER_SIZE(maxBlockSize); |
| 2744 |
|
| } |
| 2745 |
|
| |
| 2746 |
|
| /* |
| 2747 |
|
| *_continue() : |
| 2748 |
|
| These decoding functions allow decompression of multiple blocks in "streaming" mode. |
| 2749 |
|
| Previously decoded blocks must still be available at the memory position where they were decoded. |
| 2750 |
|
| If it's not possible, save the relevant part of decoded data into a safe buffer, |
| 2751 |
|
| and indicate where it stands using LZ4_setStreamDecode() |
| 2752 |
|
| */ |
| 2753 |
|
| LZ4_FORCE_O2 |
| 2754 |
0 |
| int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxOutputSize) |
| 2755 |
|
| { |
| 2756 |
0 |
| LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; |
| 2757 |
|
| int result; |
| 2758 |
|
| |
| 2759 |
0 |
▶ | if (lz4sd->prefixSize == 0) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (lz4sd->prefixSize == 0) { |
0 |
0 |
0 |
|
| 2760 |
|
| /* The first call, no dictionary yet. */ |
| 2761 |
0 |
▶ | assert(lz4sd->extDictSize == 0); |
Branch: 1 branch
| Branch | True | False | Total |
| assert(lz4sd->extDictSize == 0); |
0 |
0 |
0 |
|
| 2762 |
0 |
| result = LZ4_decompress_safe(source, dest, compressedSize, maxOutputSize); |
| 2763 |
0 |
▶ | if (result <= 0) return result; |
Branch: 1 branch
| Branch | True | False | Total |
| if (result <= 0) return result; |
0 |
0 |
0 |
|
| 2764 |
0 |
| lz4sd->prefixSize = (size_t)result; |
| 2765 |
0 |
| lz4sd->prefixEnd = (BYTE*)dest + result; |
| 2766 |
0 |
▶ | } else if (lz4sd->prefixEnd == (BYTE*)dest) { |
Branch: 1 branch
| Branch | True | False | Total |
| } else if (lz4sd->prefixEnd == (BYTE*)dest) { |
0 |
0 |
0 |
|
| 2767 |
|
| /* They're rolling the current segment. */ |
| 2768 |
0 |
▶ | if (lz4sd->prefixSize >= 64 KB - 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (lz4sd->prefixSize >= 64 KB - 1) |
0 |
0 |
0 |
|
| 2769 |
0 |
| result = LZ4_decompress_safe_withPrefix64k(source, dest, compressedSize, maxOutputSize); |
| 2770 |
0 |
▶ | else if (lz4sd->extDictSize == 0) |
Branch: 1 branch
| Branch | True | False | Total |
| else if (lz4sd->extDictSize == 0) |
0 |
0 |
0 |
|
| 2771 |
0 |
| result = LZ4_decompress_safe_withSmallPrefix(source, dest, compressedSize, maxOutputSize, |
| 2772 |
|
| lz4sd->prefixSize); |
| 2773 |
|
| else |
| 2774 |
0 |
| result = LZ4_decompress_safe_doubleDict(source, dest, compressedSize, maxOutputSize, |
| 2775 |
0 |
▶ | lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize); |
Branch: 1 branch
| Branch | True | False | Total |
| lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize); |
0 |
0 |
0 |
|
| 2776 |
0 |
▶ | if (result <= 0) return result; |
Branch: 1 branch
| Branch | True | False | Total |
| if (result <= 0) return result; |
0 |
0 |
0 |
|
| 2777 |
0 |
| lz4sd->prefixSize += (size_t)result; |
| 2778 |
0 |
| lz4sd->prefixEnd += result; |
| 2779 |
|
| } else { |
| 2780 |
|
| /* The buffer wraps around, or they're switching to another buffer. */ |
| 2781 |
0 |
| lz4sd->extDictSize = lz4sd->prefixSize; |
| 2782 |
0 |
| lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize; |
| 2783 |
0 |
| result = LZ4_decompress_safe_forceExtDict(source, dest, compressedSize, maxOutputSize, |
| 2784 |
0 |
| lz4sd->externalDict, lz4sd->extDictSize); |
| 2785 |
0 |
▶ | if (result <= 0) return result; |
Branch: 1 branch
| Branch | True | False | Total |
| if (result <= 0) return result; |
0 |
0 |
0 |
|
| 2786 |
0 |
| lz4sd->prefixSize = (size_t)result; |
| 2787 |
0 |
| lz4sd->prefixEnd = (BYTE*)dest + result; |
| 2788 |
|
| } |
| 2789 |
|
| |
| 2790 |
0 |
| return result; |
| 2791 |
|
| } |
| 2792 |
|
| |
| 2793 |
|
| LZ4_FORCE_O2 int |
| 2794 |
0 |
| LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, |
| 2795 |
|
| const char* source, char* dest, int originalSize) |
| 2796 |
|
| { |
| 2797 |
0 |
| LZ4_streamDecode_t_internal* const lz4sd = |
| 2798 |
0 |
▶ | (assert(LZ4_streamDecode!=NULL), &LZ4_streamDecode->internal_donotuse); |
Branch: 1 branch
| Branch | True | False | Total |
| (assert(LZ4_streamDecode!=NULL), &LZ4_streamDecode->internal_donotuse); |
0 |
0 |
0 |
|
| 2799 |
|
| int result; |
| 2800 |
|
| |
| 2801 |
|
| DEBUGLOG(5, "LZ4_decompress_fast_continue (toDecodeSize=%i)", originalSize); |
| 2802 |
0 |
▶ | assert(originalSize >= 0); |
Branch: 1 branch
| Branch | True | False | Total |
| assert(originalSize >= 0); |
0 |
0 |
0 |
|
| 2803 |
|
| |
| 2804 |
0 |
▶ | if (lz4sd->prefixSize == 0) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (lz4sd->prefixSize == 0) { |
0 |
0 |
0 |
|
| 2805 |
|
| DEBUGLOG(5, "first invocation : no prefix nor extDict"); |
| 2806 |
0 |
▶ | assert(lz4sd->extDictSize == 0); |
Branch: 1 branch
| Branch | True | False | Total |
| assert(lz4sd->extDictSize == 0); |
0 |
0 |
0 |
|
| 2807 |
0 |
| result = LZ4_decompress_fast(source, dest, originalSize); |
| 2808 |
0 |
▶ | if (result <= 0) return result; |
Branch: 1 branch
| Branch | True | False | Total |
| if (result <= 0) return result; |
0 |
0 |
0 |
|
| 2809 |
0 |
| lz4sd->prefixSize = (size_t)originalSize; |
| 2810 |
0 |
| lz4sd->prefixEnd = (BYTE*)dest + originalSize; |
| 2811 |
0 |
▶ | } else if (lz4sd->prefixEnd == (BYTE*)dest) { |
Branch: 1 branch
| Branch | True | False | Total |
| } else if (lz4sd->prefixEnd == (BYTE*)dest) { |
0 |
0 |
0 |
|
| 2812 |
|
| DEBUGLOG(5, "continue using existing prefix"); |
| 2813 |
0 |
| result = LZ4_decompress_unsafe_generic( |
| 2814 |
|
| (const BYTE*)source, (BYTE*)dest, originalSize, |
| 2815 |
|
| lz4sd->prefixSize, |
| 2816 |
0 |
▶ | lz4sd->externalDict, lz4sd->extDictSize); |
Branch: 1 branch
| Branch | True | False | Total |
| lz4sd->externalDict, lz4sd->extDictSize); |
0 |
0 |
0 |
|
| 2817 |
0 |
▶ | if (result <= 0) return result; |
Branch: 1 branch
| Branch | True | False | Total |
| if (result <= 0) return result; |
0 |
0 |
0 |
|
| 2818 |
0 |
| lz4sd->prefixSize += (size_t)originalSize; |
| 2819 |
0 |
| lz4sd->prefixEnd += originalSize; |
| 2820 |
|
| } else { |
| 2821 |
|
| DEBUGLOG(5, "prefix becomes extDict"); |
| 2822 |
0 |
| lz4sd->extDictSize = lz4sd->prefixSize; |
| 2823 |
0 |
| lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize; |
| 2824 |
0 |
| result = LZ4_decompress_fast_extDict(source, dest, originalSize, |
| 2825 |
0 |
| lz4sd->externalDict, lz4sd->extDictSize); |
| 2826 |
0 |
▶ | if (result <= 0) return result; |
Branch: 1 branch
| Branch | True | False | Total |
| if (result <= 0) return result; |
0 |
0 |
0 |
|
| 2827 |
0 |
| lz4sd->prefixSize = (size_t)originalSize; |
| 2828 |
0 |
| lz4sd->prefixEnd = (BYTE*)dest + originalSize; |
| 2829 |
|
| } |
| 2830 |
|
| |
| 2831 |
0 |
| return result; |
| 2832 |
|
| } |
| 2833 |
|
| |
| 2834 |
|
| |
| 2835 |
|
| /* |
| 2836 |
|
| Advanced decoding functions : |
| 2837 |
|
| *_usingDict() : |
| 2838 |
|
| These decoding functions work the same as "_continue" ones, |
| 2839 |
|
| the dictionary must be explicitly provided within parameters |
| 2840 |
|
| */ |
| 2841 |
|
| |
| 2842 |
0 |
| int LZ4_decompress_safe_usingDict(const char* source, char* dest, int compressedSize, int maxOutputSize, const char* dictStart, int dictSize) |
| 2843 |
|
| { |
| 2844 |
0 |
▶ | if (dictSize < 0) return -1; |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictSize < 0) return -1; |
0 |
0 |
0 |
|
| 2845 |
0 |
▶ | if (dictSize==0) |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictSize==0) |
0 |
0 |
0 |
|
| 2846 |
0 |
| return LZ4_decompress_safe(source, dest, compressedSize, maxOutputSize); |
| 2847 |
0 |
▶ | if (dictStart+dictSize == dest) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictStart+dictSize == dest) { |
0 |
0 |
0 |
|
| 2848 |
0 |
▶ | if (dictSize >= 64 KB - 1) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictSize >= 64 KB - 1) { |
0 |
0 |
0 |
|
| 2849 |
0 |
| return LZ4_decompress_safe_withPrefix64k(source, dest, compressedSize, maxOutputSize); |
| 2850 |
|
| } |
| 2851 |
0 |
▶ | assert(dictSize >= 0); |
Branch: 1 branch
| Branch | True | False | Total |
| assert(dictSize >= 0); |
0 |
0 |
0 |
|
| 2852 |
0 |
| return LZ4_decompress_safe_withSmallPrefix(source, dest, compressedSize, maxOutputSize, (size_t)dictSize); |
| 2853 |
|
| } |
| 2854 |
0 |
▶ | assert(dictSize >= 0); |
Branch: 1 branch
| Branch | True | False | Total |
| assert(dictSize >= 0); |
0 |
0 |
0 |
|
| 2855 |
0 |
| return LZ4_decompress_safe_forceExtDict(source, dest, compressedSize, maxOutputSize, dictStart, (size_t)dictSize); |
| 2856 |
|
| } |
| 2857 |
|
| |
| 2858 |
0 |
| int LZ4_decompress_safe_partial_usingDict(const char* source, char* dest, int compressedSize, int targetOutputSize, int dstCapacity, const char* dictStart, int dictSize) |
| 2859 |
|
| { |
| 2860 |
0 |
▶ | if (dictSize < 0) return -1; |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictSize < 0) return -1; |
0 |
0 |
0 |
|
| 2861 |
0 |
▶ | if (dictSize==0) |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictSize==0) |
0 |
0 |
0 |
|
| 2862 |
0 |
| return LZ4_decompress_safe_partial(source, dest, compressedSize, targetOutputSize, dstCapacity); |
| 2863 |
0 |
▶ | if (dictStart+dictSize == dest) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictStart+dictSize == dest) { |
0 |
0 |
0 |
|
| 2864 |
0 |
▶ | if (dictSize >= 64 KB - 1) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictSize >= 64 KB - 1) { |
0 |
0 |
0 |
|
| 2865 |
0 |
| return LZ4_decompress_safe_partial_withPrefix64k(source, dest, compressedSize, targetOutputSize, dstCapacity); |
| 2866 |
|
| } |
| 2867 |
0 |
▶ | assert(dictSize >= 0); |
Branch: 1 branch
| Branch | True | False | Total |
| assert(dictSize >= 0); |
0 |
0 |
0 |
|
| 2868 |
0 |
| return LZ4_decompress_safe_partial_withSmallPrefix(source, dest, compressedSize, targetOutputSize, dstCapacity, (size_t)dictSize); |
| 2869 |
|
| } |
| 2870 |
0 |
▶ | assert(dictSize >= 0); |
Branch: 1 branch
| Branch | True | False | Total |
| assert(dictSize >= 0); |
0 |
0 |
0 |
|
| 2871 |
0 |
| return LZ4_decompress_safe_partial_forceExtDict(source, dest, compressedSize, targetOutputSize, dstCapacity, dictStart, (size_t)dictSize); |
| 2872 |
|
| } |
| 2873 |
|
| |
| 2874 |
0 |
| int LZ4_decompress_fast_usingDict(const char* source, char* dest, int originalSize, const char* dictStart, int dictSize) |
| 2875 |
|
| { |
| 2876 |
0 |
▶ | if (dictSize < 0) return -1; |
Branch: 1 branch
| Branch | True | False | Total |
| if (dictSize < 0) return -1; |
0 |
0 |
0 |
|
| 2877 |
0 |
▶ | if (dictSize==0 || dictStart+dictSize == dest) |
Branch: 2 branches
| Branch | True | False | Total |
| if (dictSize==0 || dictStart+dictSize == dest) |
0 |
0 |
0 |
| if (dictSize==0 || dictStart+dictSize == dest) |
0 |
0 |
0 |
|
| 2878 |
0 |
| return LZ4_decompress_unsafe_generic( |
| 2879 |
|
| (const BYTE*)source, (BYTE*)dest, originalSize, |
| 2880 |
|
| (size_t)dictSize, NULL, 0); |
| 2881 |
0 |
▶ | assert(dictSize >= 0); |
Branch: 1 branch
| Branch | True | False | Total |
| assert(dictSize >= 0); |
0 |
0 |
0 |
|
| 2882 |
0 |
| return LZ4_decompress_fast_extDict(source, dest, originalSize, dictStart, (size_t)dictSize); |
| 2883 |
|
| } |
| 2884 |
|
| |
| 2885 |
|
| |
| 2886 |
|
| /*=************************************************* |
| 2887 |
|
| * Obsolete Functions |
| 2888 |
|
| ***************************************************/ |
| 2889 |
|
| /* obsolete compression functions */ |
| 2890 |
0 |
| int LZ4_compress_limitedOutput(const char* source, char* dest, int inputSize, int maxOutputSize) |
| 2891 |
|
| { |
| 2892 |
0 |
| return LZ4_compress_default(source, dest, inputSize, maxOutputSize); |
| 2893 |
|
| } |
| 2894 |
0 |
| int LZ4_compress(const char* src, char* dest, int srcSize) |
| 2895 |
|
| { |
| 2896 |
0 |
| return LZ4_compress_default(src, dest, srcSize, LZ4_compressBound(srcSize)); |
| 2897 |
|
| } |
| 2898 |
0 |
| int LZ4_compress_limitedOutput_withState (void* state, const char* src, char* dst, int srcSize, int dstSize) |
| 2899 |
|
| { |
| 2900 |
0 |
| return LZ4_compress_fast_extState(state, src, dst, srcSize, dstSize, 1); |
| 2901 |
|
| } |
| 2902 |
0 |
| int LZ4_compress_withState (void* state, const char* src, char* dst, int srcSize) |
| 2903 |
|
| { |
| 2904 |
0 |
| return LZ4_compress_fast_extState(state, src, dst, srcSize, LZ4_compressBound(srcSize), 1); |
| 2905 |
|
| } |
| 2906 |
0 |
| int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_stream, const char* src, char* dst, int srcSize, int dstCapacity) |
| 2907 |
|
| { |
| 2908 |
0 |
| return LZ4_compress_fast_continue(LZ4_stream, src, dst, srcSize, dstCapacity, 1); |
| 2909 |
|
| } |
| 2910 |
0 |
| int LZ4_compress_continue (LZ4_stream_t* LZ4_stream, const char* source, char* dest, int inputSize) |
| 2911 |
|
| { |
| 2912 |
0 |
| return LZ4_compress_fast_continue(LZ4_stream, source, dest, inputSize, LZ4_compressBound(inputSize), 1); |
| 2913 |
|
| } |
| 2914 |
|
| |
| 2915 |
|
| /* |
| 2916 |
|
| These decompression functions are deprecated and should no longer be used. |
| 2917 |
|
| They are only provided here for compatibility with older user programs. |
| 2918 |
|
| - LZ4_uncompress is totally equivalent to LZ4_decompress_fast |
| 2919 |
|
| - LZ4_uncompress_unknownOutputSize is totally equivalent to LZ4_decompress_safe |
| 2920 |
|
| */ |
| 2921 |
0 |
| int LZ4_uncompress (const char* source, char* dest, int outputSize) |
| 2922 |
|
| { |
| 2923 |
0 |
| return LZ4_decompress_fast(source, dest, outputSize); |
| 2924 |
|
| } |
| 2925 |
0 |
| int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize) |
| 2926 |
|
| { |
| 2927 |
0 |
| return LZ4_decompress_safe(source, dest, isize, maxOutputSize); |
| 2928 |
|
| } |
| 2929 |
|
| |
| 2930 |
|
| /* Obsolete Streaming functions */ |
| 2931 |
|
| |
| 2932 |
0 |
| int LZ4_sizeofStreamState(void) { return sizeof(LZ4_stream_t); } |
| 2933 |
|
| |
| 2934 |
0 |
| int LZ4_resetStreamState(void* state, char* inputBuffer) |
| 2935 |
|
| { |
| 2936 |
|
| (void)inputBuffer; |
| 2937 |
0 |
| LZ4_resetStream((LZ4_stream_t*)state); |
| 2938 |
0 |
| return 0; |
| 2939 |
|
| } |
| 2940 |
|
| |
| 2941 |
|
| #if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) |
| 2942 |
0 |
| void* LZ4_create (char* inputBuffer) |
| 2943 |
|
| { |
| 2944 |
|
| (void)inputBuffer; |
| 2945 |
0 |
| return LZ4_createStream(); |
| 2946 |
|
| } |
| 2947 |
|
| #endif |
| 2948 |
|
| |
| 2949 |
0 |
| char* LZ4_slideInputBuffer (void* state) |
| 2950 |
|
| { |
| 2951 |
|
| /* avoid const char * -> char * conversion warning */ |
| 2952 |
0 |
| return (char *)(uptrval)((LZ4_stream_t*)state)->internal_donotuse.dictionary; |
| 2953 |
|
| } |
| 2954 |
|
| |
| 2955 |
|
| #endif /* LZ4_COMMONDEFS_ONLY */ |