code: func NewXzReader(r io.Reader) (*XzReader, error) {
  	rpipe, wpipe := io.Pipe()
  	ex, err := exec.LookPath("xz")
  	if err != nil {
  		log.Fatalf("couldn't find xz executable: %v", err)
  	}
  	cmd := exec.Command(ex, "--decompress", "--stdout")
  
  	closech := make(chan error)
  
  	cmd.Stdin = r
  	cmd.Stdout = wpipe
  
  	go func() {
  		err := cmd.Run()
  		wpipe.CloseWithError(err)
  		closech <- err
  	}()
  
  	return &XzReader{rpipe, cmd, closech}, nil
  }
docs: // NewXzReader shells out to a command line xz executable (if
  // available) to decompress the given io.Reader using the xz
  // compression format and returns an *XzReader.
  // It is the caller's responsibility to call Close on the XzReader when done.