Compresso Lab is a web-based interactive tool for experimenting with and learning about data compression algorithms. It provides a hands-on environment to build, test, and analyze compression pipelines, with AI-powered insights and optimization suggestions.
- Interactive Pipelines: Build compression pipelines by chaining multiple algorithms together.
- Real-time Analysis: Instantly see the results of your compression pipeline, including size, ratio, and entropy changes.
- Data Visualization: Analyze your data with byte-level heatmaps, frequency charts, and data composition bars.
- AI-Powered Insights:
- Analysis: Get an AI-generated analysis of your compression pipeline's effectiveness.
- Optimization: Let the AI suggest an optimal compression pipeline for your data.
- Brute Force Search: Automatically search for the best combination of algorithms.
- Multiple Algorithms: Experiment with a variety of classic compression and transformation algorithms.
- Save & Load: Save your entire workspace, including pipelines and custom data presets, to a file and load it back later.
- Side-by-Side Comparison: Compare the performance of up to four different pipelines at once.
- Frontend: React with Vite
- Language: TypeScript
- AI: Google Gemini (via
@google/genai) - Charting: Recharts
- Styling: Tailwind CSS
- Node.js and npm
- A Google AI API key (for AI features)
-
Clone the repository:
git clone https://github.com/johnjg75dev/Compresso-Lab.git cd Compresso-Lab -
Install dependencies:
npm install
-
Set up your API key:
- Create a
.env.localfile in the root of the project. - Add your Google AI API key to the file:
API_KEY=your_api_key_here
- Create a
-
Run the development server:
npm run dev
-
Open your browser: Navigate to
http://localhost:5173(or the address shown in your terminal).
The following algorithms are available in Compresso Lab:
- RLE (Run-Length Encoding): Simple compression for data with repeating values.
- LZW (Lempel-Ziv-Welch): A dictionary-based compression algorithm.
- Huffman Coding: Uses a frequency-sorted binary tree to assign codes to characters.
- Arithmetic Coding: Encodes an entire message into a single number.
- BWT (Burrows-Wheeler Transform): Permutes the data to group similar characters together, making it easier to compress.
- MTF (Move-to-Front): A data transformation algorithm that often improves the performance of subsequent compression.
- Delta Encoding: Stores the difference between consecutive bytes.
- XOR Transform: Applies a simple XOR operation with a given key.
- DCT (Discrete Cosine Transform): A lossy compression technique often used in image and signal processing.
- Base64: Encodes binary data into an ASCII string format.
This project is licensed under the MIT License. See the LICENSE file for details.