Example #1
0
        public static long LengthOf_(Hexalyzer.IAccessor <byte> data, long offset)
        {
            long len = FString.LengthOf_(data, offset);

            if (len > 0)
            {
                len += 4;                // uint:Hash
            }
            if (offset + len > data.Count)
            {
                len = -1;
            }
            return(len);
        }
Example #2
0
        public static IDatatype FromData_(Hexalyzer.IAccessor <byte> data, long offset)
        {
            FString str = FString.FromData_(data, offset) as FString;

            if (str == null)
            {
                return(null);
            }

            offset += FString.LengthOf_(data, offset);
            if (offset + 4 > data.Count)
            {
                return(null);
            }

            uint hash = T.SystemType.FromData <uint>(data, offset);

            return(new FStringWithHash(str, hash));
        }