/// <summary> /// Writes the specified number of bytes from an array /// </summary> public void Write(byte[] source, int offsetInBytes, int numberOfBytes) { if (source == null) { throw new ArgumentNullException("source"); } int bits = numberOfBytes * 8; EnsureBufferSize(m_bitLength + bits); NetBitWriter.WriteBytes(source, offsetInBytes, numberOfBytes, m_data, m_bitLength); m_bitLength += bits; }
/// <summary> /// Writes all bytes in an array /// </summary> public void Write(byte[] source) { if (source == null) { throw new ArgumentNullException("source"); } int bits = source.Length * 8; EnsureBufferSize(m_bitLength + bits); NetBitWriter.WriteBytes(source, 0, source.Length, m_data, m_bitLength); m_bitLength += bits; }