{"id":13641211,"url":"https://github.com/zlib-ng/zlib-ng","last_synced_at":"2025-05-13T20:22:36.691Z","repository":{"id":21842179,"uuid":"25165333","full_name":"zlib-ng/zlib-ng","owner":"zlib-ng","description":"zlib replacement with optimizations for \"next generation\" systems.","archived":false,"fork":false,"pushed_at":"2025-04-27T16:23:50.000Z","size":10402,"stargazers_count":1753,"open_issues_count":48,"forks_count":282,"subscribers_count":44,"default_branch":"develop","last_synced_at":"2025-04-28T11:56:48.823Z","etag":null,"topics":["c","compression","deflate","inflate","library","optimized","zlib","zlib-license","zlib-ng","zlib-replacement"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zlib-ng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"zlib-ng"}},"created_at":"2014-10-13T15:47:27.000Z","updated_at":"2025-04-27T16:23:54.000Z","dependencies_parsed_at":"2023-11-23T13:41:25.181Z","dependency_job_id":"18324c92-6806-47ce-895f-c51306cfa837","html_url":"https://github.com/zlib-ng/zlib-ng","commit_stats":{"total_commits":2425,"total_committers":158,"mean_commits":"15.348101265822784","dds":0.7447422680412371,"last_synced_commit":"2e3e5f30a05ee7b113c755ad9a075304e02bc328"},"previous_names":[],"tags_count":103,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zlib-ng%2Fzlib-ng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zlib-ng%2Fzlib-ng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zlib-ng%2Fzlib-ng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zlib-ng%2Fzlib-ng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zlib-ng","download_url":"https://codeload.github.com/zlib-ng/zlib-ng/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251311332,"owners_count":21569008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","compression","deflate","inflate","library","optimized","zlib","zlib-license","zlib-ng","zlib-replacement"],"created_at":"2024-08-02T01:01:18.827Z","updated_at":"2025-04-28T11:56:58.322Z","avatar_url":"https://github.com/zlib-ng.png","language":"C","readme":"| CI | Stable | Develop |\n|:---|:-------|:--------|\n| GitHub Actions | [![Stable CMake](https://github.com/zlib-ng/zlib-ng/actions/workflows/cmake.yml/badge.svg?branch=stable)](https://github.com/zlib-ng/zlib-ng/actions/workflows/cmake.yml?query=branch%3Astable) \u003cbr\u003e [![Stable Configure](https://github.com/zlib-ng/zlib-ng/actions/workflows/configure.yml/badge.svg?branch=stable)](https://github.com/zlib-ng/zlib-ng/actions/workflows/configure.yml?query=branch%3Astable) | [![Develop CMake](https://github.com/zlib-ng/zlib-ng/actions/workflows/cmake.yml/badge.svg?branch=develop)](https://github.com/zlib-ng/zlib-ng/actions/workflows/cmake.yml?query=branch%3Adevelop) \u003cbr\u003e [![Develop Configure](https://github.com/zlib-ng/zlib-ng/actions/workflows/configure.yml/badge.svg?branch=develop)](https://github.com/zlib-ng/zlib-ng/actions/workflows/configure.yml?query=branch%3Adevelop) |\n| CodeFactor     | [![CodeFactor](https://www.codefactor.io/repository/github/zlib-ng/zlib-ng/badge/stable)](https://www.codefactor.io/repository/github/zlib-ng/zlib-ng/overview/stable) | [![CodeFactor](https://www.codefactor.io/repository/github/zlib-ng/zlib-ng/badge/develop)](https://www.codefactor.io/repository/github/zlib-ng/zlib-ng/overview/develop) |\n| OSS-Fuzz       | [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/zlib-ng.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened\u0026can=1\u0026q=proj:zlib-ng) | [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/zlib-ng.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened\u0026can=1\u0026q=proj:zlib-ng) |\n| Codecov        | [![codecov](https://codecov.io/github/zlib-ng/zlib-ng/branch/stable/graph/badge.svg?token=uKsgK9LIuC)](https://codecov.io/github/zlib-ng/zlib-ng/tree/stable) | [![codecov](https://codecov.io/github/zlib-ng/zlib-ng/branch/develop/graph/badge.svg?token=uKsgK9LIuC)](https://codecov.io/github/zlib-ng/zlib-ng/tree/develop) |\n\n## zlib-ng\n*zlib data compression library for the next generation systems*\n\nMaintained by Hans Kristian Rosbach\n          aka Dead2 (zlib-ng àt circlestorm dót org)\n\nFeatures\n--------\n\n* Zlib compatible API with support for dual-linking\n* Modernized native API based on zlib API for ease of porting\n* Modern C11 syntax and a clean code layout\n* Deflate medium and quick algorithms based on Intel’s zlib fork\n* Support for CPU intrinsics when available\n  * Adler32 implementation using SSSE3, AVX2, AVX512, AVX512-VNNI, Neon, VMX \u0026 VSX\n  * CRC32-B implementation using PCLMULQDQ, VPCLMULQDQ, ARMv8, \u0026 IBM Z\n  * Slide hash implementations using SSE2, AVX2, ARMv6, Neon, VMX \u0026 VSX\n  * Compare256 implementations using SSE2, AVX2, Neon, POWER9 \u0026 RVV\n  * Inflate chunk copying using SSE2, SSSE3, AVX, Neon \u0026 VSX\n  * Support for hardware-accelerated deflate using IBM Z DFLTCC\n* Safe unaligned memory read/writes and large bit buffer improvements\n* Includes improvements from Cloudflare and Intel forks\n* Configure and CMake build system support\n* Comprehensive set of CMake unit tests\n* Code sanitizers, fuzzing, and coverage\n* GitHub Actions continuous integration on Windows, macOS, and Linux\n  * Emulated CI for ARM, AARCH64, PPC, PPC64, RISCV, SPARC64, S390x using qemu\n\n\nHistory\n-------\n\nThe motivation for this fork was seeing several 3rd party contributions with new optimizations not getting\nimplemented into the official zlib repository.\n\nMark Adler has been maintaining zlib for a very long time, and he has done a great job and hopefully he will continue\nfor a long time yet. The idea of zlib-ng is not to replace zlib, but to co-exist as a drop-in replacement with a\nlower threshold for code change.\n\nzlib has a long history and is incredibly portable, even supporting many systems that predate the Internet.\u003cbr\u003e\nThat is great, but it can complicate further development and maintainability. The zlib code contains many workarounds\nfor really old compilers or to accommodate systems with limitations such as operating in a 16-bit environment.\n\nMany of these workarounds are only maintenance burdens, some of them are pretty huge code-wise. With many workarounds\ncluttered throughout the code, it makes it harder for new programmers with an idea/interest for zlib to contribute.\n\nI decided to make a fork, merge all the Intel optimizations, some of the Cloudflare optimizations, plus a couple other\nsmaller patches. Then started cleaning out workarounds, various dead code, all contrib and example code.\u003cbr\u003e\nThe result is a better performing and easier to maintain zlib-ng.\n\nA lot of improvements have gone into zlib-ng since its start, and numerous people and companies have contributed both\nsmall and big improvements, or valuable testing.\n\n\nBuild\n-----\n\u003csup\u003ePlease read LICENSE.md, it is very simple and very liberal.\u003c/sup\u003e\n\nThere are two ways to build zlib-ng:\n\n### Cmake\n\nTo build zlib-ng using the cross-platform makefile generator cmake.\n\n```\ncmake .\ncmake --build . --config Release\nctest --verbose -C Release\n```\n\nAlternatively, you can use the cmake configuration GUI tool ccmake:\n\n```\nccmake .\n```\n\n### Configure\n\nTo build zlib-ng using the bash configure script:\n\n```\n./configure\nmake\nmake test\n```\n\nBuild Options\n-------------\n\n| CMake                      | configure                | Description                                                                         | Default |\n|:---------------------------|:-------------------------|:------------------------------------------------------------------------------------|---------|\n| ZLIB_COMPAT                | --zlib-compat            | Compile with zlib compatible API                                                    | OFF     |\n| ZLIB_ENABLE_TESTS          |                          | Build test binaries                                                                 | ON      |\n| WITH_GZFILEOP              | --without-gzfileops      | Compile with support for gzFile related functions                                   | ON      |\n| WITH_OPTIM                 | --without-optimizations  | Build with optimisations                                                            | ON      |\n| WITH_NEW_STRATEGIES        | --without-new-strategies | Use new strategies                                                                  | ON      |\n| WITH_NATIVE_INSTRUCTIONS   |                          | Compiles with full instruction set supported on this host (gcc/clang -march=native) | OFF     |\n| WITH_RUNTIME_CPU_DETECTION |                          | Compiles with runtime CPU detection                                                 | ON      |\n| WITH_SANITIZER             |                          | Build with sanitizer (memory, address, undefined)                                   | OFF     |\n| WITH_GTEST                 |                          | Build gtest_zlib                                                                    | ON      |\n| WITH_FUZZERS               |                          | Build test/fuzz                                                                     | OFF     |\n| WITH_BENCHMARKS            |                          | Build test/benchmarks                                                               | OFF     |\n| WITH_MAINTAINER_WARNINGS   |                          | Build with project maintainer warnings                                              | OFF     |\n| WITH_CODE_COVERAGE         |                          | Enable code coverage reporting                                                      | OFF     |\n\n\nInstall\n-------\n\nWARNING: We do not recommend manually installing unless you really know what you are doing, because this can\npotentially override the system default zlib library, and any incompatibility or wrong configuration of zlib-ng\ncan make the whole system unusable, requiring recovery or reinstall.\nIf you still want a manual install, we recommend using the /opt/ path prefix.\n\nFor Linux distros, an alternative way to use zlib-ng (if compiled in zlib-compat mode) instead of zlib, is through\nthe use of the _LD_PRELOAD_ environment variable. If the program is dynamically linked with zlib, then the program\nwill temporarily attempt to use zlib-ng instead, without risking system-wide instability.\n\n```\nLD_PRELOAD=/opt/zlib-ng/libz.so.1.2.13.zlib-ng /usr/bin/program\n```\n\n### Cmake\n\nTo install zlib-ng system-wide using cmake:\n\n```sh or powershell\ncmake --build . --target install\n```\n\n### Configure\n\nTo install zlib-ng system-wide using the configure script:\n\n```sh\nmake install\n```\n\n### CPack\n\nAfter building with cmake, an installation package can be created using cpack. By default a tgz package is created,\nbut you can append `-G \u003cformat\u003e` to each command to generate alternative packages types (TGZ, ZIP, RPM, DEB). To easily\ncreate a rpm or deb package, you would use `-G RPM` or `-G DEB` respectively.\n\n```sh or powershell\ncd build\ncpack --config CPackConfig.cmake\ncpack --config CPackSourceConfig.cmake\n```\n\n### Vcpkg\n\nAlternatively, you can build and install zlib-ng using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:\n\n```sh or powershell\ngit clone https://github.com/Microsoft/vcpkg.git\ncd vcpkg\n./bootstrap-vcpkg.sh # \"./bootstrap-vcpkg.bat\" for powershell\n./vcpkg integrate install\n./vcpkg install zlib-ng\n```\n\nThe zlib-ng port in vcpkg is kept up to date by Microsoft team members and community contributors.\nIf the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.\n\nContributing\n------------\n\nZlib-ng is aiming to be open to contributions, and we would be delighted to receive pull requests on github.\nHelp with testing and reviewing pull requests etc is also very much appreciated.\n\nPlease check the Wiki for more info: [Contributing](https://github.com/zlib-ng/zlib-ng/wiki/Contributing)\n\nAcknowledgments\n----------------\n\nThanks go out to all the people and companies who have taken the time to contribute\ncode reviews, testing and/or patches. Zlib-ng would not have been nearly as good without you.\n\nThe deflate format used by zlib was defined by Phil Katz.\u003cbr\u003e\nThe deflate and zlib specifications were written by L. Peter Deutsch.\n\nzlib was originally created by Jean-loup Gailly (compression) and Mark Adler (decompression).\n\n\nAdvanced Build Options\n----------------------\n\n| CMake                           | configure             | Description                                                         | Default                |\n|:--------------------------------|:----------------------|:--------------------------------------------------------------------|------------------------|\n| FORCE_SSE2                      | --force-sse2          | Skip runtime check for SSE2 instructions (Always on for x86_64)     | OFF (x86)              |\n| WITH_AVX2                       |                       | Build with AVX2 intrinsics                                          | ON                     |\n| WITH_AVX512                     |                       | Build with AVX512 intrinsics                                        | ON                     |\n| WITH_AVX512VNNI                 |                       | Build with AVX512VNNI intrinsics                                    | ON                     |\n| WITH_SSE2                       |                       | Build with SSE2 intrinsics                                          | ON                     |\n| WITH_SSSE3                      |                       | Build with SSSE3 intrinsics                                         | ON                     |\n| WITH_SSE42                      |                       | Build with SSE42 intrinsics                                         | ON                     |\n| WITH_PCLMULQDQ                  |                       | Build with PCLMULQDQ intrinsics                                     | ON                     |\n| WITH_VPCLMULQDQ                 | --without-vpclmulqdq  | Build with VPCLMULQDQ intrinsics                                    | ON                     |\n| WITH_ARMV8                      | --without-armv8       | Build with ARMv8 intrinsics                                          | ON                     |\n| WITH_NEON                       | --without-neon        | Build with NEON intrinsics                                          | ON                     |\n| WITH_ARMV6                      | --without-armv6       | Build with ARMv6 intrinsics                                         | ON                     |\n| WITH_ALTIVEC                    | --without-altivec     | Build with AltiVec (VMX) intrinsics                                 | ON                     |\n| WITH_POWER8                     | --without-power8      | Build with POWER8 optimisations                                     | ON                     |\n| WITH_RVV                        |                       | Build with RVV intrinsics                                           | ON                     |\n| WITH_CRC32_VX                   | --without-crc32-vx    | Build with vectorized CRC32 on IBM Z                                | ON                     |\n| WITH_DFLTCC_DEFLATE             | --with-dfltcc-deflate | Build with DFLTCC intrinsics for compression on IBM Z               | OFF                    |\n| WITH_DFLTCC_INFLATE             | --with-dfltcc-inflate | Build with DFLTCC intrinsics for decompression on IBM Z             | OFF                    |\n| WITH_INFLATE_STRICT             |                       | Build with strict inflate distance checking                         | OFF                    |\n| WITH_INFLATE_ALLOW_INVALID_DIST |                       | Build with zero fill for inflate invalid distances                  | OFF                    |\n| INSTALL_UTILS                   |                       | Copy minigzip and minideflate during install                        | OFF                    |\n| ZLIBNG_ENABLE_TESTS             |                       | Test zlib-ng specific API                                           | ON                     |\n\n\nRelated Projects\n----------------\n\n* Fork of the popular minizip                   https://github.com/zlib-ng/minizip-ng\n* Python tool to benchmark minigzip/minideflate https://github.com/zlib-ng/deflatebench\n* Python tool to benchmark pigz                 https://github.com/zlib-ng/pigzbench\n* 3rd party patches for zlib-ng compatibility   https://github.com/zlib-ng/patches\n","funding_links":["https://github.com/sponsors/zlib-ng"],"categories":["Compression","C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzlib-ng%2Fzlib-ng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzlib-ng%2Fzlib-ng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzlib-ng%2Fzlib-ng/lists"}