git404hub

what is godecompose fr?

cookiengineer/godecompose — explained in plain English

Analysis updated 2026-05-18

6GoAudience · developer

tl;dr

A command line tool that reconstructs readable Go source code from a compiled binary by matching it against known compiler patterns.

vibe map

mindmap
  root((repo))
    What it does
      Reconstructs Go source
      Pattern based matching
      Skips runtime and stdlib
    Tech stack
      Go
      x86_64 disassembly
    Workflow
      Disassemble binary
      Match patterns
      Write project folder
    Pattern system
      hexpat file format
      350 plus built in patterns
    Audience
      Reverse engineers
      Security researchers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Recover approximate Go source code from a compiled binary you no longer have the source for.

VIBE 2

Inspect which functions in a Go binary belong to your own code versus the standard library.

VIBE 3

Study how a Go binary's compiled instructions map back to specific lines of source code.

VIBE 4

Write custom pattern files to teach the tool to recognize additional compiler output.

what's the stack?

Gox86_64

how it stacks up fr

cookiengineer/godecomposebeastmastergrinder/turbopuffer-engine-opensourceca-x/nowledge-mem-snap
Stars666
LanguageGoGoGo
Setup difficultymoderatemoderate
Complexity5/53/5
Audiencedeveloperdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

in plain english

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.

prompts (copy fr)

prompt 1
Walk me through using godecompose to disassemble and decompile a small Go binary.
prompt 2
Explain how godecompose tells apart my own code from the Go runtime and standard library.
prompt 3
Show me an example of a hexpat pattern file and what it matches in a binary.
prompt 4
What binary formats and processor architectures does godecompose support.

Frequently asked questions

what is godecompose fr?

A command line tool that reconstructs readable Go source code from a compiled binary by matching it against known compiler patterns.

What language is godecompose written in?

Mainly Go. The stack also includes Go, x86_64.

Who is godecompose for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.