當前位置: 首頁>>代碼示例>>C#>>正文


C# ByteReader.Inflate方法代碼示例

本文整理匯總了C#中libJT.Utilities.ByteReader.Inflate方法的典型用法代碼示例。如果您正苦於以下問題:C# ByteReader.Inflate方法的具體用法?C# ByteReader.Inflate怎麽用?C# ByteReader.Inflate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在libJT.Utilities.ByteReader的用法示例。


在下文中一共展示了ByteReader.Inflate方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ReadV10

        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();
        }
開發者ID:doug8679,項目名稱:libJT,代碼行數:35,代碼來源:LogicalSceneGraph.cs

示例2: ReadV8

        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();
        }
開發者ID:doug8679,項目名稱:libJT,代碼行數:12,代碼來源:ElementHeader.cs


注:本文中的libJT.Utilities.ByteReader.Inflate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。