public void WriteToStream() { var bytes = new byte[] { 10, 10 }; var writer = new FastMemoryWriter(); writer.Write(bytes); var stream = new MemoryStream(); writer.FastCopyTo(stream); var result = stream.ToArray(); Assert.Equal(bytes, result); }