/* Function to store the given bit into the given bit buffer.  */
void BitBuffer_StoreNextBit(BitBuffer_t *const Buffer, const bool Bit)
/* Function to store the given bit into the given bit buffer.  */
void BitBuffer_StoreNextBit(BitBuffer_t *const Buffer, const bool Bit)
{
	if (Bit)
	  *Buffer->In.CurrentByte |= Buffer->In.ByteMask;
	Buffer->Elements++;
	if (Buffer->In.ByteMask == (1 << 7))
	{
		if (Buffer->In.CurrentByte != &Buffer->Data[sizeof(Buffer->Data) - 1])
		  Buffer->In.CurrentByte++;
		else
		  Buffer->In.CurrentByte = Buffer->Data;
		Buffer->In.ByteMask = (1 << 0);
	}
	else
	{
		Buffer->In.ByteMask <<= 1;
	}
}