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

Add a comment to explain how Crc32HashCalc is sometimes Crc32C #266

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions zlib-rs/src/deflate/hash_calc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ impl RollHashCalc {
/// The methods of this struct can only be executed if the system has platform support, otherwise
/// the result is UB. Use [`Self::is_supported()`] to check at runtime whether the system has
/// support before executing any methods.
///
/// # Compatibility
///
/// The methods of this struct implement different CRC variants on different CPU types,
/// for consistency with zlib-ng. For example, the x86 implementation computes CRC-32C,
/// whereas the AArch64 implementation computes IEEE CRC-32. Therefore, this struct is
/// suitable for internal hash table use, but not for generating portable checksums.
pub struct Crc32HashCalc;

impl Crc32HashCalc {
Expand Down
Loading