rofl-parser

Crates.iorofl-parser
lib.rsrofl-parser
version0.1.26
sourcesrc
created_at2023-02-09 04:17:08.15126
updated_at2023-04-18 08:19:02.465796
descriptionParse useable data from `*.rofl` file
homepage
repositoryhttps://github.com/tiger1710/rofl-parser
max_upload_size
id780477
size30,792
DeokHwan Kim (tiger1710)

documentation

README

rofl-parser

Parse useable data from *.rofl file. (League of Legends replay file)

Usage

1. Parse from 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(())
}

2. Parse from data

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(())
}
Commit count: 32

cargo fmt