From 26a64de95ebad874b19b7fb0db17875bb3197e2e Mon Sep 17 00:00:00 2001 From: Emmanuel Marty Date: Tue, 24 Mar 2020 12:04:25 +0100 Subject: [PATCH] Compress LZSA2 faster --- src/shrink_block_v2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shrink_block_v2.c b/src/shrink_block_v2.c index 9bc8f3c..111bd58 100644 --- a/src/shrink_block_v2.c +++ b/src/shrink_block_v2.c @@ -435,6 +435,7 @@ static void lzsa_optimize_forward_v2(lzsa_compressor *pCompressor, const unsigne n++) { if (pDestSlots[n].rep_offset == nMatchOffset) { exists = 1; + nInsertedNoRepMatchCandidate = 1; break; } } @@ -447,6 +448,7 @@ static void lzsa_optimize_forward_v2(lzsa_compressor *pCompressor, const unsigne (!nInsertForwardReps || pDestSlots[nn].rep_pos >= i || nScore >= (pDestSlots[nn].score + nDisableScore) || pDestSlots[nMatchesPerArrival - 1].from_slot)) { exists = 1; + nInsertedNoRepMatchCandidate = 1; break; } }