Made with <3 by Amazing Cow.
bin2header
- Convert any file to a C/C++ header.
bin2header
is a tool to create a header file with the contents of
any given file into an array of hexdecimal values.
This can be util in cases that we want embedding the file direct into program.
Beware that the size of output file can grow very fast.
As usual, you are very welcomed to share and hack it.
bin2header -h | -v
bin2header [-V] [-ib <size>] [-a <name>] [-o <filename>] <input-filename>
Options:
*-h --help : Show this screen.
*-v --version : Show app version and copyright.
-V -verbose : Enable Verbose mode.
-i --indent-size <size> : Indentation in spaces.
-b --block-size <size> : How many block will be read each time.
Greater block size increases speed in
expense of memory.
-a --array-name <name> : The name of resulting array.
If not set will be the same of output filename.
-o --output <filename> : The name of output file.
If not set will be the same of input filename
with the '.h' extension.
Notes:
In (-a <name>) all characters that doesn't make a valid C identifier will
be replaced with '_' (underscore) character.
Options marked with * are exclusive, i.e. the bin2header will run that
and exit successfully after the operation.
Use the Makefile.
make install
Or to uninstall
make uninstall
This project uses / depends on:
- AmazingCow's libstdcow.
It's a submodule so agit submodule update --init --recursive
will init it nicely.
bin2header
do not create / need any other files or environment vars.
This software is released under GPLv3.
Check the TODO file for general things.
This projects uses the COWTODO tags.
So install cowtodo and run:
$ cd path/for/the/project
$ cowtodo
That's gonna give you all things to do :D.
We strive to make all our code the most bug-free as possible - But we know that few of them can pass without we notice ;).
Please if you find any bug report to [email protected] with the name of this project and/or create an issue here in Github.
- AUTHORS.txt
- CHANGELOG.txt
- COPYING.txt
- Makefile
- README.md
- TODO.txt
- src/bin2header.c
Check our repos and take a look at our open source site.