Add new function

This new function compress the Data and sorted the buckets from low to high.