Пример #1
0
        protected virtual void ReadFields(IO.XmlElementStream s, bool includeFileData)
        {
            s.ReadAttributeOpt("id", ref EntryId, NumeralBase.Hex);
            //s.ReadAttributeOpt("flags", ref Flags, NumeralBase.Hex);
            s.ReadAttributeOpt("align", ref DataAlignmentBit, NumeralBase.Hex);
            if (includeFileData)
            {
                s.ReadAttributeOpt("offset", ref DataOffset.u32, NumeralBase.Hex);
                s.ReadAttributeOpt("size", ref DataSize, NumeralBase.Hex);
            }

            ReadFlags(s);
            ReadResourceFlags(s);
        }
Пример #2
0
        protected override void ReadFields(IO.XmlElementStream s, bool includeFileData)
        {
            base.ReadFields(s, includeFileData);

            s.ReadAttributeOpt("fileTime", ref mFileTimeBits, NumeralBase.Hex);

            s.ReadAttribute("name", ref FileName);

            s.ReadAttributeOpt("fullSize", ref DataUncompressedSize, NumeralBase.Hex);
            s.ReadAttributeOpt("nameOffset", ref FileNameOffset, NumeralBase.Hex);

            string hashString = null;

            if (s.ReadAttributeOpt("compressedDataHash", ref hashString))
            {
                CompressedDataTiger128 = Text.Util.ByteStringToArray(hashString);
            }
        }
Пример #3
0
        protected void ReadResourceFlags(IO.XmlElementStream s)
        {
            bool flag = false;

            if (s.ReadAttributeOpt("IsContiguous", ref flag))
            {
                IsContiguous = flag;
            }
            if (s.ReadAttributeOpt("IsWriteCombined", ref flag))
            {
                IsWriteCombined = flag;
            }
            if (s.ReadAttributeOpt("IsDeflateStream", ref flag))
            {
                IsDeflateStream = flag;
            }
            if (s.ReadAttributeOpt("IsResourceTag", ref flag))
            {
                IsResourceTag = flag;
            }
        }