A tool for encoding and analyzing text bytes visually
Project description
EncoAnalyzer is a powerful and colorful command-line tool for encoding text (Base64, Hex, UTF-8), analyzing byte distributions, and visualizing those bytes with histograms and terminal color highlights. It is a unique combination of practical encoding utilities, data analysis using NumPy, and engaging visuals via Matplotlib and Colorama.
๐ Features
- โ Encode to Base64
- โ Encode to Hexadecimal
- โ Encode to UTF-8 bytes
- โ Byte frequency histogram (0โ255) via matplotlib
- โ Colored byte printout in terminal (Colorama)
- โ Support for Unicode characters (like emojis ๐๐)
- โ Support for large input text
- โ Works both in interactive mode and CLI mode
- โ
CLI support:
encoanalyzer "text" base64 - โ Text-based and visual output
- โ Uses NumPy for efficient byte counting
- โ Custom color schemes for byte value ranges
- โ Line wrapping every 16 bytes for readability
- โ Built-in auto fallback if invalid encoding is passed
- โ Test function to run all encodings
- โ Cross-platform (Windows, Linux, macOS)
- โ Lightweight but extensible
- โ Fully open-source (MIT License)
๐ฆ Installation
Make sure you are using Python 3.7+. Install via cloning and pip:
git clone https://github.com/yourusername/encoanalyzer.git
cd encoanalyzer
pip install -r requirements.txt
๐ Requirements
Listed in requirements.txt:
matplotlib
numpy
colorama
Or install manually:
pip install matplotlib numpy colorama
## Usages
๐ ๏ธ How to Use
๐น Option 1: Interactive mode
python -m encoanalyzer
Youโll be prompted to enter text and select encoding:
Enter the text you want to analyze:
> Hello PyPI!
Choose encoding:
1. Base64
2. Hex
3. UTF-8
> 1
๐น Option 2: Command-line mode
encoanalyzer "Hello PyPI!" base64
๐ Sample Output
๐ธ Colored Byte Output
Byte visualization:
48 65 6C 6C 6F 20 50 79 50 49 21 ...
Colors are applied according to value range (Blue/Green/Red etc.)
๐ธ Histogram
๐งช Run Encoding Test Mode
To test all encodings with default string:
test_all_encodings()
๐ Encoding Behavior
Encoding Description Byte Format
UTF-8 Standard unicode b'\xe4\xb8\xad'
Hex Encoded as hexadecimal b'48656c6c6f'
Base64 Encoded to Base64 standard b'SGVsbG8='
๐จ Color Coding
Byte Range Color Meaning
0โ31 Blue Control characters
32โ63 Cyan Symbols
64โ95 Green Upper ASCII letters
96โ127 Yellow Lower ASCII letters
128โ191 Magenta Extended unicode range
192โ255 Red High-byte UTF characters
โ
Example Use Cases
๐ Analyze how different encodings represent emojis
๐ ๏ธ Check if a string contains high-value bytes
๐ See byte distribution for compressed vs uncompressed data
๐ Visual debugging of corrupted text
๐งช Test encoding schemes across multiple languages
๐ Project Structure
encoanalyzer/
โโโ encoanalyzer/
โ โโโ __init__.py
โ โโโ core.py
โโโ setup.py
โโโ README.md
โโโ LICENSE
โโโ requirements.txt
๐ Future Ideas
Add QR code output for encoded text
Support reverse decoding
Export histogram as PNG file
Add web interface with Streamlit
๐ Requirements
Listed in requirements.txt:
matplotlib
numpy
colorama
๐ License
This project is licensed under the MIT License
โจ Credits
Created by [Eden Simamora] with โค๏ธ for PyPI developers and encoding explorers.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file encoanalyzer-0.1.0.tar.gz.
File metadata
- Download URL: encoanalyzer-0.1.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63f66b0bb8587355becab8c72cb98cb1c3e2a0c06163222be99b4d872047ac7c
|
|
| MD5 |
d0279e6d5605dc49ebe7b4eef21f0078
|
|
| BLAKE2b-256 |
526c11ccc29340edf30ec4ed8c8725058e0b4780134de697a5da064512b71456
|
File details
Details for the file encoanalyzer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: encoanalyzer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a95ae951c6395d91212bee43114fcce38d223f7c3edd0c4e944e4009e530770
|
|
| MD5 |
7fe07853512ba36a01da9fff8120953c
|
|
| BLAKE2b-256 |
16a4ec02925f28dcb9a69f5de434cf523a5fc9f5a4d2bde86ef855f5985d7d56
|