static decodeMacroBlock(codewords, codeIndex, resultMetadata) {
			if (codeIndex + DecodedBitStreamParser$2.NUMBER_OF_SEQUENCE_CODEWORDS > codewords[0]) {
				// we must have at least two bytes left for the segment index
				throw FormatException.getFormatInstance();
			}
			let segmentIndexArray = new Int32Array(DecodedBitStreamParser$2.NUMBER_OF_SEQUENCE_CODEWORDS);
			for (let i /*int*/ = 0; i < DecodedBitStreamParser$2.NUMBER_OF_SEQUENCE_CODEWORDS; i++, codeIndex++) {
				segmentIndexArray[i] = codewords[codeIndex];
			}
			resultMetadata.setSegmentIndex(Integer.parseInt(DecodedBitStreamParser$2.decodeBase900toBase10(segmentIndexArray, DecodedBitStreamParser$2.NUMBER_OF_SEQUENCE_CODEWORDS)));
			let fileId = new StringBuilder();
			codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex, fileId);
			resultMetadata.setFileId(fileId.toString());
			let optionalFieldsStart = -1;
			if (codewords[codeIndex] === DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD) {
				optionalFieldsStart = codeIndex + 1;
			}
			while (codeIndex < codewords[0]) {
				switch (codewords[codeIndex]) {
					case DecodedBitStreamParser$2.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:
						codeIndex++;
						switch (codewords[codeIndex]) {
							case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:
								let fileName = new StringBuilder();
								codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex + 1, fileName);
								resultMetadata.setFileName(fileName.toString());
								break;
							case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_SENDER:
								let sender = new StringBuilder();
								codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex + 1, sender);
								resultMetadata.setSender(sender.toString());
								break;
							case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:
								let addressee = new StringBuilder();
								codeIndex = DecodedBitStreamParser$2.textCompaction(codewords, codeIndex + 1, addressee);
								resultMetadata.setAddressee(addressee.toString());
								break;
							case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:
								let segmentCount = new StringBuilder();
								codeIndex = DecodedBitStreamParser$2.numericCompaction(codewords, codeIndex + 1, segmentCount);
								resultMetadata.setSegmentCount(Integer.parseInt(segmentCount.toString()));
								break;
							case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:
								let timestamp = new StringBuilder();
								codeIndex = DecodedBitStreamParser$2.numericCompaction(codewords, codeIndex + 1, timestamp);
								resultMetadata.setTimestamp(Long.parseLong(timestamp.toString()));
								break;
							case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:
								let checksum = new StringBuilder();
								codeIndex = DecodedBitStreamParser$2.numericCompaction(codewords, codeIndex + 1, checksum);
								resultMetadata.setChecksum(Integer.parseInt(checksum.toString()));
								break;
							case DecodedBitStreamParser$2.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:
								let fileSize = new StringBuilder();
								codeIndex = DecodedBitStreamParser$2.numericCompaction(codewords, codeIndex + 1, fileSize);
								resultMetadata.setFileSize(Long.parseLong(fileSize.toString()));
								break;
							default:
								throw FormatException.getFormatInstance();
						}
						break;
					case DecodedBitStreamParser$2.MACRO_PDF417_TERMINATOR:
						codeIndex++;
						resultMetadata.setLastSegment(true);
						break;
					default:
						throw FormatException.getFormatInstance();
				}
			}
			// copy optional fields to additional options
			if (optionalFieldsStart !== -1) {
				let optionalFieldsLength = codeIndex - optionalFieldsStart;
				if (resultMetadata.isLastSegment()) {
					// do not include terminator
					optionalFieldsLength--;
				}
				resultMetadata.setOptionalData(Arrays.copyOfRange(codewords, optionalFieldsStart, optionalFieldsStart + optionalFieldsLength));
			}
			return codeIndex;
		}
@param int
@param param1
@param codewords
@param int
@param codeIndex
@param PDF417ResultMetadata
@param resultMetadata

@throws FormatException