Skip to content

Commit d11f6ae

Browse files
authored
Merge pull request #1166 from adamhathcock/copilot/sub-pr-1165
Add [Obsolete] attribute to ReaderOptions.DefaultBufferSize for backward compatibility
2 parents d52facd + 010a38b commit d11f6ae

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/SharpCompress/Readers/ReaderOptions.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ namespace SharpCompress.Readers;
55

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

0 commit comments

Comments
 (0)