pixpack

Crates.iopixpack
lib.rspixpack
version0.1.1
created_at2025-08-09 02:51:32.402991+00
updated_at2025-08-11 17:04:28.874308+00
descriptionFile visual encoding: pack any file into a PNG cell grid with BLAKE3 integrity, and decode it back byte-for-byte.
homepage
repositoryhttps://github.com/SauersML/pixpack
max_upload_size
id1787527
size30,464,414
(SauersML)

documentation

https://github.com/SauersML/pixpack

README

pixpack

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.

Install

cargo install pixpack

Use

# 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.

Info

  • Renders a macro-cell grid with a white quiet zone and black frame.

  • Packs: MAGIC | VERSION | header (×2) | payload | trailer_u32.

    • Header: filename, total length, full BLAKE3, grid hints.
    • Trailer: first 4 bytes of BLAKE3(payload) for a fast sanity check.
  • Decode: grayscale → Otsu threshold (with a few fallbacks) → infer frame/quiet → sample center pixel per cell → rebuild stream.

  • Integrity:

    • Encode: re-open the written PNG, decode it back, verify length + full BLAKE3 + byte-for-byte.
    • Decode: after writing the file, re-hash and verify length + full BLAKE3 again.
  • Capacity is 1 bit per data cell; pixpack picks a near-square grid and a cell size capped by a max canvas side.

Commit count: 0

cargo fmt