decodeChunked

fun CoroutineScope.decodeChunked(input: ByteReadChannel, contentLength: Long): DecoderJob

Start a chunked stream decoder coroutine


Decode chunked transfer encoding from the input channel and write the result in out.

Throws

if stream has ended unexpectedly.

if the format is invalid.


fun CoroutineScope.decodeChunked(input: ByteReadChannel): DecoderJob

Deprecated

Specify content length if known or pass -1L

Replace with

decodeChunked(input, -1L)

Start a chunked stream decoder coroutine


suspend fun decodeChunked(input: ByteReadChannel, out: ByteWriteChannel, contentLength: Long)

Deprecated (with error)

The contentLength is ignored for chunked transfer encoding

Replace with

decodeChunked(input, out)

Chunked stream decoding loop