<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.hydrogenaudio.org/index.php?action=history&amp;feed=atom&amp;title=Range_coding</id>
	<title>Range coding - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.hydrogenaudio.org/index.php?action=history&amp;feed=atom&amp;title=Range_coding"/>
	<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Range_coding&amp;action=history"/>
	<updated>2026-04-28T16:53:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Range_coding&amp;diff=13159&amp;oldid=prev</id>
		<title>HotshotGG at 02:02, 8 September 2006</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Range_coding&amp;diff=13159&amp;oldid=prev"/>
		<updated>2006-09-08T02:02:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:02, 8 September 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l34&quot;&gt;Line 34:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Additional reading:&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=References=&lt;/ins&gt;=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [http://www.arturocampos.com/ac_range.html Range coder by Arturo San Emeterio Campos]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [http://www.arturocampos.com/ac_range.html Range coder by Arturo San Emeterio Campos]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [http://www.compressconsult.com/rangecoder/ GPLed Range coder]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [http://www.compressconsult.com/rangecoder/ GPLed Range coder]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Algorithms]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>HotshotGG</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Range_coding&amp;diff=8005&amp;oldid=prev</id>
		<title>Jan at 12:47, 22 March 2005</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Range_coding&amp;diff=8005&amp;oldid=prev"/>
		<updated>2005-03-22T12:47:30Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A range coder is an entropy coder, which means it tries to save values in an optimal way. Range coding is similar to [[Arithmetic Coding]] and to a lesser extent [[Huffman coding]] and [[Fano coding]]. [[Rice coding]] and [[Start Step Stop Coding]] also serve a similar purpose, but in different situations.&lt;br /&gt;
&lt;br /&gt;
To illustrate what an entropy coder does, suppose you have a file with just four possible values 0, 1, 2 and 3. You could just store them in two bits each like this:&lt;br /&gt;
&lt;br /&gt;
 0 = 00&lt;br /&gt;
 1 = 01&lt;br /&gt;
 2 = 10&lt;br /&gt;
 3 = 11&lt;br /&gt;
&lt;br /&gt;
Which wouldn&amp;#039;t be too bad if all values occur more or less equally often. But suppose that 0 occurs much more frequently than the others (say 50% of the time). In that case it might be better to use the following bitpatterns for the values 0-3:&lt;br /&gt;
&lt;br /&gt;
 0 = 0&lt;br /&gt;
 1 = 10&lt;br /&gt;
 2 = 110&lt;br /&gt;
 3 = 111&lt;br /&gt;
&lt;br /&gt;
Assuming 1-3 occur equally often the average number of bits used would be 0.50*1 + 0.17*2 + 0.17*3 + 0.17*3 = 1.83 instead of the 2 we had before. With larger numbers of bits this becomes increasingly interesting.&lt;br /&gt;
&lt;br /&gt;
There are several methods for determining the above bitpatterns, [[Huffman coding]] and [[Fano coding]] are the easiest to understand, they produce patterns very similar to the above, where the prefix is used to determine how much has to be read. Range coding and [[arithmetic coding]] are a bit more complicated, they build a table of [[frequency|frequencies]] and then allocate certain ranges of numbers to a certain value. The above example would look something like this:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! Value || Chance || Number range&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0.5 || [0, 0.5)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0.17 || [0.5, 0.67)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 0.17 || [0.66, 0.83)&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 0.17 || [0.83, 1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
With range coding integers are used instead of floating-point values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Additional reading:=&lt;br /&gt;
&lt;br /&gt;
* [http://www.arturocampos.com/ac_range.html Range coder by Arturo San Emeterio Campos]&lt;br /&gt;
* [http://www.compressconsult.com/rangecoder/ GPLed Range coder]&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
</feed>