| Crates.io | pixpack |
| lib.rs | pixpack |
| version | 0.1.1 |
| created_at | 2025-08-09 02:51:32.402991+00 |
| updated_at | 2025-08-11 17:04:28.874308+00 |
| description | File visual encoding: pack any file into a PNG cell grid with BLAKE3 integrity, and decode it back byte-for-byte. |
| homepage | |
| repository | https://github.com/SauersML/pixpack |
| max_upload_size | |
| id | 1787527 |
| size | 30,464,414 |
Turn any file into a single PNG whose pixels carry the data. Feed that PNG back in to recover the exact original with strong integrity checks.
cargo install pixpack
# encode (file → PNG)
pixpack myfile.bin # creates myfile.bin.png
# decode (PNG → file)
pixpack myfile.bin.png # recreates myfile.bin
One argument only. If it’s a PNG, pixpack decodes; otherwise it encodes.
Renders a macro-cell grid with a white quiet zone and black frame.
Packs: MAGIC | VERSION | header (×2) | payload | trailer_u32.
Decode: grayscale → Otsu threshold (with a few fallbacks) → infer frame/quiet → sample center pixel per cell → rebuild stream.
Integrity:
Capacity is 1 bit per data cell; pixpack picks a near-square grid and a cell size capped by a max canvas side.