How ckormanyos/xxd works
This repository is a standalone command-line xxd utility: it reads bytes from a file or standard input and either renders a text representation or reconstructs binary data from hex-like text. The README documents normal, PostScript, C-include and binary dumps, plus reverse conversion and file patching. The implementation is concentrated in src/xxd.c; the sampled excerpts show option parsing, stream setup and reverse parsing, but omit some formatting routines, so their internal call wiring is not expanded.
Main entry points: xxd.c Option parsing
Components 7
Other components
- CLI user
- Option parsing
src/xxd.c - File streams
src/xxd.c - Hex dump
src/xxd.c - Other dump formats
src/xxd.c - Reverse decoding
src/xxd.c - Output bytes or text
Connections 11
- CLI user → Option parsing: runs options
- Option parsing → File streams: selects streams
- Option parsing → Hex dump: selects dump
- Option parsing → Other dump formats: selects format
- Option parsing → Reverse decoding: selects reverse
- File streams → Hex dump: supplies bytes
- File streams → Other dump formats: supplies bytes
- File streams → Reverse decoding: supplies text
- Hex dump → Output bytes or text: writes dump
- Other dump formats → Output bytes or text: writes dump
- Reverse decoding → Output bytes or text: writes bytes