decode(bits) {
			// Construct a parser and read version, error-correction level
			const parser = new BitMatrixParser(bits);
			const version = parser.getVersion();
			// Read codewords
			const codewords = parser.readCodewords();
			// Separate into data blocks
			const dataBlocks = DataBlock.getDataBlocks(codewords, version);
			// Count total number of data bytes
			let totalBytes = 0;
			for (let db of dataBlocks) {
				totalBytes += db.getNumDataCodewords();
			}
			const resultBytes = new Uint8Array(totalBytes);
			const dataBlocksCount = dataBlocks.length;
			// Error-correct and copy data blocks together into a stream of bytes
			for (let j = 0; j < dataBlocksCount; j++) {
				const dataBlock = dataBlocks[j];
				const codewordBytes = dataBlock.getCodewords();
				const numDataCodewords = dataBlock.getNumDataCodewords();
				this.correctErrors(codewordBytes, numDataCodewords);
				for (let i = 0; i < numDataCodewords; i++) {
					// De-interlace data blocks.
					resultBytes[i * dataBlocksCount + j] = codewordBytes[i];
				}
			}
			// Decode the contents of that stream of bytes
			return DecodedBitStreamParser.decode(resultBytes);
		}
<p>Decodes a Data Matrix Code represented as a {@link BitMatrix}. A 1 or "true" is taken
to mean a black module.</p>

@param bits booleans representing white/black Data Matrix Code modules
@return text and bytes encoded within the Data Matrix Code
@throws FormatException if the Data Matrix Code cannot be decoded
@throws ChecksumException if error correction fails