pub fn encode_chunk(chunk: &ChunkData) -> Result<Vec<u8>, DecodeError>
Encodes and compresses a chunk.
Returns an error if the chunk violates the encoding’s bounds or zstd fails.