// Open untars source and decompresses the contents into destination.
Open untars source and decompresses the contents into destination.
// Open untars source and decompresses the contents into destination .
func (xzFormat) Open(source, destination string) error {
	f, err := os.Open(source)
	if err != nil {
		return fmt.Errorf("%s: failed to open archive: %v", source, err)
	}
	defer f.Close()
	xzReader, err := xz.NewReader(f)
	if err != nil {
		return fmt.Errorf("error decompressing %s: %v", source, err)
	}
	return untar(tar.NewReader(xzReader), destination)
}
func ( xzFormat ) Open ( source , destination string ) error { f , err := os . Open ( source ) if err != nil { return fmt . Errorf ( " " , source , err ) } defer f . Close ( ) xzReader , err := xz . NewReader ( f ) if err != nil { return fmt . Errorf ( " " , source , err ) } return untar ( tar . NewReader ( xzReader ) , destination ) }
Open untars source and decompresses the contents into destination.
Open untars source and decompresses the contents into destination .