Documentation ¶
Index ¶
Constants ¶
View Source
const UnixfsChunkSize uint64 = 1 << 20
View Source
const UnixfsLinksPerLevel = 1 << 10
Variables ¶
This section is empty.
Functions ¶
func BalanceNode ¶
func BalanceNode(ctx context.Context, f io.Reader, fsize int64, bufDs format.DAGService, cidBuilder cid.Builder, batchReadNum int) (cid.Cid, error)
Todos:
read more bytes and parallel the dags save work
func NewDagWithData ¶
Types ¶
type BatchSplitter ¶
type BatchSplitter struct {
// contains filtered or unexported fields
}
func NewBatchSplitter ¶
func NewBatchSplitter(r io.Reader, size int64, batch int) *BatchSplitter
NewSizeSplitter returns a new size-based Splitter with the given block size.
func (*BatchSplitter) NextBytes ¶
func (ss *BatchSplitter) NextBytes() ([]*Idxbuf, error)
func (*BatchSplitter) Reader ¶
func (ss *BatchSplitter) Reader() io.Reader
type FSNodeOverDag ¶
type FSNodeOverDag struct {
// contains filtered or unexported fields
}
func NewFSNFromDag ¶
func NewFSNFromDag(nd *merkledag.ProtoNode) (*FSNodeOverDag, error)
func NewFSNodeOverDag ¶
func NewFSNodeOverDag(fsNodeType pb.Data_DataType, cidBuilder cid.Builder) *FSNodeOverDag
func (*FSNodeOverDag) AddChild ¶
func (n *FSNodeOverDag) AddChild(link *format.Link, fileSize uint64) error
func (*FSNodeOverDag) SetFileData ¶
func (n *FSNodeOverDag) SetFileData(fileData []byte)
Click to show internal directories.
Click to hide internal directories.