Make "unpack" deal with .xz-compressed files

Has this already been done by someone else?  The moonbase is full of .xz tar files these days, and it surprised me when lin couldn't unpack them automatically.

I actually took advantage of tar's ability to figure out how a file
is compressed for itself, and merged all of the different kinds of
tar unpack to a single command line.