pub fn compress<T: ZfpCompressible, D: Dimension>(
data: ArrayView<'_, T, D>,
mode: &ZfpCompressionMode,
non_finite: ZfpNonFiniteValuesMode,
) -> Result<Vec<u8>, ZfpCodecError>Expand description
Compress the data array using ZFP with the provided mode.
ยงErrors
Errors with
ZfpCodecError::NonFiniteDataif any data element is non-finite (infinite or NaN) and a non-reversible lossy compressionmodeis used and thenon_finitemode is notZfpNonFiniteValuesMode::AllowUnsafeZfpCodecError::ExcessiveDimensionalityif data is more than 4-dimensionalZfpCodecError::InvalidExpertModeif themodehas invalid expert mode parametersZfpCodecError::HeaderEncodeFailedif encoding the ZFP header failedZfpCodecError::MetaHeaderEncodeFailedif encoding the array metadata header failedZfpCodecError::ZfpEncodeFailedif an opaque encoding error occurred