Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for encodeLength (0.12 sec)

  1. src/internal/profile/proto.go

    			encodeVarint(b, uint64(u))
    		}
    		n2 := len(b.data)
    		encodeLength(b, tag, n2-n1)
    		n3 := len(b.data)
    		copy(b.tmp[:], b.data[n2:n3])
    		copy(b.data[n1+(n3-n2):], b.data[n1:n2])
    		copy(b.data[n1:], b.tmp[:n3-n2])
    		return
    	}
    	for _, u := range x {
    		encodeInt64(b, tag, u)
    	}
    }
    
    func encodeString(b *buffer, tag int, x string) {
    	encodeLength(b, tag, len(x))
    	b.data = append(b.data, x...)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 17 16:20:57 UTC 2022
    - 6.8K bytes
    - Viewed (0)
  2. src/cmd/vendor/github.com/google/pprof/profile/proto.go

    	m.encode(&b)
    	return b.data
    }
    
    func encodeVarint(b *buffer, x uint64) {
    	for x >= 128 {
    		b.data = append(b.data, byte(x)|0x80)
    		x >>= 7
    	}
    	b.data = append(b.data, byte(x))
    }
    
    func encodeLength(b *buffer, tag int, len int) {
    	encodeVarint(b, uint64(tag)<<3|2)
    	encodeVarint(b, uint64(len))
    }
    
    func encodeUint64(b *buffer, tag int, x uint64) {
    	// append varint to b.data
    	encodeVarint(b, uint64(tag)<<3)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 22 18:58:12 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  3. 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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Thu Jan 04 05:32:07 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  4. 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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  5. 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: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 10 14:11:51 UTC 2023
    - 7K bytes
    - Viewed (0)
  6. 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: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 10 14:11:51 UTC 2023
    - 7K bytes
    - Viewed (0)
Back to top