mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #1000] Fix Windows test failures due to ArrayPool buffer sizing #1422
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/adamhathcock/sharpcompress/pull/1000
State: closed
Merged: Yes
Windows tests failed because
ArrayPool<byte>.Shared.Rent()returns buffers larger than requested on Windows but not on Linux. Tests usedtest.Length(actual rented size) instead of the requested size for reads and comparisons.Changes
Read()calls to use explicit size0x1000instead oftest.Length.Take(0x1000)to compare only the requested portion of rented buffersThis aligns with
ArrayPoolcontract: rented buffers may be larger than requested and only the specified portion should be used.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.