wrote huffTree.EncodeText