]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: compression: pass the configured level to slz
authorWilly Tarreau <w@1wt.eu>
Sun, 1 Nov 2026 20:23:40 +0000 (21:23 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 3 Nov 2026 08:33:40 +0000 (09:33 +0100)
commit7fe515c3dd6bfb2e72ae840f2da43048bf48e5df
treee0ee7e559554d34cdd15d4f4fba6c0ed6d40ec0f
parenta4ecfdd49e95ec412d79815e2fd210100b0c2183
BUG/MINOR: compression: pass the configured level to slz

Since its integration in 1.6 with commit 418b8c0c4 ("MAJOR: compression:
integrate support for libslz"), the slz backend only knew levels 0 and 1,
so the init functions forced the level to 0 or 1 using !!level, and the
rate limiting code only raised the level back up to 1. Since slz 1.4-dev3
was imported in commit 32582812a ("IMPORT: slz: update slz to version
1.4-dev3"), slz supports levels 1 to 3 (higher ones behave as 3), but
tune.comp.maxlevel was still capped to 1.

Let's pass the configured level to slz's init functions, and let the rate
limiting code raise the level back up to tune.comp.maxlevel.

Note that configurations with tune.comp.maxlevel above 1 will now use the
higher slz levels, which compress better but consume more CPU.

This must be backported wherever commit 32582812a is backported.
src/compression.c