• Home
  • Raw
  • Download

Lines Matching refs:ip

940 static size_t ZSTD_count_2segments(const BYTE *ip, const BYTE *match, const BYTE *iEnd, const BYTE …  in ZSTD_count_2segments()  argument
942 const BYTE *const vEnd = MIN(ip + (mEnd - match), iEnd); in ZSTD_count_2segments()
943 size_t const matchLength = ZSTD_count(ip, match, vEnd); in ZSTD_count_2segments()
946 return matchLength + ZSTD_count(ip + matchLength, iStart, iEnd); in ZSTD_count_2segments()
997 const BYTE *ip = base + zc->nextToUpdate; in ZSTD_fillHashTable() local
1001 while (ip <= iend) { in ZSTD_fillHashTable()
1002 hashTable[ZSTD_hashPtr(ip, hBits, mls)] = (U32)(ip - base); in ZSTD_fillHashTable()
1003 ip += fastHashFillStep; in ZSTD_fillHashTable()
1015 const BYTE *ip = istart; in ZSTD_compressBlock_fast_generic() local
1025 ip += (ip == lowest); in ZSTD_compressBlock_fast_generic()
1027 U32 const maxRep = (U32)(ip - lowest); in ZSTD_compressBlock_fast_generic()
1035 while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */ in ZSTD_compressBlock_fast_generic()
1037 size_t const h = ZSTD_hashPtr(ip, hBits, mls); in ZSTD_compressBlock_fast_generic()
1038 U32 const curr = (U32)(ip - base); in ZSTD_compressBlock_fast_generic()
1043 if ((offset_1 > 0) & (ZSTD_read32(ip + 1 - offset_1) == ZSTD_read32(ip + 1))) { in ZSTD_compressBlock_fast_generic()
1044 mLength = ZSTD_count(ip + 1 + 4, ip + 1 + 4 - offset_1, iend) + 4; in ZSTD_compressBlock_fast_generic()
1045 ip++; in ZSTD_compressBlock_fast_generic()
1046 ZSTD_storeSeq(seqStorePtr, ip - anchor, anchor, 0, mLength - MINMATCH); in ZSTD_compressBlock_fast_generic()
1049 if ((matchIndex <= lowestIndex) || (ZSTD_read32(match) != ZSTD_read32(ip))) { in ZSTD_compressBlock_fast_generic()
1050 ip += ((ip - anchor) >> g_searchStrength) + 1; in ZSTD_compressBlock_fast_generic()
1053 mLength = ZSTD_count(ip + 4, match + 4, iend) + 4; in ZSTD_compressBlock_fast_generic()
1054 offset = (U32)(ip - match); in ZSTD_compressBlock_fast_generic()
1055 while (((ip > anchor) & (match > lowest)) && (ip[-1] == match[-1])) { in ZSTD_compressBlock_fast_generic()
1056 ip--; in ZSTD_compressBlock_fast_generic()
1063 ZSTD_storeSeq(seqStorePtr, ip - anchor, anchor, offset + ZSTD_REP_MOVE, mLength - MINMATCH); in ZSTD_compressBlock_fast_generic()
1067 ip += mLength; in ZSTD_compressBlock_fast_generic()
1068 anchor = ip; in ZSTD_compressBlock_fast_generic()
1070 if (ip <= ilimit) { in ZSTD_compressBlock_fast_generic()
1073 hashTable[ZSTD_hashPtr(ip - 2, hBits, mls)] = (U32)(ip - 2 - base); in ZSTD_compressBlock_fast_generic()
1075 while ((ip <= ilimit) && ((offset_2 > 0) & (ZSTD_read32(ip) == ZSTD_read32(ip - offset_2)))) { in ZSTD_compressBlock_fast_generic()
1077 size_t const rLength = ZSTD_count(ip + 4, ip + 4 - offset_2, iend) + 4; in ZSTD_compressBlock_fast_generic()
1083 hashTable[ZSTD_hashPtr(ip, hBits, mls)] = (U32)(ip - base); in ZSTD_compressBlock_fast_generic()
1085 ip += rLength; in ZSTD_compressBlock_fast_generic()
1086 anchor = ip; in ZSTD_compressBlock_fast_generic()
1124 const BYTE *ip = istart; in ZSTD_compressBlock_fast_extDict_generic() local
1136 while (ip < ilimit) { /* < instead of <=, because (ip+1) */ in ZSTD_compressBlock_fast_extDict_generic()
1137 const size_t h = ZSTD_hashPtr(ip, hBits, mls); in ZSTD_compressBlock_fast_extDict_generic()
1141 const U32 curr = (U32)(ip - base); in ZSTD_compressBlock_fast_extDict_generic()
1149 (ZSTD_read32(repMatch) == ZSTD_read32(ip + 1))) { in ZSTD_compressBlock_fast_extDict_generic()
1151 …mLength = ZSTD_count_2segments(ip + 1 + EQUAL_READ32, repMatch + EQUAL_READ32, iend, repMatchEnd, … in ZSTD_compressBlock_fast_extDict_generic()
1152 ip++; in ZSTD_compressBlock_fast_extDict_generic()
1153 ZSTD_storeSeq(seqStorePtr, ip - anchor, anchor, 0, mLength - MINMATCH); in ZSTD_compressBlock_fast_extDict_generic()
1155 if ((matchIndex < lowestIndex) || (ZSTD_read32(match) != ZSTD_read32(ip))) { in ZSTD_compressBlock_fast_extDict_generic()
1156 ip += ((ip - anchor) >> g_searchStrength) + 1; in ZSTD_compressBlock_fast_extDict_generic()
1163 …mLength = ZSTD_count_2segments(ip + EQUAL_READ32, match + EQUAL_READ32, iend, matchEnd, lowPrefixP… in ZSTD_compressBlock_fast_extDict_generic()
1164 while (((ip > anchor) & (match > lowMatchPtr)) && (ip[-1] == match[-1])) { in ZSTD_compressBlock_fast_extDict_generic()
1165 ip--; in ZSTD_compressBlock_fast_extDict_generic()
1172 ZSTD_storeSeq(seqStorePtr, ip - anchor, anchor, offset + ZSTD_REP_MOVE, mLength - MINMATCH); in ZSTD_compressBlock_fast_extDict_generic()
1177 ip += mLength; in ZSTD_compressBlock_fast_extDict_generic()
1178 anchor = ip; in ZSTD_compressBlock_fast_extDict_generic()
1180 if (ip <= ilimit) { in ZSTD_compressBlock_fast_extDict_generic()
1183 hashTable[ZSTD_hashPtr(ip - 2, hBits, mls)] = (U32)(ip - 2 - base); in ZSTD_compressBlock_fast_extDict_generic()
1185 while (ip <= ilimit) { in ZSTD_compressBlock_fast_extDict_generic()
1186 U32 const curr2 = (U32)(ip - base); in ZSTD_compressBlock_fast_extDict_generic()
1190 && (ZSTD_read32(repMatch2) == ZSTD_read32(ip))) { in ZSTD_compressBlock_fast_extDict_generic()
1193 …ZSTD_count_2segments(ip + EQUAL_READ32, repMatch2 + EQUAL_READ32, iend, repEnd2, lowPrefixPtr) + E… in ZSTD_compressBlock_fast_extDict_generic()
1198 hashTable[ZSTD_hashPtr(ip, hBits, mls)] = curr2; in ZSTD_compressBlock_fast_extDict_generic()
1199 ip += repLength2; in ZSTD_compressBlock_fast_extDict_generic()
1200 anchor = ip; in ZSTD_compressBlock_fast_extDict_generic()
1242 const BYTE *ip = base + cctx->nextToUpdate; in ZSTD_fillDoubleHashTable() local
1246 while (ip <= iend) { in ZSTD_fillDoubleHashTable()
1247 hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = (U32)(ip - base); in ZSTD_fillDoubleHashTable()
1248 hashLarge[ZSTD_hashPtr(ip, hBitsL, 8)] = (U32)(ip - base); in ZSTD_fillDoubleHashTable()
1249 ip += fastHashFillStep; in ZSTD_fillDoubleHashTable()
1263 const BYTE *ip = istart; in ZSTD_compressBlock_doubleFast_generic() local
1273 ip += (ip == lowest); in ZSTD_compressBlock_doubleFast_generic()
1275 U32 const maxRep = (U32)(ip - lowest); in ZSTD_compressBlock_doubleFast_generic()
1283 while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */ in ZSTD_compressBlock_doubleFast_generic()
1285 size_t const h2 = ZSTD_hashPtr(ip, hBitsL, 8); in ZSTD_compressBlock_doubleFast_generic()
1286 size_t const h = ZSTD_hashPtr(ip, hBitsS, mls); in ZSTD_compressBlock_doubleFast_generic()
1287 U32 const curr = (U32)(ip - base); in ZSTD_compressBlock_doubleFast_generic()
1294 …if ((offset_1 > 0) & (ZSTD_read32(ip + 1 - offset_1) == ZSTD_read32(ip + 1))) { /* note : by const… in ZSTD_compressBlock_doubleFast_generic()
1295 mLength = ZSTD_count(ip + 1 + 4, ip + 1 + 4 - offset_1, iend) + 4; in ZSTD_compressBlock_doubleFast_generic()
1296 ip++; in ZSTD_compressBlock_doubleFast_generic()
1297 ZSTD_storeSeq(seqStorePtr, ip - anchor, anchor, 0, mLength - MINMATCH); in ZSTD_compressBlock_doubleFast_generic()
1300 if ((matchIndexL > lowestIndex) && (ZSTD_read64(matchLong) == ZSTD_read64(ip))) { in ZSTD_compressBlock_doubleFast_generic()
1301 mLength = ZSTD_count(ip + 8, matchLong + 8, iend) + 8; in ZSTD_compressBlock_doubleFast_generic()
1302 offset = (U32)(ip - matchLong); in ZSTD_compressBlock_doubleFast_generic()
1303 while (((ip > anchor) & (matchLong > lowest)) && (ip[-1] == matchLong[-1])) { in ZSTD_compressBlock_doubleFast_generic()
1304 ip--; in ZSTD_compressBlock_doubleFast_generic()
1308 } else if ((matchIndexS > lowestIndex) && (ZSTD_read32(match) == ZSTD_read32(ip))) { in ZSTD_compressBlock_doubleFast_generic()
1309 size_t const h3 = ZSTD_hashPtr(ip + 1, hBitsL, 8); in ZSTD_compressBlock_doubleFast_generic()
1313 if ((matchIndex3 > lowestIndex) && (ZSTD_read64(match3) == ZSTD_read64(ip + 1))) { in ZSTD_compressBlock_doubleFast_generic()
1314 mLength = ZSTD_count(ip + 9, match3 + 8, iend) + 8; in ZSTD_compressBlock_doubleFast_generic()
1315 ip++; in ZSTD_compressBlock_doubleFast_generic()
1316 offset = (U32)(ip - match3); in ZSTD_compressBlock_doubleFast_generic()
1317 while (((ip > anchor) & (match3 > lowest)) && (ip[-1] == match3[-1])) { in ZSTD_compressBlock_doubleFast_generic()
1318 ip--; in ZSTD_compressBlock_doubleFast_generic()
1323 mLength = ZSTD_count(ip + 4, match + 4, iend) + 4; in ZSTD_compressBlock_doubleFast_generic()
1324 offset = (U32)(ip - match); in ZSTD_compressBlock_doubleFast_generic()
1325 while (((ip > anchor) & (match > lowest)) && (ip[-1] == match[-1])) { in ZSTD_compressBlock_doubleFast_generic()
1326 ip--; in ZSTD_compressBlock_doubleFast_generic()
1332 ip += ((ip - anchor) >> g_searchStrength) + 1; in ZSTD_compressBlock_doubleFast_generic()
1339 ZSTD_storeSeq(seqStorePtr, ip - anchor, anchor, offset + ZSTD_REP_MOVE, mLength - MINMATCH); in ZSTD_compressBlock_doubleFast_generic()
1343 ip += mLength; in ZSTD_compressBlock_doubleFast_generic()
1344 anchor = ip; in ZSTD_compressBlock_doubleFast_generic()
1346 if (ip <= ilimit) { in ZSTD_compressBlock_doubleFast_generic()
1350 …hashLong[ZSTD_hashPtr(ip - 2, hBitsL, 8)] = hashSmall[ZSTD_hashPtr(ip - 2, hBitsS, mls)] = (U32)(i… in ZSTD_compressBlock_doubleFast_generic()
1353 while ((ip <= ilimit) && ((offset_2 > 0) & (ZSTD_read32(ip) == ZSTD_read32(ip - offset_2)))) { in ZSTD_compressBlock_doubleFast_generic()
1355 size_t const rLength = ZSTD_count(ip + 4, ip + 4 - offset_2, iend) + 4; in ZSTD_compressBlock_doubleFast_generic()
1361 hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = (U32)(ip - base); in ZSTD_compressBlock_doubleFast_generic()
1362 hashLong[ZSTD_hashPtr(ip, hBitsL, 8)] = (U32)(ip - base); in ZSTD_compressBlock_doubleFast_generic()
1364 ip += rLength; in ZSTD_compressBlock_doubleFast_generic()
1365 anchor = ip; in ZSTD_compressBlock_doubleFast_generic()
1405 const BYTE *ip = istart; in ZSTD_compressBlock_doubleFast_extDict_generic() local
1417 while (ip < ilimit) { /* < instead of <=, because (ip+1) */ in ZSTD_compressBlock_doubleFast_extDict_generic()
1418 const size_t hSmall = ZSTD_hashPtr(ip, hBitsS, mls); in ZSTD_compressBlock_doubleFast_extDict_generic()
1423 const size_t hLong = ZSTD_hashPtr(ip, hBitsL, 8); in ZSTD_compressBlock_doubleFast_extDict_generic()
1428 const U32 curr = (U32)(ip - base); in ZSTD_compressBlock_doubleFast_extDict_generic()
1436 (ZSTD_read32(repMatch) == ZSTD_read32(ip + 1))) { in ZSTD_compressBlock_doubleFast_extDict_generic()
1438 mLength = ZSTD_count_2segments(ip + 1 + 4, repMatch + 4, iend, repMatchEnd, lowPrefixPtr) + 4; in ZSTD_compressBlock_doubleFast_extDict_generic()
1439 ip++; in ZSTD_compressBlock_doubleFast_extDict_generic()
1440 ZSTD_storeSeq(seqStorePtr, ip - anchor, anchor, 0, mLength - MINMATCH); in ZSTD_compressBlock_doubleFast_extDict_generic()
1442 if ((matchLongIndex > lowestIndex) && (ZSTD_read64(matchLong) == ZSTD_read64(ip))) { in ZSTD_compressBlock_doubleFast_extDict_generic()
1446 mLength = ZSTD_count_2segments(ip + 8, matchLong + 8, iend, matchEnd, lowPrefixPtr) + 8; in ZSTD_compressBlock_doubleFast_extDict_generic()
1448 while (((ip > anchor) & (matchLong > lowMatchPtr)) && (ip[-1] == matchLong[-1])) { in ZSTD_compressBlock_doubleFast_extDict_generic()
1449 ip--; in ZSTD_compressBlock_doubleFast_extDict_generic()
1455 ZSTD_storeSeq(seqStorePtr, ip - anchor, anchor, offset + ZSTD_REP_MOVE, mLength - MINMATCH); in ZSTD_compressBlock_doubleFast_extDict_generic()
1457 } else if ((matchIndex > lowestIndex) && (ZSTD_read32(match) == ZSTD_read32(ip))) { in ZSTD_compressBlock_doubleFast_extDict_generic()
1458 size_t const h3 = ZSTD_hashPtr(ip + 1, hBitsL, 8); in ZSTD_compressBlock_doubleFast_extDict_generic()
1464 if ((matchIndex3 > lowestIndex) && (ZSTD_read64(match3) == ZSTD_read64(ip + 1))) { in ZSTD_compressBlock_doubleFast_extDict_generic()
1467 mLength = ZSTD_count_2segments(ip + 9, match3 + 8, iend, matchEnd, lowPrefixPtr) + 8; in ZSTD_compressBlock_doubleFast_extDict_generic()
1468 ip++; in ZSTD_compressBlock_doubleFast_extDict_generic()
1470 while (((ip > anchor) & (match3 > lowMatchPtr)) && (ip[-1] == match3[-1])) { in ZSTD_compressBlock_doubleFast_extDict_generic()
1471 ip--; in ZSTD_compressBlock_doubleFast_extDict_generic()
1478 mLength = ZSTD_count_2segments(ip + 4, match + 4, iend, matchEnd, lowPrefixPtr) + 4; in ZSTD_compressBlock_doubleFast_extDict_generic()
1480 while (((ip > anchor) & (match > lowMatchPtr)) && (ip[-1] == match[-1])) { in ZSTD_compressBlock_doubleFast_extDict_generic()
1481 ip--; in ZSTD_compressBlock_doubleFast_extDict_generic()
1488 ZSTD_storeSeq(seqStorePtr, ip - anchor, anchor, offset + ZSTD_REP_MOVE, mLength - MINMATCH); in ZSTD_compressBlock_doubleFast_extDict_generic()
1491 ip += ((ip - anchor) >> g_searchStrength) + 1; in ZSTD_compressBlock_doubleFast_extDict_generic()
1497 ip += mLength; in ZSTD_compressBlock_doubleFast_extDict_generic()
1498 anchor = ip; in ZSTD_compressBlock_doubleFast_extDict_generic()
1500 if (ip <= ilimit) { in ZSTD_compressBlock_doubleFast_extDict_generic()
1504 hashSmall[ZSTD_hashPtr(ip - 2, hBitsS, mls)] = (U32)(ip - 2 - base); in ZSTD_compressBlock_doubleFast_extDict_generic()
1505 hashLong[ZSTD_hashPtr(ip - 2, hBitsL, 8)] = (U32)(ip - 2 - base); in ZSTD_compressBlock_doubleFast_extDict_generic()
1507 while (ip <= ilimit) { in ZSTD_compressBlock_doubleFast_extDict_generic()
1508 U32 const curr2 = (U32)(ip - base); in ZSTD_compressBlock_doubleFast_extDict_generic()
1512 && (ZSTD_read32(repMatch2) == ZSTD_read32(ip))) { in ZSTD_compressBlock_doubleFast_extDict_generic()
1515 …ZSTD_count_2segments(ip + EQUAL_READ32, repMatch2 + EQUAL_READ32, iend, repEnd2, lowPrefixPtr) + E… in ZSTD_compressBlock_doubleFast_extDict_generic()
1520 hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = curr2; in ZSTD_compressBlock_doubleFast_extDict_generic()
1521 hashLong[ZSTD_hashPtr(ip, hBitsL, 8)] = curr2; in ZSTD_compressBlock_doubleFast_extDict_generic()
1522 ip += repLength2; in ZSTD_compressBlock_doubleFast_extDict_generic()
1523 anchor = ip; in ZSTD_compressBlock_doubleFast_extDict_generic()
1561 static U32 ZSTD_insertBt1(ZSTD_CCtx *zc, const BYTE *const ip, const U32 mls, const BYTE *const ien… in ZSTD_insertBt1() argument
1565 size_t const h = ZSTD_hashPtr(ip, hashLog, mls); in ZSTD_insertBt1()
1577 const U32 curr = (U32)(ip - base); in ZSTD_insertBt1()
1594 if (match[matchLength] == ip[matchLength]) in ZSTD_insertBt1()
1595 matchLength += ZSTD_count(ip + matchLength + 1, match + matchLength + 1, iend) + 1; in ZSTD_insertBt1()
1598 …matchLength += ZSTD_count_2segments(ip + matchLength, match + matchLength, iend, dictEnd, prefixSt… in ZSTD_insertBt1()
1609 if (ip + matchLength == iend) /* equal : no way to know if inf or sup */ in ZSTD_insertBt1()
1612 if (match[matchLength] < ip[matchLength]) { /* necessarily within correct buffer */ in ZSTD_insertBt1()
1643 static size_t ZSTD_insertBtAndFindBestMatch(ZSTD_CCtx *zc, const BYTE *const ip, const BYTE *const … in ZSTD_insertBtAndFindBestMatch() argument
1648 size_t const h = ZSTD_hashPtr(ip, hashLog, mls); in ZSTD_insertBtAndFindBestMatch()
1659 const U32 curr = (U32)(ip - base); in ZSTD_insertBtAndFindBestMatch()
1677 if (match[matchLength] == ip[matchLength]) in ZSTD_insertBtAndFindBestMatch()
1678 matchLength += ZSTD_count(ip + matchLength + 1, match + matchLength + 1, iend) + 1; in ZSTD_insertBtAndFindBestMatch()
1681 …matchLength += ZSTD_count_2segments(ip + matchLength, match + matchLength, iend, dictEnd, prefixSt… in ZSTD_insertBtAndFindBestMatch()
1691 if (ip + matchLength == iend) /* equal : no way to know if inf or sup */ in ZSTD_insertBtAndFindBestMatch()
1695 if (match[matchLength] < ip[matchLength]) { in ZSTD_insertBtAndFindBestMatch()
1724 static void ZSTD_updateTree(ZSTD_CCtx *zc, const BYTE *const ip, const BYTE *const iend, const U32 … in ZSTD_updateTree() argument
1727 const U32 target = (U32)(ip - base); in ZSTD_updateTree()
1735 static size_t ZSTD_BtFindBestMatch(ZSTD_CCtx *zc, const BYTE *const ip, const BYTE *const iLimit, s… in ZSTD_BtFindBestMatch() argument
1737 if (ip < zc->base + zc->nextToUpdate) in ZSTD_BtFindBestMatch()
1739 ZSTD_updateTree(zc, ip, iLimit, maxNbAttempts, mls); in ZSTD_BtFindBestMatch()
1740 return ZSTD_insertBtAndFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, mls, 0); in ZSTD_BtFindBestMatch()
1744 …const BYTE *ip, const BYTE *const iLimit, size_t *offsetPtr, const U32 maxNbAttempts, const U32 ma… in ZSTD_BtFindBestMatch_selectMLS() argument
1748 case 4: return ZSTD_BtFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, 4); in ZSTD_BtFindBestMatch_selectMLS()
1749 case 5: return ZSTD_BtFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, 5); in ZSTD_BtFindBestMatch_selectMLS()
1751 case 6: return ZSTD_BtFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, 6); in ZSTD_BtFindBestMatch_selectMLS()
1755 static void ZSTD_updateTree_extDict(ZSTD_CCtx *zc, const BYTE *const ip, const BYTE *const iend, co… in ZSTD_updateTree_extDict() argument
1758 const U32 target = (U32)(ip - base); in ZSTD_updateTree_extDict()
1766 static size_t ZSTD_BtFindBestMatch_extDict(ZSTD_CCtx *zc, const BYTE *const ip, const BYTE *const i… in ZSTD_BtFindBestMatch_extDict() argument
1769 if (ip < zc->base + zc->nextToUpdate) in ZSTD_BtFindBestMatch_extDict()
1771 ZSTD_updateTree_extDict(zc, ip, iLimit, maxNbAttempts, mls); in ZSTD_BtFindBestMatch_extDict()
1772 return ZSTD_insertBtAndFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, mls, 1); in ZSTD_BtFindBestMatch_extDict()
1776 const BYTE *ip, const BYTE *const iLimit, size_t *offsetPtr, const U32 maxNbAttempts, in ZSTD_BtFindBestMatch_selectMLS_extDict() argument
1781 case 4: return ZSTD_BtFindBestMatch_extDict(zc, ip, iLimit, offsetPtr, maxNbAttempts, 4); in ZSTD_BtFindBestMatch_selectMLS_extDict()
1782 case 5: return ZSTD_BtFindBestMatch_extDict(zc, ip, iLimit, offsetPtr, maxNbAttempts, 5); in ZSTD_BtFindBestMatch_selectMLS_extDict()
1784 case 6: return ZSTD_BtFindBestMatch_extDict(zc, ip, iLimit, offsetPtr, maxNbAttempts, 6); in ZSTD_BtFindBestMatch_selectMLS_extDict()
1796 U32 ZSTD_insertAndFindFirstIndex(ZSTD_CCtx *zc, const BYTE *ip, U32 mls) in ZSTD_insertAndFindFirstIndex() argument
1803 const U32 target = (U32)(ip - base); in ZSTD_insertAndFindFirstIndex()
1814 return hashTable[ZSTD_hashPtr(ip, hashLog, mls)]; in ZSTD_insertAndFindFirstIndex()
1820 …const BYTE *const ip, const BYTE *const iLimit, size_t *offsetPtr, const U32 maxNbAttempts, const … in ZSTD_HcFindBestMatch_generic() argument
1832 const U32 curr = (U32)(ip - base); in ZSTD_HcFindBestMatch_generic()
1838 U32 matchIndex = ZSTD_insertAndFindFirstIndex(zc, ip, mls); in ZSTD_HcFindBestMatch_generic()
1845 if (match[ml] == ip[ml]) /* potentially better */ in ZSTD_HcFindBestMatch_generic()
1846 currMl = ZSTD_count(ip, match, iLimit); in ZSTD_HcFindBestMatch_generic()
1849 …if (ZSTD_read32(match) == ZSTD_read32(ip)) /* assumption : matchIndex <= dictLimit-4 (by table con… in ZSTD_HcFindBestMatch_generic()
1850 …currMl = ZSTD_count_2segments(ip + EQUAL_READ32, match + EQUAL_READ32, iLimit, dictEnd, prefixStar… in ZSTD_HcFindBestMatch_generic()
1857 if (ip + currMl == iLimit) in ZSTD_HcFindBestMatch_generic()
1869 FORCE_INLINE size_t ZSTD_HcFindBestMatch_selectMLS(ZSTD_CCtx *zc, const BYTE *ip, const BYTE *const… in ZSTD_HcFindBestMatch_selectMLS() argument
1874 case 4: return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 4, 0); in ZSTD_HcFindBestMatch_selectMLS()
1875 case 5: return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 5, 0); in ZSTD_HcFindBestMatch_selectMLS()
1877 case 6: return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 6, 0); in ZSTD_HcFindBestMatch_selectMLS()
1881 FORCE_INLINE size_t ZSTD_HcFindBestMatch_extDict_selectMLS(ZSTD_CCtx *zc, const BYTE *ip, const BYT… in ZSTD_HcFindBestMatch_extDict_selectMLS() argument
1886 case 4: return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 4, 1); in ZSTD_HcFindBestMatch_extDict_selectMLS()
1887 case 5: return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 5, 1); in ZSTD_HcFindBestMatch_extDict_selectMLS()
1889 case 6: return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 6, 1); in ZSTD_HcFindBestMatch_extDict_selectMLS()
1901 const BYTE *ip = istart; in ZSTD_compressBlock_lazy_generic() local
1910 …typedef size_t (*searchMax_f)(ZSTD_CCtx * zc, const BYTE *ip, const BYTE *iLimit, size_t *offsetPt… in ZSTD_compressBlock_lazy_generic()
1915 ip += (ip == base); in ZSTD_compressBlock_lazy_generic()
1918 U32 const maxRep = (U32)(ip - base); in ZSTD_compressBlock_lazy_generic()
1926 while (ip < ilimit) { in ZSTD_compressBlock_lazy_generic()
1929 const BYTE *start = ip + 1; in ZSTD_compressBlock_lazy_generic()
1932 if ((offset_1 > 0) & (ZSTD_read32(ip + 1) == ZSTD_read32(ip + 1 - offset_1))) { in ZSTD_compressBlock_lazy_generic()
1934 …matchLength = ZSTD_count(ip + 1 + EQUAL_READ32, ip + 1 + EQUAL_READ32 - offset_1, iend) + EQUAL_RE… in ZSTD_compressBlock_lazy_generic()
1942 size_t const ml2 = searchMax(ctx, ip, iend, &offsetFound, maxSearches, mls); in ZSTD_compressBlock_lazy_generic()
1944 matchLength = ml2, start = ip, offset = offsetFound; in ZSTD_compressBlock_lazy_generic()
1948 ip += ((ip - anchor) >> g_searchStrength) + 1; /* jump faster over incompressible sections */ in ZSTD_compressBlock_lazy_generic()
1954 while (ip < ilimit) { in ZSTD_compressBlock_lazy_generic()
1955 ip++; in ZSTD_compressBlock_lazy_generic()
1956 if ((offset) && ((offset_1 > 0) & (ZSTD_read32(ip) == ZSTD_read32(ip - offset_1)))) { in ZSTD_compressBlock_lazy_generic()
1957 …size_t const mlRep = ZSTD_count(ip + EQUAL_READ32, ip + EQUAL_READ32 - offset_1, iend) + EQUAL_REA… in ZSTD_compressBlock_lazy_generic()
1961 matchLength = mlRep, offset = 0, start = ip; in ZSTD_compressBlock_lazy_generic()
1965 size_t const ml2 = searchMax(ctx, ip, iend, &offset2, maxSearches, mls); in ZSTD_compressBlock_lazy_generic()
1969 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_generic()
1975 if ((depth == 2) && (ip < ilimit)) { in ZSTD_compressBlock_lazy_generic()
1976 ip++; in ZSTD_compressBlock_lazy_generic()
1977 if ((offset) && ((offset_1 > 0) & (ZSTD_read32(ip) == ZSTD_read32(ip - offset_1)))) { in ZSTD_compressBlock_lazy_generic()
1978 …size_t const ml2 = ZSTD_count(ip + EQUAL_READ32, ip + EQUAL_READ32 - offset_1, iend) + EQUAL_READ3… in ZSTD_compressBlock_lazy_generic()
1982 matchLength = ml2, offset = 0, start = ip; in ZSTD_compressBlock_lazy_generic()
1986 size_t const ml2 = searchMax(ctx, ip, iend, &offset2, maxSearches, mls); in ZSTD_compressBlock_lazy_generic()
1990 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_generic()
2020 anchor = ip = start + matchLength; in ZSTD_compressBlock_lazy_generic()
2024 while ((ip <= ilimit) && ((offset_2 > 0) & (ZSTD_read32(ip) == ZSTD_read32(ip - offset_2)))) { in ZSTD_compressBlock_lazy_generic()
2026 matchLength = ZSTD_count(ip + EQUAL_READ32, ip + EQUAL_READ32 - offset_2, iend) + EQUAL_READ32; in ZSTD_compressBlock_lazy_generic()
2031 ip += matchLength; in ZSTD_compressBlock_lazy_generic()
2032 anchor = ip; in ZSTD_compressBlock_lazy_generic()
2062 const BYTE *ip = istart; in ZSTD_compressBlock_lazy_extDict_generic() local
2077 …typedef size_t (*searchMax_f)(ZSTD_CCtx * zc, const BYTE *ip, const BYTE *iLimit, size_t *offsetPt… in ZSTD_compressBlock_lazy_extDict_generic()
2084 ip += (ip == prefixStart); in ZSTD_compressBlock_lazy_extDict_generic()
2087 while (ip < ilimit) { in ZSTD_compressBlock_lazy_extDict_generic()
2090 const BYTE *start = ip + 1; in ZSTD_compressBlock_lazy_extDict_generic()
2091 U32 curr = (U32)(ip - base); in ZSTD_compressBlock_lazy_extDict_generic()
2099 if (ZSTD_read32(ip + 1) == ZSTD_read32(repMatch)) { in ZSTD_compressBlock_lazy_extDict_generic()
2103 …ZSTD_count_2segments(ip + 1 + EQUAL_READ32, repMatch + EQUAL_READ32, iend, repEnd, prefixStart) + … in ZSTD_compressBlock_lazy_extDict_generic()
2112 size_t const ml2 = searchMax(ctx, ip, iend, &offsetFound, maxSearches, mls); in ZSTD_compressBlock_lazy_extDict_generic()
2114 matchLength = ml2, start = ip, offset = offsetFound; in ZSTD_compressBlock_lazy_extDict_generic()
2118 ip += ((ip - anchor) >> g_searchStrength) + 1; /* jump faster over incompressible sections */ in ZSTD_compressBlock_lazy_extDict_generic()
2124 while (ip < ilimit) { in ZSTD_compressBlock_lazy_extDict_generic()
2125 ip++; in ZSTD_compressBlock_lazy_extDict_generic()
2133 if (ZSTD_read32(ip) == ZSTD_read32(repMatch)) { in ZSTD_compressBlock_lazy_extDict_generic()
2137 … ZSTD_count_2segments(ip + EQUAL_READ32, repMatch + EQUAL_READ32, iend, repEnd, prefixStart) + in ZSTD_compressBlock_lazy_extDict_generic()
2142 matchLength = repLength, offset = 0, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
2149 size_t const ml2 = searchMax(ctx, ip, iend, &offset2, maxSearches, mls); in ZSTD_compressBlock_lazy_extDict_generic()
2153 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
2159 if ((depth == 2) && (ip < ilimit)) { in ZSTD_compressBlock_lazy_extDict_generic()
2160 ip++; in ZSTD_compressBlock_lazy_extDict_generic()
2168 if (ZSTD_read32(ip) == ZSTD_read32(repMatch)) { in ZSTD_compressBlock_lazy_extDict_generic()
2171 size_t repLength = ZSTD_count_2segments(ip + EQUAL_READ32, repMatch + EQUAL_READ32, iend, in ZSTD_compressBlock_lazy_extDict_generic()
2177 matchLength = repLength, offset = 0, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
2184 size_t const ml2 = searchMax(ctx, ip, iend, &offset2, maxSearches, mls); in ZSTD_compressBlock_lazy_extDict_generic()
2188 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
2214 anchor = ip = start + matchLength; in ZSTD_compressBlock_lazy_extDict_generic()
2218 while (ip <= ilimit) { in ZSTD_compressBlock_lazy_extDict_generic()
2219 const U32 repIndex = (U32)((ip - base) - offset_2); in ZSTD_compressBlock_lazy_extDict_generic()
2223 if (ZSTD_read32(ip) == ZSTD_read32(repMatch)) { in ZSTD_compressBlock_lazy_extDict_generic()
2227 …ZSTD_count_2segments(ip + EQUAL_READ32, repMatch + EQUAL_READ32, iend, repEnd, prefixStart) + EQUA… in ZSTD_compressBlock_lazy_extDict_generic()
2232 ip += matchLength; in ZSTD_compressBlock_lazy_extDict_generic()
2233 anchor = ip; in ZSTD_compressBlock_lazy_extDict_generic()
2359 const BYTE *ip = (const BYTE *)src; in ZSTD_compress_generic() local
2379 U32 const curr = (U32)(ip - cctx->base); in ZSTD_compress_generic()
2394 if ((U32)(ip + blockSize - cctx->base) > cctx->loadedDictEnd + maxDist) { in ZSTD_compress_generic()
2396 U32 const newLowLimit = (U32)(ip + blockSize - cctx->base) - maxDist; in ZSTD_compress_generic()
2403 …Block_internal(cctx, op + ZSTD_blockHeaderSize, dstCapacity - ZSTD_blockHeaderSize, ip, blockSize); in ZSTD_compress_generic()
2412 memcpy(op + ZSTD_blockHeaderSize, ip, blockSize); in ZSTD_compress_generic()
2422 ip += blockSize; in ZSTD_compress_generic()
2492 const BYTE *const ip = (const BYTE *)src; in ZSTD_compressContinue_internal() local
2510 ptrdiff_t const delta = cctx->nextSrc - ip; in ZSTD_compressContinue_internal()
2521 if ((ip + srcSize > cctx->dictBase + cctx->lowLimit) & (ip < cctx->dictBase + cctx->dictLimit)) { in ZSTD_compressContinue_internal()
2522 ptrdiff_t const highInputIdx = (ip + srcSize) - cctx->dictBase; in ZSTD_compressContinue_internal()
2527 cctx->nextSrc = ip + srcSize; in ZSTD_compressContinue_internal()
2559 const BYTE *const ip = (const BYTE *)src; in ZSTD_loadDictionaryContent() local
2560 const BYTE *const iend = ip + srcSize; in ZSTD_loadDictionaryContent()
2566 zc->base += ip - zc->nextSrc; in ZSTD_loadDictionaryContent()
3134 const char *ip = istart; in ZSTD_compressStream_generic() local
3148 size_t const loaded = ZSTD_limitCopy(zcs->inBuff + zcs->inBuffPos, toLoad, ip, iend - ip); in ZSTD_compressStream_generic()
3150 ip += loaded; in ZSTD_compressStream_generic()
3210 *srcSizePtr = ip - istart; in ZSTD_compressStream_generic()