PostBar, also known as CPC 4-State, is the black-ink barcode system used by Canada Post in its automated mail sortation and delivery operations. This particular bar code system is used on "flats", which are simply larger-than-letter-size pieces of mail, such as parcels.
This symbology, derived from that used by the British Royal Mail, uses a series of bars, each of which can individually have one of four possible states, to encode information used in automated sortation and delivery onto each piece of mail. Each bar can either be short and centred (known as a tracker), medium and elevated (an ascender), medium and lowered (a descender), or full height. This symbology also uses an element known as a Data Content Identifier (or DCI), which specifies what types of information are encoded into each barcode, such as postal codes, customer information, and exact delivery points. The information that goes into each barcode is obtained from the address printed on the front of the envelope it is ultimately printed on, as well as the physical dimensions of each piece of mail. This code also uses a Reed-Solomon error correction technique, so that in case a particular piece of mail is mishandled, the information encoded in the barcode can still be correctly decoded.
Four character sets are used in PostBar codes, known as "A", "N", "Z" and "B" characters. Three-bar A characters are used exclusively to encode letters, and two-bar N characters encode only digits. Three-bar Z characters can encode either letters or digits. A and N characters are typically used to encode postal codes and country codes. B characters are one bar each, and are used to encode base-4 machine ID's for Canada Post's internal uses.
Canada Post uses nine different formats of PostBar codes—three "domestic" barcodes, used on mail within Canada, two "global" codes, used to route mail outside Canada, three "service" codes, used on customer-applied barcodes, and an "internal" code, used for testing, maintenance, and tracking purposes by Canada Post.
Each barcode begins and ends with an identical pair of bars, known as "start" and "stop" fields. These are made up of one ascender and one tracker. The Data Content Identifier is always the first character after the start field.
Placeholders used to detail each PostBar format below are A, N, Z and B for the character sets described above, * for the start and stop fields, # for a space character (two full-height bars followed by one tracker), and [RS-nn] for the error-correction field, where nn is the number of bars used. Bold Z's indicate DCIs.
DCI's used in domestic barcodes fall within the range of A-L.
- PostBar.D07: * Z ANANAN [RS-12] *
- PostBar.D12: * Z ANANAN ZZZZ # [RS-12] *
- PostBar.D22: * Z ANANAN ZZZZZZZZZZZ [RS-12] *
DCI's used in global barcodes fall within the range of 1-9.
- PostBar.G12: * Z NNN ZZZZZZZZ [RS-12] *
- PostBar.G22: * Z NNN ZZZZZZZZ ZZZZZZZZZZ [RS-12] *
DCI's used in service barcodes fall within the range of M-U.
- PostBar.S06: * Z ZZZZZ [RS-12] *
- PostBar.S11: * Z ZZZZZZZZZZ [RS-12] *
- PostBar.S21: * Z Z ZZZZZZZZZZZZZZZZZZZ [RS-12] *
DCI's used in internal barcodes fall within the range of V-Z.
- PostBar.C10: * Z ANANAN [RS-30] BBBB *