<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>C on Andrew Walsh</title><link>http://awalsh128.com/tags/c/</link><description>Recent content in C on Andrew Walsh</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><copyright>© 2026 Andrew Walsh</copyright><lastBuildDate>Wed, 03 Oct 2012 13:45:24 -0700</lastBuildDate><atom:link href="http://awalsh128.com/tags/c/feed.xml" rel="self" type="application/rss+xml"/><item><title>Understanding compression and Huffman Coding.</title><link>http://awalsh128.com/understanding-compression-and-huffman/</link><pubDate>Thu, 20 Sep 2012 00:00:00 -0700</pubDate><guid>http://awalsh128.com/understanding-compression-and-huffman/</guid><description>&lt;h3 class="relative group"&gt;Definitions&#10; &lt;div id="definitions" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#definitions" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;In a lot of texts regarding compression you will run across various&#10;conventions of syntax to describe the coding of data. Much of them are&#10;used in fields like &lt;a href="http://en.wikipedia.org/wiki/Automata_theory" target="_blank" rel="noreferrer"&gt;automata&#10;theory&lt;/a&gt;, group theory and&#10;statistics. Although, the field of &lt;a href="http://en.wikipedia.org/wiki/Coding_theory" target="_blank" rel="noreferrer"&gt;coding&#10;theory&lt;/a&gt; itself has &lt;a href="http://en.wikipedia.org/wiki/Timeline_of_information_theory" target="_blank" rel="noreferrer"&gt;a long&#10;and rich&#10;history&lt;/a&gt; in&#10;the 20st century; much of the terminology is borrowed from fields that&#10;gave rise to it.&lt;/p&gt;</description></item><item><title>Implementing a bit reader/writer in C.</title><link>http://awalsh128.com/implementing-bit-readerwriter-in-c/</link><pubDate>Thu, 13 Sep 2012 00:00:00 -0700</pubDate><guid>http://awalsh128.com/implementing-bit-readerwriter-in-c/</guid><description>&lt;h3 class="relative group"&gt;Introduction&#10; &lt;div id="introduction" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#introduction" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;I was working on implementing a simple compression tool based on naive&#10;&lt;a href="http://en.wikipedia.org/wiki/Huffman_coding" target="_blank" rel="noreferrer"&gt;Huffman coding&lt;/a&gt; and&#10;initially assumed all of my &lt;a href="http://en.wikipedia.org/wiki/Prefix_code" target="_blank" rel="noreferrer"&gt;prefix&#10;codes&lt;/a&gt; would be at or under a&#10;byte long. Although I failed to account for the &lt;a href="http://www.arturocampos.com/ac_fib_huffman.html#Fibbonaci%20and%20Huffman" target="_blank" rel="noreferrer"&gt;worst case of Huffman&#10;coding&lt;/a&gt;,&#10;which can yield codes up to 255 bits in length.&lt;/p&gt;</description></item></channel></rss>