func (block *BlockInfo) Offset() int64 {
	return int64(block.Position) * int64(BLOCKSIZE)
}
Get the byte offset of this block in its containing file.
package fs
import (
	"bytes"
	"crypto/sha1"
	"fmt"
	"path/filepath"
)
const BLOCKSIZE int = 8192
type Node interface {
	Repo() NodeRepo
	Parent() (FsNode, bool)
}
type FsNode interface {
	Node
	Name() string
	Mode() uint32
}
func RelPath(item FsNode) string {
	parts := []string{}
	for fsNode, hasParent := item, true; hasParent; fsNode, hasParent = fsNode.Parent() {
		parts = append([]string{fsNode.Name()}, parts...)
	}
	return filepath.Join(parts...)
}
type Block interface {
	Node
	Info() *BlockInfo
}
type BlockInfo struct {
	Position int
	Weak     int
	Strong   string
	Parent   string
}