https://github.com/ammarlodhi255/file-compression-system
File Compression Using Huffman Coding Built in Java.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.4%) to scientific vocabulary
Keywords
Repository
File Compression Using Huffman Coding Built in Java.
Basic Info
Statistics
- Stars: 19
- Watchers: 1
- Forks: 7
- Open Issues: 2
- Releases: 0
Topics
Metadata Files
README.md
File Compression System Using Huffman Encoding
Table of Contents
Overview
This repository contains a Java-based implementation of a file compression system utilizing Huffman encoding. Huffman encoding is a lossless data compression algorithm that is widely used for reducing the size of data files without any loss of information. You can also decompress the file using this app into its original form. This app also has some additional features such as: Given a string of alphabetic characters, you can compress the size of its bit sequence to obtain a binary sequence that has size significantly lesser than the original, this new sequence can then be sent through a network or saved in file so that it can be decompressed whenever required.
Features
- Huffman Encoding: Implements Huffman Tree and Encoding algorithms to compress files efficiently.
- User Interface: A simple GUI (
EncoderGUI.java) to interact with the system. - Custom Data Structures: Includes implementations of various data structures such as singly linked lists, priority queues, and more, tailored for the compression tasks.
- Progress Tracking: Visual progress bar to monitor the compression/decompression process.
Code and Files
The main code is contained inside src folder
- ByteNode.java: Represents a node containing byte information used in Huffman encoding.
- CharLinkedList.java: A linked list implementation for storing characters, used in encoding.
- CharNode.java: Represents a node containing character information used in Huffman encoding.
- Displayer.form and Displayer.java: Handles the display functionalities of the GUI.
- EncoderGUI.java: The main GUI for interacting with the compression system.
- HuffCompression.java: Core logic for compressing and decompressing files using Huffman encoding.
- HuffmanEncoder.java: Contains methods to generate Huffman codes and encode files.
- HuffmanTree.java: Constructs the Huffman tree necessary for encoding.
- Message.java: Handles messaging within the application.
- MinPriorityQueue.java: Implementation of a priority queue, essential for Huffman tree construction.
- Node.java: Basic node structure used in various data structures.
- ProgressBar.java: Implements the progress bar feature in the GUI.
- QueueLL.java: A queue implementation using linked lists.
- SinglyLinkedList.java: Basic singly linked list implementation.
- ThreadedText.java: Manages text in a multithreaded environment.
Getting Started
Prerequisites
- Java Development Kit (JDK) 8 or higher.
- A Java IDE (e.g., IntelliJ IDEA, Eclipse) or any text editor with Java support.
Installation
Clone the repository to your local machine using:
bash git clone https://github.com/ammarlodhi255/file-compression-system.gitNavigate to the project directory:
bash cd file-compression-system/srcOpen the project in your preferred Java IDE.
Usage
- Compile the project: Ensure all
.javafiles are compiled. Most IDEs handle this automatically. - Run the GUI:
- Execute
EncoderGUI.javato launch the user interface. - Use the provided options to compress or decompress files.
- Execute
- Command Line Interface (CLI):
- If you prefer a non-GUI approach, modify the
HuffCompression.javato take input from the command line.
- If you prefer a non-GUI approach, modify the
Example
Compress a text file:
- Open the GUI.
- Select the file you want to compress.
- Click on the "Compress" button and specify the destination for the compressed file.
Decompress a file:
- Open the GUI.
- Select the compressed file.
- Click on the "Decompress" button and choose where to save the decompressed file.
Contributing
If you'd like to contribute to this project, please fork the repository and use a feature branch. Pull requests are warmly welcome.
- Fork the repository.
- Create a new feature branch.
- Commit your changes.
- Push to the branch.
- Submit a pull request.
YouTube Video
Owner
- Name: Ammar Ahmed
- Login: ammarlodhi255
- Kind: user
- Location: Sukkur, Pakistan
- Website: https://www.youtube.com/channel/UCAh8QVO85NLQGj_RhYoTU1w/videos
- Repositories: 9
- Profile: https://github.com/ammarlodhi255
A computer scientist at heart, interested in AI, software development, and space.
GitHub Events
Total
- Issues event: 1
- Watch event: 5
- Fork event: 2
Last Year
- Issues event: 1
- Watch event: 5
- Fork event: 2
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 2
- Total pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- NilLAAY (1)
- jk-117 (1)
Pull Request Authors
- ammarlodhi255 (4)