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