예제 #1
0
 /// <summary>
 /// Writes 1 to 8 bits of a byte
 /// </summary>
 public void Write(byte source, int numberOfBits)
 {
     EnsureBufferSize(m_bitLength + numberOfBits);
     NetBitWriter.WriteByte(source, numberOfBits, m_data, m_bitLength);
     m_bitLength += numberOfBits;
 }
예제 #2
0
 /// <summary>
 /// Writes a boolean value using 1 bit
 /// </summary>
 public void Write(bool value)
 {
     EnsureBufferSize(m_bitLength + 1);
     NetBitWriter.WriteByte((value ? (byte)1 : (byte)0), 1, m_data, m_bitLength);
     m_bitLength += 1;
 }
예제 #3
0
 public void Write(sbyte source)
 {
     EnsureBufferSize(m_bitLength + 8);
     NetBitWriter.WriteByte((byte)source, 8, m_data, m_bitLength);
     m_bitLength += 8;
 }