Lines Matching +full:4 +full:- +full:byte
1 // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
6 * This source code is licensed under both the BSD-style license (found in the
9 * You may select, at your option, one of the above-listed licenses.
22 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_fillDoubleHashTableForCDict()
23 U32* const hashLarge = ms->hashTable; in ZSTD_fillDoubleHashTableForCDict()
24 U32 const hBitsL = cParams->hashLog + ZSTD_SHORT_CACHE_TAG_BITS; in ZSTD_fillDoubleHashTableForCDict()
25 U32 const mls = cParams->minMatch; in ZSTD_fillDoubleHashTableForCDict()
26 U32* const hashSmall = ms->chainTable; in ZSTD_fillDoubleHashTableForCDict()
27 U32 const hBitsS = cParams->chainLog + ZSTD_SHORT_CACHE_TAG_BITS; in ZSTD_fillDoubleHashTableForCDict()
28 const BYTE* const base = ms->window.base; in ZSTD_fillDoubleHashTableForCDict()
29 const BYTE* ip = base + ms->nextToUpdate; in ZSTD_fillDoubleHashTableForCDict()
30 const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE; in ZSTD_fillDoubleHashTableForCDict()
37 for (; ip + fastHashFillStep - 1 <= iend; ip += fastHashFillStep) { in ZSTD_fillDoubleHashTableForCDict()
38 U32 const curr = (U32)(ip - base); in ZSTD_fillDoubleHashTableForCDict()
60 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_fillDoubleHashTableForCCtx()
61 U32* const hashLarge = ms->hashTable; in ZSTD_fillDoubleHashTableForCCtx()
62 U32 const hBitsL = cParams->hashLog; in ZSTD_fillDoubleHashTableForCCtx()
63 U32 const mls = cParams->minMatch; in ZSTD_fillDoubleHashTableForCCtx()
64 U32* const hashSmall = ms->chainTable; in ZSTD_fillDoubleHashTableForCCtx()
65 U32 const hBitsS = cParams->chainLog; in ZSTD_fillDoubleHashTableForCCtx()
66 const BYTE* const base = ms->window.base; in ZSTD_fillDoubleHashTableForCCtx()
67 const BYTE* ip = base + ms->nextToUpdate; in ZSTD_fillDoubleHashTableForCCtx()
68 const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE; in ZSTD_fillDoubleHashTableForCCtx()
75 for (; ip + fastHashFillStep - 1 <= iend; ip += fastHashFillStep) { in ZSTD_fillDoubleHashTableForCCtx()
76 U32 const curr = (U32)(ip - base); in ZSTD_fillDoubleHashTableForCCtx()
110 ZSTD_compressionParameters const* cParams = &ms->cParams; in ZSTD_compressBlock_doubleFast_noDict_generic()
111 U32* const hashLong = ms->hashTable; in ZSTD_compressBlock_doubleFast_noDict_generic()
112 const U32 hBitsL = cParams->hashLog; in ZSTD_compressBlock_doubleFast_noDict_generic()
113 U32* const hashSmall = ms->chainTable; in ZSTD_compressBlock_doubleFast_noDict_generic()
114 const U32 hBitsS = cParams->chainLog; in ZSTD_compressBlock_doubleFast_noDict_generic()
115 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_doubleFast_noDict_generic()
116 const BYTE* const istart = (const BYTE*)src; in ZSTD_compressBlock_doubleFast_noDict_generic()
117 const BYTE* anchor = istart; in ZSTD_compressBlock_doubleFast_noDict_generic()
118 const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); in ZSTD_compressBlock_doubleFast_noDict_generic()
120 const U32 prefixLowestIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); in ZSTD_compressBlock_doubleFast_noDict_generic()
121 const BYTE* const prefixLowest = base + prefixLowestIndex; in ZSTD_compressBlock_doubleFast_noDict_generic()
122 const BYTE* const iend = istart + srcSize; in ZSTD_compressBlock_doubleFast_noDict_generic()
123 const BYTE* const ilimit = iend - HASH_READ_SIZE; in ZSTD_compressBlock_doubleFast_noDict_generic()
134 const BYTE* nextStep; in ZSTD_compressBlock_doubleFast_noDict_generic()
143 const BYTE* matchl0; /* the long match for ip */ in ZSTD_compressBlock_doubleFast_noDict_generic()
144 const BYTE* matchs0; /* the short match for ip */ in ZSTD_compressBlock_doubleFast_noDict_generic()
145 const BYTE* matchl1; /* the long match for ip1 */ in ZSTD_compressBlock_doubleFast_noDict_generic()
146 const BYTE* matchs0_safe; /* matchs0 or safe address */ in ZSTD_compressBlock_doubleFast_noDict_generic()
148 const BYTE* ip = istart; /* the current position */ in ZSTD_compressBlock_doubleFast_noDict_generic()
149 const BYTE* ip1; /* the next position */ in ZSTD_compressBlock_doubleFast_noDict_generic()
153 const BYTE dummy[] = {0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0xe2,0xb4}; in ZSTD_compressBlock_doubleFast_noDict_generic()
158 ip += ((ip - prefixLowest) == 0); in ZSTD_compressBlock_doubleFast_noDict_generic()
160 U32 const current = (U32)(ip - base); in ZSTD_compressBlock_doubleFast_noDict_generic()
161 U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, current, cParams->windowLog); in ZSTD_compressBlock_doubleFast_noDict_generic()
162 U32 const maxRep = current - windowLow; in ZSTD_compressBlock_doubleFast_noDict_generic()
185 curr = (U32)(ip-base); in ZSTD_compressBlock_doubleFast_noDict_generic()
191 if ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1))) { in ZSTD_compressBlock_doubleFast_noDict_generic()
192 mLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4; in ZSTD_compressBlock_doubleFast_noDict_generic()
194 … ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, REPCODE1_TO_OFFBASE, mLength); in ZSTD_compressBlock_doubleFast_noDict_generic()
204 …{ const BYTE* const matchl0_safe = ZSTD_selectAddr(idxl0, prefixLowestIndex, matchl0, &dummy[0]… in ZSTD_compressBlock_doubleFast_noDict_generic()
209 offset = (U32)(ip-matchl0); in ZSTD_compressBlock_doubleFast_noDict_generic()
210 …while (((ip>anchor) & (matchl0>prefixLowest)) && (ip[-1] == matchl0[-1])) { ip--; matchl0--; mLeng… in ZSTD_compressBlock_doubleFast_noDict_generic()
252 return (size_t)(iend - anchor); in ZSTD_compressBlock_doubleFast_noDict_generic()
257 mLength = ZSTD_count(ip+4, matchs0+4, iend) + 4; in ZSTD_compressBlock_doubleFast_noDict_generic()
258 offset = (U32)(ip - matchs0); in ZSTD_compressBlock_doubleFast_noDict_generic()
267 offset = (U32)(ip-matchl1); in ZSTD_compressBlock_doubleFast_noDict_generic()
272 …while (((ip>anchor) & (matchs0>prefixLowest)) && (ip[-1] == matchs0[-1])) { ip--; matchs0--; mLeng… in ZSTD_compressBlock_doubleFast_noDict_generic()
274 /* fall-through */ in ZSTD_compressBlock_doubleFast_noDict_generic()
280 if (step < 4) { in ZSTD_compressBlock_doubleFast_noDict_generic()
286 * 4 bytes, so as long as step, the distance between ip and ip1 in ZSTD_compressBlock_doubleFast_noDict_generic()
287 * (initially) is less than 4, we know ip1 < new ip. */ in ZSTD_compressBlock_doubleFast_noDict_generic()
288 hashLong[hl1] = (U32)(ip1 - base); in ZSTD_compressBlock_doubleFast_noDict_generic()
291 … ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); in ZSTD_compressBlock_doubleFast_noDict_generic()
300 /* done after iLimit test, as candidates could be > iend-8 */ in ZSTD_compressBlock_doubleFast_noDict_generic()
303 hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] = (U32)(ip-2-base); in ZSTD_compressBlock_doubleFast_noDict_generic()
305 hashSmall[ZSTD_hashPtr(ip-1, hBitsS, mls)] = (U32)(ip-1-base); in ZSTD_compressBlock_doubleFast_noDict_generic()
311 & (MEM_read32(ip) == MEM_read32(ip - offset_2)) )) { in ZSTD_compressBlock_doubleFast_noDict_generic()
313 size_t const rLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4; in ZSTD_compressBlock_doubleFast_noDict_generic()
315 hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = (U32)(ip-base); in ZSTD_compressBlock_doubleFast_noDict_generic()
316 hashLong[ZSTD_hashPtr(ip, hBitsL, 8)] = (U32)(ip-base); in ZSTD_compressBlock_doubleFast_noDict_generic()
334 ZSTD_compressionParameters const* cParams = &ms->cParams; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
335 U32* const hashLong = ms->hashTable; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
336 const U32 hBitsL = cParams->hashLog; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
337 U32* const hashSmall = ms->chainTable; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
338 const U32 hBitsS = cParams->chainLog; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
339 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
340 const BYTE* const istart = (const BYTE*)src; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
341 const BYTE* ip = istart; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
342 const BYTE* anchor = istart; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
343 const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
345 const U32 prefixLowestIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
346 const BYTE* const prefixLowest = base + prefixLowestIndex; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
347 const BYTE* const iend = istart + srcSize; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
348 const BYTE* const ilimit = iend - HASH_READ_SIZE; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
351 const ZSTD_MatchState_t* const dms = ms->dictMatchState; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
352 const ZSTD_compressionParameters* const dictCParams = &dms->cParams; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
353 const U32* const dictHashLong = dms->hashTable; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
354 const U32* const dictHashSmall = dms->chainTable; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
355 const U32 dictStartIndex = dms->window.dictLimit; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
356 const BYTE* const dictBase = dms->window.base; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
357 const BYTE* const dictStart = dictBase + dictStartIndex; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
358 const BYTE* const dictEnd = dms->window.nextSrc; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
359 const U32 dictIndexDelta = prefixLowestIndex - (U32)(dictEnd - dictBase); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
360 const U32 dictHBitsL = dictCParams->hashLog + ZSTD_SHORT_CACHE_TAG_BITS; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
361 const U32 dictHBitsS = dictCParams->chainLog + ZSTD_SHORT_CACHE_TAG_BITS; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
362 const U32 dictAndPrefixLength = (U32)((ip - prefixLowest) + (dictEnd - dictStart)); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
367 assert(ms->window.dictLimit + (1U << cParams->windowLog) >= endIndex); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
369 if (ms->prefetchCDictTables) { in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
370 size_t const hashTableBytes = (((size_t)1) << dictCParams->hashLog) * sizeof(U32); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
371 size_t const chainTableBytes = (((size_t)1) << dictCParams->chainLog) * sizeof(U32); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
396 U32 const curr = (U32)(ip-base); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
399 const BYTE* matchLong = base + matchIndexL; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
400 const BYTE* match = base + matchIndexS; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
401 const U32 repIndex = curr + 1 - offset_1; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
402 const BYTE* repMatch = (repIndex < prefixLowestIndex) ? in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
403 dictBase + (repIndex - dictIndexDelta) : in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
410 const BYTE* repMatchEnd = repIndex < prefixLowestIndex ? dictEnd : iend; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
411 mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
413 … ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, REPCODE1_TO_OFFBASE, mLength); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
420 offset = (U32)(ip-matchLong); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
421 …while (((ip>anchor) & (matchLong>prefixLowest)) && (ip[-1] == matchLong[-1])) { ip--; matchLong--;… in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
426 const BYTE* dictMatchL = dictBase + dictMatchIndexL; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
431 offset = (U32)(curr - dictMatchIndexL - dictIndexDelta); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
432 …while (((ip>anchor) & (dictMatchL>dictStart)) && (ip[-1] == dictMatchL[-1])) { ip--; dictMatchL--;… in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
451 ip += ((ip-anchor) >> kSearchStrength) + 1; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
463 const BYTE* matchL3 = base + matchIndexL3; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
470 offset = (U32)(ip-matchL3); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
471 …while (((ip>anchor) & (matchL3>prefixLowest)) && (ip[-1] == matchL3[-1])) { ip--; matchL3--; mLeng… in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
476 const BYTE* dictMatchL3 = dictBase + dictMatchIndexL3; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
481 offset = (U32)(curr + 1 - dictMatchIndexL3 - dictIndexDelta); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
482 …hile (((ip>anchor) & (dictMatchL3>dictStart)) && (ip[-1] == dictMatchL3[-1])) { ip--; dictMatchL3-… in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
488 mLength = ZSTD_count_2segments(ip+4, match+4, iend, dictEnd, prefixLowest) + 4; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
489 offset = (U32)(curr - matchIndexS); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
490 …while (((ip>anchor) & (match>dictStart)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /… in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
492 mLength = ZSTD_count(ip+4, match+4, iend) + 4; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
493 offset = (U32)(ip - match); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
494 …while (((ip>anchor) & (match>prefixLowest)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; … in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
501 … ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
510 /* done after iLimit test, as candidates could be > iend-8 */ in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
513 hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] = (U32)(ip-2-base); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
515 hashSmall[ZSTD_hashPtr(ip-1, hBitsS, mls)] = (U32)(ip-1-base); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
520 U32 const current2 = (U32)(ip-base); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
521 U32 const repIndex2 = current2 - offset_2; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
522 const BYTE* repMatch2 = repIndex2 < prefixLowestIndex ? in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
523 dictBase + repIndex2 - dictIndexDelta : in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
527 const BYTE* const repEnd2 = repIndex2 < prefixLowestIndex ? dictEnd : iend; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
528 …size_t const repLength2 = ZSTD_count_2segments(ip+4, repMatch2+4, iend, repEnd2, prefixLowest) + 4; in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
547 return (size_t)(iend - anchor); in ZSTD_compressBlock_doubleFast_dictMatchState_generic()
558 ZSTD_GEN_DFAST_FN(noDict, 4)
563 ZSTD_GEN_DFAST_FN(dictMatchState, 4)
573 const U32 mls = ms->cParams.minMatch; in ZSTD_compressBlock_doubleFast()
577 case 4 : in ZSTD_compressBlock_doubleFast()
593 const U32 mls = ms->cParams.minMatch; in ZSTD_compressBlock_doubleFast_dictMatchState()
597 case 4 : in ZSTD_compressBlock_doubleFast_dictMatchState()
616 ZSTD_compressionParameters const* cParams = &ms->cParams; in ZSTD_compressBlock_doubleFast_extDict_generic()
617 U32* const hashLong = ms->hashTable; in ZSTD_compressBlock_doubleFast_extDict_generic()
618 U32 const hBitsL = cParams->hashLog; in ZSTD_compressBlock_doubleFast_extDict_generic()
619 U32* const hashSmall = ms->chainTable; in ZSTD_compressBlock_doubleFast_extDict_generic()
620 U32 const hBitsS = cParams->chainLog; in ZSTD_compressBlock_doubleFast_extDict_generic()
621 const BYTE* const istart = (const BYTE*)src; in ZSTD_compressBlock_doubleFast_extDict_generic()
622 const BYTE* ip = istart; in ZSTD_compressBlock_doubleFast_extDict_generic()
623 const BYTE* anchor = istart; in ZSTD_compressBlock_doubleFast_extDict_generic()
624 const BYTE* const iend = istart + srcSize; in ZSTD_compressBlock_doubleFast_extDict_generic()
625 const BYTE* const ilimit = iend - 8; in ZSTD_compressBlock_doubleFast_extDict_generic()
626 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_doubleFast_extDict_generic()
627 const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); in ZSTD_compressBlock_doubleFast_extDict_generic()
628 const U32 lowLimit = ZSTD_getLowestMatchIndex(ms, endIndex, cParams->windowLog); in ZSTD_compressBlock_doubleFast_extDict_generic()
630 const U32 dictLimit = ms->window.dictLimit; in ZSTD_compressBlock_doubleFast_extDict_generic()
632 const BYTE* const prefixStart = base + prefixStartIndex; in ZSTD_compressBlock_doubleFast_extDict_generic()
633 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_compressBlock_doubleFast_extDict_generic()
634 const BYTE* const dictStart = dictBase + dictStartIndex; in ZSTD_compressBlock_doubleFast_extDict_generic()
635 const BYTE* const dictEnd = dictBase + prefixStartIndex; in ZSTD_compressBlock_doubleFast_extDict_generic()
648 const BYTE* const matchBase = matchIndex < prefixStartIndex ? dictBase : base; in ZSTD_compressBlock_doubleFast_extDict_generic()
649 const BYTE* match = matchBase + matchIndex; in ZSTD_compressBlock_doubleFast_extDict_generic()
653 const BYTE* const matchLongBase = matchLongIndex < prefixStartIndex ? dictBase : base; in ZSTD_compressBlock_doubleFast_extDict_generic()
654 const BYTE* matchLong = matchLongBase + matchLongIndex; in ZSTD_compressBlock_doubleFast_extDict_generic()
656 const U32 curr = (U32)(ip-base); in ZSTD_compressBlock_doubleFast_extDict_generic()
657 const U32 repIndex = curr + 1 - offset_1; /* offset_1 expected <= curr +1 */ in ZSTD_compressBlock_doubleFast_extDict_generic()
658 const BYTE* const repBase = repIndex < prefixStartIndex ? dictBase : base; in ZSTD_compressBlock_doubleFast_extDict_generic()
659 const BYTE* const repMatch = repBase + repIndex; in ZSTD_compressBlock_doubleFast_extDict_generic()
664 & (offset_1 <= curr+1 - dictStartIndex)) /* note: we are searching at curr+1 */ in ZSTD_compressBlock_doubleFast_extDict_generic()
666 const BYTE* repMatchEnd = repIndex < prefixStartIndex ? dictEnd : iend; in ZSTD_compressBlock_doubleFast_extDict_generic()
667 mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixStart) + 4; in ZSTD_compressBlock_doubleFast_extDict_generic()
669 … ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, REPCODE1_TO_OFFBASE, mLength); in ZSTD_compressBlock_doubleFast_extDict_generic()
672 const BYTE* const matchEnd = matchLongIndex < prefixStartIndex ? dictEnd : iend; in ZSTD_compressBlock_doubleFast_extDict_generic()
673 … const BYTE* const lowMatchPtr = matchLongIndex < prefixStartIndex ? dictStart : prefixStart; in ZSTD_compressBlock_doubleFast_extDict_generic()
676 offset = curr - matchLongIndex; in ZSTD_compressBlock_doubleFast_extDict_generic()
677 …while (((ip>anchor) & (matchLong>lowMatchPtr)) && (ip[-1] == matchLong[-1])) { ip--; matchLong--; … in ZSTD_compressBlock_doubleFast_extDict_generic()
680 … ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); in ZSTD_compressBlock_doubleFast_extDict_generic()
685 const BYTE* const match3Base = matchIndex3 < prefixStartIndex ? dictBase : base; in ZSTD_compressBlock_doubleFast_extDict_generic()
686 const BYTE* match3 = match3Base + matchIndex3; in ZSTD_compressBlock_doubleFast_extDict_generic()
690 const BYTE* const matchEnd = matchIndex3 < prefixStartIndex ? dictEnd : iend; in ZSTD_compressBlock_doubleFast_extDict_generic()
691 … const BYTE* const lowMatchPtr = matchIndex3 < prefixStartIndex ? dictStart : prefixStart; in ZSTD_compressBlock_doubleFast_extDict_generic()
694 offset = curr+1 - matchIndex3; in ZSTD_compressBlock_doubleFast_extDict_generic()
695 …while (((ip>anchor) & (match3>lowMatchPtr)) && (ip[-1] == match3[-1])) { ip--; match3--; mLength++… in ZSTD_compressBlock_doubleFast_extDict_generic()
697 const BYTE* const matchEnd = matchIndex < prefixStartIndex ? dictEnd : iend; in ZSTD_compressBlock_doubleFast_extDict_generic()
698 … const BYTE* const lowMatchPtr = matchIndex < prefixStartIndex ? dictStart : prefixStart; in ZSTD_compressBlock_doubleFast_extDict_generic()
699 mLength = ZSTD_count_2segments(ip+4, match+4, iend, matchEnd, prefixStart) + 4; in ZSTD_compressBlock_doubleFast_extDict_generic()
700 offset = curr - matchIndex; in ZSTD_compressBlock_doubleFast_extDict_generic()
701 …while (((ip>anchor) & (match>lowMatchPtr)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; }… in ZSTD_compressBlock_doubleFast_extDict_generic()
705 … ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); in ZSTD_compressBlock_doubleFast_extDict_generic()
708 ip += ((ip-anchor) >> kSearchStrength) + 1; in ZSTD_compressBlock_doubleFast_extDict_generic()
718 /* done after iLimit test, as candidates could be > iend-8 */ in ZSTD_compressBlock_doubleFast_extDict_generic()
721 hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] = (U32)(ip-2-base); in ZSTD_compressBlock_doubleFast_extDict_generic()
723 hashSmall[ZSTD_hashPtr(ip-1, hBitsS, mls)] = (U32)(ip-1-base); in ZSTD_compressBlock_doubleFast_extDict_generic()
728 U32 const current2 = (U32)(ip-base); in ZSTD_compressBlock_doubleFast_extDict_generic()
729 U32 const repIndex2 = current2 - offset_2; in ZSTD_compressBlock_doubleFast_extDict_generic()
730 … const BYTE* repMatch2 = repIndex2 < prefixStartIndex ? dictBase + repIndex2 : base + repIndex2; in ZSTD_compressBlock_doubleFast_extDict_generic()
732 & (offset_2 <= current2 - dictStartIndex)) in ZSTD_compressBlock_doubleFast_extDict_generic()
734 const BYTE* const repEnd2 = repIndex2 < prefixStartIndex ? dictEnd : iend; in ZSTD_compressBlock_doubleFast_extDict_generic()
735 … size_t const repLength2 = ZSTD_count_2segments(ip+4, repMatch2+4, iend, repEnd2, prefixStart) + 4; in ZSTD_compressBlock_doubleFast_extDict_generic()
752 return (size_t)(iend - anchor); in ZSTD_compressBlock_doubleFast_extDict_generic()
755 ZSTD_GEN_DFAST_FN(extDict, 4)
764 U32 const mls = ms->cParams.minMatch; in ZSTD_compressBlock_doubleFast_extDict()
768 case 4 : in ZSTD_compressBlock_doubleFast_extDict()