mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #1166] Add [Obsolete] attribute to ReaderOptions.DefaultBufferSize for backward compatibility #1608
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/1166
State: closed
Merged: Yes
PR #1165 removed the public constant
ReaderOptions.DefaultBufferSize, causing compilation errors for consumers referencing it. This PR restores the constant with deprecation guidance.Changes
ReaderOptions.DefaultBufferSizewith original value (0x10000 = 65536 bytes) and[Obsolete]attribute directing users toConstants.BufferSizeBufferSizeproperty defaults toConstants.BufferSize(81920 bytes, matching .NET's Stream.CopyTo)Migration Path
Existing code compiles with warning instead of error:
New
ReaderOptionsinstances automatically use the improved 81920-byte default while existing constant references remain functional.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.