https://github.com/teschmitt/bzippr
A Rust implementation of the bzip2 compression algorithm.
https://github.com/teschmitt/bzippr
bzip2 compression crate rust
Last synced: 5 months ago
JSON representation
A Rust implementation of the bzip2 compression algorithm.
- Host: GitHub
- URL: https://github.com/teschmitt/bzippr
- Owner: teschmitt
- License: agpl-3.0
- Created: 2025-09-24T20:10:25.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-10-04T21:51:08.000Z (7 months ago)
- Last Synced: 2025-10-04T23:33:04.227Z (7 months ago)
- Topics: bzip2, compression, crate, rust
- Language: Rust
- Homepage:
- Size: 67.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bzippr
A Rust implementation of the `bzip2` compression algorithm.
## Overview
bzippr is a command-line tool that implements the `bzip2` compression algorithm from scratch. The project aims to provide a comprehensive Rust implementation of all stages in the bzip2 compression pipeline.
## Features
- ✅ Run-Length Encoding (RLE) compression and decompression
- ✅ Burrows-Wheeler Transform (BWT) implementation
- ✅ Move-to-Front (MTF) transformation (with second RLE pass)
- ⏳ Huffman Coding
- ⏳ Full bzip2 format support
- ⏳ Command-line interface for file compression
## Implementation Status
The project has successfully implemented the following compression stages:
1. **Run-Length Encoding (RLE)**: A lossless data compression technique that encodes consecutive repeated data elements.
2. **Burrows-Wheeler Transform (BWT)**: A reversible transformation that rearranges input data to improve compressibility.
3. **Move-to-Front Transform (MTF)** (includes second RLE pass): An algorithm that reorders data based on recency of occurrence, improving compression for certain types of data.
## Installation
```bash
cargo build --release
```
## Usage
The command-line interface is still in development. The core compression algorithms can be used as a library.
```rust
use bzippr::{bwt, mtf, rle};
// Example usage will be provided once CLI is complete
```
## Future Work
- Implement Huffman Coding stage
- Integrate all compression stages into the full bzip2 pipeline
- Develop a user-friendly command-line interface
- Add benchmarking against the original bzip2 implementation
- Support for additional bzip2 features (block sizes, compression levels)
## License
Gnu AGPLv3 (see LICENSE file for full terms)
## Contributing
This project is in active development. Feel free to contribute by opening issues or submitting pull requests.