Commit Graph

104 Commits

Author SHA1 Message Date
Hans Kristian Rosbach
860e4cff79 2.2.4 Release 2025-02-10 23:43:59 +01:00
Hans Kristian Rosbach
cbb6ec1d74 2.2.3 Release 2025-01-01 01:22:18 +01:00
Hans Kristian Rosbach
c939498c7f 2.2.2 Release 2024-09-17 14:12:24 +02:00
Hans Kristian Rosbach
d54e3769be 2.2.1 Release 2024-07-02 15:55:49 +02:00
Hans Kristian Rosbach
80514c17b3 2.2.0 Release 2024-06-19 14:19:52 +02:00
Hans Kristian Rosbach
5b208676f8 Clean up memory allocation functions that are no longer used, and its tests.
Co-authored-by: Ilya Leoshkevich <iii@linux.ibm.com>
2024-05-28 16:35:13 +02:00
Nathan Moinvaziri
9d33c8163d Use zng_alloc_aligned in unit tests to prevent having to use C++17.
alloc_aligned when using in C++ requires C++17 standard. zutil_p.h
include removed from test_crc32 since it was causing the same issue and was
not really needed.
2024-02-07 19:16:28 +01:00
Hans Kristian Rosbach
74253725f8 2.1.6 Release 2024-01-10 23:25:47 +01:00
Hans Kristian Rosbach
2bc66887dd 2.1.5 Release 2023-11-27 13:26:56 +01:00
Hans Kristian Rosbach
9fb955b8ba 2.1.4 Release 2023-10-19 18:45:33 +02:00
Hans Kristian Rosbach
cf89cf3503 2.1.3 Release 2023-06-29 10:23:11 +02:00
Hans Kristian Rosbach
f75c6856c3 2.1.2 Release 2023-06-07 21:12:16 +02:00
Hans Kristian Rosbach
ee68fc338f 2.1.1-Beta2
Changes since 2.1.0-Beta1:
- Fix missing exported z_size_t type in zlib.h (zlib-compat mode).
- Fix two Coverity warnings
- Fix CMake GNUInstallDirs usage
- Configure/CMake improvements for compilers with early AVX512-VNNI support (GCC8.0 etc)
- Microptimalization for AVX512 implementation of CRC32
- Optimized deflate_rle compression, also added related test and benchmark.
- Add testing of file_compress/file_uncompress in minigzip/minideflate
- Add emulated RISC-V to CI test workflow
- Add deflate_fast to switchlevels test
- Fix abicheck CI test was not ignoring version string
- Fix MinGW CI test, broken by Github Actions VM image updates
2023-05-17 13:03:27 +02:00
Hans Kristian Rosbach
1c2698f9be 2.1.0 Beta1 release
This release contains two years of development and improvements to zlib-ng,
as well as fixes and changes inherited from zlib.

The 2.1.x version series has new targeted minumum buildsystem versions, as detailed on the Wiki https://github.com/zlib-ng/zlib-ng/wiki

Buildsystem:
- Many improvements to the CMake scripts.
- Improved support for detecting memory alignment functions.
- Improved support for unaligned access by letting the compiler promote code to unaligned if supported by the CPU.
- Remove x86 cpu feature detection for TZCNT, safely fallback to BSF.
- Enable using AVX512 intrinsics with GCC <9.

Optimizations and Enhancements:
- Decompression is a lot faster (56% faster measured on AVX2-capable x86-64)
- Compresson is improved for Level 9, at the cost of a little performance.
- Compression is improved for Level 3, by switching from deflate_fast to deflate_medium.
- Levels 3 and 4 have been reconfigured to provide a better gradual tradeoff for speed/compression between levels 2 and 5.
- Deflate_quick (Level 1) has been improved to default to a bigger windowsize and support changing the window size like the other levels.

New instruction set optimizations:
- Adler32 implementation using AVX512, AVX512-VNNI, VMX.
- CRC32-B implementation using VPCLMULQDQ & IBM-Z.
- Slide hash implementation using VMX.
- Compare256 implementations using SSE2, Neon, & POWER9.
- Inflate chunk copying using SSSE3 & VSX.

Compatibility and Porting:
- CRC-32 computation changes from madler/zlib. zlib-ng/zlib-ng#a6155234
- Compatible and up-to-date with zlib 1.2.13.
- Removed the usage of macros in zlib-ng.h, making life easier for languages that want to call the C functions without having the C preprocessor (Python, etc).

