Lines Matching +full:1 +full:ms
17 void ZSTD_fillHashTableForCDict(ZSTD_MatchState_t* ms, in ZSTD_fillHashTableForCDict() argument
21 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_fillHashTableForCDict()
22 U32* const hashTable = ms->hashTable; in ZSTD_fillHashTableForCDict()
25 const BYTE* const base = ms->window.base; in ZSTD_fillHashTableForCDict()
26 const BYTE* ip = base + ms->nextToUpdate; in ZSTD_fillHashTableForCDict()
45 for (p = 1; p < fastHashFillStep; ++p) { in ZSTD_fillHashTableForCDict()
54 void ZSTD_fillHashTableForCCtx(ZSTD_MatchState_t* ms, in ZSTD_fillHashTableForCCtx() argument
58 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_fillHashTableForCCtx()
59 U32* const hashTable = ms->hashTable; in ZSTD_fillHashTableForCCtx()
62 const BYTE* const base = ms->window.base; in ZSTD_fillHashTableForCCtx()
63 const BYTE* ip = base + ms->nextToUpdate; in ZSTD_fillHashTableForCCtx()
81 for (p = 1; p < fastHashFillStep; ++p) { in ZSTD_fillHashTableForCCtx()
88 void ZSTD_fillHashTable(ZSTD_MatchState_t* ms, in ZSTD_fillHashTable() argument
94 ZSTD_fillHashTableForCDict(ms, end, dtlm); in ZSTD_fillHashTable()
96 ZSTD_fillHashTableForCCtx(ms, end, dtlm); in ZSTD_fillHashTable()
136 mval = MEM_read32(currentPtr) ^ 1; /* guaranteed to not match. */ in ZSTD_match4Found_branch()
147 * 1. Hash (map position to hash value via input read)
156 * Rather than do 1->2->3->4 sequentially for a single position before moving
168 * N+1 | ... TM
185 * N+1 | H
192 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_noDict_generic() argument
196 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_compressBlock_fast_noDict_generic()
197 U32* const hashTable = ms->hashTable; in ZSTD_compressBlock_fast_noDict_generic()
199 size_t const stepSize = cParams->targetLength + !(cParams->targetLength) + 1; /* min 2 */ in ZSTD_compressBlock_fast_noDict_generic()
200 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_fast_noDict_generic()
203 const U32 prefixStartIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); in ZSTD_compressBlock_fast_noDict_generic()
216 U32 rep_offset2 = rep[1]; in ZSTD_compressBlock_fast_noDict_generic()
233 const size_t kStepIncr = (1 << (kSearchStrength - 1)); in ZSTD_compressBlock_fast_noDict_generic()
239 U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, curr, cParams->windowLog); in ZSTD_compressBlock_fast_noDict_generic()
252 ip1 = ip0 + 1; in ZSTD_compressBlock_fast_noDict_generic()
254 ip3 = ip2 + 1; in ZSTD_compressBlock_fast_noDict_generic()
277 mLength = ip0[-1] == match0[-1]; in ZSTD_compressBlock_fast_noDict_generic()
293 * This write is known to be safe because the ip1 == ip0 + 1, in ZSTD_compressBlock_fast_noDict_generic()
300 /* lookup ip[1] */ in ZSTD_compressBlock_fast_noDict_generic()
327 /* lookup ip[1] */ in ZSTD_compressBlock_fast_noDict_generic()
365 * set rep[0] = rep_offset1 and rep[1] = offsetSaved1. in ZSTD_compressBlock_fast_noDict_generic()
371 rep[1] = rep_offset2 ? rep_offset2 : offsetSaved2; in ZSTD_compressBlock_fast_noDict_generic()
386 while (((ip0>anchor) & (match0>prefixStart)) && (ip0[-1] == match0[-1])) { in ZSTD_compressBlock_fast_noDict_generic()
426 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], \
429 … return ZSTD_compressBlock_fast_##dictMode##_generic(ms, seqStore, rep, src, srcSize, mml, cmov); \
432 ZSTD_GEN_FAST_FN(noDict, 4, 1)
433 ZSTD_GEN_FAST_FN(noDict, 5, 1)
434 ZSTD_GEN_FAST_FN(noDict, 6, 1)
435 ZSTD_GEN_FAST_FN(noDict, 7, 1)
443 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast() argument
446 U32 const mml = ms->cParams.minMatch; in ZSTD_compressBlock_fast()
448 int const useCmov = ms->cParams.windowLog < 19; in ZSTD_compressBlock_fast()
449 assert(ms->dictMatchState == NULL); in ZSTD_compressBlock_fast()
455 return ZSTD_compressBlock_fast_noDict_4_1(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
457 return ZSTD_compressBlock_fast_noDict_5_1(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
459 return ZSTD_compressBlock_fast_noDict_6_1(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
461 return ZSTD_compressBlock_fast_noDict_7_1(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
469 return ZSTD_compressBlock_fast_noDict_4_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
471 return ZSTD_compressBlock_fast_noDict_5_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
473 return ZSTD_compressBlock_fast_noDict_6_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
475 return ZSTD_compressBlock_fast_noDict_7_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast()
483 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_dictMatchState_generic() argument
486 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_compressBlock_fast_dictMatchState_generic()
487 U32* const hashTable = ms->hashTable; in ZSTD_compressBlock_fast_dictMatchState_generic()
491 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_fast_dictMatchState_generic()
494 const BYTE* ip1 = ip0 + stepSize; /* we assert below that stepSize >= 1 */ in ZSTD_compressBlock_fast_dictMatchState_generic()
496 const U32 prefixStartIndex = ms->window.dictLimit; in ZSTD_compressBlock_fast_dictMatchState_generic()
500 U32 offset_1=rep[0], offset_2=rep[1]; in ZSTD_compressBlock_fast_dictMatchState_generic()
502 const ZSTD_MatchState_t* const dms = ms->dictMatchState; in ZSTD_compressBlock_fast_dictMatchState_generic()
515 const U32 maxDistance = 1U << cParams->windowLog; in ZSTD_compressBlock_fast_dictMatchState_generic()
526 if (ms->prefetchCDictTables) { in ZSTD_compressBlock_fast_dictMatchState_generic()
527 size_t const hashTableBytes = (((size_t)1) << dictCParams->hashLog) * sizeof(U32); in ZSTD_compressBlock_fast_dictMatchState_generic()
540 assert(stepSize >= 1); in ZSTD_compressBlock_fast_dictMatchState_generic()
541 while (ip1 <= ilimit) { /* repcode check at (ip0 + 1) is safe because ip0 < ip1 */ in ZSTD_compressBlock_fast_dictMatchState_generic()
552 const size_t kStepIncr = 1 << kSearchStrength; in ZSTD_compressBlock_fast_dictMatchState_generic()
556 while (1) { in ZSTD_compressBlock_fast_dictMatchState_generic()
558 const U32 repIndex = curr + 1 - offset_1; in ZSTD_compressBlock_fast_dictMatchState_generic()
567 && (MEM_read32(repMatch) == MEM_read32(ip0 + 1))) { in ZSTD_compressBlock_fast_dictMatchState_generic()
569 … mLength = ZSTD_count_2segments(ip0 + 1 + 4, repMatch + 4, iend, repMatchEnd, prefixStart) + 4; in ZSTD_compressBlock_fast_dictMatchState_generic()
586 && (ip0[-1] == dictMatch[-1])) { in ZSTD_compressBlock_fast_dictMatchState_generic()
604 && (ip0[-1] == match[-1])) { in ZSTD_compressBlock_fast_dictMatchState_generic()
673 rep[1] = offset_2; in ZSTD_compressBlock_fast_dictMatchState_generic()
686 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_dictMatchState() argument
689 U32 const mls = ms->cParams.minMatch; in ZSTD_compressBlock_fast_dictMatchState()
690 assert(ms->dictMatchState != NULL); in ZSTD_compressBlock_fast_dictMatchState()
695 return ZSTD_compressBlock_fast_dictMatchState_4_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_dictMatchState()
697 return ZSTD_compressBlock_fast_dictMatchState_5_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_dictMatchState()
699 return ZSTD_compressBlock_fast_dictMatchState_6_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_dictMatchState()
701 return ZSTD_compressBlock_fast_dictMatchState_7_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_dictMatchState()
709 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_extDict_generic() argument
712 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_compressBlock_fast_extDict_generic()
713 U32* const hashTable = ms->hashTable; in ZSTD_compressBlock_fast_extDict_generic()
716 size_t const stepSize = cParams->targetLength + !(cParams->targetLength) + 1; in ZSTD_compressBlock_fast_extDict_generic()
717 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_fast_extDict_generic()
718 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_compressBlock_fast_extDict_generic()
722 const U32 lowLimit = ZSTD_getLowestMatchIndex(ms, endIndex, cParams->windowLog); in ZSTD_compressBlock_fast_extDict_generic()
725 const U32 dictLimit = ms->window.dictLimit; in ZSTD_compressBlock_fast_extDict_generic()
731 U32 offset_1=rep[0], offset_2=rep[1]; in ZSTD_compressBlock_fast_extDict_generic()
753 const size_t kStepIncr = (1 << (kSearchStrength - 1)); in ZSTD_compressBlock_fast_extDict_generic()
761 return ZSTD_compressBlock_fast(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_extDict_generic()
776 ip1 = ip0 + 1; in ZSTD_compressBlock_fast_extDict_generic()
778 ip3 = ip2 + 1; in ZSTD_compressBlock_fast_extDict_generic()
800 rval = MEM_read32(ip2) ^ 1; /* guaranteed to not match. */ in ZSTD_compressBlock_fast_extDict_generic()
813 mLength = ip0[-1] == match0[-1]; in ZSTD_compressBlock_fast_extDict_generic()
824 MEM_read32(ip0) ^ 1; /* guaranteed not to match */ in ZSTD_compressBlock_fast_extDict_generic()
832 /* lookup ip[1] */ in ZSTD_compressBlock_fast_extDict_generic()
852 MEM_read32(ip0) ^ 1; /* guaranteed not to match */ in ZSTD_compressBlock_fast_extDict_generic()
860 /* lookup ip[1] */ in ZSTD_compressBlock_fast_extDict_generic()
894 rep[1] = offset_2 ? offset_2 : offsetSaved2; in ZSTD_compressBlock_fast_extDict_generic()
912 while (((ip0>anchor) & (match0>lowMatchPtr)) && (ip0[-1] == match0[-1])) { in ZSTD_compressBlock_fast_extDict_generic()
967 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_fast_extDict() argument
970 U32 const mls = ms->cParams.minMatch; in ZSTD_compressBlock_fast_extDict()
971 assert(ms->dictMatchState == NULL); in ZSTD_compressBlock_fast_extDict()
976 return ZSTD_compressBlock_fast_extDict_4_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_extDict()
978 return ZSTD_compressBlock_fast_extDict_5_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_extDict()
980 return ZSTD_compressBlock_fast_extDict_6_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_extDict()
982 return ZSTD_compressBlock_fast_extDict_7_0(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast_extDict()