I'd like to create a tarball using the xz compression tool. According to google, as of 10.10 there is an undocumented "--xz" switch for tar but I can't get it to work. On linux there is a "-J" switch that allows for xz compression but that isn't supported directly on OS X.
The man page for tar references xz compression but does not show a working example of how to use it. My other searches all result in something similar to:
tar cf - some_dir | xz -1 > some_dir.txz
However, decompressing that from the command line is less than intuitive and requires xz to handle the decompression before handing the file off to tar.
So, what's the "state of the art" in using xz compression directly from tar?