Improved support more environments:
- Apple M1
- vcpkg
- Emscripten

Testing:
- Tests have been converted to use GTest. Many new tests have also been added.
- Gbench support has been added to easily benchmark changes to performance-critical functions.

Misc:
- Several pieces of core code has been restructured or rewritten.
- Too many changes to list here, see the git commit log for the full list of changes.

Deprecations:
- Configure no longer has the full range of tests.
- NMake is no longer actively supported and tested, it is now community supported.
- See the wiki for minimum build system versions and deprecations https://github.com/zlib-ng/zlib-ng/wiki
2023-04-28 11:38:36 +02:00
Hans Kristian Rosbach
0ba881e3c1 Fix wrong names and invalid entries in zlib.map and zlib-ng.map 2023-02-09 01:54:19 +01:00
Hans Kristian Rosbach
cf5bb01da9 Fix prefixing for internal functions calloc/cfree 2023-02-09 01:54:19 +01:00
Pavel P
359e572966 Use const char* for z_error argument 2023-01-20 00:29:21 +01:00
Nathan Moinvaziri
b047c7247f Prefix shared functions to prevent symbol conflict when linking native api against compat api. 2023-01-09 15:10:11 +01:00
Nathan Moinvaziri
24d1d8497e Rename memory alignment functions because they handle custom allocator which is the first parameter so having calloc and cfree (c = custom) is confusing in the name. 2022-04-14 00:00:22 +02:00
Nathan Moinvaziri
d955c068db Fixed signed comparison warning in zng_calloc_aligned.
zutil.c: In function ‘zng_calloc_aligned’:
zutil.c:133:20: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘long unsigned int’ [-Wsign-compare]
2022-03-27 19:17:21 +02:00
Nathan Moinvaziri
80d9b16455 Bypass memory alignment compensation if not using custom allocator. 2022-03-15 18:32:15 +01:00
Nathan Moinvaziri
a39e323a4d Added memory alignment compensation functions for users who may be using custom allocators that don't align on the same boundary zlib-ng expects. 2022-03-15 18:32:15 +01:00
Nathan Moinvaziri
88d077a40a Added build system check for posix_memalign support.
Co-authored-by: concatime <concatime@users.noreply@github.com>
Co-authored-by: Mika Lindqvist <postmaster@raasu.org>
2021-07-07 19:55:08 +02:00
Nathan Moinvaziri
857e4f1e04 Added Z_UNUSED define for ignore unused variables. 2021-06-18 09:16:44 +02:00
Hans Kristian Rosbach
74436cfb05 Open up develop branch for non-stable commits.
Replace ZLIBNG_VERNUM with a larger one with space for more accurate information.
Replace ZLIBNG_VER_SUBREVISION with ZLIBNG_VER_MODIFIED and ZLIBNG_VER_STATUS.
2021-06-12 11:41:17 +02:00
Hans Kristian Rosbach
558192b4a6 Version 2.0.4
- Fix inflate corruption #982
- Minor code cleanup #983 #984
- Fix mpicc compilation #959
- Fix build on NetBSD #964
- Fix build on OpenBSD #970
- Fix build on Cygwin #972 #974
- Fix linter warnings in configure #975
- Spelling fixes #961
- Improve unistd.h handling #960
- Remove stdarg.h detection #976
- CI/Test improvements #977 #981 #985
- Cmake improvements #980 #989
2021-06-11 21:35:20 +02:00
Hans Kristian Rosbach
54b1c13c37 Version 2.0.3
- Include porting guide in release packages #917
- Documentation improvements #913 #949
- Added Windows ARM binaries in release packages #916
- Fix crash on ARMv7 #927
- Fix building on FreeBSD #921
- Fix building with musl on aarch64 #936 #952
- Fix ARM float-abi detection #918
- Fix cmake detection of risc-v architectures #942
- Minor buildsystem fixes #922 #924 #933 #938 #950
- Improve zlib-compat build #915 #944
- CI/Test improvements #926 #929 #927 #937 #939 #940
2021-05-13 11:03:11 +02:00
Hans Kristian Rosbach
5fe25907ea Version 2.0.2 2021-03-23 18:31:50 +01:00
Hans Kristian Rosbach
b7af2db53f Version 2.0.1 - Hotfix 2021-03-17 10:24:36 +01:00
Hans Kristian Rosbach
ac18b0c35c Stable release 2.0.0 2021-03-16 20:46:50 +01:00
Hans Kristian Rosbach
7606b9f39a Version 2.0.0 Release Candidate 2 2021-01-29 09:48:01 +01:00
Hans Kristian Rosbach
4d9734bd87 Version 2.0.0 Release Candidate 1 2021-01-11 22:12:04 +01:00
Nathan Moinvaziri
febeec5218 Optionally include gzguts.h with WITH_GZFILEOP flag. 2020-09-16 09:10:07 +02:00
Hans Kristian Rosbach
696e387ef1 Simplify zng_calloc and zng_cfree.
Make new static functions zng_alloc and zng_free available to other parts of the code.
Always request aligned allocations, even if UNALIGNED_OK is set.
2020-09-14 12:04:30 +02:00
Hans Kristian Rosbach
a1ae8834d3 Remove some of the references to the unreleased zlib 1.2.12 2020-09-13 13:07:54 +02:00
Nathan Moinvaziri
1f10aa4e29 Rename ZEXPORT and ZEXTERN for consistency. 2020-08-31 12:33:16 +02:00
Nathan Moinvaziri
7cffba4dd6 Rename ZLIB_INTERNAL to Z_INTERNAL for consistency. 2020-08-31 12:33:16 +02:00
Mika Lindqvist
28e5e73f34
Reintroduce support for ZLIB_CONST in compat mode. (#704)
* Reintroduce support for ZLIB_CONST in compat mode.
2020-08-23 09:58:57 +02:00
Nathan Moinvaziri
d5d1f7e81b Fixed extra symbols added to ABI when zlib-compat specified. 2020-08-02 18:32:25 +02:00
Nathan Moinvaziri
8f110451f7 Remove support for DYNAMIC_CRC_TABLE which was broken. 2020-05-25 15:17:46 +02:00
Pavel P
762068fdc6 Remove cvs keywords 2020-03-17 15:26:47 +01:00
Nathan Moinvaziri
98666ba14a Support aligned alloc/free functions for Windows and define them only if MZ_ZALLOC is not defined. 2020-02-07 19:33:30 +01:00
Nathan Moinvaziri
e0a711cdde Fixed formatting, 4 spaces for code intent, 2 spaces for preprocessor indent, initial function brace on the same line as definition, removed extraneous spaces and new lines. 2020-02-07 10:44:20 +01:00
Hans Kristian Rosbach
74a3e05bfa
Remove BUILDFIXED and MAKEFIXED. (#375)
Remove BUILDFIXED support.
Split out MAKEFIXED into a separate 'makefixed' util that is easy
to use if we want to regenerate/verify inffixed.h.
2019-08-08 10:38:06 +02:00
Nathan Moinvaziri
f06c71f981 Add zng_ prefix to internal functions to avoid linking conflicts with zlib. (#363) 2019-07-18 13:21:13 +02:00
Mark Adler
c534d1ad53 Fix compilation with --solo and --debug combined.
However this ends up not really being solo, since it has to
include external libraries.
2019-01-09 15:11:53 +01:00
Mika Lindqvist
df1fd1567f Move private defines from zconf.h and zconf-ng.h to zbuild.h
* move definition of z_size_t to zbuild.h
2018-03-22 10:18:27 +01:00
Mika Lindqvist
3e7e5e55b8 Align in 16-byte boundary when UNALIGNED_OK is undefined. 2018-02-22 10:11:19 +01:00
Mika Lindqvist
aff0fc6e3c Adapt code to support PREFIX macros and update build scripts 2018-01-31 10:45:29 +01:00
Hans Kristian Rosbach
f5e888a6a6 Add function prefix (zng_) to all exported functions to allow zlib-ng
to co-exist in an application that has been linked to something that
depends on stock zlib. Previously, that would cause random problems
since there is no way to guarantee what zlib version is being used
for each dynamically linked function.

Add the corresponding zlib-ng.h.

Tests, example and minigzip will not compile before they have been
adapted to use the correct functions as well.
Either duplicate them, so we have minigzip-ng.c for example, or add
compile-time detection in the source code.
2018-01-31 10:45:29 +01:00