Anonymous user
Huffman coding: Difference between revisions
→{{header|Lua}}: update description
(→{{header|Lua}}: : add Lua implementation (tested against 5.2 and 5.3)) |
(→{{header|Lua}}: update description) |
||
Line 3,303:
=={{header|Lua}}==
{{trans|Lua}}
This implementation
construct the Huffman tree, and finally fold the tree into the codes
while outputting them.
<lang lua>local build_freqtable = function (data)
local freq = { }
|