/// <summary> /// Append mode info. On success, store the result in "bits". /// </summary> /// <param name="mode">The mode.</param> /// <param name="bits">The bits.</param> internal static void AppendModeInfo(Mode mode, BitArray bits) { bits.AppendBits(mode.Bits, 4); }
private static int CalculateBitsNeeded(Mode mode, BitArray headerBits, BitArray dataBits, Version version) { return headerBits.Size + mode.GetCharacterCountBits(version) + dataBits.Size; }