public override int Write(byte[] data, int offset, int length) { LaneCheck(); if (data == null) { throw new ArgumentNullException("data"); } if (length < 0 || length > data.Length) { throw new ArgumentOutOfRangeException("length"); } if (offset < 0 || offset + length > Memory.Length) { throw new ArgumentOutOfRangeException("offset"); } var src = new Memory <byte>(data).Slice(0, length); var dst = Memory.Slice(offset); src.CopyTo(dst); return(offset + length); }