Huffman coding: Difference between revisions
Content added Content deleted
m (→{{header|zkl}}: update) |
|||
Line 3,210: | Line 3,210: | ||
{{trans|Java}} |
{{trans|Java}} |
||
This implementation creates an actual tree structure, and then traverses the tree to recover the code. |
This implementation creates an actual tree structure, and then traverses the tree to recover the code. |
||
<lang kotlin>import java.util.* |
|||
⚫ | |||
⚫ | |||
override fun compareTo(other: HuffmanTree) = freq - other.freq |
override fun compareTo(other: HuffmanTree) = freq - other.freq |
||
} |
} |