Skip to content

Symbologies ​

What the grader does for each symbology, and how much of it is tested.

Every "yes" below is asserted in test/coverage.test.ts: a symbol is drawn with bwip-js (or a corpus file is used), graded through gradeFile, and the report is checked. Every gap that test file used to mark as an expected failure is now closed. Run it with npx tsc -p . && npx vitest run test/coverage.test.ts.

Corpus counts are files in bench/corpus/manifest.json (387 files), counted by script from each item's format, gs1 flag, data and description. "Read" is the number of those files whose code was found and decoded in bench/runs/latest/rows.json (381 of 387).

GS1 symbologies ​

SymbologyFound and decodedCheck digit, data syntaxSize against GS1Bar heightQuiet zonesColourPredicted gradeDigits under the codeCorpus files (read)
EAN-13yesGTIN check digit; prefix meaningyes: 0.264–0.660 mm (80–200%)yes: 22.85 mm at 0.330 mmyes: 11X / 7Xyesyes, against 1.5/06/660compared with PDF text; missing digits detected160 (159)
UPC-AyesGTIN check digit; prefix meaningyes: 80–200%yes: 22.85 mm at 0.330 mmyes: 9X / 9Xyesyes, against 1.5/06/660as EAN-1396 (94)
EAN-8yesGTIN check digit; prefix meaningyes: 80–200%yes: 18.23 mm at 0.330 mmyes: 7X / 7Xyesyes, against 1.5/06/660as EAN-1315 (15)
UPC-EyesGTIN check digit; number system 0 only (fail); zero suppressionyes: 80–200%yes: 22.85 mm at 0.330 mmyes: 9X / 7Xyesyes, against 1.5/06/660as EAN-1313 (13)
Add-ons (EAN-2, EAN-5)yes, when ZXing reads them: up to about 10X from the main symbol (GS1 allows 7X to 12X, so one at 12X is missed). The digits are in addOn and the summarynot checkednononononono0: untested in the public corpus
ITF-14yes (format ITF, name "ITF-14")GTIN check digit; 14 digits; wide-to-narrow ratio 2.25–3.0 (fail); bearer barsyes: 0.495–1.016 mmyes: 31.75 mmyes: 10X / 10Xyesyes, against 1.5/10/660, or 0.5/20/660 from X 0.635 mmcompared with PDF text26 (25)
GS1-128yesevery AI in GS1's table, with its format and content; check digits; pairs and partners; 165.10 mm; 48 characters counting separatorsyes: 0.495–1.016 mmyes: 31.75 mmyes: 10X / 10Xyesyes, against 1.5/10/660bracketed text in a PDF compared27 (27)
GS1 DataBar OmnidirectionalyesGTIN check digityes: 0.264–0.660 mmyes: 46X (Table 5-44 note ****)1X guard spaceyesyes, against 1.5/06/660same code path as GS1-128; not tested on its own2 (2)
GS1 DataBar Stacked OmnidirectionalyesGTIN check digityesno: measured on one row, total height not judged1Xyesyes, row by rowas above1 (1)
GS1 DataBar TruncatedyesGTIN check digityesreported as a short DataBar (check)1Xyesyesas above1 (1)
GS1 DataBar StackedyesGTIN check digityesreported as a short DataBar (check)1Xyesyes, row by rowas above1 (1)
GS1 DataBar LimitedyesGTIN check digit; always a check "not for tills"noyes: 10X1Xyesyes, against 1.5/06/660as above1 (1)
GS1 DataBar Expandedyesas GS1-128; 74 digits / 41 charactersyes: 0.264–0.660 mmyes: 34X1Xyesyes, against 1.5/06/660as above2 (2)
GS1 DataBar Expanded Stackedyesas Expandedyesno: measured on one row1Xyesyes, row by rowas above1 (1)
GS1 DataMatrixyes, square and the six rectangular sizes; a DMRE size is a checkas GS1-128; FNC1yes: 0.396–0.990 mm (0.743 mm with AI 8200)n/ayes: 1X, four sidesyesyes, against 1.5/12/660same code path as GS1-128; not tested on its own11 (10)
Data Matrix with a GS1 Digital Linkyesas QR Code with a GS1 Digital Linkyes: 0.396–0.990 mmn/ayes: 1Xyesyes, against 1.5/12/660no0: untested in the public corpus
GS1 QR Codeyesas GS1-128yes: 0.396–0.743 mm (Table 5-45)n/ayes: 4X, four sidesyesyes, against 1.5/12/660same code path as GS1-128; not tested on its own2 (2)
QR Code with a GS1 Digital LinkyesGTIN check digit; 14-digit GTIN and no convenience alphas (fail); path keys and order per Digital Link 1.7.0; scheme; every value in path and queryyes: 0.396–0.990 mmn/ayes: 4Xyesyes, against 1.5/12/660no11 (11)

