FA-79522 / Barcode symbology encoding / Member archive
ITF pads odd-length data with a trailing zero · case 02
A five-digit value 12345 scans as 123450, changing its magnitude.
Case contract
Encode ASCII digits as Interleaved 2 of 5 element widths (narrow 1, wide = ratio in {2, 2.5, 3}). An odd-length input gets a leading 0. Start is narrow bar/space/bar/space; each digit pair interleaves the first digit's pattern in the bars with the second digit's pattern in the spaces; stop is wide bar, narrow space, narrow bar. Digit patterns use weights 1,2,4,7 plus parity (0 = NNWWN). Invalid input returns None.
Why this case matters
Retail, logistics, pharmacy and document workflows depend on encoders that produce exactly the module pattern, code-set switches, separators and quiet zones scanners expect; one misplaced module or separator makes a label unreadable or, worse, scan as different data.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: odd length padding side 0 | [1, 1, 1, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 3, 3, 1, 3, 1, 1] | [1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 3, 3, 1, 1, 3, 1, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 1] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