public uint ReadU29()
{
uint result = 0;
for (var i = 0; i < 4; i++)
{
var b = ReadByte();
if (i != 3)
{
result = (result << 7) | (byte)(b & 0x7f);
}
else
{
result = (result << 7) | b;
}
if ((b & 0x80) == 0) break;
}
return result;
}
public Variant ReadUndefined()