Skip to main content

write_binary_field

Function write_binary_field 

Source
pub fn write_binary_field(data: &[f64], dims: [u32; 3], ndim: u8) -> Vec<u8> 
Expand description

Write a f64 field with a binary header.

Returns the complete byte stream: [header (24 bytes)] + [payload]. The header checksum is computed automatically.

  • data – the field values in row-major order
  • dims[nx, ny, nz] (set unused dims to 1)
  • ndim – number of active dimensions (1, 2, or 3)