lolrofl

Crates.iololrofl
lib.rslolrofl
version0.2.0
sourcesrc
created_at2022-06-23 13:37:46.207314
updated_at2022-06-26 10:26:16.716143
descriptionLibrary and tool to parse and inspect ROFL replay files generated from League of Legends games.
homepage
repositoryhttps://github.com/Ayowel/lolrofl-rs
max_upload_size
id611884
size77,630
(Ayowel)

documentation

README

LoLROFL

Crates.io Documentation

Rust library and tool to parse and inspect ROFL replay files generated from League of Legends games.

The end goal is to provide the ability to extract all data contained in a replay file in a meaningfull way based on the definitions available at https://github.com/loldevs/leaguespec/wiki after updating them to match current-day replay formats.

Backward-compatibility for replay files is NOT to be expected as of now.

:warning: This project uses semantic-versioning with v0 exception. As such, the API may be changed with every minor update while the major version is 0. Only patch versions should be presumed as forward-compatible.

Usage

Add lolrofl to your project's cargo.toml.

[dependencies.lolrofl]
version = "^0.1.0"

Use lolrofl to parse a loaded file's content :

// Load a file in memory
let content = std::fs::read(source_file).unwrap();

// Build a selector for data loading
let data_selector = lolrofl::consts::LOAD_HEAD | lolrofl::consts::LOAD_METADATA;

// Load the data with the Rofl object
let data = lolrofl::Rofl::from_slice(&content[..], data_selector).unwrap();

// Print the file's signature
println!("{:?}", data.head().signature());
// Print the file's metadata
println!("{:?}", data.meta().unwrap());
Commit count: 23

cargo fmt