Skip to main content

encode

Function encode 

Source
pub fn encode(index: &ArtifactIndex) -> Result<Vec<u8>, IndexError>
Expand description

Serialize index as JSON and zstd-compress it โ€” the bytes the OCI layer carries.

Not compiled for wasm32: zstd does not build there and the edge never encodes indexes โ€” producers (admin, CI) and the CLI consumer are all native.

ยงErrors

IndexError::Serialize or IndexError::Compress.