ste
04/03/2022, 7:32 PMbr
(Brotli) support in ktor-client-encoding
? The only thing I could find is https://github.com/ktorio/ktor/issues/408, but this is closed and the YouTrack link is brokenimplementation("org.brotli:dec:0.1.2")
install(ContentEncoding) {
this.customEncoder(object : ContentEncoder {
override val name = "br"
override fun CoroutineScope.decode(source: ByteReadChannel): ByteReadChannel {
return BrotliInputStream(source.toInputStream()).toByteReadChannel()
}
override fun CoroutineScope.encode(source: ByteReadChannel): ByteReadChannel {
TODO()
}
})
}
Aleksei Tirman [JB]
04/04/2022, 8:09 AMste
04/04/2022, 9:28 AMktor
, but whatever), but I have to use a 2017 release (https://github.com/google/brotli/issues/715)Aleksei Tirman [JB]
04/04/2022, 9:40 AMste
04/04/2022, 9:43 AM