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<()>
Expand description
Compress an ndarray and serialize both data and metadata to a file
§Arguments
path
- Path to save the compressed arrayarray
- The array to compressalgorithm
- The compression algorithm to uselevel
- 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