Skip to content

A lightweight C++ tool that converts any file into a C/C++ header containing bytecode array. Features progress bar, drag-and-drop support, and constexpr optimization.

License

Notifications You must be signed in to change notification settings

chadlrnsn/ByteForge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ByteForge

A simple command-line tool that converts any file into a C/C++ header file containing the file's contents as bytecode.

Features

  • Convert any file to bytecode array in a header file
  • Progress bar visualization during conversion
  • Support for drag-and-drop or command-line arguments
  • Automatic safe variable naming
  • Real-time conversion progress display

Usage

# Using command line arguments
ByteForge input_file [output_file.h]

# Interactive mode
ByteForge
> Please enter the file path: input_file

The tool will generate a header file containing:

  • An unsigned int array with the file's bytecode
  • A constant with the array size

Output Example

unsigned int example_data[] = {
    0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A,
    // ... more bytes ...
};

const size_t example_data_size = sizeof(example_data);

About

A lightweight C++ tool that converts any file into a C/C++ header containing bytecode array. Features progress bar, drag-and-drop support, and constexpr optimization.

Topics

Resources

License

Stars

Watchers

Forks