modifying method that counts size of huffman code

block code calculation seems to work correctly.