This repository contains Java implementations of various lossless and lossy compression algorithms, developed as part of an Information Theory course. The code is organized by algorithm and includes both source code and example files for testing and demonstration.
- Path:
lossless/Adaptive Huffman/ - Implements Adaptive Huffman coding for dynamic data compression.
- Includes encoder, decoder, and visualization tools.
- Path:
lossless/Standard Huffman/ - Implements the classic Huffman coding algorithm for static data compression.
- Path:
lossless/LZ77 Compression/ - Implements the LZ77 sliding window compression algorithm.
- Path:
lossless/LZ78 Compression/ - Implements the LZ78 dictionary-based compression algorithm.
- Includes sample text files for testing.
- Path:
lossy/2-D Feed Backward Predictive Coding/ - Implements predictive coding for image compression.
- Path:
lossy/Vector Quantization Gray/ - Implements vector quantization for grayscale images.
- Path:
lossy/Vector Quantization RGB/ - Implements vector quantization for RGB images.
- Includes training and test image sets.
- Requirements:
- Java (JDK 8 or higher)
- Compile & Run:
- Navigate to the desired algorithm's directory.
- Compile using
javac *.javainside thesrcfolder. - Run the main class using
java Mainor the relevant main class for each algorithm.
Information-Theory-Compression/
├── lossless/
│ ├── Adaptive Huffman/
│ ├── Standard Huffman/
│ ├── LZ77 Compression/
│ └── LZ78 Compression/
└── lossy/
├── 2-D Feed Backward Predictive Coding/
├── Vector Quantization Gray/
└── Vector Quantization RGB/
Each subfolder contains its own README.md with more details and usage instructions.
This project is for educational purposes.