Skip to main content

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

  1. โœ… Encode to Base64
  2. โœ… Encode to Hexadecimal
  3. โœ… Encode to UTF-8 bytes
  4. โœ… Byte frequency histogram (0โ€“255) via matplotlib
  5. โœ… Colored byte printout in terminal (Colorama)
  6. โœ… Support for Unicode characters (like emojis ๐ŸŒ๐Ÿ”)
  7. โœ… Support for large input text
  8. โœ… Works both in interactive mode and CLI mode
  9. โœ… CLI support: encoanalyzer "text" base64
  10. โœ… Text-based and visual output
  11. โœ… Uses NumPy for efficient byte counting
  12. โœ… Custom color schemes for byte value ranges
  13. โœ… Line wrapping every 16 bytes for readability
  14. โœ… Built-in auto fallback if invalid encoding is passed
  15. โœ… Test function to run all encodings
  16. โœ… Cross-platform (Windows, Linux, macOS)
  17. โœ… Lightweight but extensible
  18. โœ… 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

encoanalyzer-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

encoanalyzer-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

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

Hashes for encoanalyzer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 63f66b0bb8587355becab8c72cb98cb1c3e2a0c06163222be99b4d872047ac7c
MD5 d0279e6d5605dc49ebe7b4eef21f0078
BLAKE2b-256 526c11ccc29340edf30ec4ed8c8725058e0b4780134de697a5da064512b71456

See more details on using hashes here.

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

Hashes for encoanalyzer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a95ae951c6395d91212bee43114fcce38d223f7c3edd0c4e944e4009e530770
MD5 7fe07853512ba36a01da9fff8120953c
BLAKE2b-256 16a4ec02925f28dcb9a69f5de434cf523a5fc9f5a4d2bde86ef855f5985d7d56

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page