compress: Further optimize inner loop.