Expand description
Rust library and tool to parse and inspect ROFL replay files generated from League of Legends games.
Backward-compatibility for replay files is NOT to be expected as of now.
§Usage as a command-line tool
After building with cargo install --bin lolrofl --features "clap json payload"
, a new lolrofl
executable become available.
Said executable allows the inspection of ROFL files to extract game information, metadata, or development intel with the following commands:
get
: Get high-level information on the fileget info
: Print simple/high-level info on the file and the gameget metadata
: Print the game’s metadataget payload
: Print technical information on the file
analyze
: Get low-level information on the file - usually for debug and development purposeexport
: Export chunk or keyframe data to a file or directory
§Usage as a library
Use lolrofl
to parse a loaded file’s content :
// let content = std::fs::read(source_file).unwrap();
// Parse the file's content with Rofl
let data = lolrofl::Rofl::from_slice(&content[..]).unwrap();
// Print the file's length as specified within the file (this may not match the actual file size if it is incomplete or corrupted)
println!("Expected file length: {:?} bytes", data.head().file_len());
// Print the file's metadata (a JSON string)
println!("{}", data.metadata().unwrap());
// Print information on the game without depending on the metadata
let payload = data.payload().unwrap();
println!("The game {} lasted {} seconds", payload.id(), payload.duration()/1000);
Modules§
- iter
- Scope for all the iterators that may be used to process ROFL data
- model
- Structs that map to parts of the data model of a ROFL file.
Structs§
- Rofl
- Base ROFL file parser
Enums§
- Errors
- The errors that may be raised by this crate