Optimize pic compression to be 50% faster.