- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for encodedLength (0.78 sec)
-
android/guava-tests/test/com/google/common/base/Utf8Test.java
// We can't use Character.isSurrogate(c) because of GWT. public void testEncodedLength_validStrings() { assertEquals(0, Utf8.encodedLength("")); assertEquals(11, Utf8.encodedLength("Hello world")); assertEquals(8, Utf8.encodedLength("Résumé")); assertEquals( 461, Utf8.encodedLength( "威廉·莎士比亞(William Shakespeare," + "1564年4月26號—1616年4月23號[1])係隻英國嗰演員、劇作家同詩人,"
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 12.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/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 Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 1.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/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 Sep 05 11:42:10 UTC 2025 - Last Modified: Mon May 05 16:01:00 UTC 2025 - 22.4K bytes - Viewed (0) -
android/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 Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 7K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/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 Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 11K bytes - Viewed (0)