static encode(data, minECCPercent, userSpecifiedLayers) {
			// High-level encode
			let bits = new HighLevelEncoder(data).encode();
			// stuff bits and choose symbol size
			let eccBits = Integer.truncDivision((bits.getSize() * minECCPercent), 100) + 11;
			let totalSizeBits = bits.getSize() + eccBits;
			let compact;
			let layers;
			let totalBitsInLayer;
			let wordSize;
			let stuffedBits;
			if (userSpecifiedLayers !== Encoder$1.DEFAULT_AZTEC_LAYERS) {
				compact = userSpecifiedLayers < 0;
				layers = Math.abs(userSpecifiedLayers);
				if (layers > (compact ? Encoder$1.MAX_NB_BITS_COMPACT : Encoder$1.MAX_NB_BITS)) {
					throw new IllegalArgumentException(StringUtils.format('Illegal value %s for layers', userSpecifiedLayers));
				}
				totalBitsInLayer = Encoder$1.totalBitsInLayer(layers, compact);
				wordSize = Encoder$1.WORD_SIZE[layers];
				let usableBitsInLayers = totalBitsInLayer - (totalBitsInLayer % wordSize);
				stuffedBits = Encoder$1.stuffBits(bits, wordSize);
				if (stuffedBits.getSize() + eccBits > usableBitsInLayers) {
					throw new IllegalArgumentException('Data to large for user specified layer');
				}
				if (compact && stuffedBits.getSize() > wordSize * 64) {
					// Compact format only allows 64 data words, though C4 can hold more words than that
					throw new IllegalArgumentException('Data to large for user specified layer');
				}
			}
			else {
				wordSize = 0;
				stuffedBits = null;
				// We look at the possible table sizes in the order Compact1, Compact2, Compact3,
				// Compact4, Normal4,...  Normal(i) for i < 4 isn't typically used since Compact(i+1)
				// is the same size, but has more data.
				for (let i /*int*/ = 0;; i++) {
					if (i > Encoder$1.MAX_NB_BITS) {
						throw new IllegalArgumentException('Data too large for an Aztec code');
					}
					compact = i <= 3;
					layers = compact ? i + 1 : i;
					totalBitsInLayer = Encoder$1.totalBitsInLayer(layers, compact);
					if (totalSizeBits > totalBitsInLayer) {
						continue;
					}
					// [Re]stuff the bits if this is the first opportunity, or if the
					// wordSize has changed
					if (stuffedBits == null || wordSize !== Encoder$1.WORD_SIZE[layers]) {
						wordSize = Encoder$1.WORD_SIZE[layers];
						stuffedBits = Encoder$1.stuffBits(bits, wordSize);
					}
					let usableBitsInLayers = totalBitsInLayer - (totalBitsInLayer % wordSize);
					if (compact && stuffedBits.getSize() > wordSize * 64) {
						// Compact format only allows 64 data words, though C4 can hold more words than that
						continue;
					}
					if (stuffedBits.getSize() + eccBits <= usableBitsInLayers) {
						break;
					}
				}
			}
			let messageBits = Encoder$1.generateCheckWords(stuffedBits, totalBitsInLayer, wordSize);
			// generate mode message
			let messageSizeInWords = stuffedBits.getSize() / wordSize;
			let modeMessage = Encoder$1.generateModeMessage(compact, layers, messageSizeInWords);
			// allocate symbol
			let baseMatrixSize = (compact ? 11 : 14) + layers * 4; // not including alignment lines
			let alignmentMap = new Int32Array(baseMatrixSize);
			let matrixSize;
			if (compact) {
				// no alignment marks in compact mode, alignmentMap is a no-op
				matrixSize = baseMatrixSize;
				for (let i /*int*/ = 0; i < alignmentMap.length; i++) {
					alignmentMap[i] = i;
				}
			}
			else {
				matrixSize = baseMatrixSize + 1 + 2 * Integer.truncDivision((Integer.truncDivision(baseMatrixSize, 2) - 1), 15);
				let origCenter = Integer.truncDivision(baseMatrixSize, 2);
				let center = Integer.truncDivision(matrixSize, 2);
				for (let i /*int*/ = 0; i < origCenter; i++) {
					let newOffset = i + Integer.truncDivision(i, 15);
					alignmentMap[origCenter - i - 1] = center - newOffset - 1;
					alignmentMap[origCenter + i] = center + newOffset + 1;
				}
			}
			let matrix = new BitMatrix(matrixSize);
			// draw data bits
			for (let i /*int*/ = 0, rowOffset = 0; i < layers; i++) {
				let rowSize = (layers - i) * 4 + (compact ? 9 : 12);
				for (let j /*int*/ = 0; j < rowSize; j++) {
					let columnOffset = j * 2;
					for (let k /*int*/ = 0; k < 2; k++) {
						if (messageBits.get(rowOffset + columnOffset + k)) {
							matrix.set(alignmentMap[i * 2 + k], alignmentMap[i * 2 + j]);
						}
						if (messageBits.get(rowOffset + rowSize * 2 + columnOffset + k)) {
							matrix.set(alignmentMap[i * 2 + j], alignmentMap[baseMatrixSize - 1 - i * 2 - k]);
						}
						if (messageBits.get(rowOffset + rowSize * 4 + columnOffset + k)) {
							matrix.set(alignmentMap[baseMatrixSize - 1 - i * 2 - k], alignmentMap[baseMatrixSize - 1 - i * 2 - j]);
						}
						if (messageBits.get(rowOffset + rowSize * 6 + columnOffset + k)) {
							matrix.set(alignmentMap[baseMatrixSize - 1 - i * 2 - j], alignmentMap[i * 2 + k]);
						}
					}
				}
				rowOffset += rowSize * 8;
			}
			// draw mode message
			Encoder$1.drawModeMessage(matrix, compact, matrixSize, modeMessage);
			// draw alignment marks
			if (compact) {
				Encoder$1.drawBullsEye(matrix, Integer.truncDivision(matrixSize, 2), 5);
			}
			else {
				Encoder$1.drawBullsEye(matrix, Integer.truncDivision(matrixSize, 2), 7);
				for (let i /*int*/ = 0, j = 0; i < Integer.truncDivision(baseMatrixSize, 2) - 1; i += 15, j += 16) {
					for (let k /*int*/ = Integer.truncDivision(matrixSize, 2) & 1; k < matrixSize; k += 2) {
						matrix.set(Integer.truncDivision(matrixSize, 2) - j, k);
						matrix.set(Integer.truncDivision(matrixSize, 2) + j, k);
						matrix.set(k, Integer.truncDivision(matrixSize, 2) - j);
						matrix.set(k, Integer.truncDivision(matrixSize, 2) + j);
					}
				}
			}
			let aztec = new AztecCode();
			aztec.setCompact(compact);
			aztec.setSize(matrixSize);
			aztec.setLayers(layers);
			aztec.setCodeWords(messageSizeInWords);
			aztec.setMatrix(matrix);
			return aztec;
		}
Encodes the given binary content as an Aztec symbol

@param data input data string
@param minECCPercent minimal percentage of error check words (According to ISO/IEC 24778:2008,
                     a minimum of 23% + 3 words is recommended)
@param userSpecifiedLayers if non-zero, a user-specified value for the number of layers
@return Aztec symbol matrix with metadata