Lines Matching full:if
28 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 #if LV_USE_LZ4_INTERNAL
73 …* This method is safe if your compiler supports it, and *generally* as fast or faster t…
81 # if defined(__GNUC__) && \
92 * Define this parameter if your target system or compiler does not support hardware bit count
94 #if defined(_MSC_VER) && defined(_WIN32_WCE) /* Visual Studio for WinCE doesn't support Hardware …
128 #if defined(_MSC_VER) && (_MSC_VER >= 1400) /* Visual Studio 2005+ */
138 # if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99…
164 #if defined(__PPC64__) && defined(__LITTLE_ENDIAN__) && defined(__GNUC__) && !defined(__clang__)
172 #if (defined(__GNUC__) && (__GNUC__ >= 3)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 80…
211 #if defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
232 #if ! LZ4_FREESTANDING
235 #if !defined(LZ4_memset)
258 #if (LZ4_DISTANCE_MAX > LZ4_DISTANCE_ABSOLUTE_MAX) /* max supported by LZ4 format */
271 #if defined(LZ4_DEBUG) && (LZ4_DEBUG>=1)
281 #if defined(LZ4_DEBUG) && (LZ4_DEBUG>=2)
285 if ((g_debuglog_enable) && (l<=LZ4_DEBUG)) { \
304 #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
313 # if UINT_MAX != 4294967295UL
324 #if defined(__x86_64__)
346 * memcpy() as if it were standard compliant, so it can inline it in freestanding
349 #if !defined(LZ4_memcpy)
350 # if defined(__GNUC__) && (__GNUC__ >= 4)
357 #if !defined(LZ4_memmove)
358 # if defined(__GNUC__) && (__GNUC__ >= 4)
371 #if defined(__GNUC__) || defined(__INTEL_COMPILER)
377 #if defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS==2)
434 if (LZ4_isLittleEndian()) { in LZ4_readLE16()
444 if (LZ4_isLittleEndian()) { in LZ4_writeLE16()
469 # if defined __i386__ || defined _M_IX86 || defined __x86_64__ || defined _M_X64
483 #if LZ4_FAST_DEC_LOOP
489 if (offset < 8) { in LZ4_memcpy_using_offset_base()
538 #if defined(_MSC_VER) && (_MSC_VER <= 1937) /* MSVC 2022 ver 17.7 or earlier */ in LZ4_memcpy_using_offset()
543 #if defined(_MSC_VER) && (_MSC_VER <= 1937) /* MSVC 2022 ver 17.7 or earlier */ in LZ4_memcpy_using_offset()
572 if (LZ4_isLittleEndian()) { in LZ4_NbCommonBytes()
573 if (sizeof(val) == 8) { in LZ4_NbCommonBytes()
574 # if defined(_MSC_VER) && (_MSC_VER >= 1800) && (defined(_M_AMD64) && !defined(_M_ARM64EC)) &… in LZ4_NbCommonBytes()
580 # if defined(__clang__) && (__clang_major__ < 10) in LZ4_NbCommonBytes()
602 # if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(LZ4_FORCE_SW_BITCOUNT) in LZ4_NbCommonBytes()
616 if (sizeof(val)==8) { in LZ4_NbCommonBytes()
617 # if (defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 3) || \ in LZ4_NbCommonBytes()
622 #if 1 in LZ4_NbCommonBytes()
646 if (!(val>>by32)) { r=4; } else { r=0; val>>=by32; } in LZ4_NbCommonBytes()
647 if (!(val>>16)) { r+=2; val>>=8; } else { val>>=24; } in LZ4_NbCommonBytes()
653 # if (defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 3) || \ in LZ4_NbCommonBytes()
674 if (likely(pIn < pInLimit-(STEPSIZE-1))) { in LZ4_count()
676 if (!diff) { in LZ4_count()
684 if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } in LZ4_count()
689 …if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMat… in LZ4_count()
690 if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } in LZ4_count()
691 if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++; in LZ4_count()
748 #if defined (__cplusplus)
760 #if defined (__cplusplus)
769 if (tableType == byU16) in LZ4_hash4()
778 if (LZ4_isLittleEndian()) { in LZ4_hash5()
789 if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); in LZ4_hashPosition()
835 * Assumption 1 : only valid if tableType == byU32 or byU16.
841 if (tableType == byU32) { in LZ4_getIndexOnHash()
846 if (tableType == byU16) { in LZ4_getIndexOnHash()
872 /* If the table hasn't been used, it's guaranteed to be zeroed out, and is in LZ4_prepareTable()
874 * out if it's safe to leave as is or whether it needs to be reset. in LZ4_prepareTable()
876 if ((tableType_t)cctx->tableType != clearedTable) { in LZ4_prepareTable()
878 if ((tableType_t)cctx->tableType != tableType in LZ4_prepareTable()
898 if (cctx->currentOffset != 0 && tableType == byU32) { in LZ4_prepareTable()
966 …if (tableType == byU16) assert(inputSize<LZ4_64Klimit); /* Size too large (not within 64K limit) … in LZ4_compress_generic_validated()
967 … if (tableType == byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ in LZ4_compress_generic_validated()
968 /* If init conditions are not met, we don't have to mark stream in LZ4_compress_generic_validated()
970 …if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anyth… in LZ4_compress_generic_validated()
976 if (dictDirective == usingDictCtx) { in LZ4_compress_generic_validated()
987 …if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all l… in LZ4_compress_generic_validated()
991 if (tableType == byPtr) { in LZ4_compress_generic_validated()
1005 if (tableType == byPtr) { in LZ4_compress_generic_validated()
1015 if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; in LZ4_compress_generic_validated()
1040 if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; in LZ4_compress_generic_validated()
1043 if (dictDirective == usingDictCtx) { in LZ4_compress_generic_validated()
1044 if (matchIndex < startIndex) { in LZ4_compress_generic_validated()
1055 } else if (dictDirective == usingExtDict) { in LZ4_compress_generic_validated()
1056 if (matchIndex < startIndex) { in LZ4_compress_generic_validated()
1073 …if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside o… in LZ4_compress_generic_validated()
1075 if ( ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) in LZ4_compress_generic_validated()
1081 if (LZ4_read32(match) == LZ4_read32(ip)) { in LZ4_compress_generic_validated()
1082 if (maybe_extMem) offset = current - matchIndex; in LZ4_compress_generic_validated()
1092 if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) { in LZ4_compress_generic_validated()
1099 if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ in LZ4_compress_generic_validated()
1103 if ((outputDirective == fillOutput) && in LZ4_compress_generic_validated()
1108 if (litLength >= RUN_MASK) { in LZ4_compress_generic_validated()
1127 * - offset : if maybe_ext_memSegment==1 (constant) in LZ4_compress_generic_validated()
1132 if ((outputDirective == fillOutput) && in LZ4_compress_generic_validated()
1140 if (maybe_extMem) { /* static test */ in LZ4_compress_generic_validated()
1141 …DEBUGLOG(6, " with offset=%u (ext if > %i)", offset, (int)(ip - (const BYTE*)source)); in LZ4_compress_generic_validated()
1153 if ( (dictDirective==usingExtDict || dictDirective==usingDictCtx) in LZ4_compress_generic_validated()
1157 if (limit > matchlimit) limit = matchlimit; in LZ4_compress_generic_validated()
1160 if (ip==limit) { in LZ4_compress_generic_validated()
1172 if ((outputDirective) && /* Check output buffer overflow */ in LZ4_compress_generic_validated()
1174 if (outputDirective == fillOutput) { in LZ4_compress_generic_validated()
1180 if (unlikely(ip <= filledIp)) { in LZ4_compress_generic_validated()
1181 /* We have already filled up to filledIp so if ip ends up less than filledIp in LZ4_compress_generic_validated()
1183 … * a problem if we reuse the hash table. So we have to remove these positions in LZ4_compress_generic_validated()
1198 if (matchCode >= ML_MASK) { in LZ4_compress_generic_validated()
1218 if (ip >= mflimitPlusOne) break; in LZ4_compress_generic_validated()
1222 if (tableType == byPtr) { in LZ4_compress_generic_validated()
1230 if (tableType == byPtr) { in LZ4_compress_generic_validated()
1234 if ( (match+LZ4_DISTANCE_MAX >= ip) in LZ4_compress_generic_validated()
1244 if (dictDirective == usingDictCtx) { in LZ4_compress_generic_validated()
1245 if (matchIndex < startIndex) { in LZ4_compress_generic_validated()
1256 } else if (dictDirective==usingExtDict) { in LZ4_compress_generic_validated()
1257 if (matchIndex < startIndex) { in LZ4_compress_generic_validated()
1270 if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) in LZ4_compress_generic_validated()
1275 if (maybe_extMem) offset = current - matchIndex; in LZ4_compress_generic_validated()
1290 if ( (outputDirective) && /* Check output buffer overflow */ in LZ4_compress_generic_validated()
1292 if (outputDirective == fillOutput) { in LZ4_compress_generic_validated()
1303 if (lastRun >= RUN_MASK) { in LZ4_compress_generic_validated()
1316 if (outputDirective == fillOutput) { in LZ4_compress_generic_validated()
1345 …if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or n… in LZ4_compress_generic()
1346 if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ in LZ4_compress_generic()
1347 …if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anythi… in LZ4_compress_generic()
1352 if (outputDirective == fillOutput) { in LZ4_compress_generic()
1361 inputConsumed, /* only written into if outputDirective == fillOutput */ in LZ4_compress_generic()
1371 if (acceleration < 1) acceleration = LZ4_ACCELERATION_DEFAULT; in LZ4_compress_fast_extState()
1372 if (acceleration > LZ4_ACCELERATION_MAX) acceleration = LZ4_ACCELERATION_MAX; in LZ4_compress_fast_extState()
1373 if (maxOutputSize >= LZ4_compressBound(inputSize)) { in LZ4_compress_fast_extState()
1374 if (inputSize < LZ4_64Klimit) { in LZ4_compress_fast_extState()
1381 if (inputSize < LZ4_64Klimit) { in LZ4_compress_fast_extState()
1395 * to call if the state buffer is known to be correctly initialized already
1402 if (acceleration < 1) acceleration = LZ4_ACCELERATION_DEFAULT; in LZ4_compress_fast_extState_fastReset()
1403 if (acceleration > LZ4_ACCELERATION_MAX) acceleration = LZ4_ACCELERATION_MAX; in LZ4_compress_fast_extState_fastReset()
1406 if (dstCapacity >= LZ4_compressBound(srcSize)) { in LZ4_compress_fast_extState_fastReset()
1407 if (srcSize < LZ4_64Klimit) { in LZ4_compress_fast_extState_fastReset()
1410 if (ctx->currentOffset) { in LZ4_compress_fast_extState_fastReset()
1421 if (srcSize < LZ4_64Klimit) { in LZ4_compress_fast_extState_fastReset()
1424 if (ctx->currentOffset) { in LZ4_compress_fast_extState_fastReset()
1441 #if (LZ4_HEAPMODE) in LZ4_compress_fast()
1443 if (ctxPtr == NULL) return 0; in LZ4_compress_fast()
1450 #if (LZ4_HEAPMODE) in LZ4_compress_fast()
1471 if (targetDstSize >= LZ4_compressBound(*srcSizePtr)) { /* compression success is guaranteed */ in LZ4_compress_destSize_extState()
1474 if (*srcSizePtr < LZ4_64Klimit) { in LZ4_compress_destSize_extState()
1485 #if (LZ4_HEAPMODE) in LZ4_compress_destSize()
1487 if (ctx == NULL) return 0; in LZ4_compress_destSize()
1495 #if (LZ4_HEAPMODE) in LZ4_compress_destSize()
1507 #if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
1513 if (lz4s == NULL) return NULL; in LZ4_createStream()
1521 #if LZ4_ALIGN_TEST in LZ4_stream_t_alignment()
1532 if (buffer == NULL) { return NULL; } in LZ4_initStream()
1533 if (size < sizeof(LZ4_stream_t)) { return NULL; } in LZ4_initStream()
1534 if (!LZ4_isAligned(buffer, LZ4_stream_t_alignment())) return NULL; in LZ4_initStream()
1551 #if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
1554 if (!LZ4_stream) return 0; /* support free on NULL */ in LZ4_freeStream()
1579 /* We always increment the offset by 64 KB, since, if the dict is longer, in LZ4_loadDict()
1580 * we truncate it to the last 64k, and if it's shorter, we still want to in LZ4_loadDict()
1587 if (dictSize < (int)HASH_UNIT) { in LZ4_loadDict()
1591 if ((dictEnd - p) > 64 KB) p = dictEnd - 64 KB; in LZ4_loadDict()
1615 if (dictCtx != NULL) { in LZ4_attach_dictionary()
1616 /* If the current offset is zero, we will never look in the in LZ4_attach_dictionary()
1621 if (workingStream->internal_donotuse.currentOffset == 0) { in LZ4_attach_dictionary()
1627 if (dictCtx->dictSize == 0) { in LZ4_attach_dictionary()
1638 …if (LZ4_dict->currentOffset + (unsigned)nextSize > 0x80000000) { /* potential ptrdiff_t overflow… in LZ4_renormDictT()
1645 if (LZ4_dict->hashTable[i] < delta) LZ4_dict->hashTable[i]=0; in LZ4_renormDictT()
1649 if (LZ4_dict->dictSize > 64 KB) LZ4_dict->dictSize = 64 KB; in LZ4_renormDictT()
1667 if (acceleration < 1) acceleration = LZ4_ACCELERATION_DEFAULT; in LZ4_compress_fast_continue()
1668 if (acceleration > LZ4_ACCELERATION_MAX) acceleration = LZ4_ACCELERATION_MAX; in LZ4_compress_fast_continue()
1671 if ( (streamPtr->dictSize < 4) /* tiny dictionary : not enough for a hash */ in LZ4_compress_fast_continue()
1685 if ((sourceEnd > (const char*)streamPtr->dictionary) && (sourceEnd < dictEnd)) { in LZ4_compress_fast_continue()
1687 if (streamPtr->dictSize > 64 KB) streamPtr->dictSize = 64 KB; in LZ4_compress_fast_continue()
1688 if (streamPtr->dictSize < 4) streamPtr->dictSize = 0; in LZ4_compress_fast_continue()
1694 if (dictEnd == source) { in LZ4_compress_fast_continue()
1695 if ((streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset)) in LZ4_compress_fast_continue()
1703 if (streamPtr->dictCtx) { in LZ4_compress_fast_continue()
1710 if (inputSize > 4 KB) { in LZ4_compress_fast_continue()
1721 if ((streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset)) { in LZ4_compress_fast_continue()
1742 if ((streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset)) { in LZ4_compress_forceExtDict()
1756 …* If previously compressed data block is not guaranteed to remain available at its memory locatio…
1760 * @return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error.
1768 if ((U32)dictSize > 64 KB) { dictSize = 64 KB; } /* useless to define a dictionary > 64 KB */ in LZ4_saveDict()
1769 if ((U32)dictSize > dict->dictSize) { dictSize = (int)dict->dictSize; } in LZ4_saveDict()
1771 if (safeBuffer == NULL) assert(dictSize == 0); in LZ4_saveDict()
1772 if (dictSize > 0) { in LZ4_saveDict()
1824 const BYTE* const dictStart, /* only if dict==usingExtDict */ in LZ4_decompress_unsafe_generic()
1825 const size_t dictSize /* note: =0 if dictStart==NULL */ in LZ4_decompress_unsafe_generic()
1834 if (dictStart == NULL) assert(dictSize == 0); in LZ4_decompress_unsafe_generic()
1842 if (ll==15) { in LZ4_decompress_unsafe_generic()
1846 if ((size_t)(oend-op) < ll) return -1; /* output buffer overflow */ in LZ4_decompress_unsafe_generic()
1850 if ((size_t)(oend-op) < MFLIMIT) { in LZ4_decompress_unsafe_generic()
1851 if (op==oend) break; /* end of block */ in LZ4_decompress_unsafe_generic()
1863 if (ml==15) { in LZ4_decompress_unsafe_generic()
1869 if ((size_t)(oend-op) < ml) return -1; /* output buffer overflow */ in LZ4_decompress_unsafe_generic()
1874 if (offset > (size_t)(op - prefixStart) + dictSize) { in LZ4_decompress_unsafe_generic()
1880 if (offset > (size_t)(op - prefixStart)) { in LZ4_decompress_unsafe_generic()
1885 if (extml > ml) { in LZ4_decompress_unsafe_generic()
1905 if ((size_t)(oend-op) < LASTLITERALS) { in LZ4_decompress_unsafe_generic()
1920 * @ilimit : position after which if length is not decoded, the input is necessarily corrupted.
1921 * @initial_check - check ip >= ipmax before start of loop. Returns initial_error if so.
1934 if (initial_check && unlikely((*ip) >= ilimit)) { /* read limit reached */ in read_variable_length()
1941 if (unlikely((*ip) > ilimit)) { /* read limit reached */ in read_variable_length()
1945 if ((sizeof(length)<8) && unlikely(length > ((Rvl_t)(-1)/2)) ) { in read_variable_length()
1964 … int outputSize, /* If endOnInput==endOnInputSize, this value is `dstCapacity` */ in LZ4_decompress_generic()
1969 const BYTE* const dictStart, /* only if dict==usingExtDict */ in LZ4_decompress_generic()
1970 const size_t dictSize /* note : = 0 if noDict */ in LZ4_decompress_generic()
1973 if ((src == NULL) || (outputSize < 0)) { return -1; } in LZ4_decompress_generic()
2001 if (unlikely(outputSize==0)) { in LZ4_decompress_generic()
2003 if (partialDecoding) return 0; in LZ4_decompress_generic()
2006 if (unlikely(srcSize==0)) { return -1; } in LZ4_decompress_generic()
2012 #if LZ4_FAST_DEC_LOOP in LZ4_decompress_generic()
2013 if ((oend - op) < FASTLOOP_SAFE_DISTANCE) { in LZ4_decompress_generic()
2028 if (length == RUN_MASK) { in LZ4_decompress_generic()
2030 if (addl == rvl_error) { in LZ4_decompress_generic()
2035 … if (unlikely((uptrval)(op)+length<(uptrval)(op))) { goto _output_error; } /* overflow detection */ in LZ4_decompress_generic()
2036 … if (unlikely((uptrval)(ip)+length<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ in LZ4_decompress_generic()
2040 if ((op+length>oend-32) || (ip+length>iend-32)) { goto safe_literal_copy; } in LZ4_decompress_generic()
2043 } else if (ip <= iend-(16 + 1/*max lit + offset + nextToken*/)) { in LZ4_decompress_generic()
2062 if (length == ML_MASK) { in LZ4_decompress_generic()
2064 if (addl == rvl_error) { in LZ4_decompress_generic()
2070 … if (unlikely((uptrval)(op)+length<(uptrval)op)) { goto _output_error; } /* overflow detection */ in LZ4_decompress_generic()
2071 if (op + length >= oend - FASTLOOP_SAFE_DISTANCE) { in LZ4_decompress_generic()
2076 if (op + length >= oend - FASTLOOP_SAFE_DISTANCE) { in LZ4_decompress_generic()
2081 if ((dict == withPrefix64k) || (match >= lowPrefix)) { in LZ4_decompress_generic()
2082 if (offset >= 8) { in LZ4_decompress_generic()
2094 if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { in LZ4_decompress_generic()
2099 if ((dict==usingExtDict) && (match < lowPrefix)) { in LZ4_decompress_generic()
2101 if (unlikely(op+length > oend-LASTLITERALS)) { in LZ4_decompress_generic()
2102 if (partialDecoding) { in LZ4_decompress_generic()
2110 if (length <= (size_t)(lowPrefix-match)) { in LZ4_decompress_generic()
2120 if (restSize > (size_t)(op - lowPrefix)) { /* overlap copy */ in LZ4_decompress_generic()
2135 if (unlikely(offset<16)) { in LZ4_decompress_generic()
2154 * 1) If the literal length is 0..14, and there is enough space, in LZ4_decompress_generic()
2157 * 2) Further if the match length is 4..18, copy 18 bytes in a similar in LZ4_decompress_generic()
2162 if ( (length != RUN_MASK) in LZ4_decompress_generic()
2170 * If it doesn't work out, the info won't be wasted. */ in LZ4_decompress_generic()
2177 if ( (length != ML_MASK) in LZ4_decompress_generic()
2195 if (length == RUN_MASK) { in LZ4_decompress_generic()
2197 if (addl == rvl_error) { goto _output_error; } in LZ4_decompress_generic()
2199 … if (unlikely((uptrval)(op)+length<(uptrval)(op))) { goto _output_error; } /* overflow detection */ in LZ4_decompress_generic()
2200 … if (unlikely((uptrval)(ip)+length<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ in LZ4_decompress_generic()
2203 #if LZ4_FAST_DEC_LOOP in LZ4_decompress_generic()
2210 if ((cpy>oend-MFLIMIT) || (ip+length>iend-(2+1+LASTLITERALS))) { in LZ4_decompress_generic()
2216 if (partialDecoding) { in LZ4_decompress_generic()
2227 if (ip+length > iend) { in LZ4_decompress_generic()
2234 if (cpy > oend) { in LZ4_decompress_generic()
2243 if ((ip+length != iend) || (cpy > oend)) { in LZ4_decompress_generic()
2254 * When partialDecoding, it is EOF if we've either in LZ4_decompress_generic()
2258 if (!partialDecoding || (cpy == oend) || (ip >= (iend-2))) { in LZ4_decompress_generic()
2274 if (length == ML_MASK) { in LZ4_decompress_generic()
2276 if (addl == rvl_error) { goto _output_error; } in LZ4_decompress_generic()
2278 … if (unlikely((uptrval)(op)+length<(uptrval)op)) goto _output_error; /* overflow detection */ in LZ4_decompress_generic()
2282 #if LZ4_FAST_DEC_LOOP in LZ4_decompress_generic()
2285 …if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _output_error; /* Error : of… in LZ4_decompress_generic()
2287 if ((dict==usingExtDict) && (match < lowPrefix)) { in LZ4_decompress_generic()
2289 if (unlikely(op+length > oend-LASTLITERALS)) { in LZ4_decompress_generic()
2290 if (partialDecoding) length = MIN(length, (size_t)(oend-op)); in LZ4_decompress_generic()
2294 if (length <= (size_t)(lowPrefix-match)) { in LZ4_decompress_generic()
2304 if (restSize > (size_t)(op - lowPrefix)) { /* overlap copy */ in LZ4_decompress_generic()
2321 if (partialDecoding && (cpy > oend-MATCH_SAFEGUARD_DISTANCE)) { in LZ4_decompress_generic()
2325 if (matchEnd > op) { /* overlap copy */ in LZ4_decompress_generic()
2331 if (op == oend) { break; } in LZ4_decompress_generic()
2335 if (unlikely(offset<8)) { in LZ4_decompress_generic()
2350 if (unlikely(cpy > oend-MATCH_SAFEGUARD_DISTANCE)) { in LZ4_decompress_generic()
2352 …if (cpy > oend-LASTLITERALS) { goto _output_error; } /* Error : last LASTLITERALS bytes must be li… in LZ4_decompress_generic()
2353 if (op < oCopyLimit) { in LZ4_decompress_generic()
2361 if (length > 16) { LZ4_wildCopy8(op+8, match+8, cpy); } in LZ4_decompress_generic()
2497 #if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
2506 if (LZ4_stream == NULL) { return 0; } /* support free on NULL */ in LZ4_freeStreamDecode()
2514 * This function is not necessary if previous data is still available where it was decoded.
2516 * @return : 1 if OK, 0 if error
2522 if (dictSize) { in LZ4_setStreamDecode()
2542 * or 0 if there is an error (invalid maxBlockSize).
2546 if (maxBlockSize < 0) return 0; in LZ4_decoderRingBufferSize()
2547 if (maxBlockSize > LZ4_MAX_INPUT_SIZE) return 0; in LZ4_decoderRingBufferSize()
2548 if (maxBlockSize < 16) maxBlockSize = 16; in LZ4_decoderRingBufferSize()
2556 If it's not possible, save the relevant part of decoded data into a safe buffer,
2565 if (lz4sd->prefixSize == 0) { in LZ4_decompress_safe_continue()
2569 if (result <= 0) return result; in LZ4_decompress_safe_continue()
2572 } else if (lz4sd->prefixEnd == (BYTE*)dest) { in LZ4_decompress_safe_continue()
2574 if (lz4sd->prefixSize >= 64 KB - 1) in LZ4_decompress_safe_continue()
2576 else if (lz4sd->extDictSize == 0) in LZ4_decompress_safe_continue()
2582 if (result <= 0) return result; in LZ4_decompress_safe_continue()
2591 if (result <= 0) return result; in LZ4_decompress_safe_continue()
2610 if (lz4sd->prefixSize == 0) { in LZ4_decompress_fast_continue()
2614 if (result <= 0) return result; in LZ4_decompress_fast_continue()
2617 } else if (lz4sd->prefixEnd == (BYTE*)dest) { in LZ4_decompress_fast_continue()
2623 if (result <= 0) return result; in LZ4_decompress_fast_continue()
2632 if (result <= 0) return result; in LZ4_decompress_fast_continue()
2650 if (dictSize==0) in LZ4_decompress_safe_usingDict()
2652 if (dictStart+dictSize == dest) { in LZ4_decompress_safe_usingDict()
2653 if (dictSize >= 64 KB - 1) { in LZ4_decompress_safe_usingDict()
2665 if (dictSize==0) in LZ4_decompress_safe_partial_usingDict()
2667 if (dictStart+dictSize == dest) { in LZ4_decompress_safe_partial_usingDict()
2668 if (dictSize >= 64 KB - 1) { in LZ4_decompress_safe_partial_usingDict()
2680 if (dictSize==0 || dictStart+dictSize == dest) in LZ4_decompress_fast_usingDict()
2744 #if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)