static readCode(rawbits, startIndex, length) {
			let res = 0;
			for (let i = startIndex; i < startIndex + length; i++) {
				res <<= 1;
				if (rawbits[i]) {
					res |= 0x01;
				}
			}
			return res;
		}
Reads a code of given length and at given index in an array of bits