Function compress_array

Source
pub fn compress_array<P, A, S, D>(
    path: P,
    array: &ArrayBase<S, D>,
    algorithm: CompressionAlgorithm,
    level: Option<u32>,
    additional_metadata: Option<HashMap<String, String>>,
) -> Result<()>
where P: AsRef<Path>, A: Serialize + Clone, S: Data<Elem = A>, D: Dimension + Serialize,
Expand description

Compress an ndarray and serialize both data and metadata to a file

§Arguments

  • path - Path to save the compressed array
  • array - The array to compress
  • algorithm - The compression algorithm to use
  • level - The compression level (0-9, where 0 is no compression, 9 is maximum compression)
  • additional_metadata - Optional additional metadata to include

§Returns

Result indicating success or failure