Comment on Why can't code be uncompiled?
GlitzyArmrest@lemmy.world 11 months ago
You can get close depending on the language by using decompilers. Usually though, they’re rough translations of what the decompiler thinks that the (compiled) machine code does. It’s not a 1:1 deal.
Basically, a compiler translates the human-readable code to machine code that can actually be recognized and executed by your computer. A decompiler attempts to do the opposite, it translates the machine code back into the original language. But like some “translators”, it’s not always correct. That’s the hard part - once decompiled you will likely have a lot of blanks to fill in and bugs to fix before anything will be compilable again. You’ll likely never be able to get an exact copy of the original source code via decompiler.