halved memory usage for lossless compression