pub fn hiread<S: Read + Write>(stream: &mut S) -> Result<Vec<f64>> {
    let mut i = 0;
    let mut size = DEFAULT_SIZE;
    let mut buf = vec![0.0; size];
    let mut buf_view = as_u8_slice_mut(&mut buf);
    loop {
        if i == size * 8 {
            drop(buf_view);
            size *= 2;
            buf.resize(size, 0.0);
            buf_view = as_u8_slice_mut(&mut buf);
        }

        i += stream.read(&mut buf_view[i..])?;

        if buf_view[i - 8..i] == DELIMITER_NAN {
            stream.write(b"\n")?;
            stream.flush()?;
            break;
        }
    }
    size = i / 8 - 1;
    buf.truncate(size);
    Ok(buf)
}
/// Read a *High Tension Message* from the `stream`.
///
/// This function is blocking.
///
/// During operation, this function allocates space greedily by doubling buffer
/// size each time more space is needed. Since message size is unknown, this
/// minimize the number of allocations required, but may induce excessive RAM
/// consumption. Extra space is released when the function returns.
///
/// # Examples
///
/// Basic usage:
///
/// ```no_run
/// use std::net::TcpStream;
/// let stream = TcpStream::connect("127.0.0.1:34567")
///
/// let data = hiread(&mut stream);
/// ```
Read a *High Tension Message* from the `stream`.
This function is blocking.

During operation, this function allocates space greedily by doubling buffer
size each time more space is needed. Since message size is unknown, this
minimize the number of allocations required, but may induce excessive RAM
consumption. Extra space is released when the function returns.
Read a * High Tension Message * from the ` stream ` . This function is blocking . During operation this function allocates space greedily by doubling buffer size each time more space is needed . Since message size is unknown this minimize the number of allocations required but may induce excessive RAM consumption . Extra space is released when the function returns .
pub fn hiread<S: Read + Write>(stream: &mut S) -> Result<Vec<f64>> {
    let mut i = 0;
    let mut size = DEFAULT_SIZE;
    let mut buf = vec![0.0; size];
    let mut buf_view = as_u8_slice_mut(&mut buf);
    loop {
        if i == size * 8 {
            drop(buf_view);
            size *= 2;
            buf.resize(size, 0.0);
            buf_view = as_u8_slice_mut(&mut buf);
        }
        i += stream.read(&mut buf_view[i..])?;
        if buf_view[i - 8..i] == DELIMITER_NAN {
            stream.write(b"\n")?;
            stream.flush()?;
            break;
        }
    }
    size = i / 8 - 1;
    buf.truncate(size);
    Ok(buf)
}
pub fn hiread < S : Read + Write > ( stream : & mut S ) -> Result < Vec < f64 > > { let mut i = 0 ; let mut size = DEFAULT_SIZE ; let mut buf = vec ! [ 0.0 size ] ; let mut buf_view = as_u8_slice_mut ( & mut buf ) ; loop { if i == size * 8 { drop ( buf_view ) ; size *= 2 ; buf . resize ( size , 0.0 ) ; buf_view = as_u8_slice_mut ( & mut buf ) ; } i += stream . read ( & mut buf_view [ i .. ] ) ? ; if buf_view [ i - 8 .. i ] == DELIMITER_NAN { stream . write ( b" \n " ) ? ; stream . flush ( ) ? ; break ; } } size = i / 8 - 1 ; buf . truncate ( size ) ; Ok ( buf ) }
Read a *High Tension Message* from the `stream`.
Read a * High Tension Message * from the ` stream ` .
stream
&mut S
stream
&mut S
examples
Basic usage.



let data = hiread(&mut stream);
```
Basic usage . let data = hiread ( &mut stream ) ; ` ` `