It is easy to observe that this encoding is invertible/reversible as it is an injective mapping. Now, we can compute the average number of bits required to represent one letter in this encoding.
Number of bits required on average per letter = summed over all characters (Probability of appearance of a character * number of bits required to represent that character)