8000 GitHub - iaseth/b64: A command-line Base64 encoder and decoder in C.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

iaseth/b64

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

b64

A lightweight command-line tool to encode or decode files using Base64.

🛠️ Written in C. Supports multiple input files, flexible CLI flags, and streams output to stdout by de 82A6 fault.

🚀 Features

  • ✅ Encode or decode Base64
  • ✅ Input from file(s) or stdin
  • ✅ Combine multiple input files
  • ✅ Output to a file or stdout
  • ✅ Support for URL-safe encoding with --url-safe
  • ✅ Small, fast, and dependency-free

📦 Build

git clone https://github.com/iaseth/b64.git
cd b64/build
cmake ..
make

This builds the b64 binary in the build/ directory.

📚 Usage

b64 [options] <file1> [file2 ...]

Options

Option Long Option Description
-o <file> Output to file instead of stdout
-d --decode Decode instead of encode
-u --url-safe Use Base64URL encoding
-w --wrap Wrap lines after 80 characters
-h --help Show help info
-l --list List all available encodings
-v --version Show version info

Examples

Encode files and write to stdout:

./b64 file1.txt file2.txt

Encode files and write to file:

./b64 file1.txt file2.txt -o encoded.b64

Decode Base64 file to stdout:

./b64 -d encoded.b64

Encode and then Decode the same file:

./b64 README.md | ./b64 -d

./b64 README.md encodes the file to base64, | redirects the output to ./b64 -d, which then decodes it back.

📂 Project Structure

b64/
├── src --- 1 day ago
│	├── base64.c --- 8 minutes ago, 1 hashlines, 14 blocks, 45 statements, 1 comments
│	├── base64.h --- 2 minutes ago, 9 hashlines, 1 blocks, 5 statements, 3 comments
│	├── main.c --- 4 minutes ago, 6 hashlines, 21 blocks, 45 statements, 2 comments
│	├── version.h --- 1 day ago, 22 hashlines, 5 comments
├── CMakeLists.txt --- 1 day ago, 12 lines
├── LICENSE.md --- 1 day ago
├── README.md --- 1 minute ago, 7 headers

📄 License

MIT License

About

A command-line Base64 encoder and decoder in C.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0