pub fn compress<T: ZfpCompressible, D: Dimension>(
data: ArrayView<'_, T, D>,
mode: &ZfpCompressionMode,
) -> Result<Vec<u8>, ZfpCodecError>
Expand description
Compress the data
array using ZFP with the provided mode
.
ยงErrors
Errors with
ZfpCodecError::NonFiniteData
if any data element is non-finite (infinite or NaN) and a non-reversible lossy compressionmode
is usedZfpCodecError::ExcessiveDimensionality
if data is more than 4-dimensionalZfpCodecError::InvalidExpertMode
if themode
has invalid expert mode parametersZfpCodecError::HeaderEncodeFailed
if encoding the ZFP header failedZfpCodecError::MetaHeaderEncodeFailed
if encoding the array metadata header failedZfpCodecError::ZfpEncodeFailed
if an opaque encoding error occurred