Merge pull request #1166 from adamhathcock/copilot/sub-pr-1165

Add [Obsolete] attribute to ReaderOptions.DefaultBufferSize for backward compatibility
This commit is contained in:
Adam Hathcock
2026-01-27 11:57:54 +00:00
committed by GitHub

View File

@@ -5,6 +5,16 @@ namespace SharpCompress.Readers;
public class ReaderOptions : OptionsBase
{
/// <summary>
/// The default buffer size for stream operations.
/// This value (65536 bytes) is preserved for backward compatibility.
/// New code should use Constants.BufferSize instead (81920 bytes), which matches .NET's Stream.CopyTo default.
/// </summary>
[Obsolete(
"Use Constants.BufferSize instead. This constant will be removed in a future version."
)]
public const int DefaultBufferSize = 0x10000;
/// <summary>
/// Look for RarArchive (Check for self-extracting archives or cases where RarArchive isn't at the start of the file)
/// </summary>