static decodeTextCompaction(textCompactionData, byteCompactionData, length, result) {
			// Beginning from an initial state of the Alpha sub-mode
			// The default compaction mode for PDF417 in effect at the start of each symbol shall always be Text
			// Compaction mode Alpha sub-mode (alphabetic: uppercase). A latch codeword from another mode to the Text
			// Compaction mode shall always switch to the Text Compaction Alpha sub-mode.
			let subMode = Mode$2.ALPHA;
			let priorToShiftMode = Mode$2.ALPHA;
			let i = 0;
			while (i < length) {
				let subModeCh = textCompactionData[i];
				let ch = /*char*/ '';
				switch (subMode) {
					case Mode$2.ALPHA:
						// Alpha (alphabetic: uppercase)
						if (subModeCh < 26) {
							// Upper case Alpha Character
							// Note: 65 = 'A' ASCII -> there is byte code of symbol
							ch = /*(char)('A' + subModeCh) */ String.fromCharCode(65 + subModeCh);
						}
						else {
							switch (subModeCh) {
								case 26:
									ch = ' ';
									break;
								case DecodedBitStreamParser$2.LL:
									subMode = Mode$2.LOWER;
									break;
								case DecodedBitStreamParser$2.ML:
									subMode = Mode$2.MIXED;
									break;
								case DecodedBitStreamParser$2.PS:
									// Shift to punctuation
									priorToShiftMode = subMode;
									subMode = Mode$2.PUNCT_SHIFT;
									break;
								case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
									result.append(/*(char)*/ byteCompactionData[i]);
									break;
								case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:
									subMode = Mode$2.ALPHA;
									break;
							}
						}
						break;
					case Mode$2.LOWER:
						// Lower (alphabetic: lowercase)
						if (subModeCh < 26) {
							ch = /*(char)('a' + subModeCh)*/ String.fromCharCode(97 + subModeCh);
						}
						else {
							switch (subModeCh) {
								case 26:
									ch = ' ';
									break;
								case DecodedBitStreamParser$2.AS:
									// Shift to alpha
									priorToShiftMode = subMode;
									subMode = Mode$2.ALPHA_SHIFT;
									break;
								case DecodedBitStreamParser$2.ML:
									subMode = Mode$2.MIXED;
									break;
								case DecodedBitStreamParser$2.PS:
									// Shift to punctuation
									priorToShiftMode = subMode;
									subMode = Mode$2.PUNCT_SHIFT;
									break;
								case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
									// TODO Does this need to use the current character encoding? See other occurrences below
									result.append(/*(char)*/ byteCompactionData[i]);
									break;
								case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:
									subMode = Mode$2.ALPHA;
									break;
							}
						}
						break;
					case Mode$2.MIXED:
						// Mixed (punctuation: e)
						if (subModeCh < DecodedBitStreamParser$2.PL) {
							ch = DecodedBitStreamParser$2.MIXED_CHARS[subModeCh];
						}
						else {
							switch (subModeCh) {
								case DecodedBitStreamParser$2.PL:
									subMode = Mode$2.PUNCT;
									break;
								case 26:
									ch = ' ';
									break;
								case DecodedBitStreamParser$2.LL:
									subMode = Mode$2.LOWER;
									break;
								case DecodedBitStreamParser$2.AL:
									subMode = Mode$2.ALPHA;
									break;
								case DecodedBitStreamParser$2.PS:
									// Shift to punctuation
									priorToShiftMode = subMode;
									subMode = Mode$2.PUNCT_SHIFT;
									break;
								case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
									result.append(/*(char)*/ byteCompactionData[i]);
									break;
								case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:
									subMode = Mode$2.ALPHA;
									break;
							}
						}
						break;
					case Mode$2.PUNCT:
						// Punctuation
						if (subModeCh < DecodedBitStreamParser$2.PAL) {
							ch = DecodedBitStreamParser$2.PUNCT_CHARS[subModeCh];
						}
						else {
							switch (subModeCh) {
								case DecodedBitStreamParser$2.PAL:
									subMode = Mode$2.ALPHA;
									break;
								case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
									result.append(/*(char)*/ byteCompactionData[i]);
									break;
								case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:
									subMode = Mode$2.ALPHA;
									break;
							}
						}
						break;
					case Mode$2.ALPHA_SHIFT:
						// Restore sub-mode
						subMode = priorToShiftMode;
						if (subModeCh < 26) {
							ch = /*(char)('A' + subModeCh)*/ String.fromCharCode(65 + subModeCh);
						}
						else {
							switch (subModeCh) {
								case 26:
									ch = ' ';
									break;
								case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:
									subMode = Mode$2.ALPHA;
									break;
							}
						}
						break;
					case Mode$2.PUNCT_SHIFT:
						// Restore sub-mode
						subMode = priorToShiftMode;
						if (subModeCh < DecodedBitStreamParser$2.PAL) {
							ch = DecodedBitStreamParser$2.PUNCT_CHARS[subModeCh];
						}
						else {
							switch (subModeCh) {
								case DecodedBitStreamParser$2.PAL:
									subMode = Mode$2.ALPHA;
									break;
								case DecodedBitStreamParser$2.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
									// PS before Shift-to-Byte is used as a padding character,
									// see 5.4.2.4 of the specification
									result.append(/*(char)*/ byteCompactionData[i]);
									break;
								case DecodedBitStreamParser$2.TEXT_COMPACTION_MODE_LATCH:
									subMode = Mode$2.ALPHA;
									break;
							}
						}
						break;
				}
				// if (ch !== 0) {
				if (ch !== '') {
					// Append decoded character to result
					result.append(ch);
				}
				i++;
			}
		}
The Text Compaction mode includes all the printable ASCII characters
(i.e. values from 32 to 126) and three ASCII control characters: HT or tab
(9: e), LF or line feed (10: e), and CR or carriage
return (13: e). The Text Compaction mode also includes various latch
and shift characters which are used exclusively within the mode. The Text
Compaction mode encodes up to 2 characters per codeword. The compaction rules
for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode
switches are defined in 5.4.2.3.

@param textCompactionData The text compaction data.
@param byteCompactionData The byte compaction data if there
                          was a mode shift.
@param length             The size of the text compaction and byte compaction data.
@param result             The decoded data is appended to the result.