New haffuman decoding.
refactoring.