I have a javascript program that loops through a encoded hex file and converts it into readable hex and it shows the values that I need it to so they can be changed. The problem I'm having is converting it back to the encoded hex file perfectly in the exact same size and compression as before. I'm relatively new with this stuff so forgive me if I didn't explain it well enough, but it would help so much if I could solve this problem. It's the last thing to make my program run properly. How would I take my hex code and re compress it back to its original form but with the edited values? I have tried simply converting the hex characters. My current end result is a big file with nothing but hex, but I need to make something like this
0220022008F60000024002400252024002640240024002400240024002400240024002760288029A02AC02BE02D002E2024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240039603A403B6024003EA040E04320456047A049E04C204E6050A052E05520576059A05BE05E2060203D80240024002400240024002400240024002400240024002400240024002400922094209620982024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240062E0654068406B006D006F00710073007500770079007B007D007F00810083008500870089008B808E209020240024002400240024002400240024002F403840240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240024002400240
convert to look like this:
ö @@R@d@@@@@@@@vˆš¬¾Ðâ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@–¤¶@ê2VzžÂæ
I know it has something to do with encoding.