Exemplo n.º 1
0
        internal ReleaseManifestFileEntry(
            uint fileId,
            ReleaseManifest releaseManifest,
            ReleaseManifestFileEntryDescriptor fileDescriptor,
            ReleaseManifestDirectoryEntry parent)
            : base(releaseManifest.StringTable[fileDescriptor.NameIndex])
        {
            m_id = fileId;
            m_releaseManifest = releaseManifest;
            m_descriptor      = fileDescriptor;
            m_parent          = parent;
            m_parent.m_files.Add(this);
            m_parent.AddChild(this); // TODO: Override to remove duplication

            Name = m_releaseManifest.StringTable[NameStringTableIndex];
        }
Exemplo n.º 2
0
        internal static ReleaseManifestFileEntryDescriptor ReadRMFileEntryDescriptor(this BinaryReader reader)
        {
            var result = new ReleaseManifestFileEntryDescriptor();

            result.NameIndex         = reader.ReadUInt32();
            result.ArchiveId         = reader.ReadUInt32();
            result.ChecksumLow       = reader.ReadUInt64();
            result.ChecksumHigh      = reader.ReadUInt64();
            result.EntityType        = reader.ReadUInt32();
            result.DecompressedSize  = reader.ReadUInt32();
            result.CompressedSize    = reader.ReadUInt32();
            result.Checksum2         = reader.ReadUInt32();
            result.PatcherEntityType = reader.ReadUInt16();
            result.UnknownConstant1  = reader.ReadByte();
            result.UnknownConstant2  = reader.ReadByte();
            return(result);
        }