Godelify

Turns a C source file into a prime number and back

· 1 min read

Godelify

Github: godelify

Try it: godelify.animeshchouhan.com. The web version works with any text or file.

Gödel numbering gives every statement its own number. Godelify does the same for C files. It compresses the source with zlib, reads the bytes as one big integer and adds a small suffix until the number is prime. Drop the suffix and decompress to get the exact file back.

godelify encode program.c
godelify decode <prime> <size> recovered.c

Keep the file size along with the prime. You need both to decode.