# rofl-parser Parse useable data from `*.rofl` file. (League of Legends replay file) # Usage ## 1. Parse from file ```rust fn parse_rofl() -> Result<(), Box> { let mut rofl = Rofl::new(); let _ = rofl.parse_rofl_file("*.rofl")?; // rofl file download needed let rofl_json = rofl.get_rofl_json(); // get full rofl info assert!(rofl_json.is_some()); Ok(()) } ``` ## 2. Parse from data If we have `[u8]` data, parse from data ```rust fn parse_rofl(data: &[u8]) -> Result<(), Box> { let mut rofl = Rofl::new(); let _ = rofl.parse_rofl_data(data)?; let rofl_json = rofl.get_rofl_json(); assert!(rofl_json.is_some()); Ok(()) } ```