Home
last modified time | relevance | path

Searched refs:CodedOutputStream (Results 1 – 25 of 192) sorted by relevance

12345678

/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/
DCodedOutputStreamTest.java85 CodedOutputStream output = CodedOutputStream.newInstance(rawOutput); in assertWriteVarint()
92 CodedOutputStream.computeRawVarint32Size((int) value)); in assertWriteVarint()
97 CodedOutputStream output = CodedOutputStream.newInstance(rawOutput); in assertWriteVarint()
104 CodedOutputStream.computeRawVarint64Size(value)); in assertWriteVarint()
112 CodedOutputStream output = in assertWriteVarint()
113 CodedOutputStream.newInstance(rawOutput, blockSize); in assertWriteVarint()
121 CodedOutputStream output = in assertWriteVarint()
122 CodedOutputStream.newInstance(rawOutput, blockSize); in assertWriteVarint()
167 CodedOutputStream output = CodedOutputStream.newInstance(rawOutput); in assertWriteLittleEndian32()
175 output = CodedOutputStream.newInstance(rawOutput, blockSize); in assertWriteLittleEndian32()
[all …]
/third_party/protobuf/java/core/src/test/java/com/google/protobuf/
DCodedOutputStreamTest.java33 import com.google.protobuf.CodedOutputStream.OutOfSpaceException;
53 CodedOutputStream stream(); in stream()
61 private final CodedOutputStream stream;
66 stream = CodedOutputStream.newInstance(output, size); in OutputStreamCoder()
70 public CodedOutputStream stream() { in stream()
86 private final CodedOutputStream stream;
91 stream = CodedOutputStream.newInstance(bytes); in ArrayCoder()
95 public CodedOutputStream stream() { in stream()
111 private final CodedOutputStream stream;
123 stream = CodedOutputStream.newInstance(buffer); in NioHeapCoder()
[all …]
DProto2ExtensionLookupSchemaTest.java105 CodedOutputStream.computeUInt32SizeNoTag(TestEnum.ONE_VALUE) in testUnknownEnum()
106 + CodedOutputStream.computeUInt32SizeNoTag(outOfRange) in testUnknownEnum()
107 + CodedOutputStream.computeUInt32SizeNoTag(TestEnum.ONE_VALUE); in testUnknownEnum()
109 CodedOutputStream packedOut = packedBuilder.getCodedOutput(); in testUnknownEnum()
121 CodedOutputStream codedOutput = CodedOutputStream.newInstance(output); in testUnknownEnum()
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/
DCodedOutputStreamTest.cs52 CodedOutputStream output = new CodedOutputStream(rawOutput); in AssertWriteVarint()
57 … Assert.AreEqual(data.Length, CodedOutputStream.ComputeRawVarint32Size((uint) value)); in AssertWriteVarint()
62 CodedOutputStream output = new CodedOutputStream(rawOutput); in AssertWriteVarint()
68 Assert.AreEqual(data.Length, CodedOutputStream.ComputeRawVarint64Size(value)); in AssertWriteVarint()
78 CodedOutputStream output = in AssertWriteVarint()
79 new CodedOutputStream(rawOutput, bufferSize); in AssertWriteVarint()
87 CodedOutputStream output = new CodedOutputStream(rawOutput, bufferSize); in AssertWriteVarint()
137 CodedOutputStream output = new CodedOutputStream(rawOutput); in AssertWriteLittleEndian32()
146 output = new CodedOutputStream(rawOutput, bufferSize); in AssertWriteLittleEndian32()
160 CodedOutputStream output = new CodedOutputStream(rawOutput); in AssertWriteLittleEndian64()
[all …]
/third_party/protobuf/java/core/src/main/java/com/google/protobuf/
DSchemaUtil.java342 size += CodedOutputStream.computeInt64SizeNoTag(primitiveList.getLong(i)); in computeSizeInt64ListNoTag()
346 size += CodedOutputStream.computeInt64SizeNoTag(list.get(i)); in computeSizeInt64ListNoTag()
360 return CodedOutputStream.computeTagSize(fieldNumber) in computeSizeInt64List()
361 + CodedOutputStream.computeLengthDelimitedFieldSize(size); in computeSizeInt64List()
363 return size + (list.size() * CodedOutputStream.computeTagSize(fieldNumber)); in computeSizeInt64List()
378 size += CodedOutputStream.computeUInt64SizeNoTag(primitiveList.getLong(i)); in computeSizeUInt64ListNoTag()
382 size += CodedOutputStream.computeUInt64SizeNoTag(list.get(i)); in computeSizeUInt64ListNoTag()
396 return CodedOutputStream.computeTagSize(fieldNumber) in computeSizeUInt64List()
397 + CodedOutputStream.computeLengthDelimitedFieldSize(size); in computeSizeUInt64List()
399 return size + (length * CodedOutputStream.computeTagSize(fieldNumber)); in computeSizeUInt64List()
[all …]
DFieldSet.java577 public void writeTo(final CodedOutputStream output) throws IOException { in writeTo()
588 public void writeMessageSetTo(final CodedOutputStream output) throws IOException { in writeMessageSetTo()
597 private void writeMessageSetTo(final Map.Entry<T, Object> entry, final CodedOutputStream output) in writeMessageSetTo()
623 final CodedOutputStream output, in writeElement()
647 final CodedOutputStream output, final WireFormat.FieldType type, final Object value) in writeElementNoTag()
722 final FieldDescriptorLite<?> descriptor, final Object value, final CodedOutputStream output) in writeField()
789 return CodedOutputStream.computeLazyFieldMessageSetExtensionSize( in getMessageSetSerializedSize()
792 return CodedOutputStream.computeMessageSetExtensionSize( in getMessageSetSerializedSize()
811 int tagSize = CodedOutputStream.computeTagSize(number); in computeElementSize()
833 return CodedOutputStream.computeDoubleSizeNoTag((Double) value); in computeElementSizeNoTag()
[all …]
DMessageSchema.java1456 size += CodedOutputStream.computeDoubleSize(number, 0); in getSerializedSizeProto2()
1461 size += CodedOutputStream.computeFloatSize(number, 0); in getSerializedSizeProto2()
1466 size += CodedOutputStream.computeInt64Size(number, unsafe.getLong(message, offset)); in getSerializedSizeProto2()
1471 size += CodedOutputStream.computeUInt64Size(number, unsafe.getLong(message, offset)); in getSerializedSizeProto2()
1476 size += CodedOutputStream.computeInt32Size(number, unsafe.getInt(message, offset)); in getSerializedSizeProto2()
1481 size += CodedOutputStream.computeFixed64Size(number, 0); in getSerializedSizeProto2()
1486 size += CodedOutputStream.computeFixed32Size(number, 0); in getSerializedSizeProto2()
1491 size += CodedOutputStream.computeBoolSize(number, true); in getSerializedSizeProto2()
1498 size += CodedOutputStream.computeBytesSize(number, (ByteString) value); in getSerializedSizeProto2()
1500 size += CodedOutputStream.computeStringSize(number, (String) value); in getSerializedSizeProto2()
[all …]
DAbstractMessageLite.java70 final CodedOutputStream output = CodedOutputStream.newInstance(result); in toByteArray()
81 final int bufferSize = CodedOutputStream.computePreferredBufferSize(getSerializedSize()); in writeTo()
82 final CodedOutputStream codedOutput = CodedOutputStream.newInstance(output, bufferSize); in writeTo()
91 CodedOutputStream.computePreferredBufferSize( in writeDelimitedTo()
92 CodedOutputStream.computeRawVarint32Size(serialized) + serialized); in writeDelimitedTo()
93 final CodedOutputStream codedOutput = CodedOutputStream.newInstance(output, bufferSize); in writeDelimitedTo()
/third_party/protobuf/src/google/protobuf/
Dwire_format_lite.h187 io::CodedOutputStream* output);
197 io::CodedOutputStream* output);
307 io::CodedOutputStream* unknown_fields_stream, RepeatedField<int>* values);
350 io::CodedOutputStream* output);
354 int32 value, io::CodedOutputStream* output);
356 int64 value, io::CodedOutputStream* output);
358 uint32 value, io::CodedOutputStream* output);
360 uint64 value, io::CodedOutputStream* output);
362 int32 value, io::CodedOutputStream* output);
364 int64 value, io::CodedOutputStream* output);
[all …]
Dwire_format_lite.cc67 io::CodedOutputStream::StaticVarintSize32<
69 io::CodedOutputStream::StaticVarintSize32<
71 io::CodedOutputStream::StaticVarintSize32<
73 io::CodedOutputStream::StaticVarintSize32<
170 io::CodedOutputStream* output) { in SkipField()
248 io::CodedOutputStream* output) { in SkipMessage()
297 io::CodedOutputStream* unknown_fields_stream, RepeatedField<int>* values) { in ReadPackedEnumPreserveUnknowns()
354 static void WriteArray(const CType* a, int n, io::CodedOutputStream* output) { in WriteArray()
373 io::CodedOutputStream* output) { in WriteFloatArray()
378 io::CodedOutputStream* output) { in WriteDoubleArray()
[all …]
Dgenerated_message_util.cc111 static void Serialize(const void* ptr, io::CodedOutputStream* output) { in Serialize()
122 static void Serialize(const void* ptr, io::CodedOutputStream* output) { in Serialize()
133 static void Serialize(const void* ptr, io::CodedOutputStream* output) { in Serialize()
144 static void Serialize(const void* ptr, io::CodedOutputStream* output) { in Serialize()
154 static void Serialize(const void* ptr, io::CodedOutputStream* output) { in Serialize()
165 static void Serialize(const void* ptr, io::CodedOutputStream* output) { in Serialize()
175 static void Serialize(const void* ptr, io::CodedOutputStream* output) { in Serialize()
186 static void Serialize(const void* ptr, io::CodedOutputStream* output) { in Serialize()
197 static void Serialize(const void* ptr, io::CodedOutputStream* output) { in Serialize()
233 static void Serialize(const void* ptr, io::CodedOutputStream* output) { in Serialize()
[all …]
/third_party/protobuf/csharp/src/Google.Protobuf.Test/
DCodedOutputStreamTest.cs54 CodedOutputStream output = new CodedOutputStream(rawOutput); in AssertWriteVarint()
67 … Assert.AreEqual(data.Length, CodedOutputStream.ComputeRawVarint32Size((uint) value)); in AssertWriteVarint()
73 CodedOutputStream output = new CodedOutputStream(rawOutput); in AssertWriteVarint()
86 Assert.AreEqual(data.Length, CodedOutputStream.ComputeRawVarint64Size(value)); in AssertWriteVarint()
96 CodedOutputStream output = in AssertWriteVarint()
97 new CodedOutputStream(rawOutput, bufferSize); in AssertWriteVarint()
112 CodedOutputStream output = new CodedOutputStream(rawOutput, bufferSize); in AssertWriteVarint()
171 var output = new CodedOutputStream(rawOutput); in AssertWriteLittleEndian32()
187 var output = new CodedOutputStream(rawOutput, bufferSize); in AssertWriteLittleEndian32()
209 var output = new CodedOutputStream(rawOutput); in AssertWriteLittleEndian64()
[all …]
DCodedInputStreamTest.cs371 CodedOutputStream output = new CodedOutputStream(ms); in ReadMaliciouslyLargeBlob()
390 CodedOutputStream output = new CodedOutputStream(ms); in ReadBlobGreaterThanCurrentLimit()
422 CodedOutputStream output = new CodedOutputStream(ms); in ReadStringGreaterThanCurrentLimit()
509 CodedOutputStream output = new CodedOutputStream(ms); in MakeMaliciousRecursionUnknownFieldsPayload()
539 CodedOutputStream output = new CodedOutputStream(ms); in ReadGroup_WrongEndGroupTag()
554 CodedOutputStream output = new CodedOutputStream(ms); in ReadGroup_UnknownFields_WrongEndGroupTag()
583 CodedOutputStream output = new CodedOutputStream(ms); in ReadInvalidUtf8()
603 CodedOutputStream output = new CodedOutputStream(ms); in ReadNegativeSizedStringThrowsInvalidProtocolBufferException()
621 CodedOutputStream output = new CodedOutputStream(ms); in ReadNegativeSizedBytesThrowsInvalidProtocolBufferException()
671 CodedOutputStream output = new CodedOutputStream(ms); in TestSlowPathAvoidance()
[all …]
DLegacyGeneratedCodeTest.cs105 var codedOutput = new CodedOutputStream(ms); in IntermixingOfNewAndLegacyGeneratedCodeWorksWithCodedOutputStream()
167 public void WriteTo(pb::CodedOutputStream output) { in WriteTo()
180 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Bb); in CalculateSize()
234 public void WriteTo(pb::CodedOutputStream output) { in WriteTo()
259 size += 1 + pb::CodedOutputStream.ComputeMessageSize(A); in CalculateSize()
262 size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32); in CalculateSize()
DFieldCodecTest.cs126 var codedOutput = new CodedOutputStream(stream); in TestRoundTripRaw()
148 var codedOutput = new CodedOutputStream(stream); in TestRoundTripWithTag()
161 var codedOutput = new CodedOutputStream(stream); in TestCalculateSizeWithTag()
171 CodedOutputStream codedOutput; in TestDefaultValue()
173 codedOutput = new CodedOutputStream(stream); in TestDefaultValue()
187 codedOutput = new CodedOutputStream(stream); in TestDefaultValue()
/third_party/protobuf/csharp/src/Google.Protobuf/
DUnknownField.cs159 result += CodedOutputStream.ComputeTagSize(fieldNumber) * varintList.Count; in GetSerializedSize()
162 result += CodedOutputStream.ComputeUInt64Size(value); in GetSerializedSize()
167 result += CodedOutputStream.ComputeTagSize(fieldNumber) * fixed32List.Count; in GetSerializedSize()
168 result += CodedOutputStream.ComputeFixed32Size(1) * fixed32List.Count; in GetSerializedSize()
172 result += CodedOutputStream.ComputeTagSize(fieldNumber) * fixed64List.Count; in GetSerializedSize()
173 result += CodedOutputStream.ComputeFixed64Size(1) * fixed64List.Count; in GetSerializedSize()
177 result += CodedOutputStream.ComputeTagSize(fieldNumber) * lengthDelimitedList.Count; in GetSerializedSize()
180 result += CodedOutputStream.ComputeBytesSize(value); in GetSerializedSize()
185 result += CodedOutputStream.ComputeTagSize(fieldNumber) * 2 * groupList.Count; in GetSerializedSize()
DFieldCodec.cs222 …(), (ref WriteContext ctx, string value) => ctx.WriteString(value), CodedOutputStream.ComputeStrin… in ForString()
233 … (ref WriteContext ctx, ByteString value) => ctx.WriteBytes(value), CodedOutputStream.ComputeBytes… in ForBytes()
244 …Bool(), (ref WriteContext ctx, bool value) => ctx.WriteBool(value), CodedOutputStream.BoolSize, ta… in ForBool()
255 …, (ref WriteContext output, int value) => output.WriteInt32(value), CodedOutputStream.ComputeInt32… in ForInt32()
266 … (ref WriteContext output, int value) => output.WriteSInt32(value), CodedOutputStream.ComputeSInt3… in ForSInt32()
299 …(ref WriteContext output, uint value) => output.WriteUInt32(value), CodedOutputStream.ComputeUInt3… in ForUInt32()
310 … (ref WriteContext output, long value) => output.WriteInt64(value), CodedOutputStream.ComputeInt64… in ForInt64()
321 …(ref WriteContext output, long value) => output.WriteSInt64(value), CodedOutputStream.ComputeSInt6… in ForSInt64()
354 …ref WriteContext output, ulong value) => output.WriteUInt64(value), CodedOutputStream.ComputeUInt6… in ForUInt64()
365 …(ref WriteContext output, float value) => output.WriteFloat(value), CodedOutputStream.FloatSize, t… in ForFloat()
[all …]
DWritingPrimitivesMessages.cs89 if (ctx.state.CodedOutputStream == null) in WriteRawMessage()
99 ctx.CopyStateTo(ctx.state.CodedOutputStream); in WriteRawMessage()
103 message.WriteTo(ctx.state.CodedOutputStream); in WriteRawMessage()
107 ctx.LoadStateFrom(ctx.state.CodedOutputStream); in WriteRawMessage()
DWriteBufferHelper.cs48 private CodedOutputStream codedOutputStream;
50 public CodedOutputStream CodedOutputStream => codedOutputStream; field
58 … public static void Initialize(CodedOutputStream codedOutputStream, out WriteBufferHelper instance) in Initialize()
141 throw new CodedOutputStream.OutOfSpaceException(); in RefreshBuffer()
DCodedOutputStream.cs60 public sealed partial class CodedOutputStream : IDisposable class
79 public CodedOutputStream(byte[] flatArray) : this(flatArray, 0, flatArray.Length) in CodedOutputStream() method in Google.Protobuf.CodedOutputStream
88 private CodedOutputStream(byte[] buffer, int offset, int length) in CodedOutputStream() method in Google.Protobuf.CodedOutputStream
98 private CodedOutputStream(Stream output, byte[] buffer, bool leaveOpen) in CodedOutputStream() method in Google.Protobuf.CodedOutputStream
113 public CodedOutputStream(Stream output) : this(output, DefaultBufferSize, false) in CodedOutputStream() method in Google.Protobuf.CodedOutputStream
123 …public CodedOutputStream(Stream output, int bufferSize) : this(output, new byte[bufferSize], false) in CodedOutputStream() method in Google.Protobuf.CodedOutputStream
133 …public CodedOutputStream(Stream output, bool leaveOpen) : this(output, DefaultBufferSize, leaveOpe… in CodedOutputStream() method in Google.Protobuf.CodedOutputStream
145 …public CodedOutputStream(Stream output, int bufferSize, bool leaveOpen) : this(output, new byte[bu… in CodedOutputStream() method in Google.Protobuf.CodedOutputStream
/third_party/protobuf/csharp/src/Google.Protobuf.Benchmarks/
DParseRawPrimitivesBenchmark.cs377 CodedOutputStream cos = new CodedOutputStream(ms); in CreateBufferWithRandomVarints()
395 CodedOutputStream cos = new CodedOutputStream(ms); in CreateBufferWithRandomFloats()
408 CodedOutputStream cos = new CodedOutputStream(ms); in CreateBufferWithRandomDoubles()
477 CodedOutputStream cos = new CodedOutputStream(ms); in CreateBufferWithStrings()
495 while (CodedOutputStream.ComputeStringSize(str) > encodedSize) in CreateStringWithEncodedSize()
500 if (CodedOutputStream.ComputeStringSize(str) != encodedSize) in CreateStringWithEncodedSize()
515 while (CodedOutputStream.ComputeStringSize(str) > encodedSize) in CreateNonAsciiStringWithEncodedSize()
521 while (CodedOutputStream.ComputeStringSize(str) < encodedSize) in CreateNonAsciiStringWithEncodedSize()
529 if (CodedOutputStream.ComputeStringSize(str) != encodedSize) in CreateNonAsciiStringWithEncodedSize()
DBenchmarkMessage1Proto3.cs708 public void WriteTo(pb::CodedOutputStream output) { in WriteTo()
1053 size += 1 + pb::CodedOutputStream.ComputeStringSize(Field1); in CalculateSize()
1056 size += 1 + pb::CodedOutputStream.ComputeStringSize(Field9); in CalculateSize()
1059 size += 2 + pb::CodedOutputStream.ComputeStringSize(Field18); in CalculateSize()
1068 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Field2); in CalculateSize()
1071 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Field3); in CalculateSize()
1074 size += 2 + pb::CodedOutputStream.ComputeInt32Size(Field280); in CalculateSize()
1077 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Field6); in CalculateSize()
1080 size += 2 + pb::CodedOutputStream.ComputeInt64Size(Field22); in CalculateSize()
1083 size += 1 + pb::CodedOutputStream.ComputeStringSize(Field4); in CalculateSize()
[all …]
/third_party/protobuf/src/google/protobuf/util/internal/
Dproto_writer.cc55 using io::CodedOutputStream;
78 stream_(new CodedOutputStream(&adapter_)), in ProtoWriter()
99 stream_(new CodedOutputStream(&adapter_)), in ProtoWriter()
124 CodedOutputStream* stream) { in WriteInt32()
134 CodedOutputStream* stream) { in WriteSFixed32()
144 CodedOutputStream* stream) { in WriteSInt32()
154 CodedOutputStream* stream) { in WriteFixed32()
164 CodedOutputStream* stream) { in WriteUInt32()
174 CodedOutputStream* stream) { in WriteInt64()
184 CodedOutputStream* stream) { in WriteSFixed64()
[all …]
/third_party/protobuf/src/google/protobuf/io/
Dcoded_stream.h166 class CodedOutputStream; variable
970 friend class CodedOutputStream; variable
1046 class PROTOBUF_EXPORT CodedOutputStream {
1049 explicit CodedOutputStream(ZeroCopyOutputStream* stream) in CodedOutputStream() function
1050 : CodedOutputStream(stream, true) {} in CodedOutputStream()
1051 CodedOutputStream(ZeroCopyOutputStream* stream, bool do_eager_refresh);
1055 ~CodedOutputStream();
1263 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CodedOutputStream);
1588 inline uint8* CodedOutputStream::WriteVarint32ToArray(uint32 value, in WriteVarint32ToArray()
1593 inline uint8* CodedOutputStream::WriteVarint64ToArray(uint64 value, in WriteVarint64ToArray()
[all …]
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/Collections/
DRepeatedFieldTest.cs311 var output = new CodedOutputStream(stream); in AddEntriesFrom_PackedInt32()
312 var length = CodedOutputStream.ComputeInt32Size(10) in AddEntriesFrom_PackedInt32()
313 + CodedOutputStream.ComputeInt32Size(999) in AddEntriesFrom_PackedInt32()
314 + CodedOutputStream.ComputeInt32Size(-1000); in AddEntriesFrom_PackedInt32()
339 var output = new CodedOutputStream(stream); in AddEntriesFrom_NonPackedInt32()
365 var output = new CodedOutputStream(stream); in AddEntriesFrom_String()
391 var output = new CodedOutputStream(stream); in AddEntriesFrom_Message()
413 var output = new CodedOutputStream(stream); in WriteTo_PackedInt32()
425 … Assert.AreEqual(1 + CodedOutputStream.ComputeLengthSize(length) + length, stream.Length); in WriteTo_PackedInt32()
434 var output = new CodedOutputStream(stream); in WriteTo_NonPackedInt32()
[all …]

12345678