This application was created as part of a coding challenge. The challenge details can be found here.
The following resources were used for implementing and understanding the functionality of the xxd
command:
A simple xxd-like ("hex dump") cli tool created in Rust. This implementation mimics some, but not all of the functionalities of the original xxd
command.
To run the ccxxd command line tool, follow these steps:
- Clone the repository.
- Build the applikcation using
cargo build --release
. That will generate the executable in thetarget/release
directory calledccxxd
. - Run the application.
You can run the application with the following arguments:
ccxxd -c <input> <output>
to specify the number of bytes per line.ccxxd -e <input> <output>
to set the little-endian byte order.ccxxd -g <input> <output>
to specify the number of bytes per group.ccxxd -l <input> <output>
to specify the number of bytes to write.ccxxd -r <input> <output>
to reverse the process, reading a hexdump and writing the original file.ccxxd -s <input> <output>
to skip a number of bytes.
The application accepts file paths as the input and output arguments. The input file is the file to be read and the output file is the file to be written to. If the input file is not specified then the application reads from stdin. If the output file is not specified then the application writes to stdout.