pub fn decompress_from_reader<R: Read + Seek>(
reader: &mut R,
config: &EngineConfiguration,
) -> Result<Vec<u8>>Expand description
Decompress a CRSH file from a seekable reader.
Phase 1 (sequential): reads all block headers and payloads into memory. Phase 2 (parallel): decompresses the collected payloads via rayon.
This two-phase approach avoids sharing &mut R across rayon worker threads.
§Errors
CrushError::ExpansionLimitExceeded— decompressed size would exceed the ratio limit.CrushError::ChecksumMismatch— a block’s CRC32 does not match.CrushError::InvalidFormat— file is truncated or block data is corrupt.CrushError::IndexCorrupted— footer or index is missing or invalid.CrushError::Cancelled— cancelled via progress callback.CrushError::Io— underlying I/O error.