data compression - What is the difference between shannon fano and huffman algorithm? -


it likes similar me except top down , bottom-up parsing . can explain ?

that indeed fundamental difference.

in huffman encoding, codes built bottom repeatedly combining 2 least common entries in list of populations until 2 left.

in shannon-fano, population list sorted pop count , repeatedly (recursively) split in 2 - half population in each half, or close 1 can - until 2 entries left in sub-section.

huffman has been proven produce (an) optimal prefix encoding whereas shannon-fano (can be) less efficient. shannon-fano, on other hand, arguably bit simpler implement.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -