Compress a list