public uint GetUInt(int bitCount = sizeof(uint) * 8) { if (absPosition + bitCount > absLength) { throw new IndexOutOfRangeException(MsgIOORE(false, absPosition, bitCount)); } uint result = new FastBit.UInt().Read(data, absPosition, bitCount); absPosition += bitCount; return(result); }
public float GetFloatAt(int offset) { const int bitCount = sizeof(float) * 8; if (absOffset + offset + bitCount > absLength) { throw new IndexOutOfRangeException(MsgIOORE(false, absOffset + offset, bitCount)); } var u = new FastBit.UInt(); u.Read(data, absOffset + offset, bitCount); var f = new FastByte.Float(u.b0, u.b1, u.b2, u.b3); return(!BitConverter.IsLittleEndian ? f.GetReversed() : f.value); }