Added method to determine output length of encoded string.

This is useful for calculating the size of fields or other storage requirements when using a custom alphabet.