| Crates.io | press_rs |
| lib.rs | press_rs |
| version | 0.2.0 |
| created_at | 2025-12-20 13:05:46.038726+00 |
| updated_at | 2025-12-20 19:40:15.687744+00 |
| description | Tiny file compressor and packager on Rust. |
| homepage | https://teseystd.github.io/press.rs/ |
| repository | https://github.com/TeseySTD/press.rs |
| max_upload_size | |
| id | 1996475 |
| size | 80,332 |
PressRs is a custom data compression tool built from scratch in Rust. It combines a TAR-like packager with an LZW (Lempel–Ziv–Welch) compressor to reduce file sizes while preserving directory structures.
It is designed as an educational project to demonstrate low-level bit manipulation, dictionary-based compression algorithms, and file stream handling in Rust.
.pressrs file.| Operation | Input Size | Throughput | Time |
|---|---|---|---|
| Compression | 1 KB | 81 MiB/s | 12 µs |
| Compression | 100 KB | 103 MiB/s | 945 µs |
| Compression | 1 MB | 102 MiB/s | 9.8 ms |
| Decompression | 1 KB | 152 MiB/s | 6.4 µs |
| Decompression | 100 KB | 171 MiB/s | 570 µs |
| Pack (small) | 3 entries | - | 475 ns |
| Unpack (small) | 5 KB archive | - | 328 ns |
| Full Pipeline | Pack + Compress 100 KB | 101 MiB/s | 965 µs |
| Full Pipeline | Decompress + Unpack 100 KB | 175 MiB/s | 576 µs |
Benchmarks run on intel i5-11400H wsl ubuntu. LZW compression algorithm.
The core of PressRs is the LZW algorithm.
Clear Code and resets, preventing memory overflow and adapting to new data patterns.PressRs uses a custom binary format similar to TAR:
Ensure you have Rust installed, then clone and build:
git clone https://github.com/TeseySTD/press.rs.git
cd press.rs
cargo build --release
Executable will be at ./target/release/press_rs