Skip to content

Conversation

heisen-li
Copy link
Contributor

No description provided.


![image](./images/Huffman_coding_1.png)

那么定义了这棵树带来了什么改变吗?如果定义了这种特殊的树,那就可以只记录编码长度就可以对字符进行表示了。比如上图中,就可以表示A - 2. B - 1. C - 3, D - 3。这样我们记录这个对应关系就可以了。这是这个算法的最核心的一点:用码字长度序列将这棵码树记录下来。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A - 2. 有的地方用. 有的用,这里有什么含义吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的意思是A这个字符的表示长度为2.也就是01;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants