Rename BufferedStream to BufferedStreamReader due to functionality

This commit is contained in:
Matt Nadareski
2026-03-24 11:10:27 -04:00
parent aa63869881
commit 2592dd9bb6
4 changed files with 10 additions and 11 deletions

View File

@@ -14,7 +14,7 @@ namespace SabreTools.IO.Compression.SZDD
/// <summary>
/// Source stream for the decompressor
/// </summary>
private readonly BufferedStream _source;
private readonly BufferedStreamReader _source;
/// <summary>
/// SZDD format being decompressed
@@ -43,7 +43,7 @@ namespace SabreTools.IO.Compression.SZDD
// Initialize the window with space characters
_window = Array.ConvertAll(_window, b => (byte)0x20);
_source = new BufferedStream(source);
_source = new BufferedStreamReader(source);
}
/// <summary>

View File

@@ -3,7 +3,7 @@ using Xunit;
namespace SabreTools.IO.Test
{
public class BufferedStreamTests
public class BufferedStreamReaderTests
{
#region ReadNextByte
@@ -11,7 +11,7 @@ namespace SabreTools.IO.Test
public void ReadNextByte_Empty_Null()
{
var source = new MemoryStream();
var stream = new BufferedStream(source);
var stream = new BufferedStreamReader(source);
byte? actual = stream.ReadNextByte();
Assert.Null(actual);
}
@@ -20,7 +20,7 @@ namespace SabreTools.IO.Test
public void ReadNextByte_Filled_ValidPosition_Byte()
{
var source = new MemoryStream(new byte[1024]);
var stream = new BufferedStream(source);
var stream = new BufferedStreamReader(source);
byte? actual = stream.ReadNextByte();
Assert.Equal((byte)0x00, actual);
}
@@ -30,7 +30,7 @@ namespace SabreTools.IO.Test
{
var source = new MemoryStream(new byte[1024]);
source.Seek(0, SeekOrigin.End);
var stream = new BufferedStream(source);
var stream = new BufferedStreamReader(source);
byte? actual = stream.ReadNextByte();
Assert.Null(actual);
}

View File

@@ -3,10 +3,9 @@ using System.IO;
namespace SabreTools.IO
{
/// <summary>
/// Buffered stream that reads in blocks
/// Buffered stream reader that reads in blocks
/// </summary>
/// <remarks>Not a true <see cref="Stream"/> implementation yet</remarks>
public class BufferedStream
public class BufferedStreamReader
{
/// <summary>
/// Source stream for populating the buffer
@@ -31,7 +30,7 @@ namespace SabreTools.IO
/// <summary>
/// Create a new buffered stream
/// </summary>
public BufferedStream(Stream source)
public BufferedStreamReader(Stream source)
{
_source = source;
}

View File

@@ -8,7 +8,6 @@ This library contains both custom stream implementations and utility classes for
| Class | Notes |
| --- | --- |
| `BufferedStream` | Not a true stream implementation used for buffered, single-byte reads |
| `ReadOnlyBitStream` | Read-only stream implementation allowing bitwise reading |
| `ReadOnlyCompositeStream` | Read-only stream implementation that wraps multiple source streams in a set order |
| `ReadOnlyViewStream` | Read-only stream implementation representing a view into source data |
@@ -17,5 +16,6 @@ This library contains both custom stream implementations and utility classes for
| Class | Notes |
| --- | --- |
| `BufferedStreamReader` | Stream reader used for buffered, single-byte reads |
| `ParentablePath` | Class that represents a path that is rooted by a parent directory |
| `PathTool` | Utility class for common Path-related functions |