jetessays A gift to every explorer.
中文

CQRC: Differential Testing Two Zero-Dependency QR Code Encoders at the Module-Matrix Level

by Daozhendong YangAuthor
Authors: Daozhendong Yang
Submitted: 2026-10-25 · ID: 26.0001 · Category: cs.IT · Version 1
Tags: imported, entry-paper · Confidence: proposed · License: All rights reserved

Abstract

QR Code encoders are usually validated by scanning a rendered image, a test that lets the decoder's error correction absorb encoder mistakes and that samples few of the possible inputs. This paper reports CQRC, a QR Code generator written twice from scratch---in C# and in JavaScript---without third-party dependencies, and evaluates it by taking the module matrix, not the image, as the conformance unit. On a seeded corpus of 200 inputs spanning versions 1--40, all four error-correction levels and five payload families, the two implementations produce bit-identical matrices for 192 inputs (1,164,776 modules); the other eight expose a C# defect. A third-party oracle (python-qrcode 8.2, invoked with an explicit mask) agrees on 60/60 cases (585,988 modules), a 40x4 structural sweep passes in both languages, and byte-mode capacity matches the published ISO table at all 44 checked points. We diagnose the eight failures exactly: the C# Reed--Solomon encoder indexes a polynomial whose leading zero coefficients have been stripped, so any block whose remainder starts with 0x00 throws (8/200 cases; the predictor has accuracy 1.000, against 8.95 expected occurrences in 2,292 blocks). The JavaScript port supplies the missing zero padding and is correct. A second defect, a PNG IDAT stream without an Adler-32 checksum, is rejected by both CPython and Node zlib despite valid chunk CRCs. We also measure the metadata trailer (20/20 recovered from the code words; its "ISO/IEC 21570" label is a misattribution, since ISO 21570 is a food-analysis standard) and the geometric cost of styling: circular finders change 16 of 49 cells per finder, and 0.5 module rounding removes 40% of a module's area. No decoder was available, so we do not claim that styled symbols scan.

Download

Author’s validation note: Imported from the author's local archive. UNVERIFIED on jetessays.

Body

Imported entry paper (unverified hypothesis)

This paper was imported into jetessays as an entry paper from the author's local archive (cqrc). It is not an established result: under jetessays policy every item is an UNVERIFIED HYPOTHESIS unless explicitly verified. The original source files (LaTeX, figures, scripts, measurements) live in the author's local archive and are not hosted here.

Abstract (as submitted)

QR Code encoders are usually validated by scanning a rendered image, a test that lets the decoder's error correction absorb encoder mistakes and that samples few of the possible inputs. This paper reports CQRC, a QR Code generator written twice from scratch---in C# and in JavaScript---without third-party dependencies, and evaluates it by taking the module matrix, not the image, as the conformance unit. On a seeded corpus of 200 inputs spanning versions 1--40, all four error-correction levels and five payload families, the two implementations produce bit-identical matrices for 192 inputs (1,164,776 modules); the other eight expose a C# defect. A third-party oracle (python-qrcode 8.2, invoked with an explicit mask) agrees on 60/60 cases (585,988 modules), a 40x4 structural sweep passes in both languages, and byte-mode capacity matches the published ISO table at all 44 checked points. We diagnose the eight failures exactly: the C# Reed--Solomon encoder indexes a polynomial whose leading zero coefficients have been stripped, so any block whose remainder starts with 0x00 throws (8/200 cases; the predictor has accuracy 1.000, against 8.95 expected occurrences in 2,292 blocks). The JavaScript port supplies the missing zero padding and is correct. A second defect, a PNG IDAT stream without an Adler-32 checksum, is rejected by both CPython and Node zlib despite valid chunk CRCs. We also measure the metadata trailer (20/20 recovered from the code words; its "ISO/IEC 21570" label is a misattribution, since ISO 21570 is a food-analysis standard) and the geometric cost of styling: circular finders change 16 of 49 cells per finder, and 0.5 module rounding removes 40% of a module's area. No decoder was available, so we do not claim that styled symbols scan.

Note

Imported via the jetessays seed importer. The author chose not to keep an explicit upload record on this site; the work is listed as an entry paper so it can be discovered, discussed, endorsed and relayed.

★ Starred by 0
Found a policy violation? insult, discrimination, academic discrimination, defamation, dangerous instructions

Discussion

Log in to join the discussion

No comments yet. Be the first to discuss this hypothesis.

← back to browse