Lines Matching defs:optLdm

904 ZSTD_opt_getNextMatchAndUpdateSeqStore(ZSTD_optLdm_t* optLdm, U32 currPosInBlock,
913 if (optLdm->seqStore.size == 0 || optLdm->seqStore.pos >= optLdm->seqStore.size) {
914 optLdm->startPosInBlock = UINT_MAX;
915 optLdm->endPosInBlock = UINT_MAX;
920 currSeq = optLdm->seqStore.seq[optLdm->seqStore.pos];
921 assert(optLdm->seqStore.posInSequence <= currSeq.litLength + currSeq.matchLength);
923 literalsBytesRemaining = (optLdm->seqStore.posInSequence < currSeq.litLength) ?
924 currSeq.litLength - (U32)optLdm->seqStore.posInSequence :
927 currSeq.matchLength - ((U32)optLdm->seqStore.posInSequence - currSeq.litLength) :
932 optLdm->startPosInBlock = UINT_MAX;
933 optLdm->endPosInBlock = UINT_MAX;
934 ZSTD_optLdm_skipRawSeqStoreBytes(&optLdm->seqStore, blockBytesRemaining);
940 optLdm->startPosInBlock = currPosInBlock + literalsBytesRemaining;
941 optLdm->endPosInBlock = optLdm->startPosInBlock + matchBytesRemaining;
942 optLdm->offset = currSeq.offset;
944 if (optLdm->endPosInBlock > currBlockEndPos) {
946 optLdm->endPosInBlock = currBlockEndPos;
947 ZSTD_optLdm_skipRawSeqStoreBytes(&optLdm->seqStore, currBlockEndPos - currPosInBlock);
950 ZSTD_optLdm_skipRawSeqStoreBytes(&optLdm->seqStore, literalsBytesRemaining + matchBytesRemaining);
960 const ZSTD_optLdm_t* optLdm, U32 currPosInBlock)
962 U32 const posDiff = currPosInBlock - optLdm->startPosInBlock;
964 U32 const candidateMatchLength = optLdm->endPosInBlock - optLdm->startPosInBlock - posDiff;
967 if (currPosInBlock < optLdm->startPosInBlock
968 || currPosInBlock >= optLdm->endPosInBlock
974 U32 const candidateOffCode = STORE_OFFSET(optLdm->offset);
987 ZSTD_optLdm_processMatchCandidate(ZSTD_optLdm_t* optLdm,
991 if (optLdm->seqStore.size == 0 || optLdm->seqStore.pos >= optLdm->seqStore.size) {
995 if (currPosInBlock >= optLdm->endPosInBlock) {
996 if (currPosInBlock > optLdm->endPosInBlock) {
1001 U32 const posOvershoot = currPosInBlock - optLdm->endPosInBlock;
1002 ZSTD_optLdm_skipRawSeqStoreBytes(&optLdm->seqStore, posOvershoot);
1004 ZSTD_opt_getNextMatchAndUpdateSeqStore(optLdm, currPosInBlock, remainingBytes);
1006 ZSTD_optLdm_maybeAddMatch(matches, nbMatches, optLdm, currPosInBlock);
1063 ZSTD_optLdm_t optLdm;
1065 optLdm.seqStore = ms->ldmSeqStore ? *ms->ldmSeqStore : kNullRawSeqStore;
1066 optLdm.endPosInBlock = optLdm.startPosInBlock = optLdm.offset = 0;
1067 ZSTD_opt_getNextMatchAndUpdateSeqStore(&optLdm, (U32)(ip-istart), (U32)(iend-ip));
1084 ZSTD_optLdm_processMatchCandidate(&optLdm, matches, &nbMatches,
1203 ZSTD_optLdm_processMatchCandidate(&optLdm, matches, &nbMatches,