public static void makeVersionInfoBits(Version version, BitArray bits)
{
bits.appendBits(version.VersionNumber, 6);
int bchCode = calculateBCHCode(version.VersionNumber, 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);
}
}