Skip to content

Allow users of the SDK to decide about hardware-accelerated CRC#128

Open
drubery wants to merge 1 commit intoip7z:mainfrom
drubery:main
Open

Allow users of the SDK to decide about hardware-accelerated CRC#128
drubery wants to merge 1 commit intoip7z:mainfrom
drubery:main

Conversation

@drubery
Copy link
Copy Markdown

@drubery drubery commented Jun 26, 2025

It's slightly helpful for fuzzers to be able to disable CRC checks. This was previously done in Chromium by overriding g_CrcTable, but hardware-accelerated CRC breaks that. This PR would allow Chromium to define Z7_NO_CRC_HW_FORCE to instead leave hardware acceleration dependent on g_Crc_Algo.

See also https://crrev.com/c/6619906.

Copy link
Copy Markdown

@gyurix gyurix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use case makes sense for embedders/fuzzers.

Main concern is API shape: exporting raw g_Crc_Algo in public header leaks internal policy/state as public surface. That is harder to evolve than a narrow setter/config API, and current patch does not document valid values/semantics clearly.

Diff is otherwise small and clean.

Merge readiness: 6/10. Before merge: document allowed values or replace global exposure with a smaller public control point.

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