"Colour" means the red-light checks in colour, from the colours the file is drawn in. "Yes, against" means the ISO/IEC 15416 or 15415 parameters are computed from the artwork and held to the minimum GS1 sets; grade says what that is worth. A size in "%" is an EAN/UPC magnification; every other symbology's size is reported and judged in millimetres.

Other symbologies the decoder reads ​

GS1 sets no size for these, so size is reported and never judged.

SymbologyFound and decodedData checksX-dimension reportedQuiet zonesColourPredicted gradeCorpus files (read)
Code 128yesflags GS1 data or a bare GTIN encoded without FNC1yesyes: 10Xyesyes; flagged under 1.53 (3)
ITF, not 14 digitsyescheck: GS1 uses ITF only as ITF-14yesyes: 10Xyesyes0: untested in the public corpus
QR Codeyesa link is shown; on a page with a retail barcode a plain link gets a checkyesyes: 4Xyesyes; flagged under 1.513 (12)
Data Matrixyesflags GS1 data without FNC1yesyes: 1Xyesyes; flagged under 1.51 (1)
Code 39yesnoneyesyes: 10Xyesyes; flagged under 1.50: untested in the public corpus
Code 93yesnoneyes, from its 9-module charactersnoyesno0: untested in the public corpus
Codabaryesnoneyesnoyesno0: untested in the public corpus
PDF417yesnoneyes, from the start pattern each row begins withyes: 2Xyesnot predicted0: untested in the public corpus
MicroPDF417yesnoneyes, from the row address patternsnoyesnot predicted0: untested in the public corpus
Aztecyesnoneyes, from its layers and its bullseye (compact or full)noyesnot predicted0: untested in the public corpus
MaxiCodeyesnonenonoyesnot predicted0: untested in the public corpus
Micro QRyesnoneyes, from its versionnoyesnot predicted0: untested in the public corpus
rMQRyesnoneyes, from the size ZXing statesnoyesnot predicted0: untested in the public corpus
GS1 DotCode, Composite componentsno0: untested in the public corpus

"Not predicted": the summary says "A print-quality grade isn't predicted for this symbology." The 2D grade is modelled on the finder patterns and error correction of QR Code and Data Matrix only; a grade worked out on another symbology's structure would be a false verdict.

Known limits ​

SymbolWhat happens
EAN/UPC add-on 11X or 12X from the main symbolnot read by ZXing; the main symbol is graded alone
Stacked GS1 DataBartotal height not judged; grade is the mean of scans over its rows, a combination ISO/IEC 24724 may define differently (not verified)
GS1 Digital Link, compressednot recognised as a Digital Link

What the corpus doesn't hold ​

  • No add-on, Code 39, Code 93, Codabar, PDF417, Aztec, MaxiCode, Micro QR or rMQR file, and no Data Matrix carrying a Digital Link. For those, the only evidence is one drawn symbol each in test/coverage.test.ts.
  • One file each for five of the seven GS1 DataBar forms, and two for Omnidirectional and Expanded.
  • Every corpus file is synthetic. The numbers for real artwork are in the README and are not reproducible from this repository.

MIT licensed. It predicts from the artwork; it is not a verifier.