Home
last modified time | relevance | path

Searched refs:CodedInputStream (Results 1 – 25 of 238) sorted by relevance

12345678910

/external/protobuf/csharp/src/Google.Protobuf.Test/
DCodedInputStreamTest.cs62 CodedInputStream input = new CodedInputStream(data); in AssertReadVarint()
65 input = new CodedInputStream(data); in AssertReadVarint()
72 input = new CodedInputStream(new SmallBlockInputStream(data, bufferSize)); in AssertReadVarint()
75 input = new CodedInputStream(new SmallBlockInputStream(data, bufferSize)); in AssertReadVarint()
87 Assert.AreEqual((uint) value, CodedInputStream.ReadRawVarint32(memoryStream)); in AssertReadVarint()
98 CodedInputStream input = new CodedInputStream(data); in AssertReadVarintFailure()
102 input = new CodedInputStream(data); in AssertReadVarintFailure()
107 …exception = Assert.Throws<InvalidProtocolBufferException>(() => CodedInputStream.ReadRawVarint32(n… in AssertReadVarintFailure()
155 CodedInputStream input = new CodedInputStream(data); in AssertReadLittleEndian32()
162 input = new CodedInputStream( in AssertReadLittleEndian32()
[all …]
DCodedOutputStreamTest.cs250 … Assert.AreEqual(0, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(0))); in RoundTripZigZag32()
251 … Assert.AreEqual(1, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(1))); in RoundTripZigZag32()
252 … Assert.AreEqual(-1, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(-1))); in RoundTripZigZag32()
253 … Assert.AreEqual(14927, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(14927))); in RoundTripZigZag32()
254 … Assert.AreEqual(-3612, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(-3612))); in RoundTripZigZag32()
260 … Assert.AreEqual(0, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(0))); in RoundTripZigZag64()
261 … Assert.AreEqual(1, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(1))); in RoundTripZigZag64()
262 … Assert.AreEqual(-1, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(-1))); in RoundTripZigZag64()
263 … Assert.AreEqual(14927, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(14927))); in RoundTripZigZag64()
264 … Assert.AreEqual(-3612, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(-3612))); in RoundTripZigZag64()
[all …]
/external/protobuf/java/core/src/test/java/com/google/protobuf/
DCodedInputStreamTest.java95 private void assertDataConsumed(byte[] data, CodedInputStream input) in assertDataConsumed()
106 CodedInputStream input = CodedInputStream.newInstance(data); in assertReadVarint()
110 input = CodedInputStream.newInstance(data); in assertReadVarint()
114 input = CodedInputStream.newInstance(data); in assertReadVarint()
118 input = CodedInputStream.newInstance(data); in assertReadVarint()
124 input = CodedInputStream.newInstance( in assertReadVarint()
129 input = CodedInputStream.newInstance( in assertReadVarint()
134 input = CodedInputStream.newInstance( in assertReadVarint()
139 input = CodedInputStream.newInstance( in assertReadVarint()
151 assertEquals((int) value, CodedInputStream.readRawVarint32(rawInput)); in assertReadVarint()
[all …]
DUnknownFieldSetLiteTest.java63 CodedInputStream input = CodedInputStream.newInstance(foo.toByteArray()); in testMergeFieldFrom()
76 CodedInputStream input = CodedInputStream.newInstance(foo.toByteArray()); in testSerializedSize()
88 CodedInputStream input = in testMergeVarintField()
89 CodedInputStream.newInstance(toByteString(unknownFields).toByteArray()); in testMergeVarintField()
102 CodedInputStream input = in testMergeVarintField_negative()
103 CodedInputStream.newInstance(toByteString(builder).toByteArray()); in testMergeVarintField_negative()
131 CodedInputStream input = in testMutableCopyOf()
132 CodedInputStream.newInstance(toByteString(unknownFields).toByteArray()); in testMutableCopyOf()
274 unknownFields.mergeFieldFrom(1, CodedInputStream.newInstance(new byte[0])); in testMakeImmutable()
DCodedOutputStreamTest.java295 assertEquals(0, CodedOutputStream.encodeZigZag32(CodedInputStream.decodeZigZag32(0))); in testEncodeZigZag()
296 assertEquals(1, CodedOutputStream.encodeZigZag32(CodedInputStream.decodeZigZag32(1))); in testEncodeZigZag()
297 assertEquals(-1, CodedOutputStream.encodeZigZag32(CodedInputStream.decodeZigZag32(-1))); in testEncodeZigZag()
298 assertEquals(14927, CodedOutputStream.encodeZigZag32(CodedInputStream.decodeZigZag32(14927))); in testEncodeZigZag()
299 assertEquals(-3612, CodedOutputStream.encodeZigZag32(CodedInputStream.decodeZigZag32(-3612))); in testEncodeZigZag()
301 assertEquals(0, CodedOutputStream.encodeZigZag64(CodedInputStream.decodeZigZag64(0))); in testEncodeZigZag()
302 assertEquals(1, CodedOutputStream.encodeZigZag64(CodedInputStream.decodeZigZag64(1))); in testEncodeZigZag()
303 assertEquals(-1, CodedOutputStream.encodeZigZag64(CodedInputStream.decodeZigZag64(-1))); in testEncodeZigZag()
304 assertEquals(14927, CodedOutputStream.encodeZigZag64(CodedInputStream.decodeZigZag64(14927))); in testEncodeZigZag()
305 assertEquals(-3612, CodedOutputStream.encodeZigZag64(CodedInputStream.decodeZigZag64(-3612))); in testEncodeZigZag()
[all …]
/external/protobuf/src/google/protobuf/io/
Dcoded_stream.h145 class CodedInputStream; variable
159 class LIBPROTOBUF_EXPORT CodedInputStream {
162 explicit CodedInputStream(ZeroCopyInputStream* input);
167 explicit CodedInputStream(const uint8* buffer, int size);
174 ~CodedInputStream();
408 std::pair<CodedInputStream::Limit, int> IncrementRecursionDepthAndPushLimit(
510 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CodedInputStream);
845 inline bool CodedInputStream::ReadVarint32(uint32* value) { in ReadVarint32()
860 inline bool CodedInputStream::ReadVarint64(uint64* value) { in ReadVarint64()
872 inline const uint8* CodedInputStream::ReadLittleEndian32FromArray( in ReadLittleEndian32FromArray()
[all …]
Dcoded_stream.cc75 CodedInputStream::~CodedInputStream() { in ~CodedInputStream()
86 int CodedInputStream::default_recursion_limit_ = 100;
93 void CodedInputStream::BackUpInputToCurrentPosition() { in BackUpInputToCurrentPosition()
106 inline void CodedInputStream::RecomputeBufferLimits() { in RecomputeBufferLimits()
119 CodedInputStream::Limit CodedInputStream::PushLimit(int byte_limit) { in PushLimit()
144 void CodedInputStream::PopLimit(Limit limit) { in PopLimit()
155 std::pair<CodedInputStream::Limit, int>
156 CodedInputStream::IncrementRecursionDepthAndPushLimit(int byte_limit) { in IncrementRecursionDepthAndPushLimit()
160 CodedInputStream::Limit CodedInputStream::ReadLengthAndPushLimit() { in ReadLengthAndPushLimit()
165 bool CodedInputStream::DecrementRecursionDepthAndPopLimit(Limit limit) { in DecrementRecursionDepthAndPopLimit()
[all …]
Dcoded_stream_unittest.cc197 CodedInputStream coded_input(&input); in TEST_2D()
212 CodedInputStream coded_input(&input); in TEST_2D()
246 CodedInputStream input(&in); in TEST_F()
259 CodedInputStream coded_input(&input); in TEST_1D()
293 CodedInputStream::ExpectTagFromArray(buffer_, in TEST_1D()
296 CodedInputStream::ExpectTagFromArray(buffer_, expected_value)); in TEST_1D()
299 CodedInputStream::ExpectTagFromArray(buffer_, expected_value)); in TEST_1D()
308 CodedInputStream coded_input(&input); in TEST_2D()
392 CodedInputStream coded_input(&input); in TEST_2D()
442 CodedInputStream coded_input(&input); in TEST_2D()
[all …]
/external/protobuf/src/google/protobuf/
Dwire_format_lite_inl.h62 io::CodedInputStream* input,
71 io::CodedInputStream* input,
80 io::CodedInputStream* input,
86 io::CodedInputStream* input,
92 io::CodedInputStream* input,
101 io::CodedInputStream* input,
110 io::CodedInputStream* input,
116 io::CodedInputStream* input,
122 io::CodedInputStream* input,
131 io::CodedInputStream* input,
[all …]
Dmessage_lite.cc106 io::CodedInputStream* input, MessageLite* message);
108 io::CodedInputStream* input, MessageLite* message);
110 io::CodedInputStream* input, MessageLite* message);
116 inline bool InlineMergeFromCodedStream(io::CodedInputStream* input, in InlineMergeFromCodedStream()
126 inline bool InlineParseFromCodedStream(io::CodedInputStream* input, in InlineParseFromCodedStream()
132 inline bool InlineParsePartialFromCodedStream(io::CodedInputStream* input, in InlineParsePartialFromCodedStream()
140 io::CodedInputStream input(reinterpret_cast<const uint8*>(data), size); in InlineParseFromArray()
147 io::CodedInputStream input(reinterpret_cast<const uint8*>(data), size); in InlineParsePartialFromArray()
163 bool MessageLite::MergeFromCodedStream(io::CodedInputStream* input) { in MergeFromCodedStream()
167 bool MessageLite::ParseFromCodedStream(io::CodedInputStream* input) { in ParseFromCodedStream()
[all …]
Dwire_format.h57 class CodedInputStream; // coded_stream.h variable
106 static bool ParseAndMergePartial(io::CodedInputStream* input,
133 static bool SkipField(io::CodedInputStream* input, uint32 tag,
138 static bool SkipMessage(io::CodedInputStream* input,
143 static bool ReadPackedEnumPreserveUnknowns(io::CodedInputStream* input,
197 io::CodedInputStream* input);
215 io::CodedInputStream* input,
251 static bool SkipMessageSetField(io::CodedInputStream* input,
259 io::CodedInputStream* input);
272 virtual bool SkipField(io::CodedInputStream* input, uint32 tag);
[all …]
Dwire_format_lite.cc122 io::CodedInputStream* input, uint32 tag) { in SkipField()
167 io::CodedInputStream* input, uint32 tag, io::CodedOutputStream* output) { in SkipField()
223 bool WireFormatLite::SkipMessage(io::CodedInputStream* input) { in SkipMessage()
242 bool WireFormatLite::SkipMessage(io::CodedInputStream* input, in SkipMessage()
264 io::CodedInputStream* input, uint32 tag) { in SkipField()
268 bool FieldSkipper::SkipMessage(io::CodedInputStream* input) { in SkipMessage()
278 io::CodedInputStream* input, uint32 tag) { in SkipField()
282 bool CodedOutputStreamFieldSkipper::SkipMessage(io::CodedInputStream* input) { in SkipMessage()
292 bool WireFormatLite::ReadPackedEnumNoInline(io::CodedInputStream* input, in ReadPackedEnumNoInline()
297 io::CodedInputStream::Limit limit = input->PushLimit(length); in ReadPackedEnumNoInline()
[all …]
Dmessage_lite.h49 class CodedInputStream; variable
141 bool ParseFromCodedStream(io::CodedInputStream* input);
144 bool ParsePartialFromCodedStream(io::CodedInputStream* input);
186 bool MergeFromCodedStream(io::CodedInputStream* input);
193 virtual bool MergePartialFromCodedStream(io::CodedInputStream* input) = 0;
Dwire_format_lite.h164 static bool SkipField(io::CodedInputStream* input, uint32 tag);
169 static bool SkipField(io::CodedInputStream* input, uint32 tag,
175 static bool SkipMessage(io::CodedInputStream* input);
179 static bool SkipMessage(io::CodedInputStream* input,
242 #define input io::CodedInputStream* input_arg
528 google::protobuf::io::CodedInputStream* input,
533 static bool ReadPackedFixedSizePrimitive(google::protobuf::io::CodedInputStream* input,
552 virtual bool SkipField(io::CodedInputStream* input, uint32 tag);
556 virtual bool SkipMessage(io::CodedInputStream* input);
573 virtual bool SkipField(io::CodedInputStream* input, uint32 tag);
[all …]
/external/protobuf/java/core/src/main/java/com/google/protobuf/
DAbstractMessageLite.java139 public BuilderType mergeFrom(final CodedInputStream input) throws IOException { in mergeFrom()
146 final CodedInputStream input, final ExtensionRegistryLite extensionRegistry) in mergeFrom()
152 final CodedInputStream input = data.newCodedInput(); in mergeFrom()
170 final CodedInputStream input = data.newCodedInput(); in mergeFrom()
192 final CodedInputStream input = in mergeFrom()
193 CodedInputStream.newInstance(data, off, len); in mergeFrom()
220 final CodedInputStream input = in mergeFrom()
221 CodedInputStream.newInstance(data, off, len); in mergeFrom()
236 final CodedInputStream codedInput = CodedInputStream.newInstance(input); in mergeFrom()
245 final CodedInputStream codedInput = CodedInputStream.newInstance(input); in mergeFrom()
[all …]
DAbstractParser.java82 public MessageType parsePartialFrom(CodedInputStream input) in parsePartialFrom()
88 public MessageType parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) in parseFrom()
95 public MessageType parseFrom(CodedInputStream input) throws InvalidProtocolBufferException { in parseFrom()
104 CodedInputStream input = data.newCodedInput(); in parsePartialFrom()
138 CodedInputStream input = CodedInputStream.newInstance(data, off, len); in parsePartialFrom()
196 CodedInputStream codedInput = CodedInputStream.newInstance(input); in parsePartialFrom()
233 size = CodedInputStream.readRawVarint32(firstByte, input); in parsePartialDelimitedFrom()
DParser.java62 public MessageType parseFrom(CodedInputStream input) in parseFrom()
71 public MessageType parseFrom(CodedInputStream input, in parseFrom()
80 public MessageType parsePartialFrom(CodedInputStream input) in parsePartialFrom()
88 public MessageType parsePartialFrom(CodedInputStream input, in parsePartialFrom()
DWireFormat.java182 Object readString(CodedInputStream input) throws IOException { in readString()
189 Object readString(CodedInputStream input) throws IOException { in readString()
196 Object readString(CodedInputStream input) throws IOException { in readString()
202 abstract Object readString(CodedInputStream input) throws IOException; in readString()
220 CodedInputStream input, in readPrimitiveField()
DUnknownFieldSet.java246 public static UnknownFieldSet parseFrom(final CodedInputStream input) in parseFrom()
505 public Builder mergeFrom(final CodedInputStream input) throws IOException { in mergeFrom()
520 public boolean mergeFieldFrom(final int tag, final CodedInputStream input) in mergeFieldFrom()
557 final CodedInputStream input = data.newCodedInput(); in mergeFrom()
578 final CodedInputStream input = CodedInputStream.newInstance(data); in mergeFrom()
598 final CodedInputStream codedInput = CodedInputStream.newInstance(input); in mergeFrom()
610 final int size = CodedInputStream.readRawVarint32(firstByte, input); in mergeDelimitedFrom()
624 public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) in mergeFrom()
640 final CodedInputStream input = in mergeFrom()
641 CodedInputStream.newInstance(data, off, len); in mergeFrom()
[all …]
DCodedInputStream.java53 public final class CodedInputStream { class
57 public static CodedInputStream newInstance(final InputStream input) { in newInstance()
58 return new CodedInputStream(input, BUFFER_SIZE); in newInstance()
64 static CodedInputStream newInstance(final InputStream input, int bufferSize) { in newInstance()
65 return new CodedInputStream(input, bufferSize); in newInstance()
71 public static CodedInputStream newInstance(final byte[] buf) { in newInstance()
78 public static CodedInputStream newInstance(final byte[] buf, final int off, in newInstance()
86 static CodedInputStream newInstance( in newInstance()
88 CodedInputStream result = new CodedInputStream(buf, off, len, bufferIsImmutable); in newInstance()
119 public static CodedInputStream newInstance(ByteBuffer buf) { in newInstance()
[all …]
/external/protobuf/csharp/src/Google.Protobuf/
DMessageExtensions.cs51 CodedInputStream input = new CodedInputStream(data); in MergeFrom()
65 CodedInputStream input = data.CreateCodedInput(); in MergeFrom()
79 CodedInputStream codedInput = new CodedInputStream(input); in MergeFrom()
97 int size = (int) CodedInputStream.ReadRawVarint32(input); in MergeDelimitedFrom()
DCodedInputStream.cs54 public sealed class CodedInputStream : IDisposable class
124 …public CodedInputStream(byte[] buffer) : this(null, ProtoPreconditions.CheckNotNull(buffer, "buffe… in CodedInputStream() method in Google.Protobuf.CodedInputStream
131 public CodedInputStream(byte[] buffer, int offset, int length) in CodedInputStream() method in Google.Protobuf.CodedInputStream
149 public CodedInputStream(Stream input) : this(input, false) in CodedInputStream() method in Google.Protobuf.CodedInputStream
160 public CodedInputStream(Stream input, bool leaveOpen) in CodedInputStream() method in Google.Protobuf.CodedInputStream
170 internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize) in CodedInputStream() method in Google.Protobuf.CodedInputStream
188 …internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize, int sizeLimi… in CodedInputStream() method in Google.Protobuf.CodedInputStream
218 … public static CodedInputStream CreateWithLimits(Stream input, int sizeLimit, int recursionLimit) in CreateWithLimits()
220 … return new CodedInputStream(input, new byte[BufferSize], 0, 0, sizeLimit, recursionLimit); in CreateWithLimits()
/external/tensorflow/tensorflow/core/distributed_runtime/
Dtensor_coding.cc84 protobuf::io::CodedInputStream input(source->contents()); in ParseFrom()
123 bool ReadVarintSizeAsInt(protobuf::io::CodedInputStream* input, int* result) { in ReadVarintSizeAsInt()
133 bool ReadNestedMessage(protobuf::io::CodedInputStream* input, in ReadNestedMessage()
137 std::pair<protobuf::io::CodedInputStream::Limit, int> p = in ReadNestedMessage()
148 protobuf::io::CodedInputStream* input, TensorProto* tensor_meta) { in ParseTensorSubmessage()
220 protobuf::io::CodedInputStream input(source->contents()); in ParseFast()
235 std::pair<protobuf::io::CodedInputStream::Limit, int> p = in ParseFast()
/external/protobuf/csharp/src/Google.Protobuf.Test/Collections/
DRepeatedFieldTest.cs241 var input = new CodedInputStream(stream); in AddEntriesFrom_PackedInt32()
267 var input = new CodedInputStream(stream); in AddEntriesFrom_NonPackedInt32()
290 var input = new CodedInputStream(stream); in AddEntriesFrom_String()
314 var input = new CodedInputStream(stream); in AddEntriesFrom_Message()
332 var input = new CodedInputStream(stream); in WriteTo_PackedInt32()
353 var input = new CodedInputStream(stream); in WriteTo_NonPackedInt32()
374 var input = new CodedInputStream(stream); in WriteTo_String()
397 var input = new CodedInputStream(stream); in WriteTo_Message()
458 CodedInputStream input = new CodedInputStream(bytes); in TestNegativeEnumArray()
496 CodedInputStream input = new CodedInputStream(bytes); in TestNegativeEnumPackedArray()
/external/grpc-grpc-java/protobuf-lite/src/main/java/io/grpc/protobuf/lite/
DProtoLiteUtils.java22 import com.google.protobuf.CodedInputStream;
172 CodedInputStream cis = null; in parse()
199 cis = CodedInputStream.newInstance(buf, 0, size); in parse()
208 cis = CodedInputStream.newInstance(stream); in parse()
222 private T parseFrom(CodedInputStream stream) throws InvalidProtocolBufferException { in parseFrom()

12345678910