Esempio n. 1
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);
        }
        public override void Deserialize(BitReader reader)
        {
            if (length == 15)
            {
                length = reader.ReadInt32();
            }

            value = Encoding.ASCII.GetString(reader.ReadBytes(length));
        }
Esempio n. 3
0
        public override void Deserialize(BitReader reader)
        {
            if (length == 15)
            {
                length = reader.ReadInt32();
            }

            value = reader.ReadBytes(length);
        }
Esempio n. 4
0
        public void Deserialize(BitReader reader)
        {
            unknown0        = reader.ReadBytes(34);
            signature       = Encoding.ASCII.GetString(reader.ReadBytes(4));
            unknown1        = reader.ReadUInt32();
            logicalFileSize = reader.ReadUInt32();
            valuesOffset    = reader.ReadUInt32();
            valuesLen       = reader.ReadUInt32();
            unknown3        = reader.ReadUInt32();
            unknown4        = reader.ReadUInt32();
            unknown5        = reader.ReadUInt32();
            numAttributes   = reader.ReadUInt32();

            attributes = new List <Attribute>();
            for (int i = 0; i < numAttributes; i++)
            {
                attributes.Add(new Attribute(reader));
            }
        }
Esempio n. 5
0
        public void Deserialize(BitReader reader)
        {
            magicNumber = reader.ReadUInt32();
            version     = reader.ReadUInt16();
            reserved    = reader.ReadUInt16();
            macOsX      = Encoding.ASCII.GetString(reader.ReadBytes(16));
            numEntries  = reader.ReadUInt16();

            for (int i = 0; i < entries.Length; i++)
            {
                entries[i] = new Entry(reader);
            }
        }
        public void Deserialize(BitReader reader)
        {
            version = Encoding.ASCII.GetString(reader.ReadBytes(2));
            switch (version)
            {
            case "00":
                property = BinaryProperty.ReadBinaryProperty(reader);
                break;

            default:
                Console.WriteLine($"Unsupported binary property list version : {version}");
                break;
            }

            // Read offset table
            // Read trailer
        }