/// <summary>
 /// Writes an unsigned integer using 1 to 16 bits
 /// </summary>
 public void Write(UInt16 source, int numberOfBits)
 {
     Debug.CheckArgument((numberOfBits > 0 && numberOfBits <= 16), "Write(ushort, numberOfBits) can only write between 1 and 16 bits");
     EnsureBufferSize(m_bitLength + numberOfBits);
     BitWriter.WriteUInt16(source, numberOfBits, m_data, m_bitLength);
     m_bitLength += numberOfBits;
 }
 /// <summary>
 /// Writes a signed 16 bit integer
 /// </summary>
 public void Write(Int16 source)
 {
     EnsureBufferSize(m_bitLength + 16);
     BitWriter.WriteUInt16((ushort)source, 16, m_data, m_bitLength);
     m_bitLength += 16;
 }