encode

fun CharsetEncoder.encode(input: CharSequence, fromIndex: Int = 0, toIndex: Int = input.length): ByteReadPacket
fun CharsetEncoder.encode(input: CharArray, fromIndex: Int, toIndex: Int, dst: Output)