I can't decompress replay files with zstd compression
-
I looked through the faf client github. From what I can gather the replay header ends with the first '\n' character. Following the new line are the compressed bytes. I tried using the zstd terminal tool and even compiled the zstd library to try streaming decompression like the one used in the github (although there apache commons is used and I have no idea how that is implemented). I assume that maybe there is a byte at the start or the end which I'm not removing and that is causing the problem but I really don't know. Can anybody help?
-
This post is deleted! -
I wrote a command line utility that can unpack replays. https://gitlab.com/Askaholic/faf-replay-parser#unpack
It can do both the old version 1 format (base64 and inflate) and the new format (zstd). You can find a pre compiled Linux binary in the CI build artifacts. It can also be compiled for windows but I don’t have a ci for that.
Also the source code for the conversion is here: https://gitlab.com/Askaholic/faf-replay-parser/-/blob/60b4db37016cbe81f0f02b547fd100ed91f70571/src/faf.rs#L15
-
@askaholic Very nice! I'll try it tomorrow, thanks.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login