| Crates.io | ppmd-rust |
| lib.rs | ppmd-rust |
| version | 1.2.1 |
| created_at | 2025-02-28 18:29:31.444059+00 |
| updated_at | 2025-07-05 16:45:51.409096+00 |
| description | PPMd compression / decompression |
| homepage | https://github.com/hasenbanck/ppmd-rust |
| repository | https://github.com/hasenbanck/ppmd-rust |
| max_upload_size | |
| id | 1573055 |
| size | 195,338 |
PPMd compression / decompression. It's a port of the PPMd C-code from 7-Zip to Rust.
The following variants are provided:
There are two ways to properly bound the uncompressed data:
std::io::Read::read_exact() to read the data
(this is what is used in the 7z archive format).finish(true) on the encoder when finishing the encoder process. You can then use
std::io::Read::read_to_end() to read the data. You are of course free to also use the std::io::Read::read_exact()
if you have stored the uncompressed data size (this is what is used in the zip archive format).Failing to do so will result in garbage symbols at the end of the actual data.
This port is based on the 7zip version of PPMd by Igor Pavlov, which in turn was based on the PPMd var.H (2001) / PPMd var.I (2002) code by Dmitry Shkarin. The carryless range coder of PPMd8 was originally written by Dmitry Subbotin (1999).
The code in this crate is in the public domain as the original code by their authors.