Performance improvement on writing by avoiding to copy the remaining object on each chunk