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); }
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); } }
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; } }