A simple utility to dump the hex or binary representation of any file and view its raw contents.
This project is inspired by the xxd command available on Linux.
It implements only a small subset of xxd's functionality and is not intended as a replacement or clone.
The main goal of this project was to sharpen my C skills and learn about file I/O, memory, and data representation—not to create a revolutionary tool.
If you want to run this project, the included Makefile gives a rough idea of how to compile it.
That said, I recommend compiling manually and possibly improving the Makefile, as the current one is fairly basic.
These are the main targets you need:
compile— compiles the code.run-test— compiles and runs the program.
Example usage:
bin/binary-translator $(FILE_LOCATION) -hbin/binary-translator is the compiled file stored in the bin folder (you can change this name if you want).
$(FILE_LOCATION) should be the path to the file you want to view as a hex/binary dump.
Flags currently available:
-b — display binary dump
-h or --help — show help text
Note: You still need to provide a FILE_LOCATION even when using the help flag. This will be improved in the future.