ritiek / libbrp

Decompress any .brp replay files that have been generated using Ballistica game engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libbrp

Ballistica engine uses Huffman coding to compress the game's .brp replay files.

This library can decompress such compressed .brp replay files.

The code here was once a part of bs-replay-analyzer but has since been moved to have its own separate repository.

TODO: Recompress any decompressed .brp replay files.

Compiling

$ git clone https://github.com/ritiek/libbrp
$ cd ./libbrp
$ make

This will create static and shared library targets under under ./lib and also compile an example which can be found in ./examples/decompress.

To remove build artifacts, you can run:

$ make clean

Example Usage

Usage: ./examples/decompress <input_replay_file> <output_replay_file>

For example:

$ ./examples/decompress ~/.bombsquad/replays/__lastReplay.brp ~/.bombsquad/replays/decoded_last_replay.brp

Now you can launch the game and choose to replay decoded_last_replay from the Watch section and it should play fine since the game can read both Huffman encoded replay files as well as raw replay files.

License

huffman.cpp, huffman.h are stripped off versions from the core game (here, and here respectively), and are originally licensed under MIT.

All other code in this repository is also licensed under MIT. See LICENSE for more info.

About

Decompress any .brp replay files that have been generated using Ballistica game engine


Languages

Language:C++ 94.8%Language:Makefile 5.2%