pub fn compress(
array: AnyArrayView<'_>,
level: ZstdLevel,
) -> Result<Vec<u8>, ZstdCodecError>
Expand description
Compress the array
using Zstandard with the provided level
.
§Errors
Errors with
ZstdCodecError::HeaderEncodeFailed
if encoding the header to the output bytevec failedZstdCodecError::ZstdEncodeFailed
if an opaque encoding error occurred
§Panics
Panics if the infallible encoding with Zstd fails.