Porting an old Python utility to C++

I used to make a lot of niche Python tools for various niche uses for myself. One of these would decode assets encoded in old Roblox places as base64. Before you could upload assets directly to Roblox you were able to embed them directly into the place file themself, which the data was stored in base64. Alot of old games took advantage of this, you could do images, audio, and even meshes entirely embedded in the data of a place.

Beat creator using custom audio assets by Defaultio back in 2008

This feature was officially discontinued around 2008, it became impossible to easily access the base64 uploading functionality, but could still be done manually in an text editor. That was until 2011 when the functionality in the client to parse the data was removed entirely, for obvious reasons (lack of moderation, bloat, etc.).

Anyways, I wrote this python tool to extract these assets into regular files on your computer. I remember it was the first time I used GitHub copilot, and it helped me code certain parts of it. I still don't understand how or why the hell this part of the code works for scanning the binary tags.

#Find every tag of <binary>:
content_elements = root.findall(".//binary")

Seriously, what the hell does the ".//" mean here and why didn't just checking for "binary" work? Guess I'll never know.

Anyways, this is one of my first times actually finishing something C++ related, so apologies for the sloppy code, no help, and less than ideal parsing of base64, all of this will get fixed eventually. I just wanted to get it out there. I still think it is miles better than the python version, it's not even funny how much faster and efficient it is (thanks Sherlock).

You can download it here if you want to use it: https://github.com/KeyboardCombination/RobloxBase64Decoder-cpp

You simply have to provide the directory for the file you want by either dragging a file onto it in Windows or using a CLI to pass the file path as an argument, just like the Python one does.

I'll provide compiled releases soon, I will update this post once that happens.