Analysis updated 2026-05-18
Recover approximate Go source code from a compiled binary you no longer have the source for.
Inspect which functions in a Go binary belong to your own code versus the standard library.
Study how a Go binary's compiled instructions map back to specific lines of source code.
Write custom pattern files to teach the tool to recognize additional compiler output.
| cookiengineer/godecompose | beastmastergrinder/turbopuffer-engine-opensource | ca-x/nowledge-mem-snap | |
|---|---|---|---|
| Stars | 6 | 6 | 6 |
| Language | Go | Go | Go |
| Setup difficulty | — | moderate | moderate |
| Complexity | — | 5/5 | 3/5 |
| Audience | developer | developer | ops devops |
Figures from each repo's GitHub metadata at analysis time.
godecompose is a command line tool that turns a compiled Go program back into readable Go source code. Normally, once a program is compiled into a binary, the original source code is gone and only machine instructions remain. Most tools that try to reverse this process guess at the original logic. godecompose instead works by matching chunks of the compiled machine code against a large database of known patterns that the Go compiler tends to produce, then swapping each matched chunk back into the line of Go code that likely created it. The tool works especially well on Go programs because Go binaries usually include a built in table of function names and locations by default, unless that information is deliberately stripped out during compilation. Using that table, godecompose can tell apart your own program's functions from the Go standard library and Go's internal runtime code, and it only tries to reconstruct your own functions, skipping the rest. It can read binaries built for Linux, Windows, and macOS, but only for 64 bit Intel style processors. The typical workflow is to disassemble a compiled program first to see a summary of its functions, then run a full decompile command that matches instructions against the pattern database and writes out a new folder containing reconstructed Go source files, organized back into the same package structure the original program used. The README includes a worked example showing a small program with two functions being decompiled, recovering about 81 percent of its instructions correctly. The matching patterns themselves are written in a custom pattern description file format with a hexpat file extension, based on a format used by an existing binary analysis tool called ImHex. The project ships with over 350 built in patterns covering common Go standard library functions. The README does not state a license for this project.
A command line tool that reconstructs readable Go source code from a compiled binary by matching it against known compiler patterns.
Mainly Go. The stack also includes Go, x86_64.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.