Implement buffer-to-buffer copying.