Decimen通过喷泉编码的二维码帧在无需配对的情况下流式传输文件

Alstroph 表示 Claude Code 帮助构建了这款一夜完成的 PoC,宣称速度为 128 KB/s,但目前其接收端页面是通过本地网络加载的。

By · Published

Primary source: Reddit

Why it matters

Decimen shows how AI coding agents can compress the path from protocol idea to working systems demo, while exposing an optical channel useful for both provisioning and data exfiltration.

Illustration of Decimen streaming fountain-coded QR frames between two devices, showing QR data blocks moving from one phone to another.

A pseudonymous software engineer using the name Alstroph released Decimen Optical Transfer on July 31st, turning a screen and camera into a one-way file link built from rapidly changing QR codes. In a demonstration post, Alstroph said the proof of concept was built with Claude Code in one night.

该项目起源于一个缓存的网页音乐播放器。Alstroph 写道,对流媒体音频质量和广告的沮丧促使他们尝试一种不依赖 Apple AirDrop 也不要求双方使用相同传输服务的手机对手机音乐共享方式。作者后来将该概念描述为一种“sneaker net”式的音乐共享方式,并承认其结果更接近技术实验而非成品的消费者功能。

Alstroph 表示他们作为职业软件工程师已有十余年经验,并自该编码代理早期发布以来在工作和个人项目中使用 Claude Code。作者还说,光学传输的概念早于 Claude 会话,AI 工具被用于实现这个概念验证。

How Decimen handles missed frames

Decimen divides a file into blocks and displays an endless sequence of QR frames. A second device points its camera at the screen, decodes enough frames and reconstructs the original file. The receiver can start watching after the transmission has begun because every frame includes a 20-byte header containing a session identifier, sequence number, block information, file length and hash.

重要组件是 Luby-transform(LT)喷泉编码。每个显示的帧将原始文件分块的一个伪随机子集合组合在一起。接收方不需要每一帧或特定的顺序。Decimen 的文档称,在收集到约为原始分块数量 1.15 倍的数据后,它可以重建文件,从而吸收由于模糊、自动对焦、刷新率不匹配或解码缓慢导致的丢帧。

这种设计消除了需要通过回传通道请求发送方重复缺失帧的必要性。它还允许发送方和接收方以不同的帧率运行。Decimen 使用 TypeScript 和 Vite,使用 node-qrcode 生成码,并通过 zxing-wasm 在相机端进行解码,后者将 ZXing-C++ 打包为 WebAssembly。

该仓库还处理了典型二维码演示可能忽略的浏览器特定故障。它使用确定性对数实现,使 V8 和 JavaScriptCore 计算出相同的喷泉码分布,考虑了 iOS 相机的帧率行为,并在丢帧时调度解码工作线程。代码以 MIT 许可证发布。

The speed claim comes with a setup caveat

Alstroph's original demonstration claimed about 120 KB/s. The repository documentation says the broader experiment reached about 128 KB/s while handheld and about 186 KB/s when the receiving phone was propped up. It also describes a 2 MB image transfer measured at 129 KB/s. Those figures are creator-reported benchmarks rather than independent measurements.

Alstroph 最初的演示声称约为 120 KB/s。该 仓库文档 称,更广泛的实验在手持时达到了约 128 KB/s,在接收手机支撑固定时达到了约 186 KB/s。文档还描述了一个 2 MB 图像以 129 KB/s 传输的测量结果。这些数据是作者报告的基准测试,而非独立测量。

精简的公开版本发送可选择的 512 KB 或 2 MB 图像。其默认配置在 24 帧/秒 下每帧显示 1,465 字节,而更高吞吐量的实验使用了更密集的二维码、叠加码、120 Hz 显示屏和带纠错的彩色通道。

一旦浏览器页面运行,Decimen 关于在无网络情况下传输有效载荷的主张是准确的,但当前设置并不是两台完全隔离设备的开箱即用工作流程。说明要求发送方运行本地 Vite 服务器,并在接收手机激活相机前指示其从服务器的本地网络地址加载一个 HTTPS 页面。然后文件字节通过光线而不是通过局域网跨越间隙。

一个可部署的隔离网络版本需要发送端和接收端的软件事先安装或加载到每台设备上。当前的仓库证明了光学通道和恢复方法,而不是为锁定环境打包完整的操作流程。

Animated QR transfer already has a history

Decimen is a new implementation of an established idea. TXQR, first published in 2018, also combines animated QR codes with fountain coding. Qrs streams data through QR-code series using Luby-transform encoding. Airgapped QR Code Transfer provides a browser implementation built with Vue.js, compression and WebAssembly scanning.

Libcimbar abandons standard QR codes for custom color-icon-matrix barcodes. Its maintainers claim roughly 106 KB/s between a monitor and smartphone camera, using fountain codes, compression and a barcode format designed specifically for optical transfer. Decimen's README acknowledges these predecessors and says its creator arrived at the approach independently.

Decimen 是对已确立想法的一种新实现。TXQR(2018 年首次发布)也将动态图二维码与喷泉编码结合。Qrs 使用 Luby-transform 编码通过一系列二维码流式传输数据。Airgapped QR Code Transfer 提供了一个基于 Vue.js、带压缩和 WebAssembly 扫描的浏览器实现。

Libcimbar 放弃了标准二维码,采用自定义的彩色图标矩阵条码。其维护者声称在显示器与智能手机相机之间使用喷泉码、压缩和专为光学传输设计的条码格式能够达到约 106 KB/s 的速率。Decimen 的 README 承认了这些前辈,并表示其作者是独立形成这一方法的。

新贡献在于一位独立开发者将这一想法快速转化为基于浏览器、可检视的系统演示的速度。该仓库包含关于错误恢复、相机行为、跨引擎数值一致性和工作线程调度的决策,这些都超出了仅生成一系列二维码图像的范围。

同一通道在安全性方面也有其优势。单向光学链路可以在禁止或监控 Bluetooth、Wi‑Fi 和常规网络流量的环境中传输信息。这可用于设备配置和在隔离环境中的受控传输。它也可能通过被允许的屏幕和相机创造一条数据外传通路。Alstroph 在讨论中明确承认了潜在的恶意用途。

二维码流是可见的广播数据。任何具有视线的兼容接收方都可以收集这些帧,这使得物理访问和屏幕可见性成为威胁模型的一部分。Decimen 在这个小型概念验证中做出这样的权衡:网络控制从有效载荷路径中消失,而房间和相机的控制权变得决定性。

Reader comments

Conversation for this story loads after sign-in.