Skip to main content

decode_file

Function decode_file 

Source
pub fn decode_file<P: AsRef<Path>, Q: AsRef<Path>>(
    input_path: P,
    output_path: Q,
) -> PpmResult<()>
Expand description

Decompress input_path (which must have been produced by encode_file) back into output_path, using the default DEFAULT_ORDER = 5.

Reads the 8-byte length prefix, then decodes exactly that many bytes via the range decoder + PPM model.

ยงErrors

Returns an error if any I/O or decoding step fails, or if the input is corrupt.