code: func FastBase58EncodingAlphabet(bin []byte, alphabet *Alphabet) string {
  	zero := alphabet.encode[0]
  
  	binsz := len(bin)
  	var i, j, zcount, high int
  	var carry uint32
  
  	for zcount < binsz && bin[zcount] == 0 {
  		zcount++
  	}
  
  	size := ((binsz-zcount)*138/100 + 1)
  
  	// allocate one big buffer up front
  	buf := make([]byte, size*2+zcount)
  
  	// use the second half for the temporary buffer
  	tmp := buf[size+zcount:]
  
  	high = size - 1
  	for i = zcount; i < binsz; i++ {
  		j = size - 1
  		for carry = uint32(bin[i]); j > high || carry != 0; j-- {
  			carry = carry + 256*uint32(tmp[j])
  			tmp[j] = byte(carry % 58)
  			carry /= 58
  		}
  		high = j
  	}
  
  	for j = 0; j < size && tmp[j] == 0; j++ {
  	}
  
  	// Use the first half for the result
  	b58 := buf[:size-j+zcount]
  
  	if zcount != 0 {
  		for i = 0; i < zcount; i++ {
  			b58[i] = zero
  		}
  	}
  
  	for i = zcount; j < size; i++ {
  		b58[i] = alphabet.encode[tmp[j]]
  		j++
  	}
  
  	return string(b58)
  }
docs: // FastBase58EncodingAlphabet encodes the passed bytes into a base58 encoded
  // string with the passed alphabet.