@@ -1,12 +1,10 @@ package main import ( - pprof "0dev.org/debug/pprof" iou "0dev.org/ioutil" predictor "0dev.org/predictor" - // "bufio" "fmt" "io" "os" ) @@ -18,13 +16,10 @@ case len(os.Args) == 2 && os.Args[1] == "-d": code = decompress(os.Stdout, os.Stdin) default: fmt.Fprintln(os.Stdout, "Usage: pdc [-d]") } - - pprof.Stop() - os.Exit(code) } // Compress the data from the given io.Reader and write it to the given io.Writer // I/O is buffered for better performance @@ -63,11 +58,10 @@ func decompress(output io.Writer, input io.Reader) int { var ( err error buffer io.Writer = iou.SizedWriter(output, 4096) decompressor io.Reader = predictor.Decompressor(iou.SizedReader(input, 4096)) - //decompressor io.Reader = predictor.Decompressor(bufio.NewReader(input)) ) _, err = io.Copy(buffer, decompressor) if err != nil { fmt.Fprintln(os.Stderr, "Error while decompressing.\n", err)