A complete ROFL parser for C#, supports both ROFL (pre 14.9) and ROFL2 (14.11+).
Package Manager
Install-Package Fraxiinus.Rofl.Extract.Data
.NET CLI
dotnet add package Fraxiinus.Rofl.Extract.Data
Use the ReplayReader
class to read replay files by running the ReadReplayAsync
method with the file path.
var replay = await ReplayReader.ReadReplayAsync("C:\\Documents\\File.rofl", options);
If the payload is required, use the optional parameter to let the parser know to not skip it (only supported by pre-14.9 replays):
var replay = await RoflReader.LoadAsync("C:\\Documents\\File.rofl", options);
Once the file is loaded, you are free to access the parsed data:
Console.WriteLine(((ROFL2) replay.Result).Metadata.GameVersion);
All the async functions support CancellationTokens.