<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki1463/index.php?action=history&amp;feed=atom&amp;title=Entropy_coding</id>
	<title>Entropy coding - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki1463/index.php?action=history&amp;feed=atom&amp;title=Entropy_coding"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki1463/index.php?title=Entropy_coding&amp;action=history"/>
	<updated>2026-12-01T07:30:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.3</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki1463/index.php?title=Entropy_coding&amp;diff=30956&amp;oldid=prev</id>
		<title>imported&gt;Headbomb: /* */  | Altered template type. Add: eprint, class. Removed parameters. Some additions/deletions were parameter name changes. | Use this tool. Report bugs. | #UCB_Gadget</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki1463/index.php?title=Entropy_coding&amp;diff=30956&amp;oldid=prev"/>
		<updated>2026-07-17T16:38:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;: &lt;/span&gt;  | Altered template type. Add: eprint, class. Removed parameters. Some additions/deletions were parameter name changes. | &lt;a href=&quot;/wiki1463/index.php?title=En:WP:UCB&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;En:WP:UCB (page does not exist)&quot;&gt;Use this tool&lt;/a&gt;. &lt;a href=&quot;/wiki1463/index.php?title=En:WP:DBUG&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;En:WP:DBUG (page does not exist)&quot;&gt;Report bugs&lt;/a&gt;. | #UCB_Gadget&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Lossless data compression scheme}}&lt;br /&gt;
