Exemple #1
0
        /// <summary>
        /// Writes a signed integer using 1 to 64 bits
        /// </summary>
        public void Write(Int64 source, int numberOfBits)
        {
            EnsureBufferSize(m_bitLength + numberOfBits);
            ulong usource = (ulong)source;

            NetBitWriter.WriteUInt64(usource, numberOfBits, m_data, m_bitLength);
            m_bitLength += numberOfBits;
        }
Exemple #2
0
        public void WriteAt(Int32 offset, UInt64 source)
        {
            int newBitLength = Math.Max(m_bitLength, offset + 64);

            EnsureBufferSize(newBitLength);
            NetBitWriter.WriteUInt64(source, 64, m_data, offset);
            m_bitLength = newBitLength;
        }
Exemple #3
0
        /// <summary>
        /// Writes a 64 bit signed integer
        /// </summary>
        public void Write(Int64 source)
        {
            EnsureBufferSize(m_bitLength + 64);
            ulong usource = (ulong)source;

            NetBitWriter.WriteUInt64(usource, 64, m_data, m_bitLength);
            m_bitLength += 64;
        }
Exemple #4
0
 public void Write(UInt64 source)
 {
     EnsureBufferSize(m_bitLength + 64);
     NetBitWriter.WriteUInt64(source, 64, m_data, m_bitLength);
     m_bitLength += 64;
 }