- Supports Lossless Compression:
- Run-Length Encoding (RLE)
- Huffman Encoding
- Arithmetic Encoding
- Supports Lossy Compression:
- NU Scalar Quantization
- Interactive GUI built with PyQt5
- Real-time encoding and decoding with detailed outputs
- Clear output of compression ratios and results
- Simplifies repetitive data patterns.
- Encodes consecutive identical elements as a single value and count.
- Example:
AAAABBBCCDAA → 4A3B2C1D2A
.
- Constructs a binary tree based on character frequencies.
- Assigns shorter codes to frequent characters.
- Guarantees the shortest average code length for a given set of characters.
- Represents an entire message as a single fractional value.
- Subdivides the range
[0, 1)
based on character probabilities.
- Utilizes the LBG algorithm to quantize data into fewer levels.
- Prioritizes data size reduction at the cost of minor quality loss.
- Select Compression Method: Choose from the available methods.
- Input Data: Enter text or numerical data for processing.
- Encode and Decode: Perform compression and decompression operations.
- Character Probability Table: Visualize and configure probabilities for Arithmetic Encoding.
-
Clone the repository:
git clone https://github.com/Talalahmed409/Compression-Project.git cd compression-project
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the application:
python compression_gui.py
- Shrouq Mohammed Rashad
- Mennah Allah Yasser Nabil
- Eyad Samih Hanafi
- Fouad Essam William
- Talal Ahmed Mahmoud
- Dr. Mahmoud Gamal
- Eng. Mariem Nagy
Special thanks to Alexandria University and our mentors for their guidance throughout this project.