An expression tree is a binary tree that represents a mathematical expression. Each leaf node contains an operand and each internal node contains an operator. The levels of the tree indicate the order of operations, with higher levels evaluated later. Huffman encoding is a data compression technique that uses a binary tree to assign variable-length codes to characters based on their frequency. Characters with higher frequency get shorter codes. This results in a smaller file size when the text is encoded.