Add resource package support

This commit is contained in:
sardelka9515
2022-08-23 12:21:17 +08:00
parent 6d7fe58719
commit 8ff08e0804
9 changed files with 102 additions and 48 deletions

View File

@ -418,6 +418,12 @@ namespace RageCoop.Core
return memoryStream.ToArray();
}
}
public static MemoryStream ToMemStream(this Stream stream)
{
var memoryStream = new MemoryStream();
stream.CopyTo(memoryStream);
return memoryStream;
}
public static byte[] Join(this List<byte[]> arrays,int lengthPerArray=-1)
{
if (arrays.Count==1) { return arrays[0]; }