https://godoc.org/github.com/chai2010/bzip2
Install GCC
or MinGW
(download here) at first,
and then run these commands:
go get github.com/chai2010/bzip2
go run bzipper.go < bzip2.go > bzip2.go.bz2
package main
import (
"io"
"log"
"os"
bzip "github.com/chai2010/bzip2"
)
func main() {
w := bzip.NewWriter(os.Stdout)
if _, err := io.Copy(w, os.Stdin); err != nil {
log.Fatalf("bzipper: %v\n", err)
}
if err := w.Close(); err != nil {
log.Fatalf("bzipper: close: %v\n", err)
}
}
Report bugs to chaishushan@gmail.com.
Thanks!