func LeavesFromReader(in io.Reader) (Leaves, error) {
	ttl, err := godctiger.TreeLeaves(in)
	if err != nil {
		return nil, err
	}
	ret := make(Leaves, len(ttl))
	for i, l := range ttl {
		ret[i] = Hash(l)
	}
	return ret, nil
}
LeavesFromReader computes the TTH leaves of data provided by a Reader.
package tiger
import (
	"bufio"
	"bytes"
	"io"
	"os"
	godctiger "github.com/aler9/go-dc/tiger"
)
type Leaves []Hash
func LeavesLoadFromReader(r io.Reader) (Leaves, error) {
	var ret Leaves
	var h Hash
	for {
		_, err := io.ReadFull(r, h[:])
		if err != nil {
			if err == io.EOF {
				break
			}
			return nil, err
		}
		ret = append(ret, h)
	}
	return ret, nil
}
func LeavesLoadFromBytes(in []byte) (Leaves, error) {
	return LeavesLoadFromReader(bytes.NewReader(in))
}
func LeavesLoadFromFile(fpath string) (Leaves, error) {
	f, err := os.Open(fpath)
	if err != nil {
		return nil, err
	}
	defer f.Close()
	buf := bufio.NewReaderSize(f, 1024*1024)
	return LeavesLoadFromReader(buf)
}