Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for Deflate (0.12 sec)

  1. okhttp/src/test/java/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt

      @Test fun `inflate deflate empty message`() {
        val deflater = MessageDeflater(false)
        val inflater = MessageInflater(false)
    
        val goldenValue = "".encodeUtf8()
    
        val deflated = deflater.deflate(goldenValue)
        assertThat(deflated).isEqualTo("00".decodeHex())
        val inflated = inflater.inflate(deflated)
    
        assertThat(inflated).isEqualTo(goldenValue)
      }
    
      @Test fun `inflate deflate with context takeover`() {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 06 05:31:00 UTC 2024
    - 5K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketExtensions.kt

     * Sec-WebSocket-Extensions: permessage-deflate; client_no_context_takeover
     * Sec-WebSocket-Extensions: permessage-deflate; server_max_window_bits="15"
     * Sec-WebSocket-Extensions: permessage-deflate; server_max_window_bits=15
     * Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover
     * Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover;
     *     client_no_context_takeover
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/ws/WebSocketExtensionsTest.kt

      }
    
      @Test
      fun emptyParameters() {
        assertThat(parse("permessage-deflate;"))
          .isEqualTo(WebSocketExtensions(perMessageDeflate = true))
      }
    
      @Test
      fun repeatedPerMessageDeflate() {
        assertThat(parse("permessage-deflate, permessage-deflate; server_no_context_takeover"))
          .isEqualTo(
            WebSocketExtensions(
              perMessageDeflate = true,
              serverNoContextTakeover = true,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  4. src/archive/zip/example_test.go

    	// Override the default Deflate compressor with a higher compression level.
    
    	// Create a buffer to write our archive to.
    	buf := new(bytes.Buffer)
    
    	// Create a new zip archive.
    	w := zip.NewWriter(buf)
    
    	// Register a custom Deflate compressor.
    	w.RegisterCompressor(zip.Deflate, func(out io.Writer) (io.WriteCloser, error) {
    		return flate.NewWriter(out, flate.BestCompression)
    	})
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Jan 27 00:22:03 UTC 2016
    - 2K bytes
    - Viewed (0)
  5. src/archive/zip/register.go

    	compressors.Store(Deflate, Compressor(func(w io.Writer) (io.WriteCloser, error) { return newFlateWriter(w), nil }))
    
    	decompressors.Store(Store, Decompressor(io.NopCloser))
    	decompressors.Store(Deflate, Decompressor(newFlateReader))
    }
    
    // RegisterDecompressor allows custom decompressors for a specified method ID.
    // The common methods [Store] and [Deflate] are built in.
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Oct 13 18:36:46 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/ws/MessageDeflater.kt

      private val deflatedBytes = Buffer()
    
      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)
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  7. samples/compare/src/test/kotlin/okhttp3/compare/ApacheHttpClientTest.kt

        }
    
        val recorded = server.takeRequest()
        assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
        assertThat(recorded.headers["Accept-Encoding"]).isEqualTo("gzip, x-gzip, deflate")
        assertThat(recorded.headers["Connection"]).isEqualTo("keep-alive")
        assertThat(recorded.headers["User-Agent"]!!).startsWith("Apache-HttpClient/")
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilJvm.kt

       * 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.
       *
       * Use this method to create a degenerate Okio Buffer where each byte is in a separate segment of
       * the internal list.
       */
      @JvmStatic
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_header_param_models/test_tutorial001.py

                            "input": {
                                "x_tag": [],
                                "host": "testserver",
                                "accept": "*/*",
                                "accept-encoding": "gzip, deflate",
                                "connection": "keep-alive",
                                "user-agent": "testclient",
                            },
                        }
                    )
                    | IsDict(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketWriter.kt

        if (perMessageDeflate && data.size >= minimumDeflateSize) {
          val messageDeflater =
            this.messageDeflater
              ?: MessageDeflater(noContextTakeover).also { this.messageDeflater = it }
          messageDeflater.deflate(messageBuffer)
          b0 = b0 or B0_FLAG_RSV1
        }
        val dataSize = messageBuffer.size
        sinkBuffer.writeByte(b0)
    
        var b1 = 0
        if (isClient) {
          b1 = b1 or B1_FLAG_MASK
        }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.9K bytes
    - Viewed (0)
Back to top