numcodecs_zlib

Function compress

Source
pub fn compress(
    array: AnyArrayView<'_>,
    level: ZlibLevel,
) -> Result<Vec<u8>, ZlibCodecError>
Expand description

Compress the array using Zlib with the provided level.

§Errors

Errors with ZlibCodecError::HeaderEncodeFailed if encoding the header to the output bytevec failed.

§Panics

Panics if the infallible encoding with Zlib fails.