这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Dead2
Copy link
Member

@Dead2 Dead2 commented Dec 29, 2024

New Years release, zlib-ng's 10 years celebration

My first commit in this repo was in October 8th 2014, although I do remember that I started during summer vacation and had made the zlib cleanup more of a mess than I wanted, so I restarted from scratch in October when I had gotten a better overview of the code and what I wanted to do to clean it up. At that point zlib-ng was not very likely to go anywhere, but despite the odds, over time several people found it and opened PRs with their own improvements, a few of those became long-time contributors, and a few years ago zlib-ng finally became more than an experimental fork. Zlib-ng has since gained traction and several distros have started replacing stock zlib with zlib-ng in compat mode.

The last year have been so lucky to have received donations so that we were able to invest in a couple Rpi5 systems for testing, and we are looking forward to hopefully being able to acquire more architectures for development and testing, Risc-V would be interesting for example.

Release 2.2.3

This time we have two code fixes for potentially unsafe access, although we have not had any bug-reports about these.
It also contains several optimizations. Especially of note, inflate has been optimized on various instruction sets and also the generic C code has seen improvements, and we have improvements for arches where unaligned accesses are not possible (lacking instructions to handle unaligned access) and also improvements on big endian.

Example benchmarks:
x86-64 AVX2: Inflate ~17.8% faster, Deflate unchanged.
Aarch64: ~Inflate 2.3% faster, Deflate unchanged.

We also took some time to do a comprehensive cleanup of the now misleading UNALIGNED_OK option and of all the "unaligned" functions. We have noticed that some distros have been disabling these, fearing they are using potentially unsafe unaligned pointers, but we already fixed that in 2.1.0-beta1. Since then, these "unaligned" settings/functions have been referring to using unaligned accesses in safe ways, like utilizing unaligned intrinsics or memcpy to fix alignment for example and selecting what safe method is optimal to the arch.
Because this was obviously misleading certain distros into disabling these optimizations, we have cleaned it up, removed a lot of unnecessary preprocessor checks, and made detection of optimal methods happen during compile. As a bonus, this cleaned up a lot of code and also let us not compile in many extra variants of compare256/longest_match, saving about 8-10KB of library size.

Fix for potentially unsafe access

Optimizations / Cleanups

Big Endian

Buildsys fixes / minor fixes

CI

Summary by CodeRabbit

  • Version Update
    • Upgraded zlib-ng library from version 2.2.2 to 2.2.3
    • Updated version information across multiple configuration and header files
    • Incremented library version and revision numbers

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 29, 2024

Walkthrough

The pull request involves updating the version number of the zlib-ng library from 2.2.2 to 2.2.3 across multiple files. This version increment is consistently applied in the Makefile, header files (zlib-ng.h.in and zlib.h.in), and the source file zutil.c. The changes are purely versioning-related and do not modify any functional aspects of the library.

Changes

File Change Summary
Makefile.in Version number updated from VER=2.2.2 to VER=2.2.3
zlib-ng.h.in - Version string updated to "2.2.3"
- Version number updated to 0x020203F0L
- Revision number incremented to 3
zlib.h.in - Version string updated to "2.2.3"
- Version number updated to 0x020203F0L
- Revision number incremented to 3
zutil.c Version string updated from " zlib-ng 2.2.2" to " zlib-ng 2.2.3"

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bf05e88 and 9ed235a.

📒 Files selected for processing (4)
  • Makefile.in (1 hunks)
  • zlib-ng.h.in (1 hunks)
  • zlib.h.in (1 hunks)
  • zutil.c (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • Makefile.in
  • zutil.c
  • zlib.h.in
  • zlib-ng.h.in

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@codecov
Copy link

codecov bot commented Dec 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.44%. Comparing base (bf05e88) to head (9ed235a).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1838   +/-   ##
========================================
  Coverage    82.43%   82.44%           
========================================
  Files          138      138           
  Lines        10994    10994           
  Branches      2778     2778           
========================================
+ Hits          9063     9064    +1     
+ Misses        1237     1235    -2     
- Partials       694      695    +1     

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

@Dead2 Dead2 merged commit cbb6ec1 into develop Jan 1, 2025
290 of 292 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Feb 9, 2025
@coderabbitai coderabbitai bot mentioned this pull request Jul 15, 2025
@coderabbitai coderabbitai bot mentioned this pull request Nov 5, 2025
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.

2 participants