mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-13 04:38:14 +04:00
zlib-ng built with ZLIB_COMPAT provides libz.so.1 with the zlib API and ABI, and carries maintained SIMD code with runtime CPU detection: NEON on ARM, the ARMv8 CRC32 instructions, and SSE/AVX on x86. zlib-ng 2.3.3 lacks the functions zlib 1.3.1.2 and 1.3.2 added: deflateUsed() and the size_t variants compress_z(), compress2_z(), compressBound_z(), deflateBound_z(), uncompress_z() and uncompress2_z(). Backport both from zlib-ng develop, and the zlib.map.in change of zlib-ng PR 2403 that exports deflateUsed under ZLIB_1.3.1.2, so libz.so.1 exports every symbol and version node of zlib 1.3.2. Build with -DNO_QUICK_STRATEGY. deflate_quick makes level 1 output of a 4 MiB text file 20% larger than zlib's; levels 3 to 6 keep deflate_medium. Install zlib_name_mangling.h, which the compat zconf.h includes. The host build in tools/zlib stays on zlib. On IPQ8074 (Cortex-A53), 4 MiB of text, median of 3 interleaved runs: inflate 34.0 -> 22.7 ms, deflate level 6 460 -> 270 ms. libz.so.1 grows by 18.9 KiB on aarch64, 9.8 KiB on arm_cortex-a7 and 9.1 KiB on mips_24kc, compressed with xz. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de> Link: https://github.com/openwrt/openwrt/pull/25570 Signed-off-by: Robert Marko <robimarko@gmail.com>