func (x *Xz) Decompress(in io.Reader, out io.Writer) error {
	r, err := fastxz.NewReader(in, 0)
	if err != nil {
		return err
	}
	_, err = io.Copy(out, r)
	return err
}
Decompress reads in, decompresses it, and writes it to out.
package archiver
import (
	"fmt"
	"io"
	"path/filepath"
	"github.com/ulikunitz/xz"
	fastxz "github.com/xi2/xz"
)
type Xz struct{}
func (x *Xz) Compress(in io.Reader, out io.Writer) error {
	w, err := xz.NewWriter(out)
	if err != nil {
		return err
	}
	defer w.Close()
	_, err = io.Copy(w, in)
	return err
}