code: func newBuilder(w io.Writer, opts *BuilderOpts) (*Builder, error) {
  	if opts == nil {
  		opts = defaultBuilderOpts
  	}
  	builderNodePool := &builderNodePool{}
  	rv := &Builder{
  		unfinished:      newUnfinishedNodes(builderNodePool),
  		registry:        newRegistry(builderNodePool, opts.RegistryTableSize, opts.RegistryMRUSize),
  		builderNodePool: builderNodePool,
  		opts:            opts,
  		lastAddr:        noneAddr,
  	}
  
  	var err error
  	rv.encoder, err = loadEncoder(opts.Encoder, w)
  	if err != nil {
  		return nil, err
  	}
  	err = rv.encoder.start()
  	if err != nil {
  		return nil, err
  	}
  	return rv, nil
  }
docs: // NewBuilder returns a new Builder which will stream out the
  // underlying representation to the provided Writer as the set is built.