summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-15zlib-ng: Remove flag `-fno-semantic-interposition`lineage-18.1zclkkk
* runs well on my Arch laptop but fails on our infra :( For now simply apply this workaround from @ zclkkk. Change-Id: Ia164112b8f262f6e3f1bf3714fb4f639069a29ce
2021-04-18Remove GitHub Actions workflowsDanny Lin
This is an Android-specific fork, so we don't care about these workflows.
2021-04-18Add zconf.h for Android buildsDanny Lin
2021-04-18Add zlib_bench from Chromium zlibDanny Lin
This tool is very helpful for comparing different implementations of zlib.
2021-04-18Port zlib-ng to the Android platformDanny Lin
- Add Soong blueprint - Add CRC32 fixes - Add NDK mappings All changes were based on the Android fork of Chromium zlib. As reported by simpleperf, a considerable amount of CPU time is spent decompressing Android binary XML resources when opening and closing activities in Settings. Because of this, some binary XMLs from framework-res.apk have been used for zlib_bench testing. zlib-ng is significantly faster than vanilla zlib and Chromium zlib (with optimizations enabled) in terms of compression. 64-bit benchmarks with zlib_bench64 on Android: Compression: +------------------------------------------+------+---------------+---------+-------+ | File | zlib | Chromium zlib | zlib-ng | Unit | +------------------------------------------+------+---------------+---------+-------+ | res/anim/activity_open_enter.xml | 10.4 | 16 | 25.1 | MiB/s | | res/anim/activity_close_enter.xml | 9.3 | 15.5 | 21.1 | MiB/s | | res/transition/move.xml | 9.7 | 16.4 | 21.6 | MiB/s | | res/drawable/stat_sys_battery_charge.xml | 13.3 | 22.4 | 33.2 | MiB/s | +------------------------------------------+------+---------------+---------+-------+ The gains are less significant for decompression, and Chromium zlib is generally slighty faster in this case. However, zlib-ng still tends to be faster than vanilla zlib: Decompression: +------------------------------------------+-------+---------------+---------+-------+ | File | zlib | Chromium zlib | zlib-ng | Unit | +------------------------------------------+-------+---------------+---------+-------+ | res/anim/activity_open_enter.xml | 136.8 | 150.6 | 153.2 | MiB/s | | res/anim/activity_close_enter.xml | 125.7 | 133.5 | 123 | MiB/s | | res/transition/move.xml | 120.6 | 129.9 | 124.4 | MiB/s | | res/drawable/stat_sys_battery_charge.xml | 194.6 | 222.1 | 217.3 | MiB/s | +------------------------------------------+-------+---------------+---------+-------+ In combination with enabling -O3 for libpng, zlib-ng speeds up screenshot saving by 16% on redfin (Cortex-A55 + Cortex-A76) as compared to vanilla zlib. While Android is likely to be decompressing much more data than it compresses, zlib-ng's significantly faster compression should be a worthwhile tradeoff for its deficiencies in decompression speed. zlib versions used for benchmarks: Vanilla zlib: [1] (Chromium zlib with optimizations disabled) Chromium zlib: [2] with all optimizations enabled zlib-ng: [3] with Android porting changes All zlib variants were built with -O3, as per commit [4]. [1] https://android.googlesource.com/platform/external/zlib/+/refs/tags/android-11.0.0_r35 [2] https://android.googlesource.com/platform/external/zlib/+/e620e8065d17bab7c9eefe3a03d7f8b80ca450d6 [3] https://github.com/zlib-ng/zlib-ng/commit/9f784908599006e9f09599b85b495bdcda1f25c4 [4] https://android.googlesource.com/platform/external/zlib/+/18e812de
2021-04-14[ARM] Use temporary variable when loading more than 8 bits in ↵Mika Lindqvist
chunkmemset_neon(). * using memcpy() forbids optimizer to optimize away the temporary variable due to aliasing rules.
2021-04-14Write generated files during tests to CMake's build directory using the name ↵Nathan Moinvaziri
of the test. Co-authored-by: Vladislav Shchapov <phprus@users.noreply.github.com>
2021-04-09Changed auto-detection of float-abi support by removing triplet check in ↵Nathan Moinvaziri
favor of compilation and link test. #911
2021-04-09Install clang-6 package if it is not present on Ubuntu when compiling ↵Nathan Moinvaziri
against clang-6 in CI.
2021-04-08Added Windows ARM and ARM64 binaries in releases. #909Nathan Moinvaziri
2021-04-08Alias ZEXTERN, ZEXPORT and ZEXPORTVA to Z_EXTERN, Z_EXPORT and Z_EXPORTVA ↵Mika Lindqvist
respectively.
2021-04-08Fix build if -D_FILE_OFFSET_BITS=64 is set manually.Mika Lindqvist
2021-03-26Include porting guide in GH release packages.Nathan Moinvaziri
2021-03-26Added build differences between zlib-compat and zlib-ng native mode to ↵Nathan Moinvaziri
porting doc.
2021-03-23Version 2.0.2Hans Kristian Rosbach
2021-03-22Fix MSVC warnings in deflate_quick_block_openIlya Leoshkevich
Add casts in order to fix the following warnings [1]: C:\Users\Nathan\Source\zlib-ng\test\deflate_quick_block_open.c(62,69): warning C4244: '=': conversion from '__int64' to 'uint32_t', possible loss of data [C:\Users\Nathan\Source\zlib-ng\deflate_quick_block_open.vcxproj] C:\Users\Nathan\Source\zlib-ng\test\deflate_quick_block_open.c(73,1): warning C4244: 'initializing': conversion from '_ _int64' to 'uint32_t', possible loss of data [C:\Users\Nathan\Source\zlib-ng\deflate_quick_block_open.vcxproj] [1] https://github.com/zlib-ng/zlib-ng/pull/880#issuecomment-802432700
2021-03-22Detect unsupported VS at configure time (and not at compile time)tbeu
2021-03-20Support for posix_memalign in FreeBSD 11. #873Nathan Moinvaziri
Co-authored-by: Hans Kristian Rosbach <hk-git@circlestorm.org> Co-authored-by: concatime <concatime@users.noreply@github.com>
2021-03-20Only perform auto-detection of floating point ABI on ARM arch. #895Nathan Moinvaziri
Co-authored-by: zhangn1985 <zhangn1985@users.noreply.github.com>
2021-03-20Restore hash_head != 0 checksIlya Leoshkevich
Commit bc5915e2dec7 ("Fixed unsigned integer overflow ASAN error when hash_head > s->strstart.") removed hash_head != 0 checks in fast, medium and slow deflate, because it improved performance [1]. Unfortunately, the attached test started failing after that. Apparently, as the comments suggest, the code implicitly relies on matches with the beginning of the window being skipped. So restore the check. [1] https://github.com/zlib-ng/zlib-ng/pull/772#issuecomment-710760300
2021-03-18Added preprocessor error guards to ensure proper library usage.Nathan Moinvaziri
2021-03-18Add a CMake macro for simple test executablesIlya Leoshkevich
6 tests use the same pattern: build a binary linked with zlib-ng and run it. At the moment this requires 5 near-identical lines of CMake code, leading to proliferation of copy-paste. Introduce a macro to get rid of it.
2021-03-18Don't test corpora when processing MinGW jobs. This should reduce the time ↵Nathan Moinvaziri
these CI runs take considerably.
2021-03-18Fix GNUInstallDirs includedir detectionVictor Westerhuis
CMake uses `INCLUDEDIR` instead of `INCDIR`.
2021-03-18Cmake: Accept custom install dirs in various formats from command line.Hans Kristian Rosbach
2021-03-17Remove unused header checks from CMake. These are legacy checks that zlib ↵Nathan Moinvaziri
used to use.
2021-03-17Fix .pc file generation in CMakeLists.txtVictor Westerhuis
Two words were swapped in a variable name, leading to empty libdir and includedir variables in the generated .pc files.
2021-03-17Version 2.0.1 - HotfixHans Kristian Rosbach
2021-03-17Fix block_open handling in deflate_quick()Ilya Leoshkevich
The attached test fails with "inflate() failed", because the deflate stream that it produces ends up being corrupted. Bisect points to the commit e7bb6db09a18 ("Replace hash_bits, hash_size and hash_mask with defines."), but it's most likely a coincidence. In any case, the reason is that if we happen to simultaneously exhaust all the buffers (in, out and bi), we return finish_started without writing the end of block symbol, which will never happen afterwards. Fix by adding another check to the tricky condition: if we are in the middle of a block, return need_more instead of finish_started.
2021-03-16Stable release 2.0.0Hans Kristian Rosbach
2021-03-16Fix defining HAVE_SYS_SDT_H with CMakeIlya Leoshkevich iii@linux.ibm.com
DFLTCC probe points are never activated when compiling with CMake. This is because check_include_file() only sets an internal CMake variable, but not a C define [1]. Fix as the link suggests - by adding an explicit add_definitions. [1] https://cmake.org/pipermail/cmake/2015-June/060830.html
2021-03-16Added comments for cmake test scripts.Nathan Moinvaziri
2021-03-16Add testing of minigzip/minideflate --help and invalid parameterHans Kristian Rosbach
2021-03-16Fix bi_valid handling in deflate_quick()Ilya Leoshkevich iii@linux.ibm.com
The attached test started failing after commit ad89d5131b29 ("Don't write end of last block when returning finish_started."): either with "bi_buf not flushed" message in debug builds, or by producing corrupted output in release builds. The problem is that we must not return finish_started when bi_buf is not empty, because the bits there will be lost. Fix by checking that bi_valid is not 0.
2021-03-16Quote CMAKE_C_FLAGS_RELEASEIlya Leoshkevich iii@linux.ibm.com
2021-03-16Updated location to compression testing corpora.Nathan Moinvaziri
2021-03-15[CMake] Add zlibstatic alias when BUILD_SHARED_LIBS is "OFF"past-due
2021-03-09Remove misleading manpage.Hans Kristian Rosbach
README.md changes: - Added a related projects section at the end. - Added blank line after header where missing. - Added extra blank line before header to make them easier to spot as plain-text. - Changed line-length for Contributing section, to make it more readable as plain-text.
2021-02-26Only set CPU feature flags in configure script if not using native instructions.Nathan Moinvaziri
2021-02-26Upload build log for pkgcheck CI when fails.Nathan Moinvaziri
2021-02-26Added pkgcheck macOS CI test for native instruction builds.Nathan Moinvaziri
2021-02-26Pass configure and cmake arguments to pkg/abi check scripts.Nathan Moinvaziri
2021-02-25Reduce number of mingw i686 and x86_64 parallel test runs due to wine errors.Nathan Moinvaziri
2021-02-25Add porting guide.Hans Kristian Rosbach
Sync cmake dfltcc descriptions with README.
2021-02-25Fix incorrect --force-sse2 info in README.mdHans Kristian Rosbach
Describe DFLTCC options more similarly to the others.
2021-02-18.github: Test with old gcc and clang by using oldest supported ubuntu.Dan Kegel
(Getting compiler version is harder than it sounds :-( so skipping that for now.)
2021-02-18Reduce number of mingw x86_64 parallel test runs due to wine connection ↵Nathan Moinvaziri
timeout error.
2021-02-17Set CI build error log artifact retention to 30 days.Nathan Moinvaziri
2021-02-17Upload cmake and configure errors when build fails.Nathan Moinvaziri
2021-02-17Use cmake check_c_compiler_flag for -fno-semantic-interposition compiler ↵Nathan Moinvaziri
flag check.