Source Encoding algorithm (Fenaux encoding && Huffman coding)

Source: Internet
Author: User
SOURCE Coding algorithm
  • Fenaux Encoding Fano Coding
  • Huffman Code Huffman Coding
Fenaux Encoding Step
  1. The source symbols are arranged from large to small according to their probability size;
  2. Divide this set of source symbols into probabilities and as close as possible or equal to one group (i.e. two sets of probabilities and the difference between the differences as small as possible!) );
  3. The above set of symbols encoded into 0, the following group encoded into 1, vice versa;
  4. Repeat steps 2 and 3 for the group that you have already divided until you can no longer group;
  5. Write the code word one at a time from left to right.
Fenaux Coding Demo

Known:

The encoding process is:

Huffman Code Huffman Coding encoding Step
  1. The source symbols are arranged from large to small according to the probability size;
  2. The probability of the smallest two source symbols into a group, wherein the above an encoding of 0, the following an encoding of 1, and the probability of the two symbols added together, and the result is again with the symbol has not been processed by the size of the order;
  3. Repeat step 2 until all the source symbols have been processed;
  4. Each code word can be obtained by returning from right to left according to the encoded path.
Huffman Coding Demo

Known:

The encoding process is:

Source Encoding algorithm (Fenaux encoding && Huffman coding)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.