public ulong GetULong(int bitCount = sizeof(long) * 8) { if (absPosition + bitCount > absLength) { throw new IndexOutOfRangeException(MsgIOORE(false, absPosition, bitCount)); } ulong result = new FastBit.ULong().Read(data, absPosition, bitCount); absPosition += bitCount; return(result); }
public double GetDoubleAt(int offset) { const int bitCount = sizeof(double) * 8; if (absOffset + offset + bitCount > absLength) { throw new IndexOutOfRangeException(MsgIOORE(false, absOffset + offset, bitCount)); } var u = new FastBit.ULong(); u.Read(data, absOffset + offset, bitCount); var f = new FastByte.Double(u.b0, u.b1, u.b2, u.b3, u.b4, u.b5, u.b6, u.b7); return(!BitConverter.IsLittleEndian ? f.GetReversed() : f.value); }