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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -