pub fn encode(input_path: &str, output_path: &str) -> Result<()>