Versions in this module Expand all Collapse all v0 v0.4.0 May 7, 2026 v0.3.1 Feb 22, 2026 v0.3.0 Feb 8, 2026 v0.2.0 Jan 29, 2026 v0.1.0 Jan 24, 2026 Changes in this version + const MaxIndent + var EOS = streams.EOS + func Copy[Ref any](ctx context.Context, b *Builder[Ref], it *Iterator[Ref]) error + func PathCompare(a, b Path) int + func Walk[Ref any](ctx context.Context, s Storage[Ref], root Root[Ref], w Walker[Ref]) error + type Builder struct + func NewBuilder[Ref any](s WriteStorage[Ref], meanSize, maxSize int, seed *[16]byte) *Builder[Ref] + func (b *Builder[R]) Append(ctx context.Context, indent uint8, data []byte) error + func (b *Builder[Ref]) Finish(ctx context.Context) (*Root[Ref], error) + type Entry struct + Path Path + Value []byte + func ListEntries[Ref any](ctx context.Context, s Storage[Ref], offset Weight, ref Ref) (ret []Entry, _ error) + type Index struct + Ref Ref + Weight Weight + func ListIndexes[Ref any](ctx context.Context, s Storage[Ref], ref Ref) (ret []Index[Ref], _ error) + type IndexCallback func(context.Context, Index[Ref]) error + type Iterator struct + func NewIterator[Ref any](s Storage[Ref], root Root[Ref], span Span) *Iterator[Ref] + func (it *Iterator[Ref]) Next(ctx context.Context, ent *Entry) error + func (it *Iterator[Ref]) Peek(ctx context.Context, ent *Entry) error + func (it *Iterator[Ref]) Seek(ctx context.Context, gteq Path) error + type Path []uint64 + func (p *Path) Add(left, right Weight) + type Root struct + Depth uint8 + Ref Ref + Weight Weight + type Span = state.Span[Path] + func PointSpan(x Path) Span + func TotalSpan() Span + type Storage interface + Get func(ctx context.Context, ref R, buf []byte) (int, error) + MarshalRef func(R) []byte + MaxSize func() int + ParseRef func([]byte) (R, error) + func NewStorage(s stores.Reading) Storage[blobcache.CID] + type StreamEntry struct + Value []byte + Weight Weight + type StreamReader struct + func NewStreamReader[Ref any](s Storage[Ref], getNext func(context.Context) (*Ref, error)) *StreamReader[Ref] + func (sr *StreamReader[Ref]) Buffered() int + func (sr *StreamReader[Ref]) Next(ctx context.Context, ent *StreamEntry) error + func (sr *StreamReader[Ref]) Peek(ctx context.Context, ent *StreamEntry) error + type StreamWriter struct + func NewStreamWriter[Ref any](s WriteStorage[Ref], meanSize, maxSize int, seed *[16]byte, ...) *StreamWriter[Ref] + func (sw *StreamWriter[Ref]) Append(ctx context.Context, se StreamEntry) error + func (sw *StreamWriter[Ref]) Buffered() int + func (sw *StreamWriter[Ref]) Flush(ctx context.Context) error + type Walker struct + After func(Ref) error + Before func(Ref) bool + ForEach func(Entry) error + type Weight []uint64 + func (w *Weight) Add(left, right Weight) + func (w *Weight) Set(x Weight) + func (w Weight) Clone() Weight + type WriteStorage interface + Post func(ctx context.Context, data []byte) (R, error) + func NewWriteStorage(s stores.RW) WriteStorage[blobcache.CID]