From 014bbc3ea480e7cdcf07b0842c398ca42b49952e Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 27 Jan 2026 11:47:52 +0000
Subject: [PATCH 1/3] Initial plan
From 53f12d75db91be1d1c38773cea93a516c18e916b Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 27 Jan 2026 11:53:37 +0000
Subject: [PATCH 2/3] Add [Obsolete] attribute to
ReaderOptions.DefaultBufferSize
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
---
src/SharpCompress/Readers/ReaderOptions.cs | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/SharpCompress/Readers/ReaderOptions.cs b/src/SharpCompress/Readers/ReaderOptions.cs
index 49a91e93..6998ba9c 100644
--- a/src/SharpCompress/Readers/ReaderOptions.cs
+++ b/src/SharpCompress/Readers/ReaderOptions.cs
@@ -5,6 +5,14 @@ namespace SharpCompress.Readers;
public class ReaderOptions : OptionsBase
{
+ ///
+ /// The default buffer size for stream operations.
+ ///
+ [Obsolete(
+ "Use Constants.BufferSize instead. This constant will be removed in a future version."
+ )]
+ public const int DefaultBufferSize = 0x10000;
+
///
/// Look for RarArchive (Check for self-extracting archives or cases where RarArchive isn't at the start of the file)
///
From 010a38bb7369ccb646479dd638262a2082522575 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 27 Jan 2026 11:54:50 +0000
Subject: [PATCH 3/3] Add clarifying comment about buffer size value difference
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
---
src/SharpCompress/Readers/ReaderOptions.cs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/SharpCompress/Readers/ReaderOptions.cs b/src/SharpCompress/Readers/ReaderOptions.cs
index 6998ba9c..b016a3b6 100644
--- a/src/SharpCompress/Readers/ReaderOptions.cs
+++ b/src/SharpCompress/Readers/ReaderOptions.cs
@@ -7,6 +7,8 @@ public class ReaderOptions : OptionsBase
{
///
/// 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.
///
[Obsolete(
"Use Constants.BufferSize instead. This constant will be removed in a future version."