From 968588d19a89d5e425ad0a87f39ec8e2e85adfb1 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Tue, 4 Jan 2022 21:34:22 -0800 Subject: [PATCH] deflate_compress: use num_new_observations NUM_OBSERVATIONS_PER_BLOCK_CHECK was being used as an approximation for num_new_observations in one place. Just use num_new_observations. --- lib/deflate_compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/deflate_compress.c b/lib/deflate_compress.c index 93e06cd..12f3fef 100644 --- a/lib/deflate_compress.c +++ b/lib/deflate_compress.c @@ -2143,7 +2143,7 @@ do_end_block_check(struct block_split_stats *stats, u32 block_length) /* Ready to end the block? */ if (total_delta + (block_length / 4096) * stats->num_observations >= - NUM_OBSERVATIONS_PER_BLOCK_CHECK * 200 / 512 * + stats->num_new_observations * 200 / 512 * stats->num_observations) return true; }