예제 #1
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);
            }
        }
예제 #2
0
        private void ReadLocalFiles(IO.XmlElementStream s)
        {
            foreach (var n in s.ElementsByName("file"))
            {
                using (s.EnterCursorBookmark(n))
                {
                    string file_name = null;
                    s.ReadAttribute("name", ref file_name);

                    string file_data = "";
                    s.ReadCursor(ref file_data);

                    if (!string.IsNullOrEmpty(file_name))
                    {
                        mLocalFiles[file_name] = file_data;
                    }
                }
            }
        }