Class BufferReader
Binary deserialization helper using unsigned LEB128 varint encoding, matching the Go/TypeScript asset encoding implementations.
public class BufferReader
- Inheritance
-
BufferReader
- Inherited Members
Constructors
BufferReader(byte[])
public BufferReader(byte[] data)
Parameters
databyte[]
Properties
Remaining
public int Remaining { get; }
Property Value
Methods
ReadByte()
public byte ReadByte()
Returns
ReadSlice(int)
public byte[] ReadSlice(int size)
Parameters
sizeint
Returns
- byte[]
ReadUint16LE()
public ushort ReadUint16LE()
Returns
ReadVarInt()
Reads an unsigned LEB128 varint. Each byte stores 7 data bits; bit 7 is the continuation flag.
public ulong ReadVarInt()
Returns
ReadVarSlice()
public byte[] ReadVarSlice()
Returns
- byte[]