Codec for base128 and base192 encoding schemes