.NET/C# MemoryStream and StreamReader
A good combo for reading text directly from streams.
Example code:
// Read network, sql or file stream into byte[] _stream.
using (MemoryStream MS = new MemoryStream(_stream)) {
using (StreamReader SR = new StreamReader(MS, Encoding.ASCII)) {
txtLogWindow.AppendText(SR.ReadToEnd());
}}
ASCII assumes you also sent or stored it as it. Adapt as needed.
Alternatively for loading into a RichTextBox with only MemoryStream:
txtLogWindow.LoadFile(MS, RichTextBoxStreamType.PlainText);