本文整理汇总了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();
}
示例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();
}