1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
using System.IO; namespace Ryujinx.HLE.Utilities { static class StreamUtils { public static byte[] StreamToBytes(Stream input) { using (MemoryStream ms = new MemoryStream()) { input.CopyTo(ms); return ms.ToArray(); } } } }