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 file- get info: Print simple/high-level info on the file and the game
- get metadata: Print the game’s metadata
- get payload: Print technical information on the file
 
- analyze: Get low-level information on the file - usually for debug and development purpose
- export: Export chunk or keyframe data to a file or directory
Usage as a library
Use lolrofl to parse a loaded file’s content :
// Parse the file's content with Rofl
// let content = std::fs::read(source_file).unwrap();
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
Scope for all the iterators that may be used to process ROFL data
Structs that map to parts of the data model of a ROFL file.
Structs
Base ROFL file parser
Enums
The errors that may be raised by this crate