- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for Inflates (0.11 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/ws/MessageInflater.kt
/** Inflates [buffer] in place as described in RFC 7692 section 7.2.2. */ @Throws(IOException::class) fun inflate(buffer: Buffer) { require(deflatedBytes.size == 0L) if (noContextTakeover) { inflater.reset() } deflatedBytes.writeAll(buffer) deflatedBytes.writeInt(OCTETS_TO_ADD_BEFORE_INFLATION) val totalBytesToRead = inflater.bytesRead + deflatedBytes.size
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt
@Test fun `inflate deflate`() { val deflater = MessageDeflater(false) val inflater = MessageInflater(false) val goldenValue = "Hello deflate!".repeat(100).encodeUtf8() val deflated = deflater.deflate(goldenValue) assertThat(deflated.size).isLessThan(goldenValue.size) val inflated = inflater.inflate(deflated) assertThat(inflated).isEqualTo(goldenValue) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 06 05:31:00 UTC 2024 - 5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/MessageDeflater.kt
private val deflater = Deflater( Deflater.DEFAULT_COMPRESSION, // nowrap (omits zlib header): true, ) private val deflaterSink = DeflaterSink(deflatedBytes, deflater) /** Deflates [buffer] in place as described in RFC 7692 section 7.2.1. */ @Throws(IOException::class) fun deflate(buffer: Buffer) { require(deflatedBytes.size == 0L) if (noContextTakeover) { deflater.reset()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketExtensions.kt
* responses should be refused as their web socket extensions will not be understood. * * Note that [java.util.zip.Deflater] is hardcoded to use 15 bits (32 KiB) for * `client_max_window_bits` and [java.util.zip.Inflater] is hardcoded to use 15 bits (32 KiB) for * `server_max_window_bits`. This harms our ability to support these parameters: * * * If `client_max_window_bits` is less than 15, OkHttp must close the web socket with code 1010.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketReader.kt
if (readingCompressedMessage) { val messageInflater = this.messageInflater ?: MessageInflater(noContextTakeover).also { this.messageInflater = it } messageInflater.inflate(messageFrameBuffer) } if (opcode == OPCODE_TEXT) { frameCallback.onReadMessage(messageFrameBuffer.readUtf8()) } else { frameCallback.onReadMessage(messageFrameBuffer.readByteString())
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.8K bytes - Viewed (0) -
docs/changelogs/changelog_4x.md
compresses messages of size 1 KiB and larger. (Inbound messages are compressed or not based on the web socket server's configuration.) * New: Defer constructing `Inflater` and `Deflater` instances until they are needed. This saves memory if web socket compression is negotiated but not used. ## Version 4.5.0-RC1 _2020-03-17_
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 17 13:25:31 UTC 2024 - 25.2K bytes - Viewed (0)