bin2header

Aug 6, 2022

NAME

Binary to Header

SYNOPSIS

bin2header [options] file

OPTIONS

-h, --help

Print help information & exit.

-v, --version

Print version information & exit.

-o, --output

Set output file name.

-n, --hname

Set header name.

-s, --chunksize

Set the buffer chunk size (in bytes).
Default: 1048576 (1 megabyte)

-d, --nbdata

Set number of bytes per line.
Default: 12

-c, --datacontent

Show data content as comment.

-f, --offset

Start reading at given offset from file beginning.

-l, --length

Number of bytes to process.

-p, --pack

Store data using 8, 16, or 32 bit integer types.
Default: 8

-e, --swap

Swap endianess for 16 or 32 bit integer types.

--stdvector

Additionally store data in std::vector for C++.

--eol

Set end of line character (cr, lf, or crlf).
Default: lf

DESCRIPTION

bin2header takes any file as an argument and converts its binary data into a source header file for use in C/C++ applications. The data is stored as a character array.