pub fn open_patch(
path: impl AsRef<Path>,
) -> ParseResult<ZiPatchReader<impl Read + 'static>>Expand description
Open the file at path and validate the ZiPatch magic, returning a
ready-to-iterate ZiPatchReader.
The concrete inner reader type is intentionally hidden behind impl Read so the choice of source and any buffering strategy remain
implementation details. Callers that need to name the type should
construct a reader of their choice and pass it to
ZiPatchReader::new.
§Errors
ParseError::Io— the file could not be opened.ParseError::InvalidMagic— the file does not start with theZiPatchmagic bytes.