예제 #1
0
        protected override void ReadV10(ByteReader reader)
        {
            // First, read the compression header (first element in segment data)
            ElementHeader head = new LogicalElementHeaderZlib();
            head.Read( reader, 10 );
            Element e = Element.Create( head, reader, head.ObjectTypeID, 10 );
            e.Read( reader, 10 );
            Elements.Add( e );

            // Read Graph Elements
            head = new LogicalElementHeader();
            head.Read( reader, 10 );
            while ( !head.ObjectTypeID.Equals( Element.EndOfElements ) ) {
                e = Element.Create( head, reader, head.ObjectTypeID, 10 );
                e.Read( reader, 10 );
                Elements.Add( e );
                head = new LogicalElementHeader();
                head.Read( reader, 10 );
            }

            // Read Property Atoms
            head = new LogicalElementHeader();
            head.Read( reader, 10 );
            while ( !head.ObjectTypeID.Equals( Element.EndOfElements ) ) {
                e = Element.Create( head, reader, head.ObjectTypeID, 10 );
                e.Read( reader, 10 );
                Properties.Add( e );
                head = new LogicalElementHeader();
                head.Read( reader, 10 );
            }

            // Attempt to read property table:
            PropertyTable.Read( reader);
            reader.Inflate();
        }
예제 #2
0
        protected override void ReadV8(ByteReader reader)
        {
            Compression = reader.ReadU32() == 2;
            CompressedLength = reader.ReadI32();
            Algorithm = reader.ReadByte();
            reader.Inflate(true, CompressedLength - 1);

            // Decompress the remainder of the header
            Length = reader.ReadI32();
            ObjectTypeID = reader.ReadGuid();
            ObjectBaseType = (ObjectBaseType) reader.ReadByte();
        }