diff --git a/src/SharpCompress/IO/SharpCompressStream.cs b/src/SharpCompress/IO/SharpCompressStream.cs index 00c0ada2..9217139a 100644 --- a/src/SharpCompress/IO/SharpCompressStream.cs +++ b/src/SharpCompress/IO/SharpCompressStream.cs @@ -8,6 +8,55 @@ using System.Threading.Tasks; namespace SharpCompress.IO; +/// +/// A stream wrapper that provides buffering and position tracking for an underlying stream. +/// +/// +/// SharpCompressStream is part of the stream handling architecture alongside: +/// +/// +/// +/// +/// IByteSource: Represents where bytes come from (file or stream). +/// An IByteSource.OpenRead() returns a raw stream that may be wrapped by SharpCompressStream. +/// +/// +/// +/// +/// SourceStream: Combines multiple IByteSource instances into a unified stream, +/// handling split archives and multi-volume scenarios. +/// +/// +/// +/// +/// SharpCompressStream: Wraps a single stream to provide buffering, position tracking, +/// and implements IStreamStack for hierarchical stream operations. +/// +/// +/// +/// +/// +/// Key features: +/// +/// +/// Optional buffering with configurable buffer size +/// Position tracking independent of underlying stream +/// Stream lifecycle management (LeaveOpen, ThrowOnDispose) +/// IStreamStack implementation for stream stack operations +/// +/// +/// +/// Usage example: +/// +/// +/// // Wrap a stream with buffering +/// var bufferedStream = SharpCompressStream.Create( +/// stream: rawStream, +/// leaveOpen: true, +/// throwOnDispose: false, +/// bufferSize: 4096); +/// +/// public class SharpCompressStream : Stream, IStreamStack { #if DEBUG_STREAMS