{"id":260,"date":"2014-02-22T18:08:09","date_gmt":"2014-02-22T17:08:09","guid":{"rendered":"https:\/\/blogs.gentoo.org\/mgorny\/?p=260"},"modified":"2016-01-28T14:15:21","modified_gmt":"2016-01-28T13:15:21","slug":"a-few-words-on-lzip-compressor","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/mgorny\/2014\/02\/22\/a-few-words-on-lzip-compressor\/","title":{"rendered":"A\u00a0few words on lzip compressor"},"content":{"rendered":"<p><ins>(update on 2016-01-28: please note that this post is\u00a0outdated and\u00a0no\u00a0longer adequately expresses my attitude towards the\u00a0two competing formats)<\/ins><\/p>\n<p>Some of\u00a0you may already have noticed that <a rel='external' href='https:\/\/packages.gentoo.org\/package\/sys-apps\/ed'>sys-apps\/ed<\/a> and\u00a0<a rel='external' href='https:\/\/packages.gentoo.org\/package\/sys-fs\/ddrescue'>sys-fs\/ddrescue<\/a> packages started pulling in <a rel='external' href='https:\/\/packages.gentoo.org\/package\/app-arch\/lzip'>lzip<\/a> archiver. \u00abIs this some new fancy archiver?\u00bb you may ask. The\u00a0answer is \u00abno. It&#8217;s been around for a\u00a0very long time, and\u00a0it never got any real interest.\u00bb<\/p>\n<p>You can read some of the\u00a0background story in\u00a0<a rel='external' href='http:\/\/linuxgazette.net\/162\/lindholm.html'>New Options in the World of File Compression<\/a> Linux Gazette article. Long story short, lzip was created before xz as a\u00a0response to the\u00a0limitations of\u00a0.lzma format used by\u00a0<a rel='external' href='http:\/\/tukaani.org\/lzma\/'>lzma-utils<\/a>. However, it never got any real attention and\u00a0when <a rel='external' href='http:\/\/tukaani.org\/xz\/'>xz-utils<\/a> was released as a\u00a0direct successor to lzma-utils it became practically redundant. And\u00a0the\u00a0two projects co-existed silently until lately\u2026<\/p>\n<p>Over the\u00a0past five years, Antonio Diaz Diaz, lzip&#8217;s author, and\u00a0a\u00a0few project supporters were trying to convince the\u00a0community that the\u00a0lzip format is\u00a0superior to xz. However, they were never able to\u00a0provide any convincing arguments to the\u00a0community, and\u00a0while xz gained popularity lzip stayed in\u00a0the\u00a0shadow. And it was used mostly by\u00a0the\u00a0projects Diaz was member of.<\/p>\n<p>It seems that he has finally decided that advocacy will not\u00a0help his pet project in\u00a0gaining popularity. Instead, he decided to take advantage of\u00a0his administrator position in\u00a0the\u00a0mentioned GNU projects and\u00a0<a rel='external' href='http:\/\/thread.gmane.org\/gmane.comp.sysutils.ddrescue\/762\/focus=767'>discontinue providing non-.lz tarballs<\/a>. As\u00a0he says, \u00absurely every user of ddrescue would like to know about lzip [\u2026]\u00bb.<\/p>\n<p>So, Gentoo user, would you like to know about lzip? Let&#8217;s try to get a\u00a0few fair points here.<\/p>\n<p><!--more--><\/p>\n<p>First of\u00a0all, it should be noted that the\u00a0two competing projects are two different implementations of\u00a0the\u00a0same compression algorithm \u2014 LZMA<del>2<\/del> (<ins>correct on 2016-01-28: Antonio Diaz Diaz pointed out that <a rel='external' href='https:\/\/en.wikipedia.org\/wiki\/Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm#LZMA2_format'>LZMA2<\/a> is purely an\u00a0additional container on top of\u00a0LZMA; so: lzip is container on top of\u00a0LZMA, while xz is container on top of\u00a0LZMA2 which is a\u00a0container on top of\u00a0LZMA<\/ins>), and they use incompatible file formats. Therefore, both can achieve the\u00a0same compression ratio (and\u00a0similar speed) but\u00a0using either of\u00a0them requires users to\u00a0download the\u00a0appropriate tool.<\/p>\n<p>xz is gaining traction lately. The\u00a0initial doubt period seems to be\u00a0over, and\u00a0growing number of\u00a0projects is adapting the\u00a0format. This includes both use of\u00a0the\u00a0compression library and\u00a0distribution of\u00a0sources in\u00a0.tar.xz. An\u00a0xz coder is\u00a0implemented within the\u00a0kernel and\u00a0it can be\u00a0used as a\u00a0compressor for\u00a0filesystems. Practically saying, it&#8217;s inevitable for\u00a0Gentoo users since it is\u00a0used to compress some of\u00a0the\u00a0larger sources (like kernel sources).<\/p>\n<p>Lzip is a\u00a0side project with\u00a0minor interest. Most of\u00a0our users were unaware of\u00a0its existence until they were forced to\u00a0install it in\u00a0order to unpack some other package. In\u00a0fact, since it is used in\u00a0particularly small packages, the\u00a0gain from using it (compared to gzip) is <em>even smaller<\/em> than size of\u00a0lzip tarball. Not to\u00a0mention if we compare it to xz that most of\u00a0our users have installed already.<\/p>\n<p>As\u00a0<a rel='external' href='https:\/\/www.ohloh.net\/p\/xz-utils'>analyzed by\u00a0Ohloh<\/a>, xz-utils \u00abhas a\u00a0well established, mature codebase\u00bb though it is mostly maintained by\u00a0a\u00a0single person. lzip is developed by\u00a0a\u00a0single person with no officially known contributors, and\u00a0<a rel='external' href='http:\/\/article.gmane.org\/gmane.comp.compression.lzip.bugs\/420'>no\u00a0public source code repository<\/a>. The\u00a0author claims that lzip is\u00a0mature and\u00a0<a rel='external' href='https:\/\/bugs.gentoo.org\/show_bug.cgi?id=249059#c12'>will be\u00a0continually developed<\/a> but those are only promises, compared to the\u00a0community growing around xz.<\/p>\n<p>Feature-wise, xz supports more fine-grained configuration of\u00a0LZMA2 and\u00a0additional filters (alike 7-Zip). Lzip has a\u00a0recovery tool and\u00a0a\u00a0<a rel='external' href='http:\/\/article.gmane.org\/gmane.comp.compression.lzip.bugs\/6'>few extra promises<\/a>.<\/p>\n<p>xz-utils are written in\u00a0C, with\u00a0the\u00a0compression library and\u00a0basic utilities being public-domain. Lzip is C++, and\u00a0GPLv3 (but there&#8217;s also a\u00a0limited public-domain C version). xz-utils use clean autotools, lzip \u2014 custom configure script and Makefile.<\/p>\n<p>To sum up: both tools are quite similar and\u00a0have no strong advantages over the\u00a0other. However, the\u00a0popularity of\u00a0xz makes it a\u00a0better choice most of\u00a0the\u00a0time, while using lzip mostly forces users to install an\u00a0extra tool for <em>no real benefit<\/em>. The\u00a0continuous support and\u00a0development in\u00a0xz-utils is guaranteed by\u00a0the\u00a0community, while in\u00a0lzip it&#8217;s just author&#8217;s promise.<\/p>\n<p>This\u00a0post would end here if\u00a0not for\u00a0the\u00a0late events. Now lzip gained an\u00a0important disadvantage: its author is simply unprofessional. While many other projects start shipping .xz compressed tarballs following its rise in popularity, Diaz is grasping at\u00a0straws and\u00a0abusing his position trying to force people to use his pet project instead. He has clearly more concern about the\u00a0popularity of\u00a0lzip than about the\u00a0friendliness to users of\u00a0the\u00a0other projects he is administering.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(update on 2016-01-28: please note that this post is\u00a0outdated and\u00a0no\u00a0longer adequately expresses my attitude towards the\u00a0two competing formats) Some of\u00a0you may already have noticed that sys-apps\/ed and\u00a0sys-fs\/ddrescue packages started pulling in lzip archiver. \u00abIs this some new fancy archiver?\u00bb you may ask. The\u00a0answer is \u00abno. It&#8217;s been around for a\u00a0very long time, and\u00a0it never got &hellip; <a href=\"https:\/\/blogs.gentoo.org\/mgorny\/2014\/02\/22\/a-few-words-on-lzip-compressor\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;A\u00a0few words on lzip compressor&#8221;<\/span><\/a><\/p>\n","protected":false},"author":137,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[3],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/posts\/260"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/users\/137"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/comments?post=260"}],"version-history":[{"count":16,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/posts\/260\/revisions"}],"predecessor-version":[{"id":420,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/posts\/260\/revisions\/420"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/media?parent=260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/categories?post=260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/tags?post=260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}