Home
last modified time | relevance | path

Searched refs:wire_format (Results 1 – 25 of 41) sorted by relevance

12

/external/protobuf/python/compatibility_tests/v2.5.0/tests/google/protobuf/internal/
Dwire_format_test.py39 from google.protobuf.internal import wire_format
48 wire_format.PackTag(field_number, tag_type))
49 PackTag = wire_format.PackTag
59 field_number, wire_type = wire_format.UnpackTag(
60 wire_format.PackTag(expected_field_number, expected_wire_type))
64 self.assertRaises(TypeError, wire_format.UnpackTag, None)
65 self.assertRaises(TypeError, wire_format.UnpackTag, 'abc')
66 self.assertRaises(TypeError, wire_format.UnpackTag, 0.0)
67 self.assertRaises(TypeError, wire_format.UnpackTag, object())
70 Z = wire_format.ZigZagEncode
[all …]
/external/protobuf/python/google/protobuf/internal/
Dwire_format_test.py43 from google.protobuf.internal import wire_format
52 wire_format.PackTag(field_number, tag_type))
53 PackTag = wire_format.PackTag
63 field_number, wire_type = wire_format.UnpackTag(
64 wire_format.PackTag(expected_field_number, expected_wire_type))
68 self.assertRaises(TypeError, wire_format.UnpackTag, None)
69 self.assertRaises(TypeError, wire_format.UnpackTag, 'abc')
70 self.assertRaises(TypeError, wire_format.UnpackTag, 0.0)
71 self.assertRaises(TypeError, wire_format.UnpackTag, object())
74 Z = wire_format.ZigZagEncode
[all …]
Dtype_checkers.py57 from google.protobuf.internal import wire_format
288 _FieldDescriptor.TYPE_DOUBLE: wire_format.DoubleByteSize,
289 _FieldDescriptor.TYPE_FLOAT: wire_format.FloatByteSize,
290 _FieldDescriptor.TYPE_INT64: wire_format.Int64ByteSize,
291 _FieldDescriptor.TYPE_UINT64: wire_format.UInt64ByteSize,
292 _FieldDescriptor.TYPE_INT32: wire_format.Int32ByteSize,
293 _FieldDescriptor.TYPE_FIXED64: wire_format.Fixed64ByteSize,
294 _FieldDescriptor.TYPE_FIXED32: wire_format.Fixed32ByteSize,
295 _FieldDescriptor.TYPE_BOOL: wire_format.BoolByteSize,
296 _FieldDescriptor.TYPE_STRING: wire_format.StringByteSize,
[all …]
Ddecoder.py96 from google.protobuf.internal import wire_format
343 return _SimpleDecoder(wire_format.WIRETYPE_FIXED32, InnerDecode)
383 return _SimpleDecoder(wire_format.WIRETYPE_FIXED64, InnerDecode)
420 wire_format.WIRETYPE_VARINT)
434 tag_bytes = encoder.TagBytes(field_number, wire_format.WIRETYPE_VARINT)
497 wire_format.WIRETYPE_VARINT)
509 wire_format.WIRETYPE_VARINT, _DecodeSignedVarint32)
512 wire_format.WIRETYPE_VARINT, _DecodeSignedVarint)
514 UInt32Decoder = _SimpleDecoder(wire_format.WIRETYPE_VARINT, _DecodeVarint32)
515 UInt64Decoder = _SimpleDecoder(wire_format.WIRETYPE_VARINT, _DecodeVarint)
[all …]
Dencoder.py73 from google.protobuf.internal import wire_format
115 return _VarintSize(wire_format.PackTag(field_number, 0))
222 _SignedVarintSize, wire_format.ZigZagEncode)
422 _VarintBytes(wire_format.PackTag(field_number, wire_type)))
442 tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED)
476 tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED)
517 tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED)
583 tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED)
625 wire_format.WIRETYPE_VARINT, _EncodeSignedVarint, _SignedVarintSize)
628 wire_format.WIRETYPE_VARINT, _EncodeVarint, _VarintSize)
[all …]
Dpython_message.py71 from google.protobuf.internal import wire_format
290 wire_format.IsTypePackable(field_descriptor.type))
354 if is_repeated and wire_format.IsTypePackable(field_descriptor.type):
357 AddDecoder(wire_format.WIRETYPE_LENGTH_DELIMITED, True)
1176 field_number, wire_type = wire_format.UnpackTag(tag)
/external/chromium-trace/catapult/common/py_trace_event/third_party/protobuf/
Dencoder.py34 import wire_format
115 return _VarintBytes(wire_format.PackTag(field_number, wire_type))
131 tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED)
200 tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED)
237 wire_format.WIRETYPE_VARINT, _EncodeSignedVarint, _SignedVarintSize)
240 wire_format.WIRETYPE_VARINT, _EncodeVarint, _VarintSize)
242 FloatEncoder = _FloatingPointEncoder(wire_format.WIRETYPE_FIXED32, '<f')
244 DoubleEncoder = _FloatingPointEncoder(wire_format.WIRETYPE_FIXED64, '<d')
253 tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED)
265 tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_VARINT)
[all …]
/external/rust/crates/protobuf/src/
Dcoded_output_stream.rs4 use crate::wire_format;
219 wire_type: wire_format::WireType, in write_tag()
221 self.write_raw_varint32(wire_format::Tag::make(field_number, wire_type).value()) in write_tag()
280 self.write_tag(field_number, wire_format::WireTypeFixed32)?; in write_float()
287 self.write_tag(field_number, wire_format::WireTypeFixed64)?; in write_double()
372 self.write_tag(field_number, wire_format::WireTypeVarint)?; in write_uint64()
379 self.write_tag(field_number, wire_format::WireTypeVarint)?; in write_uint32()
386 self.write_tag(field_number, wire_format::WireTypeVarint)?; in write_int64()
393 self.write_tag(field_number, wire_format::WireTypeVarint)?; in write_int32()
400 self.write_tag(field_number, wire_format::WireTypeVarint)?; in write_sint64()
[all …]
Dunknown.rs2 use crate::wire_format;
30 pub fn wire_type(&self) -> wire_format::WireType { in wire_type()
71 pub fn wire_type(&self) -> wire_format::WireType { in wire_type()
73 UnknownValueRef::Fixed32(_) => wire_format::WireTypeFixed32, in wire_type()
74 UnknownValueRef::Fixed64(_) => wire_format::WireTypeFixed64, in wire_type()
75 UnknownValueRef::Varint(_) => wire_format::WireTypeVarint, in wire_type()
76 UnknownValueRef::LengthDelimited(_) => wire_format::WireTypeLengthDelimited, in wire_type()
Dcoded_input_stream.rs23 use crate::wire_format;
273 pub fn read_tag(&mut self) -> ProtobufResult<wire_format::Tag> { in read_tag()
275 match wire_format::Tag::new(v) { in read_tag()
283 pub fn read_tag_unpack(&mut self) -> ProtobufResult<(u32, wire_format::WireType)> { in read_tag_unpack()
572 wire_type: wire_format::WireType, in read_unknown()
575 wire_format::WireTypeVarint => { in read_unknown()
578 wire_format::WireTypeFixed64 => self.read_fixed64().map(|v| UnknownValue::Fixed64(v)), in read_unknown()
579 wire_format::WireTypeFixed32 => self.read_fixed32().map(|v| UnknownValue::Fixed32(v)), in read_unknown()
580 wire_format::WireTypeLengthDelimited => { in read_unknown()
592 pub fn skip_field(&mut self, wire_type: wire_format::WireType) -> ProtobufResult<()> { in skip_field()
Ddescriptor.rs111 os.write_tag(1, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
672 my_size += crate::rt::value_size(10, *value, crate::wire_format::WireTypeVarint); in compute_size()
675 my_size += crate::rt::value_size(11, *value, crate::wire_format::WireTypeVarint); in compute_size()
726 os.write_tag(4, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
731 os.write_tag(5, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
736 os.write_tag(6, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
741 os.write_tag(7, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
746 os.write_tag(8, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
751 os.write_tag(9, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
1341 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
[all …]
Dplugin.rs152 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
159 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
166 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
188 my_size += crate::rt::value_size(1, v, crate::wire_format::WireTypeVarint); in compute_size()
191 my_size += crate::rt::value_size(2, v, crate::wire_format::WireTypeVarint); in compute_size()
194 my_size += crate::rt::value_size(3, v, crate::wire_format::WireTypeVarint); in compute_size()
527 os.write_tag(15, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
532 os.write_tag(3, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
754 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
779 my_size += crate::rt::value_size(2, v, crate::wire_format::WireTypeVarint); in compute_size()
[all …]
Drt.rs28 use crate::wire_format;
29 use crate::wire_format::WireType;
183 wire_format::Tag::make(field_number, WireType::WireTypeFixed64) in tag_size()
804 if wire_type == wire_format::WireTypeEndGroup { in skip_group()
820 wire_format::WireTypeStartGroup => skip_group(is), in read_unknown_or_skip_group()
Dlib.rs51 pub mod wire_format; module
/external/chromium-trace/catapult/common/py_trace_event/py_trace_event/trace_event_impl/
Dperfetto_proto_classes.py19 import wire_format
38 tag = encoder.TagBytes(5, wire_format.WIRETYPE_LENGTH_DELIMITED)
43 tag = encoder.TagBytes(6, wire_format.WIRETYPE_LENGTH_DELIMITED)
54 tag = encoder.TagBytes(11, wire_format.WIRETYPE_LENGTH_DELIMITED)
59 tag = encoder.TagBytes(12, wire_format.WIRETYPE_LENGTH_DELIMITED)
67 tag = encoder.TagBytes(44, wire_format.WIRETYPE_LENGTH_DELIMITED)
72 tag = encoder.TagBytes(48, wire_format.WIRETYPE_LENGTH_DELIMITED)
91 tag = encoder.TagBytes(1, wire_format.WIRETYPE_LENGTH_DELIMITED)
96 tag = encoder.TagBytes(2, wire_format.WIRETYPE_LENGTH_DELIMITED)
150 tag = encoder.TagBytes(2, wire_format.WIRETYPE_LENGTH_DELIMITED)
[all …]
/external/vm_tools/p9/src/protocol/
Dmod.rs6 mod wire_format; module
9 pub use self::wire_format::{Data, WireFormat};
/external/rust/crates/protobuf/src/well_known_types/
Dduration.rs87 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
94 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
113 my_size += crate::rt::value_size(1, self.seconds, crate::wire_format::WireTypeVarint); in compute_size()
116 my_size += crate::rt::value_size(2, self.nanos, crate::wire_format::WireTypeVarint); in compute_size()
Dtimestamp.rs87 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
94 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
113 my_size += crate::rt::value_size(1, self.seconds, crate::wire_format::WireTypeVarint); in compute_size()
116 my_size += crate::rt::value_size(2, self.nanos, crate::wire_format::WireTypeVarint); in compute_size()
Dstruct_pb.rs456 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
462 if wire_type != crate::wire_format::WireTypeFixed64 { in merge_from()
468 if wire_type != crate::wire_format::WireTypeLengthDelimited { in merge_from()
474 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
480 if wire_type != crate::wire_format::WireTypeLengthDelimited { in merge_from()
486 if wire_type != crate::wire_format::WireTypeLengthDelimited { in merge_from()
548 os.write_tag(5, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
553 os.write_tag(6, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
754 os.write_tag(1, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
Dtype_pb.rs285 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
293 os.write_tag(4, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
298 os.write_tag(5, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
669 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
682 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
689 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
723 my_size += crate::rt::value_size(3, self.number, crate::wire_format::WireTypeVarint); in compute_size()
732 … my_size += crate::rt::value_size(7, self.oneof_index, crate::wire_format::WireTypeVarint); in compute_size()
775 os.write_tag(9, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
1305 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
[all …]
Dwrappers.rs71 if wire_type != crate::wire_format::WireTypeFixed64 { in merge_from()
226 if wire_type != crate::wire_format::WireTypeFixed32 { in merge_from()
381 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
400 my_size += crate::rt::value_size(1, self.value, crate::wire_format::WireTypeVarint); in compute_size()
536 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
555 my_size += crate::rt::value_size(1, self.value, crate::wire_format::WireTypeVarint); in compute_size()
691 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
710 my_size += crate::rt::value_size(1, self.value, crate::wire_format::WireTypeVarint); in compute_size()
846 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
865 my_size += crate::rt::value_size(1, self.value, crate::wire_format::WireTypeVarint); in compute_size()
[all …]
Dapi.rs324 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
329 os.write_tag(3, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
337 os.write_tag(5, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
342 os.write_tag(6, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
660 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
670 if wire_type != crate::wire_format::WireTypeVarint { in merge_from()
738 os.write_tag(6, crate::wire_format::WireTypeLengthDelimited)?; in write_to_with_cached_sizes()
/external/protobuf/conformance/
Dconformance_test.cc346 WireFormat wire_format) { in WireFormatToString() argument
347 switch (wire_format) { in WireFormatToString()
360 << wire_format; in WireFormatToString()
/external/rust/crates/protobuf-codegen/src/field/
Dmod.rs5 use protobuf::wire_format;
65 fn field_type_wire_type(field_type: FieldDescriptorProto_Type) -> wire_format::WireType { in field_type_wire_type()
66 use protobuf::wire_format::*; in field_type_wire_type()
124 t if field_type_wire_type(t) == wire_format::WireTypeFixed32 => Some(4), in field_type_size()
125 t if field_type_wire_type(t) == wire_format::WireTypeFixed64 => Some(8), in field_type_size()
437 wire_type: wire_format::WireType,
1012 wire_format::WireTypeLengthDelimited in write_write_element()
1572 wire_format::WireTypeLengthDelimited in write_message_write_field()
/external/pigweed/pw_protobuf/
DBUILD44 "public/pw_protobuf/wire_format.h",

12