code: func New(dbName string, idAlloc autoid.Allocator) (KvEncoder, error) {
  	kvEnc := &kvEncoder{}
  	mu.Lock()
  	defer mu.Unlock()
  	if refCount == 0 {
  		if err := initGlobal(); err != nil {
  			return nil, err
  		}
  	}
  	err := kvEnc.initial(dbName, idAlloc)
  	if err != nil {
  		return nil, err
  	}
  	refCount++
  	return kvEnc, nil
  }
docs: // New new a KvEncoder