| Crates.io | mashi-core |
| lib.rs | mashi-core |
| version | 0.1.0 |
| created_at | 2021-11-26 14:21:40.266629+00 |
| updated_at | 2021-11-26 14:21:40.266629+00 |
| description | A 100% Rust no-std implementation of an arithmetic coding, context mixing compressor based on PAQ |
| homepage | https://github.com/datatrash/mashi |
| repository | https://github.com/datatrash/mashi |
| max_upload_size | |
| id | 488037 |
| size | 56,889 |
A 100% no-std compatible Rust implementation of a PAQ style arithmetic coding, context mixing compressor. Its intended use case is compressing 64k demos, but whatever works for you!
The main crate is mashi-core but I've provided a very bare-bones mashi-cli so you can test the compressor.
To build and use the CLI:
cargo build --releasetarget/release/mashi-cli compress tests/test.wasmtarget/release/mashi-cli decompress tests/test.wasm.mashiencoder feature if you want to include the encoderstd feature to enable std support (e.g. for running the unit tests)Compressing tests/test.wasm with various compressors:
| Compressor | % | Size | Command-line |
|---|---|---|---|
| mashi | 34.4% | 12083 | mashi-cli compress |
| zpaq | 37.0% | 13004 | zpaq a -m5 |
| xz | 38.5% | 13522 | xz --format=raw --lzma2=preset=9e |
| zstd | 41.3% | 14536 | zstd --ultra -22 |
| gzip | 44.5% | 15629 | gzip --9 |
| original | 100% | 35151 |
Since the original PAQ compressors are GPL licensed be aware that Mashi is also GPL licensed.