Two main disadvantages of Huffman encoding is that it makes two passes over data:

1. First pass: Find out sequences frequencies $$f(\cdot)$$ of letters $$c \in C$$ in the document $$D$$. Then constructing Huffman optimal tree before transmitting the tree to the receiver.
2. Second pass: encode and transmit the letters themselves based on tree structure.

Problem: Why we don't just transmit Huffman Tree over network to the receiver please? Why we need the second pass?

• Take "War and Peace". Create the Huffmann tree and send it to me, and that's it. What am I going to do with that tree? Oct 12 at 23:15