1 Matching Annotations
  1. Jan 2014
    1. Difference between XZ and LZMA2 Short answer: xz is a format that (currently) only uses the lzma2 compression algorithm. Long answer: think of xz as a container for the compression data generated by the lzma2 algorithm. We also have this paradigm for video files for example: avi/mkv/mov/mp4/ogv are containers, and xvid/x264/theora are compression algorithms. The confusion is often made because currently, the xz format only supports the lzma2 algorithm (and it’ll remain the default, even if some day, others algorithms may be added). This confusion doesn’t happen with other formats/algorithms, as for example gzip is both a compression algorithm and a format. To be exact, the gzip format only supports to encapsulate data generated by gzip… the compression algorithm. In this article I’ll use “xz” to say “the lzma2 algorithm whose data is being encapsulated by the xz format”. You’ll probably agree it’s way simpler

      The key here is the notion of a format as a container. Lots of content is moving towards that notion-- that a "file" is really an opaque (to the OS filesystem) directory or container of some sort and some other program understands the format of the "file" as a container to know how to open it to access the files inside.