Text → RGB → Pixel → LLM — Turn folders, notes, and spreadsheets into portable picture cartridges for mobile AI chats.
Mobile AI apps (Gemini, Meta AI on WhatsApp, ChatGPT) have two frustrating limits when you work from a phone:
- You can't feed them big datasets: Pasting a 10 MB spreadsheet or hundreds of project files into chat gets cut off immediately.
- You can't easily get big results back: Messaging apps like WhatsApp compress photos into blurry JPEGs and restrict file exports from chat bots.
datapixels turns ordinary pictures and single-page PDFs into a two-way storage drive for AI chats—with no servers, databases, or API keys:
- Send Data In (
packer.html/packpng.py): Compresses your files or pasted text into colored pixels beneath a yellow summary banner. Upload the resulting PDF to an AI chat, paste the generated decoder snippet, and your entire folder is mounted in the AI's memory ready to search and analyze. - Get Data Back (
viewer_dln1.html): When the AI finishes analyzing your data, it packs the output into high-contrast black-and-white tile images that survive WhatsApp photo compression intact. Open those images in the browser viewer to rebuild and download your file.
Both web tools run 100% locally inside your phone or desktop browser—your files never touch an external server.
| Live Web App | What It Does |
|---|---|
packer.html — Browser Cartridge Packer |
Select local files or paste raw text to render a downloadable LLMPv2 PNG/PDF cartridge and generate the copy-paste AI decoder snippet. |
viewer_dln1.html — Browser Archive Reconstructor |
Select one or more DLN1 black-and-white images (including JPEGs sent through WhatsApp) to decode and download the reconstructed JSON or text file. |
- Open viewer_dln1.html in your browser.
- Download the pre-made WhatsApp-compressed test image from this repo: examples/sample_dln1_whatsapp_sim.jpg.
- Select
sample_dln1_whatsapp_sim.jpginside the viewer—it decodes the JPEG-degraded tiles and reconstructs the original JSON output in milliseconds.
Tip
Using Multiple Export Images? If an AI splits a large export across several DLN1 photos (e.g., 01 through 06), select them inside viewer_dln1.html in exact order from first to last so they stitch together cleanly.
For whole directories, recursive codebases, or multi-megabyte CSV files, use the Python CLI packer:
pip install -r requirements.txt
python3 packpng.py -d ./my_folder --recursive --clip- Upload: Attach the generated
llmp_<timestamp>.pdfin your AI chat (send as a Document if using WhatsApp). - Mount: Paste the
LLM SANDBOX DECODERcode block fromllmp_<timestamp>_manifest.txtinto the chat. - Query in RAM:
run()— Deduplicates files, scores entries by information density, and profiles CSV columns.search_files("keyword")— Finds matching lines across every file and chunk.query_csv("term", col="column_name")— Filters rows across oversized, auto-chunked spreadsheets.get_block(1)— Pages through logical ~500 KB working sets safely under chat output limits.
| File / Folder | Purpose |
|---|---|
packer.html |
Minimalist browser app to pack files or pasted text into LLMPv2 PNG/PDF cartridges. |
viewer_dln1.html |
Mobile-optimized browser app to decode DLN1 1-bit JPEGs/PNGs and download rebuilt files. |
packpng.py |
Streaming Termux/desktop CLI packer with automatic CSV row-chunking and embedded 00_scan.py. |
generate_test_suite.py |
Deterministic test generator that creates dummy files and verifies round-trip SHA-256 integrity. |
examples/ |
Pre-built LLMPv2 PDF/PNG cartridges, a simulated WhatsApp DLN1 JPEG, and verification_report.json. |
| Specification | Inbound (LLMPv2 1×1 RGB PDF) |
Outbound (DLN1 8×8 1-Bit JPEG) |
|---|---|---|
| Encoding Geometry | 1×1 native RGB pixels (3 bytes/px) |
8×8 macro-tiles (0 = black, 255 = white; 1 bit/tile) |
| Max Capacity / Frame | ~11.25 MiB compressed / ~45 MB raw (2048×2048) |
~32.7 KB deflated payload (4096×4096) |
| Transport Channel | WhatsApp Document / Direct File Upload | Standard WhatsApp Photo (survives lossy JPEG) |
| Decoder Runtime | Python sandbox (fitz, numpy, json only) |
Browser <canvas> + DecompressionStream |
| Mobile Decode Speed | ~40 ms in C via fitz.xref_stream |
< 150 ms across 6 frames on Android/iOS |
- Header & Frame Layout: Rows
0..127render a high-contrast#FFD400manifest banner with RGB calibration swatches, byte lengths, and aSHA-256checksum. Rows128+store raw bytes (b"LLMP"magic + version/flags/part metadata +zlib-compressed TOC and file blob) mapped directly onto RGB channels. - Sandbox Import Bypass: Locked-down mobile AI Python sandboxes frequently block
import zlib,struct,re, andhashlib. The generated decoder wraps the raw compressed bytes inside an in-memory 3-object PDF header and calls MuPDF'sfitz.xref_stream(3)to inflate the archive in C using onlyfitz,numpy, andjson. - Automatic CSV Row-Chunking: Line-oriented files (
.csv,.tsv,.jsonl,.log) larger than--block-kb(default500 KB) are sliced along newline boundaries in64 KBstreaming RAM, with CSV/TSV column headers prepended to every slice so eachINDEX_XXblock is standalone.
- Compression Survival: WhatsApp re-encodes outbound images at roughly JPEG quality 70 with
4:2:0chroma subsampling. Encoding bits as8×8blocks of pure0and255creates a 255-step luminance gap that thresholds cleanly at128even after aggressive recompression. - Hardware Tile Sampling:
viewer_dln1.htmlverifies the alternating0, 255, 0, 255...sync pattern on Row 0, downscales the image viaimageSmoothingEnabled = falseso the GPU samples tile centers directly, and inflates raw deflate or zlib streams natively.
python3 generate_test_suite.pyBuilds a ~580 KB dummy dataset in test_corpus/, packs it into examples/sample_llmp_bundle.pdf and examples/sample_llmp_bundle.png, encodes a DLN1 export degraded with quality=70, subsampling=2 (examples/sample_dln1_whatsapp_sim.jpg), and writes verified SHA-256 results to examples/verification_report.json.
Caution
Treat Cartridges as Untrusted Input: LLMPv2 archives can contain arbitrary text payloads alongside embedded Python helper scripts (00_scan.py). Always inspect embedded code before running it in shared or sensitive environments. Use this tool only on data and systems you own or have explicit authorization to test.