/// <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; }
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; }
/// <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; }
public void Write(UInt64 source) { EnsureBufferSize(m_bitLength + 64); NetBitWriter.WriteUInt64(source, 64, m_data, m_bitLength); m_bitLength += 64; }