public static void EnsureEnoughBitCapacity(this IBitBuffer buffer, int bitCount, int maxBitCount)
        {
            Debug.Assert(bitCount >= 1);
            Debug.Assert(bitCount <= maxBitCount);

            buffer.EnsureBitCapacity(buffer.BitLength + bitCount);
        }
 public static void EnsureEnoughBitCapacity(this IBitBuffer buffer, int bitCount)
 {
     buffer.EnsureBitCapacity(buffer.BitLength + bitCount);
 }
 public static void EnsureByteCapacity(this IBitBuffer buffer, int byteCount)
 {
     buffer.EnsureBitCapacity(byteCount * 8);
 }