Possible problems:
It is very much possible that these two zlibs are targeted for x86_64 platforms and uses lots of SIMD. There may be compatibility issues on other architecture. But I suggest to use one of them in the opt-avx2 overlay as it is proven that these libs greatly improve compression performance on these new platforms with better SIMD results. More experiments about compatibility should be tested, but theses libs should have the same API and possibly ABI.
Related benchmarks/articles: https://blog.cloudflare.com/cloudflare-fights-cancer/ http://www.htslib.org/benchmarks/zlib.html https://www.snellman.net/blog/archive/2014-08-04-comparison-of-intel-and-cloudflare-zlib-patches.html
Links: https://github.com/cloudflare/zlib https://github.com/jtkukunas/zlib (Intel zlib)
Possible problems: It is very much possible that these two zlibs are targeted for x86_64 platforms and uses lots of SIMD. There may be compatibility issues on other architecture. But I suggest to use one of them in the opt-avx2 overlay as it is proven that these libs greatly improve compression performance on these new platforms with better SIMD results. More experiments about compatibility should be tested, but theses libs should have the same API and possibly ABI.