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;
}
public FileKeyIndex(AbstractBufferedReader reader, Guid? guid, bool withCommitUlong) { _guid = guid; _generation = reader.ReadVInt64(); _trLogFileId = reader.ReadVUInt32(); _trLogOffset = reader.ReadVUInt32(); _keyValueCount = (long)reader.ReadVUInt64(); _commitUlong = withCommitUlong ? reader.ReadVUInt64() : 0; }