public void Write(byte[] value) { fixed(byte *pv = value) { FastCopy.CopyBytes(_buffer + *_position, pv, value.Length); *_position += value.Length; } }
public void test_fast_copy() { const int count = 23; var expected = Utility.GetTestArray(count); var actual = new byte[count]; Assert.IsFalse(Utility.CheckTestArray(actual)); FastCopy.CopyBytes(actual, expected); Assert.IsTrue(Utility.CheckTestArray(actual)); }
public byte[] ReadBytes(int length) { var value = new byte[length]; fixed(byte *pv = value) { FastCopy.CopyBytes(pv, _buffer + *_position, length); *_position += length; } return(value); }