func readerHashAndSize(r io.ReadSeeker) (hash string, size int64, err error) {
	h := sha512.New384()
	size, err = io.Copy(h, r)
	if err != nil {
		return "", 0, errgo.Notef(err, "cannot calculate hash")
	}
	if _, err := r.Seek(0, 0); err != nil {
		return "", 0, errgo.Notef(err, "cannot seek")
	}
	return fmt.Sprintf("%x", h.Sum(nil)), size, nil
}
// readerHashAndSize returns the hex-encoded SHA384 hash and size of
// the data included in the given reader.
readerHashAndSize returns the hex-encoded SHA384 hash and size of
the data included in the given reader.
// readerHashAndSize returns the hex - encoded SHA384 hash and size of // the data included in the given reader .
func readerHashAndSize(r io.ReadSeeker) (hash string, size int64, err error) {
	h := sha512.New384()
	size, err = io.Copy(h, r)
	if err != nil {
		return "", 0, errgo.Notef(err, "cannot calculate hash")
	}
	if _, err := r.Seek(0, 0); err != nil {
		return "", 0, errgo.Notef(err, "cannot seek")
	}
	return fmt.Sprintf("%x", h.Sum(nil)), size, nil
}
func readerHashAndSize ( r io . ReadSeeker ) ( hash string , size int64 , err error ) { h := sha512 . New384 ( ) size , err = io . Copy ( h , r ) if err != nil { return " " , 0 , errgo . Notef ( err , " " ) } if _ , err := r . Seek ( 0 , 0 ) ; err != nil { return " " , 0 , errgo . Notef ( err , " " ) } return fmt . Sprintf ( " " , h . Sum ( nil ) ) , size , nil }
readerHashAndSize returns the hex-encoded SHA384 hash and size of
the data included in the given reader.
readerHashAndSize returns the hex - encoded SHA384 hash and size of the data included in the given reader .