Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for huffmanEncode (0.22 sec)

  1. okhttp/src/test/java/okhttp3/internal/http2/HpackTest.kt

      }
    
      @Test
      fun dynamicTableSizeHasAnUpperBound() {
        hpackWriter!!.resizeHeaderTable(1048576)
        assertThat(hpackWriter!!.maxDynamicTableByteCount).isEqualTo(16384)
      }
    
      @Test
      fun huffmanEncode() {
        hpackWriter = Hpack.Writer(4096, true, bytesOut)
        hpackWriter!!.writeHeaders(headerEntries("foo", "bar"))
        val expected =
          Buffer()
            .writeByte(0x40) // Literal header, new name.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 38.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/Huffman.kt

    import okio.BufferedSink
    import okio.BufferedSource
    import okio.ByteString
    
    /**
     * This class was originally composed from the following classes in
     * [Twitter Hpack][twitter_hpack].
     *
     *  * `com.twitter.hpack.HuffmanEncoder`
     *  * `com.twitter.hpack.HuffmanDecoder`
     *  * `com.twitter.hpack.HpackUtil`
     *
     * [twitter_hpack]: https://github.com/twitter/hpack
     */
    object Huffman {
      // Appendix C: Huffman Codes
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Hpack.kt

          @Throws(IOException::class)
          fun readByteString(): ByteString {
            val firstByte = readByte()
            val huffmanDecode = firstByte and 0x80 == 0x80 // 1NNNNNNN
            val length = readInt(firstByte, PREFIX_7_BITS).toLong()
    
            return if (huffmanDecode) {
              val decodeBuffer = Buffer()
              Huffman.decode(source, length, decodeBuffer)
              decodeBuffer.readByteString()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 22.5K bytes
    - Viewed (0)
Back to top