A plain-text polyglot container format and lossless text translation toolkit.
Pixel by Claude + Bone & Saucer — id_00000000000477, 2026
A .pixel file is a plain UTF-8 container. One file holds multiple content types — human text, JSON, Python, C — as named sections. Readable with any text editor. No special viewer required.
The translator takes any text and produces three forms: human readable, binary (embedded in C), and C source that encodes and decodes with 4-pass lossless verification. Any one form gives you all three.
The comprehension loop sends text through an LLM, encodes the response as a .pixel, and compares them at the binary level to score how much meaning survived.
#!PIXEL v1
#TYPE bundle
#ID example
#DATE 2026-03-20
#MANIFEST
[txt] notes.txt
[json] config.json
[py] script.py
[c] anchor.c
#END_MANIFEST
---TXT: notes.txt---
Human readable notes go here.
---END---
---JSON: config.json---
{ "key": "value" }
---END---
---PY: script.py---
print("runs with: pixel run file.pixel")
---END---
---C: anchor.c---
#include <stdio.h>
int main(void) { printf("compiled anchor\n"); return 0; }
---END---
pixel/pixel.py format runner
pixel/pixel_translator.c binary .px format (compile with gcc)
tools/translator.py 3-form lossless text encoder/decoder
tools/comprehension.py LLM comprehension loop + binary comparison
gui/pixel_studio.py desktop GUI — pack/unpack/view
demo.pixel working example
Python 3.11+
pip install anthropic python-dotenv # comprehension loop only
# Pack a folder into one .pixel file
python pixel/pixel.py pack ./my_folder
# Unpack back out
python pixel/pixel.py unpack my_bundle.pixel
# View all sections
python pixel/pixel.py view my_bundle.pixel
# View only JSON sections
python pixel/pixel.py view my_bundle.pixel --json
# Walk sections (one-line summary each)
python pixel/pixel.py walk my_bundle.pixel
# Run the embedded Python section
python pixel/pixel.py run my_bundle.pixel
# Compile and run the C section
python pixel/pixel.py run my_bundle.pixel --c
# Extract one section to stdout
python pixel/pixel.py extract my_bundle.pixel --py
python gui/pixel_studio.py
python gui/pixel_studio.py demo.pixel
Open, browse sections, pack a folder, unpack to disk.
Encodes a text file into three forms in one .pixel bundle.
The binary lives inside the C layer — not stored as a visible section.
4-pass verification: length, CRC-32 (50% anchor weight), UTF-8 validity, structure (50% anchor weight).
# Encode — produces txt + json + encoder.c + decoder.c
python tools/translator.py encode input.txt
# Verify lossless roundtrip
python tools/translator.py verify input.pixel
# Encode and verify in one step
python tools/translator.py roundtrip input.txt
# Decode back to text
python tools/translator.py decode input.pixel
Requires ANTHROPIC_API_KEY in environment or .env file.
# Encode a text file then run through the LLM loop
python tools/comprehension.py loop input.txt --passes 3
# Run loop on an existing .pixel
python tools/comprehension.py run input.pixel --passes 3 --target 95
# Compare two .pixel files at the binary level
python tools/comprehension.py compare original.pixel response.pixel
Each pass sends the text to Claude, encodes the response as a .pixel, and scores confidence: 50% byte-exact (CRC-32) + 50% structural (line count, word count). Passes dial in until confidence hits the target or plateaus.
# Compile the translator (Linux/Mac)
gcc pixel/pixel_translator.c -o pixel/pixel_translator -lm
# Pack to binary .px
python pixel/pixel.py pack ./my_folder --binary
# Unpack binary
python pixel/pixel.py unpack my_bundle.px --binary
from pixel.pixel import PixelFile
pf = PixelFile("my_bundle.pixel")
# Metadata
print(pf.meta)
# Get a section by type
sec = pf.get("json")
print(sec.content)
# Walk all sections
for sec in pf.walk():
print(sec.type, sec.name)
a Bone & Saucer Tool