public static float ReadSingle(this MemoryStream stream) { var res = BStruct.ToFloat(stream.GetBuffer(), (int)stream.Position); stream.Position += 4; return(res); }
private static object DecodeFloat(string x, int startIndex, out int endIndex) { startIndex += 1; endIndex = startIndex + 4; return(BStruct.ToFloat(Util.StringBytes(x.Substring(startIndex, 4)), 0)); }
public float ReadSingle() { ReadTypeCode(RencodeTypeCode.Single); var buffer = new byte[4]; stream.Read(buffer, 0, buffer.Length); return(BStruct.ToFloat(buffer, 0)); }