bzip2.go
func newBzip2Writer(w io.Writer) (wc io.WriteCloser, err error) {
	var bw bzip2Writer
	bw.c = exec.Command("bzip2", "-c")
	bw.c.Stdout = w

	if bw.w, err = bw.c.StdinPipe(); err != nil {
		return nil, err
	}

	if err = bw.c.Start(); err != nil {
		return nil, err
	}

	return bw, nil
}
func newBzip2Writer(w io.Writer) (wc io.WriteCloser, err error) {
	var bw bzip2Writer
	bw.c = exec.Command("bzip2", "-c")
	bw.c.Stdout = w

	if bw.w, err = bw.c.StdinPipe(); err != nil {
		return nil, err
	}

	if err = bw.c.Start(); err != nil {
		return nil, err
	}

	return bw, nil
}
func newBzip2Writer ( w io . Writer ) ( wc io . WriteCloser , err error ) { var bw bzip2Writer bw . c = exec . Command ( " " , " " ) bw . c . Stdout = w if bw . w , err = bw . c . StdinPipe ( ) ; err != nil { return nil , err } if err = bw . c . Start ( ) ; err != nil { return nil , err } return bw , nil }
// Package compress/bzip2 implements only decompression,
// so we'll fake it by running bzip2 in another process.
Package compress / bzip2 implements only decompression so we ll fake it by running bzip2 in another process .