/// <summary> /// Writes an unsigned integer using 1 to 64 bits /// </summary> public BitWriter Write(UInt64 source, int numberOfBits) { EnsureBufferSize(_lengthBits + numberOfBits); BitReaderWriter.WriteUInt64(source, numberOfBits, _data, _lengthBits); _lengthBits += numberOfBits; return(this); }
/// <summary> /// Writes a 64 bit unsigned integer /// </summary> public BitWriter Write(UInt64 source) { EnsureBufferSize(_lengthBits + 64); BitReaderWriter.WriteUInt64(source, 64, _data, _lengthBits); _lengthBits += 64; return(this); }
/// <summary> /// Writes a 64 bit unsigned integer at a given offset in the buffer /// </summary> public BitWriter WriteAt(Int32 offset, UInt64 source) { int newBitLength = Math.Max(_lengthBits, offset + 64); EnsureBufferSize(newBitLength); BitReaderWriter.WriteUInt64(source, 64, _data, offset); _lengthBits = newBitLength; return(this); }