Added Adler32 to System.IO.Hashing.#123601
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
src/libraries/System.IO.Hashing/src/System/IO/Hashing/Adler32.cs
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
src/libraries/System.IO.Hashing/src/System/IO/Hashing/Adler32.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.Hashing/src/System/IO/Hashing/Adler32.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.Hashing/src/System/IO/Hashing/Adler32.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.Hashing/src/System/IO/Hashing/Adler32.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.Hashing/src/System/IO/Hashing/Adler32.Vectorized.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.Hashing/src/System/IO/Hashing/Adler32.Avx2Sse.cs
Outdated
Show resolved
Hide resolved
|
Let me know if these changes look good as is or if any more changes are needed. |
src/libraries/System.IO.Hashing/src/System/IO/Hashing/Adler32.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.Hashing/src/System/IO/Hashing/Adler32.cs
Outdated
Show resolved
Hide resolved
🤖 Copilot Code Review — PR #123601Holistic AssessmentMotivation: The API is approved (issue #90191 has Approach: The implementation correctly follows the Adler-32 algorithm per RFC 1950: initial state of 1, modulo 65521 (largest prime < 65536), and big-endian output. The API shape matches the approved proposal and follows patterns established by sibling types ( Summary: Detailed Findings✅ Algorithm Correctness — Verified correct per RFC 1950The core algorithm is correctly implemented:
(Flagged by: GPT-5.2, Gemini 3 Pro, Claude Opus — consensus) ✅ API Consistency — Matches approved API and sibling type patterns
✅ Empty Input Handling — FixedThe earlier concern about
|
| Category | Finding |
|---|---|
| ✅ Correct | Algorithm implementation, API shape, empty input handling, endianness |
| Test vector oracle confirmation, NMax boundary test coverage | |
| 💡 Optional | Vectorization (deferred OK), test comments, doc formatting |
Verdict: The code looks correct and follows library patterns. Recommend merge after confirming test vectors were generated from an authoritative source. Vectorization can follow in a separate PR as planned.
This review was generated using multi-model analysis (GPT-5.2, Gemini 3 Pro, Claude Opus 4.5). Findings flagged by multiple models are noted.
Fixes dotnet#90191. Signed-off-by: AraHaan <[email protected]>
Co-authored-by: Jeremy Barton <[email protected]>
Also another attempt at fixing the expected hash values as well.
Signed-off-by: AraHaan <[email protected]>
Signed-off-by: AraHaan <[email protected]>
Signed-off-by: AraHaan <[email protected]>
Signed-off-by: AraHaan <[email protected]>
Co-authored-by: Kevin Jones <[email protected]>
Added another remarks entry.
…c to UpdateScalar(). Also added optional spot where ARM intrinsics can be used in UpdateScalar if vectorization is not possible.
Signed-off-by: AraHaan <[email protected]>
Signed-off-by: AraHaan <[email protected]>
f776e19 to
55235a4
Compare
Fixes #90191.