1.1.1 • Published 7 years ago

bin2carray v1.1.1

Weekly downloads
3
License
GPL-2.0
Repository
github
Last release
7 years ago

bin2carray

Description

Convert binary file content to C language array with type of unsigned char.

Install

npm install -g bin2carray

Help

For help, run:

bin2carray --help

Usage

Usage:
    bin2carray <filename without .bin>

Example: convert hello.bin to hello.c
    bin2carray hello

Version:
    <x.y.z>

A example

Now, if you create hello.bin via running:

echo "hello" > hello.bin

After bin2carray hello, hello.c will be generated like below:

/* Wherever you copy this generated array to, please preserve comments including this line below with it! */
/* You are ONLY allowed to change the name of the array below! */
const unsigned char bin2carray_hello[6] = {
    /* The content of this array is generated from bin2carray package in npm */
    /* DO NOT TOUCH ANY BYTES! */
    0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a
};

License

GPL-2.0

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago