File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/DotNext.IO/Buffers/Binary Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1- using System . Numerics ;
2- using System . Runtime . CompilerServices ;
1+ using System . Runtime . CompilerServices ;
32using System . Runtime . InteropServices ;
43
54namespace DotNext . Buffers . Binary ;
65
76[ StructLayout ( LayoutKind . Auto ) ]
87internal struct SevenBitEncodedInt32Reader : IBufferReader , ISupplier < int >
98{
10- private SevenBitEncodedInteger < uint > value ;
9+ private SevenBitEncodedInteger < uint > decoder ;
1110 private bool completed ;
1211
1312 readonly int IBufferReader . RemainingBytes => Unsafe . BitCast < bool , byte > ( ! completed ) ;
1413
1514 void IReadOnlySpanConsumer < byte > . Invoke ( ReadOnlySpan < byte > source )
16- => completed = value . Append ( MemoryMarshal . GetReference ( source ) ) is false ;
15+ => completed = decoder . Append ( MemoryMarshal . GetReference ( source ) ) is false ;
1716
18- readonly int ISupplier < int > . Invoke ( ) => ( int ) value . Value ;
17+ readonly int ISupplier < int > . Invoke ( ) => ( int ) decoder . Value ;
1918}
You can’t perform that action at this time.
0 commit comments