Exemple #1
0
        public virtual void Deserialize(BitReader reader)
        {
            id     = reader.ReadUInt32();
            offset = reader.ReadUInt32();
            size   = reader.ReadUInt32();

            var position = reader.GetPosition();

            reader.SetPosition((int)offset);

            switch (id)
            {
            case 9:
                data = new AttributesHeader(reader);
                break;

            case 2:
                break;

            default:
                Console.WriteLine($"Unknown Entry type id '{id}'");
                break;
            }

            reader.SetPosition(position);
        }
Exemple #2
0
        public void Deserialize(BitReader reader)
        {
            valueOffset = reader.ReadUInt32();
            valueLen    = reader.ReadUInt32();
            unknown     = reader.ReadUInt16();
            _nameLen    = reader.ReadByte();
            name        = Encoding.ASCII.GetString(reader.ReadBytes(_nameLen));
            padding     = reader.Pad();
            int position = reader.GetPosition();

            reader.SetPosition((int)valueOffset);

            string valueType = Encoding.ASCII.GetString(reader.ReadBytes(6));

            switch (valueType)
            {
            case "bplist":
                value = new BinaryPropertyList(reader);
                break;

            default:
                Console.WriteLine($"Unsupported attribute value type : '{valueType}'");
                break;
            }

            reader.SetPosition(position);
        }