public ulong ReadVUInt64()
{
NeedOneByteInBuffer();
var l = PackUnpack.LengthVUInt(Buf, Pos);
ulong res;
if (Pos + l <= End)
{
res = PackUnpack.UnpackVUInt(Buf, ref Pos);
}
else
{
res = (ulong)(Buf[Pos] & (0xff >> l));
do
{
Pos++;
res <<= 8;
NeedOneByteInBuffer();
res += Buf[Pos];
l--;
} while (l > 1);
Pos++;
}
return res;
}