barcodes: final review pass - #321
Merged
Merged
Conversation
Four read-only reviews of every file, acting only on errors. QR: the global-projection fallback after the tile pass rebuilds the finder map and its fine-plane form, since the tiles built their homographies in the same matrices; as written it ran on the last tile's map and failed on every fine-plane path. The unreachable hasError flag in correctBlock and the unused test parameter of drawSymbol are gone. The timing and scan comments say what the code checks. Encoder parity 1452/0 and decoder parity 192/0 against the reference are unchanged. Code 128: a reversed line that opened dark ends in an empty run, which the stop's quiet-zone test rejected, so a mirrored symbol flush against the image's left edge did not read; the test covers both flush cases. The checksum leaves _tests, which the suite never used. PDF417: put and Stream.decimal are void, since a trailing loop collects an array per codeword otherwise; the corners across the symbol come from the tracked tail edge plus its pattern width when that edge was tracked; the header describes the two-edge reader; the readFrom and row-fit comments name what first and the indicator are; a guard edgeRuns could never take is gone; tryDecode's summary sits above tryDecode. ZXing sets 1-3 stay 58/58 at four rotations. ECI 12 (ISO-8859-10) joins the table. README: a clean QR raster decodes at one pixel per module, as the suite and a direct check show, so the advice to upscale is gone; the encoder matches the reference implementation, which the vectors prove, not python-qrcode; two paragraphs rewrapped. A test comment names the symbol's true shape, nine rows of two columns. Benchmarks (Bun 1.4.0, M5) match or beat the README on every row: QR encode 2.5/14.6/45.9 µs, decode 28.4 µs/577 µs/1.32 ms, miss 5.92 ms; Code 128 720p read 5.2 µs; PDF417 1080p decode 344 µs, noise 299 µs.
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.
Summary
One last pass over every file in
packages/barcodes: four read-only reviews (qr.rip; pdf417.rip; code128/image/gif/eci/barcodes/package.json; README/dom/test), acting only on errors.Verification
bun run test:all26 lanes, 9,904 tests green.