]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cmd/nncp-reass/main.go
Use explicitly larger bufio's buffer
[nncp.git] / src / cmd / nncp-reass / main.go
index d095f95d041ba4b1c99cc2513828f2e2cce057b7..77d1c7ee600c1c34f38424bb507ac917c951288d 100644 (file)
@@ -157,7 +157,7 @@ func process(ctx *nncp.Ctx, path string, keep, dryRun, stdout, dumpMeta bool) bo
                }
                hsh = nncp.MTHNew(fi.Size(), 0)
                if _, err = nncp.CopyProgressed(
-                       hsh, bufio.NewReader(fd), "check",
+                       hsh, bufio.NewReaderSize(fd, nncp.MTHBlockSize), "check",
                        nncp.LEs{{K: "Pkt", V: chunkPath}, {K: "FullSize", V: fi.Size()}},
                        ctx.ShowPrgrs,
                ); err != nil {
@@ -213,7 +213,7 @@ func process(ctx *nncp.Ctx, path string, keep, dryRun, stdout, dumpMeta bool) bo
                        log.Fatalln("Can not stat file:", err)
                }
                if _, err = nncp.CopyProgressed(
-                       dstW, bufio.NewReader(fd), "reass",
+                       dstW, bufio.NewReaderSize(fd, nncp.MTHBlockSize), "reass",
                        nncp.LEs{{K: "Pkt", V: chunkPath}, {K: "FullSize", V: fi.Size()}},
                        ctx.ShowPrgrs,
                ); err != nil {