StreamUtils.cs 353 B

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