Add compact and in-place compact