First stable release of zlib-ng, a high-performance fork of zlib

Available library release zlib-ng 2.0 which is marked as the first stable release of the project (followed by a corrective release 2.0.1 ). Zlib-ng is compatible with zlib at the API level, but provides additional optimizations not accepted in the official zlib repository due to the conservative approach to accepting changes … Additionally, a modernized API based on zlib, but modified to facilitate portability, is proposed. The project code is written in C and is distributed under the Zlib license.

Tests performed on x86_64 systems showed that when performing compression operations, Zlib-ng is about 4 times faster than zlib and 2.1 times faster than gzip. When unpacking, Zlib-ng is about 2.4 times faster than zlib and 1.8 times faster than gzip. Significant improvements in compression / decompression performance were achieved mainly through the use of vector instructions SSE *, AVX2, VSX and Neon.

Including added implementation of the Adler32 checksum algorithm, optimized using SSSE3, AVX2, Neon and VSX instructions, CRC32-B implementation based on PCLMULQDQ and ACLE, improved hash tables, Slide hash implementation based on SSE2, AVX2, Neon and VSX, comparison operations based on SSE4.2 and AVX2. It also includes performance-focused changes used in forks from Intel and Cloudflare . Optimized the process of working with buffers. Added support for CMake and NMake build systems. Continuous integration systems are used for testing.

In addition to optimizations, Zlib-ng also includes patches accumulated in distribution packages and cleaned the code from workarounds used in zlib to support older compilers and platforms, but hinder the implementation of more efficient methods (for example, restrictions required to support 16- bit systems and non-ANSI C compilers). Work was carried out to identify and fix errors detected by static analyzers, fuzzing testing systems, and tools for detecting problems with memory (AddressSanitizer and MemorySanitizer).

/Media reports.