xxd

[full]

Vim xxd hexdump utility

Vim xxd creates a hexdump of a given file or standard input. It can also convert a hexdump back to its original binary form.

Note that the xxd executable provides build2 metadata.

One notable xxd mode is -i|--include which generates a C array definition of the input that can be used to embed binary data into C/C++ programs. While the default output is a bit old school (using unsigned int instead of size_t) and the array/length names are derived from the input file name (including directories), xxd can also produce just the array values allowing us to wrap it into an array of our choice. Below are some examples of build2 ad hoc recipies:

... More
license X11 OR LGPL-2.0-only
project xxd
url github.com/vim/vim/tree/master/src/xxd
1 Version
version 8.2.3075+1 (20200204)
repository https://pkg.cppget.org/1/stable
depends 0
requires 1; host