Encodes input.
input
The input is encoded as if by encoder.convert.
encoder.convert
@override T encode(S input) => throw UnsupportedError('no sync encode, use encodeAsync');