53595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402 The values in the Base 74 set correspond to the invariant subset of ISO 646 (whichincludes the <strong>GS1</strong> character set), but with the digits eliminated, and with the additionof GS and (GS is supported for uses other than as a data delimiter). The values in the Base 256 set may convey octets with no graphical-characterinterpretation, or “extended ASCII values” as defined in ISO 8859-6, or UTF-8 (theinterpretation may be set in the registered ID Table for an application). Thecharacters ‘0’ through ‘9’ (ASCII values 48 through 57) are supported, and anencoder may therefore encode the digits either by using a prefix or suffix (in Base256) or by using a character map (in Base 10). Note that in <strong>GS1</strong> data, FNC1 isrepresented by ASCII (octet value 29 dec ).Finally, there are situations where compaction efficiency can be enhanced by run-lengthencoding of base indicators, rather than by character map bits, when a long run ofcharacters can be classified into a single base. To facilitate that classification, additional“extension” bases are added, only for use in Prefix and Suffix Runs. In order to support run-length encoding of a primarily-numeric string with a fewinterspersed letters, a Base 13 is defined, per Table B-2 Two of these extension bases (Base 40 and Base 84) are simply defined, in that theyextend the corresponding non-numeric bases (Base 30 and Base 74, respectively) toalso include the ten decimal digits. The additional entries, for characters ‘0’ through‘9’, are added as the next ten sequential values (values 30 through 39 for Base 40, andvalues 74 through 83 for Base 84). The “extended” version of Base 256 is defined as Base 40. This allows an encoderthe option of encoding a few ASCII control or upper-ASCII characters in Base 256,while using a Prefix and/or Suffix to more efficiently encode the remaining nonnumericcharacters.The number of bits required to encode various numbers of Base 10, Base 16, Base 30,Base 40, Base 74, and Base 84 characters are shown in Figure B-1. In all cases, a limit isplaced on the size of a single input group, selected so as to output a group no larger than20 octets.Figure K-1: Required number of bits for a given number of Base ‘N’ values/* Base10 encoding accepts up to 48 input values per group: */static const unsigned char bitsForNumBase10[] = {/* 0 - 9 */ 0, 4, 7, 10, 14, 17, 20, 24, 27, 30,/* 10 - 19 */ 34, 37, 40, 44, 47, 50, 54, 57, 60, 64,/* 20 - 29 */ 67, 70, 74, 77, 80, 84, 87, 90, 94, 97,/* 30 - 39 */ 100, 103, 107, 110, 113, 117, 120, 123, 127, 130,/* 40 - 48 */ 133, 137, 140, 143, 147, 150, 153, 157, 160};/* Base13 encoding accepts up to 43 input values per group: */static const unsigned char bitsForNumBase13[] = {/* 0 - 9 */ 0, 4, 8, 12, 15, 19, 23, 26, 30, 34,/* 10 - 19 */ 38, 41, 45, 49, 52, 56, 60, 63, 67, 71,/* 20 - 29 */ 75, 78, 82, 86, 89, 93, 97, 100, 104, 108,/* 30 - 39 */ 112, 115, 119, 123, 126, 130, 134, 137, 141, 145,Copyright ©2005- 2011 <strong>GS1</strong> AISBL, All Rights Reserved. Page 202 of 218
5403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430/* 40 - 43 */ 149, 152, 156, 160 };/* Base30 encoding accepts up to 32 input values per group: */static const unsigned char bitsForNumBase30[] = {/* 0 - 9 */ 0, 5, 10, 15, 20, 25, 30, 35, 40, 45,/* 10 - 19 */ 50, 54, 59, 64, 69, 74, 79, 84, 89, 94,/* 20 - 29 */ 99, 104, 108, 113, 118, 123, 128, 133, 138, 143,/* 30 - 32 */ 148, 153, 158};/* Base40 encoding accepts up to 30 input values per group: */static const unsigned char bitsForNumBase40[] = {/* 0 - 9 */ 0, 6, 11, 16, 22, 27, 32, 38, 43, 48,/* 10 - 19 */ 54, 59, 64, 70, 75, 80, 86, 91, 96, 102,/* 20 - 29 */ 107, 112, 118, 123, 128, 134, 139, 144, 150, 155,/* 30 */ 160 };/* Base74 encoding accepts up to 25 input values per group: */static const unsigned char bitsForNumBase74[] = {/* 0 - 9 */ 0, 7, 13, 19, 25, 32, 38, 44, 50, 56,/* 10 - 19 */ 63, 69, 75, 81, 87, 94, 100, 106, 112, 118,/* 20 - 25 */ 125, 131, 137, 143, 150, 156 };/* Base84 encoding accepts up to 25 input values per group: */static const unsigned char bitsForNumBase84[] = {/* 0 - 9 */ 0, 7, 13, 20, 26, 32, 39, 45, 52, 58,/* 10 - 19 */ 64, 71, 77, 84, 90, 96, 103, 109, 116, 122,/* 20 - 25 */ 128, 135, 141, 148, 154, 160 };Table K-1: Base 30 Character setVal Basic set Shift 1 set Shift 2 setChar Decimal Char Decimal Char Decimal0 A-Punc 1 N/A NUL 0 space 321 A 65 SOH 1 ! 332 B 66 STX 2 “ 343 C 67 ETX 3 # 354 D 68 EOT 4 $ 365 E 69 ENQ 5 % 376 F 70 ACK 6 & 387 G 71 BEL 7 ‘ 398 H 72 BS 8 ( 409 I 73 HT 9 ) 4110 J 74 LF 10 * 4211 K 75 VT 11 + 4312 L 76 FF 12 , 4413 M 77 CR 13 - 4514 N 78 SO 14 . 4615 O 79 SI 15 / 47Copyright ©2005- 2011 <strong>GS1</strong> AISBL, All Rights Reserved. Page 203 of 218