- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for MessageInflater (0.12 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/ws/MessageInflater.kt
import java.io.Closeable import java.io.IOException import java.util.zip.Inflater import okio.Buffer import okio.InflaterSource private const val OCTETS_TO_ADD_BEFORE_INFLATION = 0x0000ffff class MessageInflater( private val noContextTakeover: Boolean, ) : Closeable { private val deflatedBytes = Buffer() private val inflater = Inflater( // nowrap (omits zlib header): true, )
Registered: 2024-06-16 04:42 - Last Modified: 2024-01-08 01:13 - 1.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt
import okio.ByteString.Companion.encodeUtf8 import org.junit.jupiter.api.Test internal class MessageDeflaterInflaterTest { @Test fun `inflate golden value`() { val inflater = MessageInflater(false) val message = "f248cdc9c957c8cc4bcb492cc9cccf530400".decodeHex() assertThat(inflater.inflate(message)).isEqualTo("Hello inflation!".encodeUtf8()) } /**
Registered: 2024-06-16 04:42 - Last Modified: 2024-01-06 05:31 - 5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketReader.kt
} readMessage() if (readingCompressedMessage) { val messageInflater = this.messageInflater ?: MessageInflater(noContextTakeover).also { this.messageInflater = it } messageInflater.inflate(messageFrameBuffer) } if (opcode == OPCODE_TEXT) { frameCallback.onReadMessage(messageFrameBuffer.readUtf8())
Registered: 2024-06-16 04:42 - Last Modified: 2024-01-08 01:13 - 9.8K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilJvm.kt
* detail is invisible to the caller, but subtle use of certain APIs may depend on these internal * structures. * * We make such subtle calls in [okhttp3.internal.ws.MessageInflater] because we try to read a * compressed stream that is terminated in a web socket frame even though the DEFLATE stream is * not terminated. *
Registered: 2024-06-16 04:42 - Last Modified: 2024-04-11 22:09 - 4.3K bytes - Viewed (0)