Home
last modified time | relevance | path

Searched refs:varint (Results 1 – 25 of 104) sorted by relevance

12345

/external/pigweed/pw_protobuf/public/pw_protobuf/
Dserialized_size.h32 inline constexpr size_t kMaxSizeBytesUint32 = varint::kMaxVarint32SizeBytes;
33 inline constexpr size_t kMaxSizeBytesUint64 = varint::kMaxVarint64SizeBytes;
34 inline constexpr size_t kMaxSizeBytesSint32 = varint::kMaxVarint32SizeBytes;
35 inline constexpr size_t kMaxSizeBytesSint64 = varint::kMaxVarint64SizeBytes;
38 inline constexpr size_t kMaxSizeBytesInt32 = varint::kMaxVarint64SizeBytes;
39 inline constexpr size_t kMaxSizeBytesInt64 = varint::kMaxVarint64SizeBytes;
43 inline constexpr size_t kMaxSizeOfFieldKey = varint::kMaxVarint32SizeBytes;
45 inline constexpr size_t kMaxSizeOfLength = varint::kMaxVarint32SizeBytes;
49 return varint::EncodedSize(field_number << kFieldNumberShift); in SizeOfFieldKey()
/external/rust/crates/protobuf/src/
Dunknown.rs39 UnknownValue::Varint(varint) => UnknownValueRef::Varint(varint), in get_ref()
91 pub varint: Vec<u64>, field
102 UnknownValue::Varint(varint) => self.varint.push(varint), in add_value()
114 varint: self.varint.iter(), in iter()
133 varint: slice::Iter<'o, u64>, field
149 let varint = self.varint.next(); in next() localVariable
150 if varint.is_some() { in next()
151 return Some(UnknownValueRef::Varint(*varint.unwrap())); in next()
230 pub fn add_varint(&mut self, number: u32, varint: u64) { in add_varint()
231 self.find_field(&number).varint.push(varint); in add_varint()
Dcoded_output_stream.rs3 use crate::varint;
228 let len = varint::encode_varint32(value, &mut self.buffer[self.position..]); in write_raw_varint32()
234 let len = varint::encode_varint32(value, buf); in write_raw_varint32()
243 let len = varint::encode_varint64(value, &mut self.buffer[self.position..]); in write_raw_varint64()
249 let len = varint::encode_varint64(value, buf); in write_raw_varint64()
365 UnknownValueRef::Varint(varint) => self.write_raw_varint64(varint), in write_unknown_no_tag()
Dtypes.rs215 unknown_values.varint.iter().rev().next().map(|&v| v as i32) in get_from_unknown()
231 unknown_values.varint.iter().rev().next().map(|&v| v as i64) in get_from_unknown()
259 unknown_values.varint.iter().rev().next().map(|&v| v as u32) in get_from_unknown()
287 unknown_values.varint.iter().cloned().rev().next() in get_from_unknown()
483 unknown.varint.iter().rev().next().map(|&v| v != 0) in get_from_unknown()
/external/rust/crates/grpcio-sys/grpc/third_party/upb/tests/pb/
Dtest_decoder.cc201 string varint(uint64_t x) { in varint() function
211 string delim(const string& buf) { return cat(varint(buf.size()), buf); } in delim()
216 string zz32(int32_t x) { return varint(upb_zzenc_32(x)); } in zz32()
217 string zz64(int64_t x) { return varint(upb_zzenc_64(x)); } in zz64()
220 return varint((fieldnum << 3) | wire_type); in tag()
235 return cat(varint(buf.size() + err), buf); in badlen_delim()
657 cat( tag(fieldnum, wire_type), varint(1) )); in test_premature_eof_for_type()
661 cat( tag(rep_fieldnum, wire_type), varint(1) )); in test_premature_eof_for_type()
665 cat( tag(UNKNOWN_FIELD, wire_type), varint(1) )); in test_premature_eof_for_type()
674 varint(incomplete_submsg.size()), in test_premature_eof_for_type()
[all …]
/external/exoplayer/tree/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/
DVarintReader.java148 long varint = varintBytes[0] & 0xFFL; in assembleVarint() local
150 varint &= ~VARINT_LENGTH_MASKS[varintLength - 1]; in assembleVarint()
153 varint = (varint << 8) | (varintBytes[i] & 0xFFL); in assembleVarint()
155 return varint; in assembleVarint()
/external/perfetto/src/tracing/core/
Dpacket_stream_validator.cc82 uint64_t varint = varint_; in Push() local
88 uint64_t field_type = varint & 7; // 7 = 0..0111 in Push()
89 auto field_id = static_cast<uint32_t>(varint >> 3); in Push()
123 if (varint > protozero::proto_utils::kMaxMessageLength) { in Push()
128 return static_cast<size_t>(varint); in Push()
/external/pigweed/pw_protobuf/
Ddecoder.cc52 varint::Decode(proto_, &key); in FieldNumber()
88 *out = varint::ZigZagDecode(value); in ReadSint64()
115 size_t key_size = varint::Decode(proto_, &key); in FieldSize()
127 expected_size = varint::Decode(remainder, &value); in FieldSize()
135 expected_size = varint::Decode(remainder, &value); in FieldSize()
160 size_t bytes_read = varint::Decode(proto_, &key); in ConsumeKey()
180 size_t bytes_read = varint::Decode(proto_, out); in ReadVarint()
217 size_t bytes_read = varint::Decode(proto_, &length); in ReadDelimited()
Dencoder.cc40 size_t written = pw::varint::EncodeLittleEndianBase128(value, varint_buf); in WriteVarint()
164 pw::varint::EncodeLittleEndianBase128(nested_size, varint_buf); in EncodeFrom()
204 std::min(varint::MaxValueInBytes(sizeof(SizeType)), in IncreaseParentSize()
/external/perfetto/src/protozero/filtering/
Dmessage_tokenizer.h100 uint64_t varint = varint_; in Push() local
106 auto field_type = static_cast<uint32_t>(varint & 7u); // 7 = 0..0111 in Push()
107 field_id_ = static_cast<uint32_t>(varint >> 3); in Push()
135 return Token{field_id_, ProtoWireType::kVarInt, varint}; in Push()
139 const auto payload_len = varint; in Push()
/external/pigweed/pw_varint/
Ddocs.rst9 bytes when varint-encoded.
24 Returns the size of an integer when encoded as a varint. Works on both signed
29 Returns the size of a signed integer when ZigZag encoded as a varint.
33 Returns the maximum integer value that can be encoded as a varint into the
DBUILD.gn29 "public/pw_varint/varint.h",
30 "varint.cc",
32 public = [ "public/pw_varint/varint.h" ]
DBUILD28 "varint.cc",
31 "public/pw_varint/varint.h",
/external/protobuf/java/core/src/main/java/com/google/protobuf/
DUnknownFieldSet.java734 return varint; in getVarintList()
778 return new Object[] {varint, fixed32, fixed64, lengthDelimited, group}; in getIdentityArray()
800 for (final long value : varint) { in writeTo()
820 for (final long value : varint) { in getSerializedSize()
851 writer.writeInt64List(fieldNumber, varint, false); in writeTo()
903 private List<Long> varint; field in UnknownFieldSet.Field
932 if (result.varint == null) { in build()
933 result.varint = Collections.emptyList(); in build()
935 result.varint = Collections.unmodifiableList(result.varint); in build()
974 if (!other.varint.isEmpty()) { in mergeFrom()
[all …]
/external/protobuf/conformance/
Dbinary_json_conformance_suite.cc122 string varint(uint64_t x) { in varint() function
140 string delim(const string& buf) { return cat(varint(buf.size()), buf); } in delim()
145 string zz32(int32_t x) { return varint(WireFormatLite::ZigZagEncode32(x)); } in zz32()
146 string zz64(int64_t x) { return varint(WireFormatLite::ZigZagEncode64(x)); } in zz64()
149 return varint((fieldnum << 3) | wire_type); in tag()
544 cat( tag(field->number(), wire_type), varint(1) ), in TestPrematureEOFForType()
549 cat( tag(rep_field->number(), wire_type), varint(1) ), in TestPrematureEOFForType()
555 cat( tag(UNKNOWN_FIELD, wire_type), varint(1) ), in TestPrematureEOFForType()
565 varint(incomplete_submsg.size()), in TestPrematureEOFForType()
575 varint(incomplete.size()), incomplete), in TestPrematureEOFForType()
[all …]
/external/pigweed/pw_ring_buffer/
Dprefixed_entry_ring_buffer.cc89 byte preamble_buf[varint::kMaxVarint32SizeBytes * 2]; in InternalPushBack()
93 varint::Encode<uint32_t>(user_preamble_data, preamble_buf); in InternalPushBack()
95 size_t length_bytes = varint::Encode<uint32_t>( in InternalPushBack()
332 byte varint_buf[varint::kMaxVarint32SizeBytes]; in FrontEntryInfo()
334 RawRead(varint_buf, reader.read_idx, varint::kMaxVarint32SizeBytes); in FrontEntryInfo()
335 user_preamble_bytes = varint::Decode(varint_buf, &user_preamble_data); in FrontEntryInfo()
342 varint::kMaxVarint32SizeBytes); in FrontEntryInfo()
344 size_t length_bytes = varint::Decode(varint_buf, &entry_bytes); in FrontEntryInfo()
/external/pigweed/pw_trace_tokenized/public/pw_trace_tokenized/
Dconfig.h142 (pw::varint::kMaxVarint64SizeBytes) + /* worst case delta time varint */ \
144 (pw::varint::kMaxVarint64SizeBytes) + /* worst case trace id varint */
/external/protobuf/src/google/protobuf/
Dunknown_field_set_unittest.cc147 EXPECT_EQ(all_fields_.optional_int32(), field->varint()); in TEST_F()
188 EXPECT_EQ(all_fields_.optionalgroup().a(), nested_field.varint()); in TEST_F()
341 EXPECT_EQ(654321, destination.unknown_fields().field(0).varint()); in TEST_F()
449 EXPECT_EQ(5, unknown_fields.field(0).varint()); in TEST_F()
453 EXPECT_EQ(4, unknown_fields.field(1).varint()); in TEST_F()
457 EXPECT_EQ(6, unknown_fields.field(2).varint()); in TEST_F()
479 EXPECT_EQ(5, unknown_fields.field(0).varint()); in TEST_F()
483 EXPECT_EQ(4, unknown_fields.field(1).varint()); in TEST_F()
487 EXPECT_EQ(6, unknown_fields.field(2).varint()); in TEST_F()
/external/tensorflow/tensorflow/core/lib/io/
Dinputbuffer_test.cc319 string varint; in TEST() local
321 varint.clear(); in TEST()
322 core::PutVarint32(&varint, number); in TEST()
323 TF_CHECK_OK(file->Append(StringPiece(varint))); in TEST()
359 string varint; in TEST() local
361 varint.clear(); in TEST()
362 core::PutVarint64(&varint, number); in TEST()
363 TF_CHECK_OK(file->Append(StringPiece(varint))); in TEST()
/external/pigweed/pw_hdlc/public/pw_hdlc/internal/
Dprotocol.h31 inline constexpr varint::Format kAddressFormat =
32 varint::Format::kOneTerminatedLeastSignificant;
/external/pigweed/pw_trace_tokenized/
Dtrace.cc113 sizeof(trace_token) + pw::varint::kMaxVarint64SizeBytes + // time in HandleNextItemInQueue()
114 pw::varint::kMaxVarint64SizeBytes; // trace_id in HandleNextItemInQueue()
125 header_size += pw::varint::Encode( in HandleNextItemInQueue()
133 pw::varint::Encode(trace_id, in HandleNextItemInQueue()
/external/rust/crates/grpcio-sys/grpc/third_party/upb/upb/
Dencode.c186 CASE(uint64_t, varint, UPB_WIRE_TYPE_VARINT, val); in encode_scalar()
188 CASE(uint32_t, varint, UPB_WIRE_TYPE_VARINT, val); in encode_scalar()
191 CASE(int32_t, varint, UPB_WIRE_TYPE_VARINT, (int64_t)val); in encode_scalar()
199 CASE(bool, varint, UPB_WIRE_TYPE_VARINT, val); in encode_scalar()
201 CASE(int32_t, varint, UPB_WIRE_TYPE_VARINT, encode_zz32(val)); in encode_scalar()
203 CASE(int64_t, varint, UPB_WIRE_TYPE_VARINT, encode_zz64(val)); in encode_scalar()
/external/pigweed/pw_tokenizer/
Dencode_args.cc42 return varint::Encode(value, std::as_writable_bytes(output)); in EncodeInt()
46 return varint::Encode(value, std::as_writable_bytes(output)); in EncodeInt64()
/external/pigweed/pw_hdlc/
Dencoder.cc72 size_t max_encoded_address_size = varint::EncodedSize(address) * 2; in MaxEncodedSize()
89 varint::Encode(address, metadata_buffer, kAddressFormat); in StartFrame()
/external/python/rsa/doc/
Dreference.rst73 LENGTH := varint-encoded length of the following data, in bytes
77 The varint-format was taken from Google's Protobuf_, and allows us to

12345