Reading Binary Save Files (GTA San Andreas) with JavaScript – How to Parse Properly?

Hey everyone,

I’m trying to build a small browser-based tool just for fun — it loads and reads GTA San Andreas [.](https://gtandreaspro.com)b save files and tries to show basic info like mission progress, cash, etc.

I’m using FileReader and trying to work with the binary data in JavaScript, but I’m getting stuck when it comes to parsing the buffer correctly. I can load the file, but interpreting the actual bytes is confusing — especially when trying to extract readable strings or values from specific offsets.

Anyone here ever worked on reading raw binary files in JS? Or maybe has tips on handling structured save data?

It’s more of a side learning project, but I’d love to understand how to approach this properly. Thanks!

hi and welcome to the forum.

I think when reading bytes you have to know the size of the ‘string’ or ‘integer’ or other value that you are interested in so you can pull it out of the file correctly.
for eg. if an integer is 8 bytes long, then you should read that number of bytes to get a valid value out of the bits.