mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #1166] [MERGED] Add [Obsolete] attribute to ReaderOptions.DefaultBufferSize for backward compatibility #1603
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?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/1166
Author: @Copilot
Created: 1/27/2026
Status: ✅ Merged
Merged: 1/27/2026
Merged by: @adamhathcock
Base:
adam/buffer-size-consolidation← Head:copilot/sub-pr-1165📝 Commits (3)
014bbc3Initial plan53f12d7Add [Obsolete] attribute to ReaderOptions.DefaultBufferSize010a38bAdd clarifying comment about buffer size value difference📊 Changes
1 file changed (+10 additions, -0 deletions)
View changed files
📝
src/SharpCompress/Readers/ReaderOptions.cs(+10 -0)📄 Description
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.