- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for encodedLength (0.16 sec)
-
okhttp/src/test/java/okhttp3/internal/http2/HuffmanTest.kt
import assertk.assertThat import assertk.assertions.isEqualTo import java.util.Random import okhttp3.internal.http2.Huffman.decode import okhttp3.internal.http2.Huffman.encode import okhttp3.internal.http2.Huffman.encodedLength import okio.Buffer import okio.ByteString import okio.ByteString.Companion.encodeUtf8 import okio.ByteString.Companion.toByteString import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Jan 04 05:32:07 UTC 2024 - 1.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Huffman.kt
accumulator = accumulator shl (8 - accumulatorBitCount) accumulator = accumulator or (0xffL ushr accumulatorBitCount) sink.writeByte(accumulator.toInt()) } } fun encodedLength(bytes: ByteString): Int { var bitCount = 0L for (i in 0 until bytes.size) { val byteIn = bytes[i] and 0xff bitCount += CODE_BIT_COUNTS[byteIn].toLong() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.3K bytes - Viewed (0) -
guava/src/com/google/common/base/Utf8.java
* time and space. * * @throws IllegalArgumentException if {@code sequence} contains ill-formed UTF-16 (unpaired * surrogates) */ public static int encodedLength(CharSequence sequence) { // Warning to maintainers: this implementation is highly optimized. int utf16Length = sequence.length(); int utf8Length = utf16Length; int i = 0;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 13:00:28 UTC 2024 - 7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Hpack.kt
value = value ushr 7 } out.writeByte(value) } @Throws(IOException::class) fun writeByteString(data: ByteString) { if (useCompression && Huffman.encodedLength(data) < data.size) { val huffmanBuffer = Buffer() Huffman.encode(data, huffmanBuffer) val huffmanBytes = huffmanBuffer.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)