Improve compression with a multi-stage merge sort