diff --git a/GameRes/Utility.cs b/GameRes/Utility.cs index 73171e0c..d508ac95 100644 --- a/GameRes/Utility.cs +++ b/GameRes/Utility.cs @@ -70,6 +70,16 @@ namespace GameRes.Utility { return (int)ToUInt32 (value, index); } + + public static ulong ToUInt64 (byte[] value, int index) + { + return (ulong)ToUInt32 (value, index) | ((ulong)ToUInt32 (value, index+4) << 32); + } + + public static long ToInt64 (byte[] value, int index) + { + return (long)ToUInt64 (value, index); + } } public sealed class Crc32