Added memory address management

This commit is contained in:
Samuele Lorefice
2025-02-20 17:33:55 +01:00
parent c0533a0d69
commit d95c81f3f2
2 changed files with 35 additions and 4 deletions

View File

@@ -0,0 +1,6 @@
namespace BlendFile;
public static class ByteArrayExt{
public static long ToMemAddr(this Byte[] bytes, bool isLittleEndian = true) =>
BitConverter.ToInt64(isLittleEndian == BitConverter.IsLittleEndian ? bytes : bytes.Reverse().ToArray(), 0);
}