|
|
Mile (2020-07-14) Text to C encoder. Mile reads bytes from stdin and encodes them to a C program in stdout, for example: ./mile [PIN] < input.txt > encoded.c Where [PIN] is an integer in the range of 1..65535, for example: echo "Hello, world!" | ./mile 12345 > encoded.c The generated code will only run properly if it's compiled with the same PIN that is used during decoding: gcc -DPIN=12345 encoded.c -o decoded && ./decoded > original.txt If the wrong PIN is used, decoded output will have the same size as the original input, but the bytes will likely contain garbage. All the decoding is done at compile time, so for a sufficiently large input, most compilers may spend many minutes trying to compiling those, often unsuccessfully. A special pre-preprocessor is been included to make the encoded code more acceptable to typical compilers. ./cppp -DPIN=12345 encoded.c > preprocessed.c gcc preprocessed.c -o decoded && ./decoded > original.txt Mile won the "Best abuse of CPP" award in IOCCC 2020. Layout based on "Mile" from "Didn't I Say to Make My Abilities Average in the Next Life?!" -- omoikane@uguu.org - http://uguu.org/
RAR | ZIP | / | |
2025-08-26 |