add encodeUrl and decodeUrl to Codec