diff --git a/src/SharpCompress/IO/SeekableSharpCompressStream.cs b/src/SharpCompress/IO/SeekableSharpCompressStream.cs index 69dbd147..bad123bb 100644 --- a/src/SharpCompress/IO/SeekableSharpCompressStream.cs +++ b/src/SharpCompress/IO/SeekableSharpCompressStream.cs @@ -80,7 +80,7 @@ internal sealed partial class SeekableSharpCompressStream : SharpCompressStream } } - public override void StartRecording(int minBufferSize = 0) => + public override void StartRecording(int? minBufferSize = null) => _recordedPosition = _stream.Position; public override void StopRecording() => _recordedPosition = null; diff --git a/src/SharpCompress/IO/SharpCompressStream.cs b/src/SharpCompress/IO/SharpCompressStream.cs index 9a6b2e49..26560024 100644 --- a/src/SharpCompress/IO/SharpCompressStream.cs +++ b/src/SharpCompress/IO/SharpCompressStream.cs @@ -179,13 +179,13 @@ public partial class SharpCompressStream : Stream, IStreamStack /// Begins recording reads so that can replay them. /// /// - /// Minimum ring buffer capacity in bytes. When greater than zero and larger than + /// Minimum ring buffer capacity in bytes. When provided and larger than /// , the ring buffer is allocated /// with this size. Pass the largest amount of compressed data that may be consumed /// during format detection before the first rewind. Defaults to - /// when zero or not supplied. + /// when null or not supplied. /// - public virtual void StartRecording(int minBufferSize = 0) + public virtual void StartRecording(int? minBufferSize = null) { if (_isPassthrough) { @@ -204,8 +204,8 @@ public partial class SharpCompressStream : Stream, IStreamStack if (_ringBuffer is null) { var size = - minBufferSize > Constants.RewindableBufferSize - ? minBufferSize + minBufferSize.GetValueOrDefault() > Constants.RewindableBufferSize + ? minBufferSize.GetValueOrDefault() : Constants.RewindableBufferSize; _ringBuffer = new RingBuffer(size); }