public void Write7BitValue(uint value)
{
var shift = (byte)((Get7BitValueSize(value) - 1) * 7);
var max = false;
if (shift >= 21)
{
shift = 22;
max = true;
}
while (shift >= 7)
{
Write((byte)(0x80 | ((value >> shift) & 0x7F)));
shift -= 7;
}
Write((byte)(max ? value & 0xFF : value & 0x7F));
}
public static byte Get7BitValueSize(ulong value)