f2bin is a file-to-binary converter web application. It can convert any type of file into binary data. This project is an extension of the original mp3tobin
program written in Rust, now equipped with a web interface. Currently, it supports converting files to binary, with plans to add reverse conversion (binary back to files) and more features in the future.
This project relies on the following dependencies:
Node.js and npm
- Why? Node.js is used to run the backend server (Express.js), while npm is used to manage JavaScript packages.
- Installation:
# For Linux: curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt-get install -y nodejs # For macOS (Homebrew): brew install node # For Windows: Download and install from https://nodejs.org/
Express.js, fs, and multer
- Why? These packages are required for the backend server:
express
: Handles HTTP requests and serves the frontend.fs
: Used to interact with the file system.multer
: Middleware for handling file uploads.
- Installation:
npm install express fs multer
Rust and Cargo
- Why? Rust is needed to compile the
mp3tobin
program, which performs the file-to-binary conversion. - Installation:
# For Linux and macOS: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # For Windows: Download and install from https://rustup.rs/
-
Clone the
f2bin
repository:git clone git@github.com:flightman69/f2bin.git cd f2bin
-
Initialize npm and install the required packages:
npm init -y npm install express fs multer
-
Clone the
mp3tobin
repository and build the Rust binary:git clone git@github.com:flightman69/mp3tobin.git cd mp3tobin cargo build --release
-
Copy the compiled binary to the
f2bin
folder:cp target/release/mp3tobin ../f2bin/ cd ../f2bin
-
Start the server:
node server.js
-
Open your browser and navigate to:
http://localhost:4322
-
Upload a file, click "Convert," and download the converted binary file.
- Reverse Conversion (Binary to Original File) (High Priority)
- Improved Web UI Design (High Priority)
- Dockerization (Medium Priority)
- Binary to Video Conversion (Medium Priority)
- Encryption for Binary Files (Low Priority)