package refactoring, dynamic huffman codec implemented