Decimen Optical Transfer: The Browser Turns Light Into a File Pipe
A deep dive into the fountain-coded QR system that moves files across an air gap with no network, no cable, and no native app.
- Decimen turns a one-way camera link into a real transport protocol by pairing QR frames with fountain coding.
- The key breakthrough is not QR generation, but surviving dropped frames without needing retransmission or a handshake.
- The browser is doing unusually heavy work here, from WebAssembly decoding to worker-based image processing and a standalone build.
- Compared with sequential QR tools and handshake-based alternatives, Decimen is the rare browser-first option that still feels like systems software.
The Screen Is the Sender
Decimen Optical Transfer makes a simple promise: a file can cross an air gap through light alone. A laptop emits animated QR frames, a phone watches the screen, and the receiver reconstructs the payload without Wi-Fi, Bluetooth, or a cable.
That sounds like a party trick until you notice the constraint it solves. A camera-to-screen link is one-way, so the receiver cannot ask for a resend when a frame is blurred, skipped, or clipped by refresh timing. Decimen is built around that fact, not around wishful looping.
A screen-to-camera link has no back-channel: the receiver can't ask for retransmission, and it will inevitably miss frames (blur, refresh straddling, autofocus). Looping the frames and hoping is miserable: miss one frame and you wait a full cycle for it to come around. Fountain codes fix this completely.
Why Sequential QR Transfer Fails
| Approach | Needs network? | Needs native app? | Handles dropped frames? | What actually breaks |
|---|---|---|---|---|
| Sequential browser QR loop | No | No | Poorly | One missed frame can stall the loop until it cycles back. |
| Handshake-based QR tools like qrcp | Yes, after pairing | Usually no on the phone, but it depends on the network | Not relevant | The QR only bootstraps a network connection, so true air-gapping is gone. |
| Native optical tools like txqr or cimbar | No | Often yes | Better | They can be fast, but install friction and specialized deployment raise the bar. |
| Decimen Optical Transfer | No | No | Yes | Dropped frames cost time, not correctness. |
The difference is subtle only if you ignore the protocol. Sequential tools assume order matters. Decimen assumes only information matters, so any sufficiently large set of unique frames can reconstruct the original file.
sequential QR:
chunk 1 -> chunk 2 -> chunk 3 -> chunk 4
if chunk 2 is missed, the receiver waits
fountain-coded QR:
frame A = mix(chunks 1, 4)
frame B = mix(chunks 2, 3)
frame C = mix(chunks 1, 2, 5)
any enough unique frames -> decode
The Fountain Code Is the Real Product
LT codes are the important idea here. Instead of sending chunk 1, then chunk 2, then chunk 3, Decimen emits randomized combinations of the source blocks. The receiver keeps collecting unique packets until the original file becomes solvable.
That is the right mental model for a simplex channel. A screen can speak, but it cannot listen. Fountain coding removes the need for that conversation.
How a File Becomes a Stream of Frames
The pipeline is practical, not mystical. A file is packed, compressed when that helps, wrapped with protocol metadata, hashed for integrity, and then turned into QR frames that the camera can decode in any order.
The integrity check matters more than it sounds. Optical transfer is not immune to bad capture conditions, so Decimen uses SHA-256 to verify that the reconstructed payload matches the original instead of trusting the camera blindly.
// conceptual flow from shared/protocol.ts
const packed = packFile(file, { gzip: true });
const framed = packFrame(packed, {
filename,
sha256,
fountainMeta,
});
const qr = encodeFrame(framed);
// receiver side
const packets = collectUniquePackets(videoFrames);
const file = decodeFountain(packets);
verifySha256(file, sha256);
That structure is what makes the system feel less like a demo and more like a transport layer. The file is not being displayed. It is being serialized into a stream that a camera can sample.
The Browser Is Doing Native-App Work
The receiver is where the engineering gets serious. Decimen uses Web Workers to keep image processing off the main thread, WebAssembly QR decoding to handle the heavy lifting, and frame-capture optimizations like requestVideoFrameCallback to stay synchronized with the camera feed.
The build is equally opinionated. Vite and a single-file packaging flow inline the assets into a standalone HTML artifact, so the tool can live on its own without a traditional install step. That makes the browser feel less like a shell and more like a deployment target.
| Subsystem | What it does | Why it matters |
|---|---|---|
| Web Workers | Move decoding work off the UI thread | The interface stays responsive while video analysis runs. |
| WASM QR decoding | Runs zxing-cpp in the browser | Safari gets a real decoder even without BarcodeDetector support. |
| requestVideoFrameCallback | Synchronizes capture with video frames | The receiver wastes less effort on stale frames. |
| Standalone single-file build | Bundles the app into one HTML file | The tool can be carried, copied, and opened without a build chain. |
Why This Beats the Usual Alternatives
| Project | Category | Browser-only? | True optical transfer? | Main trade-off |
|---|---|---|---|---|
| Decimen Optical Transfer | Fountain-coded QR transfer | Yes | Yes | More protocol sophistication, but much better resilience. |
| qrcp | QR handshake for network transfer | Mostly | No | It uses QR to start a network session, not to move the file itself. |
| txqr | Native optical transfer | No | Yes | Requires a native receiver app. |
| libcimbar | High-density color barcode transfer | No | Yes | Fast, but much more specialized to deploy and use. |
| Sequential browser QR tools | Looped QR chunk transfer | Yes | Yes, but brittle | Easy to understand, weak under frame loss. |
This is the category shift Decimen points at. The browser is not being used as a toy wrapper around a transfer script. It is acting as a full optical transport surface, with enough performance work beneath it to matter in practice.
What Decimen Proves About the Web
Decimen is a small project with an unusually large claim. It shows that the web can host a real transport system: one that handles lossy capture, does heavy decoding, verifies integrity, and ships as a single portable artifact.
That is why the project lands harder than a typical QR demo. It is not just moving bytes. It is showing that the browser can stand in for parts of a native stack when the problem is narrow, hard, and very well chosen.





