func (x *Xz) Decompress(rdr io.Reader) ([]byte, error) {
	r, err := xz.NewReader(rdr, 0)
	if err != nil {
		return nil, err
	}
	var buf bytes.Buffer
	_, err = io.Copy(&buf, r)
	if err != nil {
		return nil, err
	}
	return buf.Bytes(), nil
}
Decompress decompresses all the data from the rdr and returns the uncompressed bytes.
package compression
import (
	"bytes"
	"encoding/binary"
	"io"
	"github.com/therootcompany/xz"
	wrtXz "github.com/ulikunitz/xz"
)
type Xz struct {
	DictionarySize int32
	Filters        int32
}
func NewXzCompressorWithOptions(rdr io.Reader) (*Xz, error) {
	var x Xz
	err := binary.Read(rdr, binary.LittleEndian, &x)
	if err != nil {
		return nil, err
	}
	return &x, nil
}