diff --git a/lib/compress/zstd_opt.c b/lib/compress/zstd_opt.c index 7efae9b8..a7618c87 100644 --- a/lib/compress/zstd_opt.c +++ b/lib/compress/zstd_opt.c @@ -849,6 +849,8 @@ static void ldm_getNextMatchAndUpdateSeqStore(rawSeqStore_t* ldmSeqStore, ldmSeqStore->posInSequence = 0; ldmSeqStore->pos++; } + DEBUGLOG(6, "ldm_getNextMatchAndUpdateSeqStore(): got an ldm that beginning at pos: %u, end at pos: %u, with offset: %u", + *matchStartPosInBlock, *matchEndPosInBlock, *matchOffset); } /* ldm_maybeAddLdm(): @@ -870,6 +872,8 @@ static void ldm_maybeAddLdm(ZSTD_match_t* matches, U32* nbMatches, candidateMatchLength < MINMATCH) return; + DEBUGLOG(6, "ldm_maybeAddLdm(): Adding ldm candidate match (offCode: %u matchLength %u) at block position=%u", + candidateOffCode, candidateMatchLength, currPosInBlock); if (*nbMatches == 0) { matches[*nbMatches].len = candidateMatchLength; matches[*nbMatches].off = candidateOffCode; @@ -985,14 +989,14 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, U32 ldmStartPosInBlock = 0; U32 ldmEndPosInBlock = 0; U32 ldmOffset = 0; - + /* Get first match from ldm seq store if long mode is enabled */ if (ms->ldmSeqStore.size > 0 && ms->ldmSeqStore.pos < ms->ldmSeqStore.size) { ldm_getNextMatchAndUpdateSeqStore(&ms->ldmSeqStore, &ldmStartPosInBlock, &ldmEndPosInBlock, &ldmOffset, (U32)(ip-istart), (U32)(iend-ip)); } - + /* init */ DEBUGLOG(5, "ZSTD_compressBlock_opt_generic: current=%u, prefix=%u, nextToUpdate=%u", (U32)(ip - base), ms->window.dictLimit, ms->nextToUpdate); diff --git a/tests/playTests.sh b/tests/playTests.sh index ee3ef42f..3959a8f3 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -1343,8 +1343,6 @@ optCSize19=$(datagen -g2M | zstd -19 -c | wc -c) longCSize19=$(datagen -g2M | zstd -19 --long -c | wc -c) optCSize19wlog23=$(datagen -g2M | zstd -19 -c --zstd=wlog=23 | wc -c) longCSize19wlog23=$(datagen -g2M | zstd -19 -c --long=23 | wc -c) -optCSize19wlog27=$(datagen -g5M | zstd -19 -c --zstd=wlog=27 | wc -c) -longCSize19wlog27=$(datagen -g5M | zstd -19 -c --long=27 | wc -c) optCSize22=$(datagen -g900K | zstd -22 --ultra -c | wc -c) longCSize22=$(datagen -g900K | zstd -22 --ultra --long -c | wc -c) if [ "$longCSize16" -gt "$optCSize16" ]; then @@ -1356,9 +1354,6 @@ elif [ "$longCSize19" -gt "$optCSize19" ]; then elif [ "$longCSize19wlog23" -gt "$optCSize19wlog23" ]; then echo using --long on compression level 19 with wLog=23 should not cause compressed size regression exit 1 -elif [ "$longCSize19wlog27" -gt "$optCSize19wlog27" ]; then - echo using --long on compression level 19 with wLog=27 should not cause compressed size regression - exit 1 elif [ "$longCSize22" -gt "$optCSize22" ]; then echo using --long on compression level 22 should not cause compressed size regression exit 1