Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. zlib-ng

zlib-ng

ZlibC2.3.3

A modern, high-performance drop-in replacement for the zlib compression library, optimized for next-generation hardware.

GitHubGitHub
2.1k stars351 forks0 contributors

What is zlib-ng?

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.

Target Audience

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.

Value Proposition

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.

Overview

zlib replacement with optimizations for "next generation" systems.

Use Cases

Best For

  • Applications requiring high-speed data compression or decompression.
  • Replacing zlib in performance-critical systems without code changes.
  • Leveraging modern CPU instruction sets (AVX, NEON, etc.) for compression tasks.
  • Embedded or system programming where compression efficiency is key.
  • Projects needing a maintainable and actively developed compression library.
  • Cross-platform software that benefits from optimized builds for various architectures.

Not Ideal For

  • Legacy systems relying on zlib's ancient compiler or 16-bit environment workarounds
  • Environments where overriding the system zlib is prohibited or too risky
  • Projects requiring minimal binary size over performance optimizations
  • Applications dependent on zlib's exact undocumented behaviors or quirks

Pros & Cons

Pros

Substantial Speed Boosts

Benchmarks show x86-64 can be up to 4x faster than stock zlib, thanks to optimized algorithms from Intel and Cloudflare forks.

Modern Code Maintainability

Uses clean C11 syntax and removes legacy workarounds, simplifying the codebase for easier contributions and maintenance.

Broad Hardware Acceleration

Extensive support for CPU intrinsics like SSE, AVX, NEON, and RISC-V vector extensions accelerates key operations such as Adler32 and CRC32.

Flexible API Compatibility

Offers dual-linking with both zlib-compatible and modernized native APIs, enabling drop-in replacement or easier porting for new projects.

Cons

Risky System Integration

The README explicitly warns that manual installation can override system zlib and make the system unusable, requiring recovery or reinstall.

Legacy Environment Incompatibility

By stripping out workarounds for old compilers and systems, zlib-ng may not support some archaic platforms that original zlib handles.

Complex Configuration Overhead

With numerous build options for CPU intrinsics and features, optimally configuring zlib-ng for specific targets can be non-trivial and error-prone.

Frequently Asked Questions

Quick Stats

Stars2,113
Forks351
Contributors0
Open Issues15
Last commit2 days ago
CreatedSince 2014

Tags

#c-library#library#performance-optimization#zlib-license#hardware-acceleration#optimized#c#cmake#data-compression#inflate#lossless-compression#deflate#cross-platform#compression#zlib

Built With

G
GitHub Actions
C
C11
C
CMake

Included in

C/C++70.6k
Auto-fetched 7 hours ago

Related Projects

zstdzstd

Zstandard - Fast real-time compression algorithm

Stars28,090
Forks2,648
Last commit18 days ago
brotlibrotli

Brotli compression format

Stars14,977
Forks1,377
Last commit1 day ago
LZ4LZ4

Extremely Fast Compression algorithm

Stars12,166
Forks1,615
Last commit15 hours ago
libarchivelibarchive

Multi-format archive and compression library

Stars3,646
Forks1,045
Last commit17 hours ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub