A modern, high-performance drop-in replacement for the zlib compression library, optimized for next-generation hardware.
zlib-ng is a high-performance, drop-in replacement for the classic zlib data compression library. It is designed for modern hardware, offering significantly faster compression and decompression speeds while maintaining full API compatibility with the original zlib. The project solves the need for a more maintainable and optimized compression library that leverages contemporary CPU instruction sets.
System developers, embedded engineers, and performance-critical application developers who require efficient data compression, especially those working on modern x86, ARM, Power, or RISC-V architectures.
Developers choose zlib-ng for its substantial performance gains over stock zlib, its clean and maintainable modern C codebase, and its extensive support for hardware intrinsics across multiple CPU architectures, all without breaking compatibility with existing zlib-dependent software.
zlib replacement with optimizations for "next generation" systems.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks show x86-64 can be up to 4x faster than stock zlib, thanks to optimized algorithms from Intel and Cloudflare forks.
Uses clean C11 syntax and removes legacy workarounds, simplifying the codebase for easier contributions and maintenance.
Extensive support for CPU intrinsics like SSE, AVX, NEON, and RISC-V vector extensions accelerates key operations such as Adler32 and CRC32.
Offers dual-linking with both zlib-compatible and modernized native APIs, enabling drop-in replacement or easier porting for new projects.
The README explicitly warns that manual installation can override system zlib and make the system unusable, requiring recovery or reinstall.
By stripping out workarounds for old compilers and systems, zlib-ng may not support some archaic platforms that original zlib handles.
With numerous build options for CPU intrinsics and features, optimally configuring zlib-ng for specific targets can be non-trivial and error-prone.