Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-91349: Expose the crc32 function from the lzma library #131721

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

morotti
Copy link
Contributor

@morotti morotti commented Mar 25, 2025

Hello,

This is a simple PR to expose the crc32 function from the lzma library.
The code and tests are very similar to the crc in binascii and zlib. I don't think it's too controversial.

I came across this while looking at compression libraries for #91349
crc32 is always available from the lzma library (xz-utils/liblzma.so). I think it should be exposed.
there are more hashing functions available (namely crc64) but they need compilation/runtime checks to verify whether they are available.

Regards.


📚 Documentation preview 📚: https://cpython-previews--131721.org.readthedocs.build/

rmmancom and others added 3 commits March 18, 2025 14:19
It is faster than the crc32 function from the zlib library.
Update zipfile to detect and use lzma.crc32
zlic.crc32 binascii.crc32, in order of preference.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants