func New(ctx context.Context, getter storage.Getter, address swarm.Address) (file.Joiner, int64, error) {
	getter = store.New(getter)
	// retrieve the root chunk to read the total data length the be retrieved
	rootChunk, err := getter.Get(ctx, storage.ModeGetRequest, address)
	if err != nil {
		return nil, 0, err
	}

	var chunkData = rootChunk.Data()

	span := int64(binary.LittleEndian.Uint64(chunkData[:swarm.SpanSize]))

	j := &joiner{
		addr:      rootChunk.Address(),
		refLength: len(address.Bytes()),
		ctx:       ctx,
		getter:    getter,
		span:      span,
		rootData:  chunkData[swarm.SpanSize:],
	}

	return j, span, nil
}
// New creates a new Joiner. A Joiner provides Read, Seek and Size functionalities.
New creates a new Joiner. A Joiner provides Read, Seek and Size functionalities.
// New creates a new Joiner . A Joiner provides Read Seek and Size functionalities .
func New(ctx context.Context, getter storage.Getter, address swarm.Address) (file.Joiner, int64, error) {
	getter = store.New(getter)
	rootChunk, err := getter.Get(ctx, storage.ModeGetRequest, address)
	if err != nil {
		return nil, 0, err
	}
	var chunkData = rootChunk.Data()
	span := int64(binary.LittleEndian.Uint64(chunkData[:swarm.SpanSize]))
	j := &joiner{
		addr:      rootChunk.Address(),
		refLength: len(address.Bytes()),
		ctx:       ctx,
		getter:    getter,
		span:      span,
		rootData:  chunkData[swarm.SpanSize:],
	}
	return j, span, nil
}
func New ( ctx context . Context , getter storage . Getter , address swarm . Address ) ( file . Joiner , int64 , error ) { getter = store . New ( getter ) rootChunk , err := getter . Get ( ctx , storage . ModeGetRequest , address ) if err != nil { return nil , 0 , err } var chunkData = rootChunk . Data ( ) span := int64 ( binary . LittleEndian . Uint64 ( chunkData [ : swarm . SpanSize ] ) ) j := & joiner { addr : rootChunk . Address ( ) , refLength : len ( address . Bytes ( ) ) , ctx : ctx , getter : getter , span : span , rootData : chunkData [ swarm . SpanSize : ] , } return j , span , nil }
New creates a new Joiner.
New creates a new Joiner .
// retrieve the root chunk to read the total data length the be retrieved