diff --git a/README.md b/README.md index 79d50a0..7e5d8c7 100644 --- a/README.md +++ b/README.md @@ -136,11 +136,11 @@ public class Program // First, compression using var compressed = new MemoryStream(); - using (var compressor = new SnappyStream(compressed, CompressionMode.Compress, false)) { + using (var compressor = new SnappyStream(compressed, CompressionMode.Compress, true)) { await fileStream.CopyToAsync(compressor); // Disposing the compressor also flushes the buffers to the inner stream - // We pass false to the constructor above so that it doesn't dispose the inner stream + // We pass true to the constructor above so that it doesn't close/dispose the inner stream // Alternatively, we could call compressor.Flush() } diff --git a/Snappier/SnappyStream.cs b/Snappier/SnappyStream.cs index 8b03e1e..37367a4 100644 --- a/Snappier/SnappyStream.cs +++ b/Snappier/SnappyStream.cs @@ -51,7 +51,7 @@ public SnappyStream(Stream stream, CompressionMode mode) /// /// Source or destination stream. /// Compression or decompression mode. - /// If true, close the stream when the SnappyStream is closed. + /// If true, leave the inner stream open when the SnappyStream is closed. /// is null. /// Stream read/write capability doesn't match with . /// Invalid .