from Hacker News

Xz

by golwengaud on 6/24/10, 5:27 PM with 64 comments

  • by spicyj on 6/24/10, 6:12 PM

    Can someone explain to me why this Wikipedia article is at the top of the front page?
  • by vasi on 6/24/10, 10:31 PM

    I wrote a tool, pixz, that does xz compression in parallel to take advantage of multiple cores. It also indexes xz-compressed tarballs, so you can extract an individual file very quickly instead of needing to decompress the entire tarball. The parallel-compressed, self-contained tarball+index is fully compatible with regular tar/xz, you don't need any special tools to extract it.

    http://github.com/vasi/pixz

    The interface is still very rough, but it works. The xz utility comes with a very nice library and API, which made this a lot easier--thanks, Lasse!

  • by acg on 6/24/10, 7:24 PM

    The specification ( http://tukaani.org/xz/xz-file-format.txt ) reads like this format allows the application of a chain of compression "filters". Perhaps the most interesting, and least portable is the filter that modifies code to make compression easier. (Section 5.2.3) Is this mainly for intel architecures?
  • by marcinw on 6/24/10, 6:31 PM

    The only reason I stick with gzip over bz2 or 7z (lzma) is that gzip is everywhere. In reality, nobody has a file compression utility that can handle LZMA (even though I do, I never use it).
  • by dmn001 on 6/25/10, 12:00 AM

    I use 7-zip 9.15 beta - it supports LZMA2 compression and available to download here:

    http://www.7-zip.org/

  • by india on 6/25/10, 5:32 PM

    Also notably, slackware has shifted it's packaging format to a xz tar since the last two releases. This validates xz as a good replacement for gz/bz2.
  • by tman on 6/24/10, 6:25 PM

    Xz appears to use the same algorithm as 7zip.

    Here are some comparisons between the big 3 compression algorithms (taken from http://blogs.reucon.com/srt/tags/compression/ -- he used a 163 MB Mysql dump file for the tests):

      Compressor 	Size 	Ratio 	Compression 	Decompression
      gzip 	        89 MB 	54 % 	0m 13s 	        0m 05s
      bzip2 	81 MB 	49 % 	1m 30s 	        0m 20s
      7-zip 	61 MB 	37 % 	1m 48s 	        0m 11s
  • by coderdude on 6/24/10, 10:36 PM

    While we're talking about compression algorithms, here is a nice little gem called BMZ:

    http://bitbucket.org/mattsta/bmz/src

    It's is a fast compression scheme implemented using BMDiff and a Google Zippy clone (based off LZO).

  • by gubatron on 6/24/10, 10:19 PM

    Tried to apt-get it (on Ubuntu 9.10) but got scared when I gotta a warning about lzma getting uninstalled and possibly breaking my dpkg.

    Looking good on ubuntu 10.4

    Same folder compressed in 1/2 the size as with tar cvfz, sick.