diff --git a/SabreTools.IO.Test/Streams/ReadOnlyBitStreamTests.cs b/SabreTools.IO.Test/Streams/ReadOnlyBitStreamTests.cs
index 5421951..8086d89 100644
--- a/SabreTools.IO.Test/Streams/ReadOnlyBitStreamTests.cs
+++ b/SabreTools.IO.Test/Streams/ReadOnlyBitStreamTests.cs
@@ -34,11 +34,11 @@ namespace SabreTools.IO.Test.Streams
[Theory]
[InlineData(4, 0b00000101, 1)]
[InlineData(9, 0b10101010_1, 2)]
- public void ReadBitsLETest(int bits, uint expected, int position)
+ public void ReadBitsBETest(int bits, uint expected, int position)
{
byte[] data = [0b01010101, 0b01010101, 0b01010101, 0b01010101];
var stream = new ReadOnlyBitStream(new MemoryStream(data));
- uint? actual = stream.ReadBitsLE(bits);
+ uint? actual = stream.ReadBitsBE(bits);
Assert.NotNull(actual);
Assert.Equal(expected, actual);
@@ -48,11 +48,11 @@ namespace SabreTools.IO.Test.Streams
[Theory]
[InlineData(4, 0b00001010, 1)]
[InlineData(9, 0b10101010_1, 2)]
- public void ReadBitsBETest(int bits, uint expected, int position)
+ public void ReadBitsLETest(int bits, uint expected, int position)
{
byte[] data = [0b01010101, 0b01010101, 0b01010101, 0b01010101];
var stream = new ReadOnlyBitStream(new MemoryStream(data));
- uint? actual = stream.ReadBitsBE(bits);
+ uint? actual = stream.ReadBitsLE(bits);
Assert.NotNull(actual);
Assert.Equal(expected, actual);
diff --git a/SabreTools.IO/Streams/ReadOnlyBitStream.cs b/SabreTools.IO/Streams/ReadOnlyBitStream.cs
index 8304e7b..ef8ed06 100644
--- a/SabreTools.IO/Streams/ReadOnlyBitStream.cs
+++ b/SabreTools.IO/Streams/ReadOnlyBitStream.cs
@@ -88,11 +88,11 @@ namespace SabreTools.IO.Streams
}
///
- /// Read a multiple bits in little-endian, if possible
+ /// Read a multiple bits MSB-first, if possible
///
/// The next bits encoded in a UInt32, null on error or end of stream
/// [76543210] order within a byte, appended to output [76543210]
- public uint? ReadBitsLE(int bits)
+ public uint? ReadBitsBE(int bits)
{
uint value = 0;
for (int i = 0; i < bits; i++)
@@ -110,11 +110,11 @@ namespace SabreTools.IO.Streams
}
///
- /// Read a multiple bits in big-endian, if possible
+ /// Read a multiple bits in LSB-first, if possible
///
/// The next bits encoded in a UInt32, null on error or end of stream
/// [76543210] order within a byte, appended to output [01234567]
- public uint? ReadBitsBE(int bits)
+ public uint? ReadBitsLE(int bits)
{
uint value = 0;
for (int i = 0; i < bits; i++)