This project is a GUI-driven application for text compression, developed using both Java and Python. The primary focus of the project is to demonstrate the concepts of Data Structures and Algorithms (DSA) and Object-Oriented Programming (OOP).
The project consists of the following files:
-
Java Source Files:
compression.java
- Handles the text compression logic.CompressionRatio.java
- Calculates the compression ratio.FileChooserExample.java
- Provides a GUI for file selection.Huffman.java
- Implements Huffman coding for compression.Leaf.java
- Represents a leaf node in the Huffman tree.LZ77.java
- Implements the LZ77 compression algorithm.LZW.java
- Implements the LZW compression algorithm.Main.java
- The main entry point of the application.Node.java
- Represents a node in the Huffman tree.python.java
- Integrates Python scripts with Java.Triple.java
- Utility class for the LZW algorithm.
-
Python Source Files:
Huffman_tree_visualisation.py
- Visualizes the Huffman tree.
-
Configuration Files:
Requirments.txt
- Lists the dependencies for the Python scripts.
- Huffman Coding: Efficient text compression using variable-length codes.
- LZ77 Algorithm: Sliding window compression technique.
- LZW Algorithm: Dictionary-based compression method.
- GUI Interface: User-friendly interface for file selection and compression operations.
- Visualization: Graphical representation of Huffman trees for better understanding.
To run the Python scripts, ensure you have the required dependencies listed in Requirments.txt
. You can install them using:
pip install -r Requirments.txt
Follow these steps to run the application:
-
Clone the Repository:
git clone [your-repo-link]
-
Navigate to the Project Directory:
cd [project-directory]
-
Compile the Java Files:
javac *.java
-
Run the Main Java Application:
java Main
We welcome contributions from the community to improve this project. To contribute, follow these steps:
- Fork the repository.
- Create a new branch (git checkout -b feature/improvement).
- Make your changes and commit them (git commit -am 'Add new feature').
- Push to the branch (git push origin feature/improvement).
- Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
Thank you for utilizing the GUI-Driven Text Compression project! We trust that it will enrich your experience in exploring text compression techniques and applications.
For any inquiries or feedback, feel free to contact us: