public static void MakeVersionInfoBits(int version, BitVector bits) {
bits.AppendBits(version, 6);
int bchCode = CalculateBCHCode(version, VERSION_INFO_POLY);
bits.AppendBits(bchCode, 12);
if (bits.Size() != 18) { // Just in case.
throw new WriterException("should not happen but we got: " + bits.Size());
}
}