delivery_blob::compression

Function decode_archive

Source
pub fn decode_archive(
    data: &[u8],
    archive_length: usize,
) -> Result<Option<(Vec<ChunkInfo>, &[u8])>, ChunkedArchiveError>
Expand description

Decode a chunked archive header. Returns validated seek table and start of chunk data. Ranges in resulting chunks are relative to start of returned slice. Returns Ok(None) if data is not large enough to decode the archive header & seek table.