dont buffer entire input for tar adds
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
Jeromy committed
Oct 28, 2016 at 17:29 UTC
0b8271f2921515165306ce90cb11c8234e295c5e
1 file changed
-8
tar/format.go
-8
@@ -6,7 +6,6 @@ import (
6
"context"
7
"errors"
8
"io"
9
- "io/ioutil"
9
"strings"
10
11
importer "github.com/ipfs/go-ipfs/importer"
@@ -36,13 +35,6 @@ func marshalHeader(h *tar.Header) ([]byte, error) {
35
}
36
37
func ImportTar(r io.Reader, ds dag.DAGService) (*dag.ProtoNode, error) {
39
- rall, err := ioutil.ReadAll(r)
40
- if err != nil {
41
- return nil, err
42
- }
43
-
44
- r = bytes.NewReader(rall)
45
-
38
tr := tar.NewReader(r)
39
40
root := new(dag.ProtoNode)