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 createsproceeds anin actualthree treesteps: structure,determine andword then traverses the tree to recover the code.frequencies,
construct the Huffman tree, and finally fold the tree into the codes
while outputting them.
<lang lua>local build_freqtable = function (data)
local freq = { }
Anonymous user