newDecoderFeed

Creates a new Decoder.Feed, outputting decoded data to the supplied Decoder.OutFeed.

e.g.

val sb = StringBuilder()

// Alternatively use newDecoderFeed(sb::append)
myDecoder.newDecoderFeed { decodedByte ->
    sb.append(decodedByte)
}.use { feed ->
    "MYencoDEdTEXt".forEach(feed::consume)
}
println(sb.toString())

See also