I'm trying to implement Base58Check as a learning exercise and I came across the different types of prefixes as summarised here.
I wonder however how to arrive in the expected prefix characters from the prefix Byte. Why the same byte can lead to different characters, and how those come to be.
My initial assumption was that the first character is the Base58 encode of the prefix byte, but that seems wrong, the address byte 0x00 maps to "1" because it's a leading zero, but the second example of P2SH with 0x05 should map to char "6" but instead it maps to "3". And the WIF prefix of 0x80 can map to either "5" (uncompressed), "K" or "L" (compressed) even though the prefix is the same.
Also on my tests that mapping only seems to work after I add the 4 byte checksum in the end of the array. If I encode the array without the checksum the result has different prefix characters.
So, how is the expected prefix characters of Base58Check derived from the prefix?