feat(barcodes): Aztec Code (#153) - #161
Merged
Merged
Conversation
Add Aztec Code as a 2D Barcode, authored clean-room from ISO/IEC 24778, reusing the shared multi-field Reed-Solomon / Galois-field groundwork. - AztecCode : Barcode with string and byte[] content, ErrorCorrectionPercent (default 23), and a Format option (Automatic / Compact / FullRange). - Aztec/: the five-mode (Upper/Lower/Mixed/Punct/Digit) plus Binary high-level encoder, bit-stuffing, layer/format selection, the mode message (GF(16) Reed-Solomon), and the data-layer domino-spiral placement with the Full-Range reference grid. Reed-Solomon over GF(16/64/256/1024/4096) by layer count, first root 1. - DefaultAltText arm, docs/barcodes-guide.md section, and encoder / table / placement / property / decode-oracle tests. PublicAPI.Unshipped updated. All compact (1-4 layer) and full-range symbol sizes are decode-verified against zxing-cpp, including byte payloads and high error-correction settings. The data-layer placement algorithm is per ISO/IEC 24778, derived and verified against zxing-cpp reference matrices (used as an oracle, not copied) because the standard's placement figures are not in the free preview.
…ent provenance Address adversarial-review findings on #153: - Split binary-shift runs longer than 2078 bytes into consecutive blocks. A single shift's 11-bit length field capped a run at 2078 bytes and silently wrapped beyond it, corrupting large binary / high-byte payloads at low error correction. Now decode-verified across the 2078/2079-byte boundary. - Add committed decode round-trips across all 32 full-range and 4 compact layers (previously only 7 full-range layers were covered), locking in the GF(64/256/1024/4096) fields; plus a hand-derived GF(16) mode-message known-answer test and an Aztec case in the AOT smoke. - Re-source the data-layer placement provenance to the public US Patent 5,591,956 (Longacre et al.) and ISO/IEC 24778: the spiral, dominoes, MSB-first ordering, reference grid and grid displacement are each attributed to the patent by figure; zxing-cpp is a decode/cross-check oracle only. Correct a "two" -> "four" domino doc error.
This was referenced Jul 8, 2026
This was referenced Aug 19, 2026
This was referenced Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fifth and final symbology in the v1.10 barcode expansion — Aztec Code (transport ticketing: IATA boarding passes, European rail), authored clean-room from ISO/IEC 24778, on the merged multi-field
ReedSolomonBinary/GaloisFieldgroundwork.What's here
AztecCode : Barcode— string +byte[]content;ErrorCorrectionPercent(default 23);Format(Automatic/Compact/FullRange).Aztec/— the five text modes (Upper/Lower/Mixed/Punct/Digit) plus Binary high-level encoder, bit-stuffing, layer/format selection, the mode message (GF(16) Reed-Solomon), and the data-layer domino-spiral placement with the Full-Range reference grid. Reed-Solomon overGF(16/64/256/1024/4096)by layer count, first root 1.PublicAPI.Unshipped):AztecCode(+ErrorCorrectionPercent/Format/GetMatrix) andAztecFormat.Correctness verification
pdftoppm→ decode, including abyte[]binary payload and an 80% error-correction case. The encoder's matrices are byte-identical to zxing's (0 differing cells).dotnet formatclean, clean-room check pass.Provenance note (worth a look in review)
The finder, orientation, mode message, reference grid, high-level encoder, and RS were authored from the ISO/IEC 24778 text and verified. The data-layer placement algorithm (the domino spiral + reference-grid displacement) is per ISO/IEC 24778, but was derived and verified against zxing-cpp-generated reference matrices (used as an oracle — no source copied) because the standard's placement figures (Figures 4/5) are behind the paywall and not in the free preview. This is a stronger reliance on the reference decoder than the other symbologies; flagging it explicitly so it can be adjudicated (re-source from the purchased standard later if preferred). Documented in
AztecPlacement.csremarks and the guide.Scope: GS1 mode and an explicit per-layer forcing knob are out of #153's scope (deferred, additive later).