public ulong ReadUInt(int bytes)
{
switch (bytes)
{
case 0:
return 0;
case 1:
return ReadUInt8();
case 2:
return ReadUInt16();
case 3:
return ReadUInt24();
case 4:
return ReadUInt32();
case 5:
return ReadUInt40();
case 6:
return ReadUInt48();
case 7:
return ReadUInt56();
case 8:
return ReadUInt64();
}
throw new ArgumentOutOfRangeException("bytes", "must be between 0 and 8 inclusive.");
}
/// <summary>