Arbitrary length buffered I/O using memcpy.