<story><title>How are zlib, gzip and Zip related? (2013)</title><url>http://stackoverflow.com/questions/20762094/how-are-zlib-gzip-and-zip-related-what-do-they-have-in-common-and-how-are-they/20765054#20765054</url></story><parent_chain></parent_chain><comment><author>lpage</author><text>In other compression news, Apple open sourced their implementation of lzfse yesterday: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;lzfse&amp;#x2F;lzfse&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;lzfse&amp;#x2F;lzfse&lt;/a&gt;. It&amp;#x27;s based on a relatively new type of coding - asymmetric numeral systems. Huffman coding is only optimal if you consider one bit as the smallest unit of information. ANS (and more broadly, arithmetic coding) allows for fractional bits and gets closer to the Shannon limit. It&amp;#x27;s also simpler to implement than (real world) Huffman.&lt;p&gt;Unfortunately, most open source implementations of ANS are not highly optimized and quite division heavy, so they lag on speed benchmarks. Apple&amp;#x27;s implementation looks pretty good (they&amp;#x27;re using it in OS X, err, macOS, and iOS) and there&amp;#x27;s some promising academic work being done on better implementations (optimizing Huffman for x86, ARM, and FPGA is a pretty well studied problem). The compression story is still being written.</text></comment>
<story><title>How are zlib, gzip and Zip related? (2013)</title><url>http://stackoverflow.com/questions/20762094/how-are-zlib-gzip-and-zip-related-what-do-they-have-in-common-and-how-are-they/20765054#20765054</url></story><parent_chain></parent_chain><comment><author>chickenbane</author><text>Not only is this a great read, but the follow up for citations is replied with &amp;quot;I am the reference&amp;quot;.&lt;p&gt;If this were reddit I&amp;#x27;d post the hot fire gif.  Eh, here it&amp;#x27;s anyway: &lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;i.imgur.com&amp;#x2F;VQLGJOL.gif&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;i.imgur.com&amp;#x2F;VQLGJOL.gif&lt;/a&gt;</text></comment>