diff --git a/X10D/src/StreamExtensions/StreamExtensions.cs b/X10D/src/StreamExtensions/StreamExtensions.cs index 20e4e48..5d2a811 100644 --- a/X10D/src/StreamExtensions/StreamExtensions.cs +++ b/X10D/src/StreamExtensions/StreamExtensions.cs @@ -54,23 +54,23 @@ namespace X10D.StreamExtensions } /// - /// Reads a 2-byte signed integer from the current stream and advances the current position of the stream by two - /// bytes using the default endian encoding. + /// Writes a two-byte signed integer to the current stream using the system's default endian encoding, and advances + /// the stream position by two bytes. /// - /// The stream to read. - /// A 2-byte signed integer read from the current stream. + /// The stream from which the value should be read. + /// An two-byte signed integer read from the stream. public static short ReadInt16(this Stream stream) { return stream.ReadInt16(DefaultEndianness); } /// - /// Reads a 2-byte signed integer from the current stream and advances the current position of the stream by two - /// bytes using a specified endian encoding. + /// Writes a two-byte signed integer to the current stream using the specified endian encoding, and advances the + /// stream position by two bytes. /// - /// The stream to read. + /// The stream from which the value should be read. /// The endian encoding to use. - /// A 2-byte signed integer read from the current stream. + /// An two-byte unsigned integer read from the stream. public static short ReadInt16(this Stream stream, Endianness endianness) { var value = ReadInternal(stream, endianness); @@ -78,23 +78,23 @@ namespace X10D.StreamExtensions } /// - /// Reads a 4-byte signed integer from the current stream and advances the current position of the stream by four - /// bytes using the default endian encoding. + /// Writes a four-byte signed integer to the current stream using the system's default endian encoding, and advances + /// the stream position by four bytes. /// - /// The stream to read. - /// A 4-byte signed integer read from the current stream. + /// The stream from which the value should be read. + /// An four-byte signed integer read from the stream. public static int ReadInt32(this Stream stream) { return stream.ReadInt32(DefaultEndianness); } /// - /// Reads a 4-byte signed integer from the current stream and advances the current position of the stream by four - /// bytes using a specified endian encoding. + /// Writes a four-byte signed integer to the current stream using the specified endian encoding, and advances the + /// stream position by four bytes. /// - /// The stream to read. + /// The stream from which the value should be read. /// The endian encoding to use. - /// A 4-byte signed integer read from the current stream. + /// An four-byte unsigned integer read from the stream. public static int ReadInt32(this Stream stream, Endianness endianness) { var value = ReadInternal(stream, endianness); @@ -102,23 +102,23 @@ namespace X10D.StreamExtensions } /// - /// Reads an 8-byte signed integer from the current stream and advances the current position of the stream by eight - /// bytes using the default endian encoding. + /// Writes an eight-byte signed integer to the current stream using the system's default endian encoding, and advances + /// the stream position by eight bytes. /// - /// The stream to read. - /// An 8-byte signed integer read from the current stream. + /// The stream from which the value should be read. + /// An eight-byte signed integer read from the stream. public static long ReadInt64(this Stream stream) { return stream.ReadInt64(DefaultEndianness); } /// - /// Reads an 8-byte signed integer from the current stream and advances the current position of the stream by eight - /// bytes using a specified endian encoding. + /// Writes an eight-byte signed integer to the current stream using the specified endian encoding, and advances the + /// stream position by eight bytes. /// - /// The stream to read. + /// The stream from which the value should be read. /// The endian encoding to use. - /// An 8-byte signed integer read from the current stream. + /// An eight-byte unsigned integer read from the stream. public static long ReadInt64(this Stream stream, Endianness endianness) { var value = ReadInternal(stream, endianness); @@ -126,23 +126,23 @@ namespace X10D.StreamExtensions } /// - /// Reads a 2-byte unsigned integer from the current stream and advances the current position of the stream by two - /// bytes using the default endian encoding. + /// Writes a two-byte unsigned integer to the current stream using the system's default endian encoding, and advances + /// the stream position by two bytes. /// - /// The stream to read. - /// A 2-byte unsigned integer read from the current stream. + /// The stream from which the value should be read. + /// An two-byte unsigned integer read from the stream. public static ushort ReadUInt16(this Stream stream) { return stream.ReadUInt16(DefaultEndianness); } /// - /// Reads a 2-byte unsigned integer from the current stream and advances the current position of the stream by two - /// bytes using a specified endian encoding. + /// Writes a two-byte unsigned integer to the current stream using the specified endian encoding, and advances the + /// stream position by two bytes. /// - /// The stream to read. + /// The stream from which the value should be read. /// The endian encoding to use. - /// A 2-byte unsigned integer read from the current stream. + /// An two-byte unsigned integer read from the stream. public static ushort ReadUInt16(this Stream stream, Endianness endianness) { var value = ReadInternal(stream, endianness); @@ -150,23 +150,23 @@ namespace X10D.StreamExtensions } /// - /// Reads a 4-byte unsigned integer from the current stream and advances the current position of the stream by four - /// bytes using the default endian encoding. + /// Writes a four-byte unsigned integer to the current stream using the system's default endian encoding, and advances + /// the stream position by four bytes. /// - /// The stream to read. - /// A 4-byte unsigned integer read from the current stream. + /// The stream from which the value should be read. + /// An four-byte unsigned integer read from the stream. public static uint ReadUInt32(this Stream stream) { return stream.ReadUInt32(DefaultEndianness); } /// - /// Reads a 4-byte unsigned integer from the current stream and advances the current position of the stream by four - /// bytes using a specified endian encoding. + /// Writes a four-byte unsigned integer to the current stream using the specified endian encoding, and advances the + /// stream position by four bytes. /// - /// The stream to read. + /// The stream from which the value should be read. /// The endian encoding to use. - /// A 4-byte unsigned integer read from the current stream. + /// An four-byte unsigned integer read from the stream. public static uint ReadUInt32(this Stream stream, Endianness endianness) { var value = ReadInternal(stream, endianness); @@ -174,23 +174,23 @@ namespace X10D.StreamExtensions } /// - /// Reads an 8-byte unsigned integer from the current stream and advances the current position of the stream by eight - /// bytes using the default endian encoding. + /// Writes an eight-byte unsigned integer to the current stream using the system's default endian encoding, and + /// advances the stream position by eight bytes. /// - /// The stream to read. - /// An 8-byte unsigned integer read from the current stream. + /// The stream from which the value should be read. + /// An eight-byte unsigned integer read from the stream. public static ulong ReadUInt64(this Stream stream) { return stream.ReadUInt64(DefaultEndianness); } /// - /// Reads an 8-byte unsigned integer from the current stream and advances the current position of the stream by eight - /// bytes using a specified endian encoding. + /// Writes an eight-byte unsigned integer to the current stream using the specified endian encoding, and advances the + /// stream position by eight bytes. /// - /// The stream to read. + /// The stream from which the value should be read. /// The endian encoding to use. - /// An 8-byte unsigned integer read from the current stream. + /// An eight-byte unsigned integer read from the stream. public static ulong ReadUInt64(this Stream stream, Endianness endianness) { var value = ReadInternal(stream, endianness);