operator module

Using operator instead of collections module for sorting the dict with
frequences. I need to add support for arbitrary chunk_size in the future
for higer compression ratio.