Optimize compress_plwah and decompress_plwah