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

angular - DownloadURL return null in below code -

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -