huffmanencd.html
来自「数据结构词典(英文)」· HTML 代码 · 共 52 行
HTML
52 行
<!DOCTYPE HTML PUBLIC "-//IETF//DTD W3 HTML 2.0//EN">
<HTML lang="en-US">
<HEAD>
<TITLE>Huffman encoding</TITLE>
<META name="description"
content="Definition of Huffman encoding,
possibly with links to more information and implementations.">
<META name="keywords" content="Huffman encoding">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H1>Huffman encoding</H1>
<P>
(algorithm)
<P>
<strong>Definition:</strong>
A minimal variable-length encoding based on the frequency of each character. First, each character becomes a trivial <a href="tree.html" tppabs="http://hissa.nist.gov/dads/HTML/tree.html"><em>tree</em></a>, with the character as the only <a href="node.html" tppabs="http://hissa.nist.gov/dads/HTML/node.html"><em>node</em></a> and the character's frequency is the tree's frequency. The two least frequent trees are joined using a new root which is assigned the sum of their frequencies. This is repeated until all characters are in one tree. One code bit represents each level. Thus the more frequent characters are near the <a href="root.html" tppabs="http://hissa.nist.gov/dads/HTML/root.html"><em>root</em></a> and are encoded with few bits, and the rare characters are far from the root and are encoded with many bits.
<P><strong>See also</strong>
<a href="karyHuffman.html" tppabs="http://hissa.nist.gov/dads/HTML/karyHuffman.html"><em>k-ary Huffman encoding</em></a>, <a href="adaptivhuffm.html" tppabs="http://hissa.nist.gov/dads/HTML/adaptivhuffm.html"><em>adaptive Huffman encoding</em></a>.
<P><em>Note:
Also called "static Huffman encoding," in contrast with <a href="adaptivhuffm.html" tppabs="http://hissa.nist.gov/dads/HTML/adaptivhuffm.html"><em>adaptive Huffman encoding</em></a>. <P> The <a href="worstcase.html" tppabs="http://hissa.nist.gov/dads/HTML/worstcase.html"><em>worst-case</em></a> Huffman encoding (or, equivalently, the longest Huffman encoding for a set of characters) occurs when the distribution of frequencies follows the <a href="fibonacnmbrs.html" tppabs="http://hissa.nist.gov/dads/HTML/fibonacnmbrs.html"><em>Fibonacci numbers</em></a>. For this and other relations see Alex Vinokur's note on <A HREF="javascript:if(confirm('http://www.deja.com/=dnc/[ST_rn=ps]/getdoc.xp?AN=471802979 \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.deja.com/=dnc/[ST_rn=ps]/getdoc.xp?AN=471802979'" tppabs="http://www.deja.com/=dnc/[ST_rn=ps]/getdoc.xp?AN=471802979">Huffman codes and Fibonacci numbers</A>.</em>
<P>Author: <a href="terms.html#authorPEB" tppabs="http://hissa.nist.gov/dads/terms.html#authorPEB">PEB</a>
<H2>Implementation</H2>
<A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/huffman.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/huffman.html'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/huffman.html">animation which counts characters, finds the code, encodes, and decodes (Java)</A>
<H2>More information</H2>
<A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/huffman.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/huffman.html'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/huffman.html">explanation, illustration, and analysis</A>, <A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://madison.wlu.edu/%7Evermeerp/Classes/211w99/Lectures/Ch5_2/tsld001.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://madison.wlu.edu/%7Evermeerp/Classes/211w99/Lectures/Ch5_2/tsld001.htm'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://madison.wlu.edu/%7Evermeerp/Classes/211w99/Lectures/Ch5_2/tsld001.htm">step by step discovery of the algorithm</A>, <A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ics.uci.edu/%7Edan/pubs/DC-Sec3.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ics.uci.edu/%7Edan/pubs/DC-Sec3.html'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ics.uci.edu/%7Edan/pubs/DC-Sec3.html">survey on data compression</A>.
<hr>
Go to the
<A HREF="terms.html" tppabs="http://hissa.nist.gov/dads/terms.html">Algorithms, Data Structures, and Problems</A>
home page.
<hr>
If you have suggestions, corrections, or comments, please get in touch
with
<a href="javascript:if(confirm('http://hissa.nist.gov/~black/black.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://hissa.nist.gov/~black/black.html'" tppabs="http://hissa.nist.gov/~black/black.html">Paul E. Black</a>
(<a href="mailto:paul.black@nist.gov">paul.black@nist.gov</a>).
<p>
Entry modified Wed Dec 22 09:12:43 1999.<BR>
HTML page formatted Wed Dec 22 09:35:31 1999.
<P>
This page's URL is
<A href="huffmanencd.html" tppabs="http://hissa.nist.gov/dads/HTML/huffmanencd.html">http://hissa.nist.gov/dads/HTML/huffmanencd.html</A>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?