improved support for replicate/compress