Crates.io | rofl-parser |
lib.rs | rofl-parser |
version | 0.1.26 |
source | src |
created_at | 2023-02-09 04:17:08.15126 |
updated_at | 2023-04-18 08:19:02.465796 |
description | Parse useable data from `*.rofl` file |
homepage | |
repository | https://github.com/tiger1710/rofl-parser |
max_upload_size | |
id | 780477 |
size | 30,792 |
Parse useable data from *.rofl
file. (League of Legends replay file)
fn parse_rofl() -> Result<(), Box<dyn Error>> {
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(())
}
If we have [u8]
data, parse from data
fn parse_rofl(data: &[u8]) -> Result<(), Box<dyn Error>> {
let mut rofl = Rofl::new();
let _ = rofl.parse_rofl_data(data)?;
let rofl_json = rofl.get_rofl_json();
assert!(rofl_json.is_some());
Ok(())
}