IndexedStructure

This commit is contained in:
2026-07-13 08:39:52 +03:00
parent 2f81cd1d30
commit 31bda58460
26 changed files with 1381 additions and 87 deletions
+10 -1
View File
@@ -81,7 +81,8 @@ public struct Tdu
Composed = DC.Combine(new byte[] { (byte)Identifier }, 0, 1, data, 0, (uint)length);
}
else if (Class == TduClass.Dynamic
|| Class == TduClass.Extension)
|| Class == TduClass.Extension
|| (Class == TduClass.Typed && Identifier != TduIdentifier.Typed))
{
if (length == 0)
@@ -287,6 +288,14 @@ public struct Tdu
if (Class != TduClass.Typed || with.Class != TduClass.Typed)
return false;
// Dedicated typed-class values (TypeDef/TRU) carry no metadata. Their identifier
// completely describes the outer type and is sufficient for continuation encoding.
if (Identifier != TduIdentifier.Typed)
return true;
if (Metadata == null || with.Metadata == null)
return false;
if (!Metadata.Match(with.Metadata))
return false;