compress_array_zero_copy

Function compress_array_zero_copy 

Source
pub fn compress_array_zero_copy<A, S>(
    array: &ArrayBase<S, IxDyn>,
    algorithm: CompressionAlgorithm,
    level: Option<u32>,
    chunk_size: usize,
) -> Result<CompressedArray>
where A: Serialize + Clone + Pod, S: Data<Elem = A>,
Expand description

Zero-copy compression of contiguous arrays

This function provides efficient compression of contiguous arrays by processing data directly from the array’s memory layout without intermediate copying.

§Arguments

  • array - Array to compress (must be in standard layout)
  • algorithm - Compression algorithm to use
  • level - Compression level (algorithm-specific)
  • chunk_size - Size of chunks for processing

§Returns

  • Result<CompressedArray> - Compressed array or error

§Note

This function requires the array to be in standard (C-contiguous) layout.