Skip to content

2.3.0 RC1#1994

Merged
Dead2 merged 1 commit intodevelopfrom
next-stable
Nov 6, 2025
Merged

2.3.0 RC1#1994
Dead2 merged 1 commit intodevelopfrom
next-stable

Conversation

@Dead2
Copy link
Copy Markdown
Member

@Dead2 Dead2 commented Nov 5, 2025

This is a feature release that introduces several optimizations and improvements.

The biggest addition is the Chorba CRC32 code, this is a major improvement to crc32 calculation speed for pre-CLMUL cpus. For now, we have 3 variants of Chorba: Generic, SSE2 and SSE4.1.
We have also removed our detection and usage of the various aligned alloc functions, because we need to support an application-provided alloc function, we have to check and fix buffer alignments anyway, so now we just use malloc() if none is provided.
The gzopen-related init code has been rewritten to clean up and unify the gzread and gzwrite behavior. Several malloc calls removed, places in the gz* code with malloc calls is down from 7 to 4 places (using gzopen will now only result in 2-3 calls to malloc total).

The reason for releasing 2.3.x instead of another 2.2 release is the introduction of Chorba CRC32, rewritten gzopen init code, the increased CMake version requirement, and the removal of NMake project files. There should not be any API/ABI changes (other than on the previously failing platforms fixed by #1980).

2.3.0

Important fixes/changes

Optimizations

Arch-Specific improvements/optimizations

Buildsystem

Tests/Benchmarks

CI

Misc

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 5, 2025

Walkthrough

Version constants updated across header and source files to reflect a transition from beta to release candidate status. ZLIBNG_VERNUM, ZLIBNG_VER_STATUS, ZLIBNG_VER_STATUSH macros modified, and the public version string updated from 2.3.0-beta to 2.3.0-rc1.

Changes

Cohort / File(s) Change Summary
Version macro updates
zlib-ng.h.in, zlib.h.in
Updated ZLIBNG_VERNUM from 0x02030010L to 0x020300A0L, ZLIBNG_VER_STATUS from 1 to A, and ZLIBNG_VER_STATUSH from 0x1 to 0xA to reflect RC1 status
Version string update
zutil.c
Changed PREFIX3(vstring) initialization from " zlib-ng 2.3.0-beta" to " zlib-ng 2.3.0-rc1"

Possibly related PRs

  • Prep for 2.3.0 beta #1939: Updates the same version-related macros and public version string to advance from beta to RC status.
  • Fix typos #1825: Modifies ZLIBNG_VERNUM, ZLIBNG_VER_STATUS, and ZLIBNG_VER_STATUSH versioning constants in header files.
  • 2.2.3 Release #1838: Updates version-related macros and public version string constants in the same files.

Suggested labels

Build Env, cleanup, Compatibility

Suggested reviewers

  • nmoinvaz

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title '2.3.0 RC1' is very vague and generic; it states only the version number without conveying the specific nature of the changes or what the PR accomplishes. Revise the title to describe the actual changes, such as 'Version 2.3.0 RC1: update version constants and status strings' or something more descriptive of the technical changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The PR description comprehensively covers the actual changes: Chorba CRC32 optimization, gzopen rewrite, malloc reduction, removal of aligned alloc detection, CMake version bump, and NMake removal—all matching the version bump from 2.2 to 2.3.0 reflected in the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch next-stable

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.76%. Comparing base (33f4dc4) to head (3ca4f24).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #1994       +/-   ##
============================================
+ Coverage    40.67%   81.76%   +41.09%     
============================================
  Files           73      161       +88     
  Lines         7364    12960     +5596     
  Branches      1308     3149     +1841     
============================================
+ Hits          2995    10597     +7602     
+ Misses        4112     1317     -2795     
- Partials       257     1046      +789     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Dead2
Copy link
Copy Markdown
Member Author

Dead2 commented Nov 5, 2025

x86-64 on a Intel i7-11700K (Rocket Lake)

2.3.0-beta1

 Level   Comp   Comptime min/avg/max/stddev  Decomptime min/avg/max/stddev  Compressed size
 1     54.185%  0.0776/0.0783/0.0784/0.0001    0.0304/0.0304/0.0304/0.0000        8,526,745
 2     43.871%  0.1254/0.1258/0.1260/0.0002    0.0298/0.0299/0.0299/0.0000        6,903,702
 3     42.388%  0.1500/0.1504/0.1507/0.0002    0.0287/0.0287/0.0287/0.0000        6,670,239
 4     41.647%  0.1743/0.1750/0.1752/0.0002    0.0279/0.0280/0.0280/0.0000        6,553,746
 5     41.216%  0.1924/0.1929/0.1932/0.0002    0.0278/0.0279/0.0279/0.0000        6,485,936
 6     41.038%  0.2381/0.2385/0.2387/0.0002    0.0275/0.0275/0.0275/0.0000        6,457,827
 7     40.778%  0.3344/0.3350/0.3355/0.0003    0.0277/0.0278/0.0278/0.0000        6,416,941
 8     40.704%  0.4425/0.4430/0.4435/0.0003    0.0278/0.0278/0.0279/0.0000        6,405,249
 9     40.409%  0.5043/0.5048/0.5052/0.0002    0.0269/0.0270/0.0271/0.0000        6,358,951

 avg1  42.915%                       0.2493                         0.0283
 tot                               112.1852                        12.7519       60,779,336

   text    data     bss     dec     hex filename
 171921    1328       8  173257   2a4c9 libz-ng.so.2

### 2.3.0-beta1 AVX512 Disabled
 Level   Comp   Comptime min/avg/max/stddev  Decomptime min/avg/max/stddev  Compressed size
 1     54.185%  0.0782/0.0790/0.0791/0.0001    0.0308/0.0309/0.0309/0.0000        8,526,745
 2     43.871%  0.1273/0.1276/0.1278/0.0001    0.0304/0.0304/0.0304/0.0000        6,903,702
 3     42.388%  0.1526/0.1532/0.1534/0.0001    0.0292/0.0293/0.0293/0.0000        6,670,239
 4     41.647%  0.1766/0.1772/0.1775/0.0002    0.0285/0.0285/0.0286/0.0000        6,553,746
 5     41.216%  0.1940/0.1943/0.1946/0.0002    0.0283/0.0284/0.0285/0.0000        6,485,936
 6     41.038%  0.2394/0.2399/0.2401/0.0002    0.0280/0.0281/0.0281/0.0000        6,457,827
 7     40.778%  0.3353/0.3359/0.3362/0.0003    0.0283/0.0284/0.0285/0.0000        6,416,941
 8     40.704%  0.4432/0.4439/0.4444/0.0003    0.0283/0.0284/0.0285/0.0000        6,405,249
 9     40.409%  0.5040/0.5049/0.5053/0.0003    0.0274/0.0275/0.0275/0.0000        6,358,951

 avg1  42.915%                       0.2507                         0.0289
 tot                               112.7954                        12.9997       60,779,336

   text    data     bss     dec     hex filename
 155081    1328       8  156417   26301 libz-ng.so.2

v2.2.5

 Level   Comp   Comptime min/avg/max/stddev  Decomptime min/avg/max/stddev  Compressed size
 1     54.185%  0.0778/0.0788/0.0789/0.0002    0.0302/0.0303/0.0303/0.0000        8,526,745
 2     43.871%  0.1298/0.1301/0.1303/0.0001    0.0297/0.0298/0.0298/0.0000        6,903,702
 3     42.388%  0.1549/0.1554/0.1555/0.0001    0.0286/0.0287/0.0287/0.0000        6,670,239
 4     41.647%  0.1790/0.1794/0.1796/0.0002    0.0279/0.0279/0.0280/0.0000        6,553,746
 5     41.216%  0.1970/0.1974/0.1976/0.0002    0.0277/0.0278/0.0278/0.0000        6,485,936
 6     41.038%  0.2431/0.2436/0.2438/0.0002    0.0274/0.0274/0.0275/0.0000        6,457,827
 7     40.778%  0.3403/0.3411/0.3415/0.0003    0.0277/0.0277/0.0278/0.0000        6,416,941
 8     40.704%  0.4481/0.4492/0.4495/0.0003    0.0277/0.0278/0.0278/0.0000        6,405,249
 9     40.409%  0.5192/0.5199/0.5204/0.0003    0.0269/0.0270/0.0270/0.0000        6,358,951

 avg1  42.915%                       0.2550                         0.0283
 tot                               114.7435                        12.7189       60,779,336

   text    data     bss     dec     hex filename
 147012    1344       8  148364   2438c libz-ng.so.2

### 2.2.5 AVX512 Disabled
 Level   Comp   Comptime min/avg/max/stddev  Decomptime min/avg/max/stddev  Compressed size
 1     54.185%  0.0782/0.0790/0.0791/0.0002    0.0306/0.0307/0.0307/0.0000        8,526,745
 2     43.871%  0.1305/0.1308/0.1310/0.0001    0.0300/0.0301/0.0302/0.0000        6,903,702
 3     42.388%  0.1556/0.1560/0.1562/0.0001    0.0288/0.0290/0.0290/0.0000        6,670,239
 4     41.647%  0.1795/0.1800/0.1802/0.0002    0.0282/0.0283/0.0283/0.0000        6,553,746
 5     41.216%  0.1979/0.1983/0.1986/0.0002    0.0281/0.0282/0.0282/0.0000        6,485,936
 6     41.038%  0.2436/0.2440/0.2443/0.0002    0.0278/0.0279/0.0279/0.0000        6,457,827
 7     40.778%  0.3412/0.3417/0.3420/0.0002    0.0281/0.0282/0.0282/0.0000        6,416,941
 8     40.704%  0.4488/0.4495/0.4499/0.0003    0.0281/0.0282/0.0282/0.0000        6,405,249
 9     40.409%  0.5138/0.5147/0.5152/0.0003    0.0272/0.0273/0.0273/0.0000        6,358,951

 avg1  42.915%                       0.2549                         0.0286
 tot                               114.7011                        12.8863       60,779,336

   text    data     bss     dec     hex filename
 132980    1344       8  134332   20cbc libz-ng.so.2

AVX512:

  • 2.23% faster compression overall
  • Level 1: 0.63% faster
  • Level 6: 2.1% faster
  • Level 9: 2.83% faster
    AVX2:
  • 1.66% faster compression overall
  • Level 1: same
  • Level 6: 1.68% faster
  • Level 9: 1.9% faster

Decompression seems to bench slightly slower, but considering the very short times involved, it is hard to tell whether it is real or incidental, it does vary a bit between builds of different configs.

@Dead2 Dead2 merged commit 20083c8 into develop Nov 6, 2025
303 of 304 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant