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
}
Compress reads in, compresses 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{}