Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BrotliInputStream (0.18 sec)

  1. okhttp-brotli/src/main/kotlin/okhttp3/brotli/internal/Uncompress.kt

    import okio.source
    import org.brotli.dec.BrotliInputStream
    
    fun uncompress(response: Response): Response {
      if (!response.promisesBody()) {
        return response
      }
      val body = response.body
      val encoding = response.header("Content-Encoding") ?: return response
    
      val decompressedSource =
        when {
          encoding.equals("br", ignoreCase = true) ->
            BrotliInputStream(body.source().inputStream()).source().buffer()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 13:19:01 GMT 2024
    - 1.5K bytes
    - Viewed (0)
Back to top