//-------------------------------------------------------------------------------------- public static string GetUTF(Stream data) { int len = GetU16(data); if (len > 0) { byte[] buff = IOUtil.ReadExpect(data, len); return(System.Text.UTF8Encoding.UTF8.GetString(buff, 0, len)); } return(null); }
public static double GetF64(Stream data) { byte[] buff = IOUtil.ReadExpect(data, 8); return(System.BitConverter.ToDouble(buff, 0)); }
//-------------------------------------------------------------------------------------- public static float GetF32(Stream data) { byte[] buff = IOUtil.ReadExpect(data, 4); return(System.BitConverter.ToSingle(buff, 0)); }