Code extracted from: https://github.com/madler/zlib.git at commit abf180a067223611620dd97dd5681df7c7fa7c9b (v1.2.3).