Skip to main content

decompress

Function decompress 

Source
pub fn decompress(input: &[u8], config: &EngineConfiguration) -> Result<Vec<u8>>
Expand description

Decompress a CRSH-format byte slice.

Reads the file footer first, loads the index, then decompresses all blocks in parallel.

§Errors

  • VersionMismatch — file was produced by a different engine version.
  • InvalidFormat — magic bytes invalid or file truncated.
  • ChecksumMismatch — a block’s CRC32 does not match.
  • ExpansionLimitExceeded — output would exceed config.max_decompression_ratio.
  • IndexCorrupted — block index is missing or truncated.
  • Cancelled — cancelled via progress callback.