@@ -101,8 +101,8 @@ public enum ValueKind : byte
101101 public readonly ref struct ReadOnlyValueEntry ( ReadOnlySpan < byte > buffer , int startOffset )
102102 {
103103 private readonly ReadOnlySpan < byte > _buffer = buffer ;
104- internal byte Type => _buffer [ TypeOffset ] ;
105- public readonly int TypeOffset = startOffset ;
104+ internal byte Type => _buffer [ Offset ] ;
105+ public readonly int Offset = startOffset ;
106106 internal readonly int ValueOffset = startOffset + ValueSize ;
107107 internal ReadOnlySpan < byte > Value => _buffer [ ValueOffset ..] ;
108108 }
@@ -118,7 +118,7 @@ internal ref struct ValueEntry(Span<byte> buffer, int startOffset)
118118 private const int ValueSize = 1 ;
119119
120120 /// <remarks><em>Ported from C <c>lite3_type_sizes</c>.</em></remarks>
121- private static readonly int [ ] ValueKindSizes =
121+ internal static readonly int [ ] ValueKindSizes =
122122 [
123123 0 , // Null
124124 1 , // Bool
@@ -1062,7 +1062,7 @@ public static ValueKind GetValueKind(ReadOnlySpan<byte> buffer, int offset, Read
10621062 /// </remarks>
10631063 [ TronApi ( KeyDataArg = nameof ( keyData ) ) ]
10641064 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
1065- public static Status GetValueKindSize ( ReadOnlySpan < byte > buffer , int offset , ReadOnlySpan < byte > key , KeyData keyData , out uint value )
1065+ public static Status GetValueSize ( ReadOnlySpan < byte > buffer , int offset , ReadOnlySpan < byte > key , KeyData keyData , out uint value )
10661066 {
10671067 Status status ;
10681068 value = 0 ;
@@ -1469,7 +1469,7 @@ internal static Status GetBytes(ReadOnlySpan<byte> buffer, int offset, ReadOnlyS
14691469 }
14701470
14711471 value = new BytesEntry (
1472- BinaryPrimitives . ReadUInt32LittleEndian ( buffer [ entry . TypeOffset ..] ) ,
1472+ BinaryPrimitives . ReadUInt32LittleEndian ( buffer [ entry . Offset ..] ) ,
14731473 ( int ) BinaryPrimitives . ReadUInt32LittleEndian ( buffer [ entry . ValueOffset ..] ) ,
14741474 entry . ValueOffset
14751475 ) ;
@@ -1544,7 +1544,7 @@ public static Status GetObject(ReadOnlySpan<byte> buffer, int offset, ReadOnlySp
15441544 return Status . ValueKindDoesNotMatch ;
15451545 }
15461546
1547- objectOffset = entry . TypeOffset ;
1547+ objectOffset = entry . Offset ;
15481548 return 0 ;
15491549 }
15501550
@@ -1577,7 +1577,7 @@ public static Status GetArray(ReadOnlySpan<byte> buffer, int offset, ReadOnlySpa
15771577 return Status . ValueKindDoesNotMatch ;
15781578 }
15791579
1580- arrayOffset = entry . TypeOffset ;
1580+ arrayOffset = entry . Offset ;
15811581 return 0 ;
15821582 }
15831583
@@ -1760,7 +1760,7 @@ public static Status ArrayGetObject(ReadOnlySpan<byte> buffer, int offset, uint
17601760 return Status . ValueKindDoesNotMatch ;
17611761 }
17621762
1763- objectOffset = entry . TypeOffset ;
1763+ objectOffset = entry . Offset ;
17641764 return 0 ;
17651765 }
17661766
@@ -1789,7 +1789,7 @@ public static Status ArrayGetArray(ReadOnlySpan<byte> buffer, int offset, uint i
17891789 return Status . ValueKindDoesNotMatch ;
17901790 }
17911791
1792- arrayOffset = entry . TypeOffset ;
1792+ arrayOffset = entry . Offset ;
17931793 return 0 ;
17941794 }
17951795
@@ -1852,7 +1852,7 @@ public static ValueKind GetValueKind(in ReadOnlyValueEntry entry)
18521852 /// </remarks>
18531853 [ TronApi ( IsTryPattern = false ) ]
18541854 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
1855- internal static int GetValueKindSize ( in ReadOnlyValueEntry entry )
1855+ internal static int GetValueSize ( in ReadOnlyValueEntry entry )
18561856 {
18571857 var type = ( ValueKind ) entry . Type ;
18581858
0 commit comments