/osu_replay_compress

Compression algorithm for osu replay files (OSR)

Primary LanguageC

The Deets

Replay set: https://drive.google.com/file/d/1i2oe929loEzhvCfRYG-DeZZQ_YouaBYD/view

osu!game_space

61.138% avg

146869397 -> 89793302

osu!screen_space

41.693% avg

79733067 -> 33243641

taiko

68.697% avg

2794427 -> 1919694

mania

63.288% avg

14573725 -> 9223532

fruit

67.568% avg

10419674 -> 7040395

Total

55.5133468341% of the original size

254.39029 MB -> 141.220564 MB

Game space (Raw input enabled replays) is lossless for every single frame where any key is being held, for the frames with no key inputs the x/y coordinates are quantised to a lower resolution - an imperceptible change but it can easily be removed.

Screen space is technically 'gainful' compression, as it fixes the slight rounding issue present in the original OSR

All other formats are entirely lossless.