In [[information theory]], an &amp;#039;&amp;#039;&amp;#039;entropy coding&amp;#039;&amp;#039;&amp;#039; (or &amp;#039;&amp;#039;&amp;#039;entropy encoding&amp;#039;&amp;#039;&amp;#039;) is any [[lossless compression|lossless data compression]] method that attempts to approach the lower bound declared by [[Claude Shannon|Shannon&amp;#039;s]] [[source coding theorem]], which states that any lossless data compression method must have an expected code length greater than or equal to the [[entropy (information theory)|entropy]] of the source.&amp;lt;ref name=&amp;quot;Duda2015&amp;quot;&amp;gt;{{Cite book |last1=Duda |first1=Jarek |last2=Tahboub |first2=Khalid |last3=Gadgil |first3=Neeraj J. |author4-link=Edward J. Delp |last4=Delp |first4=Edward J. |title=2015 Picture Coding Symposium (PCS) |chapter=The use of asymmetric numeral systems as an accurate replacement for Huffman coding |date=May 2015 |chapter-url=https://ieeexplore.ieee.org/document/7170048 |pages=65–69 |doi=10.1109/PCS.2015.7170048|isbn=978-1-4799-7783-3 |s2cid=20260346 |url=http://ruj.uj.edu.pl/xmlui/handle/item/24054 }}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Shannon1948&amp;quot;&amp;gt;{{Cite journal |last=Shannon |first=Claude E. |title=A Mathematical Theory of Communication |journal=Bell System Technical Journal |volume=27 |issue=3 |pages=379–423 |year=1948 |doi=10.1002/j.1538-7305.1948.tb01338.x |bibcode=1948BSTJ...27..379S }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More precisely, the source coding theorem states that for any source distribution, the expected code length satisfies &amp;lt;math&amp;gt;\operatorname E_{x\sim P}[\ell(d(x))] \geq \operatorname E_{x\sim P}[-\log_b(P(x))]&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; is the function specifying the number of symbols in a code word, &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; is the coding function, &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; is the number of symbols used to make output codes and &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; is the probability of the source symbol. An entropy coding attempts to approach this lower bound.&amp;lt;ref name=&amp;quot;Shannon1948&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;CoverThomas&amp;quot;&amp;gt;{{Cite book |last1=Cover |first1=Thomas M. |last2=Thomas |first2=Joy A. |title=Elements of Information Theory |publisher=John Wiley &amp;amp; Sons |edition=2nd |year=2006 |isbn=978-0-471-24195-9}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two of the most common entropy coding techniques are [[Huffman coding]] and [[arithmetic coding]].&amp;lt;ref name=&amp;quot;Huffman1952&amp;quot;&amp;gt;{{Cite journal |last=Huffman |first=David |title=A Method for the Construction of Minimum-Redundancy Codes |journal=Proceedings of the IRE |publisher=Institute of Electrical and Electronics Engineers (IEEE) |volume=40 |issue=9 |year=1952 |issn=0096-8390 |doi=10.1109/jrproc.1952.273898 |pages=1098–1101 |bibcode=1952PIRE...40.1098H }}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Sayood2017&amp;quot;&amp;gt;{{Cite book |last=Sayood |first=Khalid |title=Introduction to Data Compression |publisher=Morgan Kaufmann |edition=5th |year=2017 |isbn=978-0-12-809474-7}}&amp;lt;/ref&amp;gt; If the approximate entropy characteristics of a data stream are known in advance (especially for [[signal compression]]), a simpler static code may be useful. These static codes include [[Universal code (data compression)|universal codes]] (such as [[Elias gamma coding]] or [[Fibonacci coding]]) and [[Golomb coding|Golomb codes]] (such as [[unary coding]] or [[Rice coding]]).&amp;lt;ref name=&amp;quot;Sayood2017&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since 2014, data compressors have started using the [[asymmetric numeral systems]] (ANS) family of entropy coding techniques, which allows combination of the compression ratio of [[arithmetic coding]] with a processing cost similar to [[Huffman coding]].&amp;lt;ref name=&amp;quot;Duda2013&amp;quot;&amp;gt;{{Cite arXiv|last=Duda |first=Jarek |title=Asymmetric numeral systems: entropy coding combining speed of Huffman coding with compression rate of arithmetic coding |year=2013 |class=cs.IT |eprint=1311.2540 }}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Duda2015&amp;quot; /&amp;gt; ANS has been adopted by compressors developed by [[Meta Platforms|Facebook]] ([[Zstandard]]), [[Apple Inc.|Apple]] ([[LZFSE]]), and [[Google]] (Draco), among others.&amp;lt;ref name=&amp;quot;Duda2013&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Intuitive explanation ==&lt;br /&gt;
&lt;br /&gt;
Entropy coding exploits the fact that some symbols occur more frequently than others. When symbol probabilities are unequal, some outcomes are more predictable, and this predictability can be used to represent the data in fewer bits. Conversely, when all symbols are equally likely, each symbol carries the maximum possible amount of information and no compression is possible.&amp;lt;ref name=&amp;quot;CoverThomas&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;Shannon1948&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;When compression is not possible:&amp;#039;&amp;#039;&amp;#039; A stream of independent fair coin flips, where heads and tails each occur with probability 0.5, has an entropy of 1 bit per symbol, exactly the cost of storing one binary digit. Since every symbol already takes the minimum possible space, there is no redundancy to exploit, and no entropy coding method can make the data any smaller on average. The same principle applies to larger alphabets: independent ternary symbols (0, 1, 2) each with probability 1/3 have an entropy of about 1.585 bits per symbol, the maximum for a three-symbol alphabet, and are likewise incompressible.&amp;lt;ref name=&amp;quot;CoverThomas&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;Shannon1948&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;When compression is possible:&amp;#039;&amp;#039;&amp;#039; If the same binary source instead produces 1s with probability 0.9 and 0s with probability 0.1, the entropy drops to about 0.469 bits per symbol. This is well below the 1-bit storage cost, because the predominance of 1s makes each symbol partially predictable. An entropy coder such as [[arithmetic coding]] can exploit this predictability to achieve a compression ratio of roughly 2.1:1 by assigning shorter codes to the more common symbol.&amp;lt;ref name=&amp;quot;CoverThomas&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;Sayood2017&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Practical example:&amp;#039;&amp;#039;&amp;#039; English text has an alphabet of roughly 27 characters (26 letters plus a space). If all characters occurred equally often, each would require about 4.75 bits. However, because letter frequencies are highly unequal (&amp;#039;e&amp;#039; occurs far more often than &amp;#039;z&amp;#039;) and letters are not independent (&amp;#039;u&amp;#039; almost always follows &amp;#039;q&amp;#039;), the true entropy of English has been estimated at roughly 1.0 to 1.5 bits per character. This large gap is what makes English text highly compressible.&amp;lt;ref name=&amp;quot;Shannon1951&amp;quot;&amp;gt;{{Cite journal |last=Shannon |first=Claude E. |title=Prediction and Entropy of Printed English |journal=Bell System Technical Journal |volume=30 |issue=1 |pages=50–64 |year=1951 |doi=10.1002/j.1538-7305.1951.tb01366.x |bibcode=1951BSTJ...30...50S }}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;CoverThomas&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Entropy as a measure of similarity ==&lt;br /&gt;
&lt;br /&gt;
Besides using entropy coding as a way to compress digital data, an entropy encoder can also be used to measure the amount of [[Similarity measure|similarity]] between [[data stream|streams of data]] and already existing classes of data. This is done by generating an entropy coder/compressor for each class of data; unknown data is then [[Statistical classification|classified]] by feeding the uncompressed data to each compressor and seeing which compressor yields the highest compression. The coder with the best compression is probably the coder trained on the data that was most similar to the unknown data.&amp;lt;ref name=&amp;quot;Cilibrasi2005&amp;quot;&amp;gt;{{Cite journal |last1=Cilibrasi |first1=Rudi |last2=Vitányi |first2=Paul M. B. |title=Clustering by Compression |journal=IEEE Transactions on Information Theory |volume=51 |issue=4 |pages=1523–1545 |year=2005 |doi=10.1109/TIT.2005.844059 |bibcode=2005ITIT...51.1523C |s2cid=911}}&amp;lt;/ref&amp;gt; This approach is grounded in the concept of [[normalized compression distance]], a parameter-free, universal similarity metric based on compression that approximates the uncomputable [[Kolmogorov complexity|normalized information distance]].&amp;lt;ref name=&amp;quot;Cilibrasi2005&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;Vitanyi2009&amp;quot;&amp;gt;{{Cite book |last1=Vitányi |first1=Paul M. B. |last2=Balbach |first2=Frank J. |last3=Cilibrasi |first3=Rudi L. |last4=Li |first4=Ming |chapter=Normalized Information Distance |title=Information Theory and Statistical Learning |publisher=Springer |year=2009 |doi=10.1007/978-0-387-84816-7_3 |isbn=978-0-387-84816-7 |chapter-url=https://dare.uva.nl/personal/pure/en/publications/normalized-information-distance(e21c018e-8394-4e29-ade0-85c5ebf98017).html }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Arithmetic coding]]&lt;br /&gt;
* [[Asymmetric numeral systems]] (ANS)&lt;br /&gt;
* [[Context-adaptive binary arithmetic coding]] (CABAC)&lt;br /&gt;
* [[Huffman coding]]&lt;br /&gt;
* [[Normalized compression distance]]&lt;br /&gt;
* [[Range coding]]&lt;br /&gt;
* [[Source coding theorem]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* &amp;#039;&amp;#039;[http://www.inference.phy.cam.ac.uk/mackay/itila/book.html Information Theory, Inference, and Learning Algorithms]&amp;#039;&amp;#039;, by [[David MacKay (scientist)|David MacKay]] (2003), gives an introduction to Shannon theory and data compression, including the [[Huffman coding]] and [[arithmetic coding]].&lt;br /&gt;
* &amp;#039;&amp;#039;[http://iphome.hhi.de/wiegand/assets/pdfs/VBpart1.pdf Source Coding],&amp;#039;&amp;#039; by [[Thomas Wiegand|T. Wiegand]] and H. Schwarz (2011).&lt;br /&gt;
&lt;br /&gt;
{{Compression Methods}}&lt;br /&gt;
{{Authority control}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Entropy coding]]&lt;br /&gt;
[[Category:Entropy and information]]&lt;br /&gt;
[[Category:Data compression]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Headbomb</name></author>
	</entry>
</feed>